PM REST Manager

PM REST Manager library follows VES Event Listener 7.1

PM VES Message

Datatype: commonEventHeader

Field

Mandatory

Default value

Configurable

Runtime

Notes

domain

yes

measurement

no

no

none

eventId

yes

none

yes

yes

Unique id generated from combination of multiple fields, selection of fields configurable via mapping config file.

eventName

yes

PM Notification

yes

yes

value configurable via mapping config file.

priority

yes

HIGH

yes

no

value configurable via mapping config file.

reportingEntityName

yes

NF-OAM-ADOPTER

yes

yes

value configurable via mapping config file.

startEpochMicrosec

yes

none

none

yes

System time at the moment of notification generation

lastEpochMicrosec

yes

none

none

yes

System time at the moment of notification generation

sequence

yes

none

no

yes

incremental per line on csv file. Each file will start processing will start from sequence 0.

sourceName

yes

none

yes

yes

value configurable via mapping config file.

version

yes

4.1

no

no

Library only enforces mandatory fields for 4.1 version

vesEventListenerVersion

yes

7.1

no

no

Library only enforces mandatory fields for 7.1 version

eventType

no

none

no

no

none

nfcNamingCode

no

none

no

no

none

nfNamingCode

no

none

no

no

none

nfVendorName

no

SOME-VENDOR

yes

no

value configurable via mapping config file.

reportingEntityId

no

ONAP-NF-OAM-SOME-VENDOR-ADAPTER

yes

no

value configurable via mapping config file.

internalHeader Fields

no

none

no

no

none

sourceId

no

none

none

no

none

timeZoneOffset

no

none

no

no

none

Datatype: measurementFields

Field

Mandatory

Default value

Configurable

Runtime

Notes

additionalFields

no

none

yes

yes

values configurable via mapping config file.

additionalMeasurements

yes

none

yes

yes

values configurable via mapping config file.

measurementInterval

yes

none

yes

no

value configurable via mapping config file.

measurementFieldsVersion

yes

4.0

no

no

none

REST PM Configuration

Rest Adapter configuration

Configuration file application.yml contains global definitions required to be consumed by PM REST adapters services.

  • synchronization-time-start Defines the time for execution of pull of PM files and forwarding as VES Message

  • synchronization-time-frequency Define the frequency to trigger the pull and forward of PM data after first execution.

  • mapping-config-path Defines the path where mapping configuration file is located

Rest SB Client Adapter configuration

  • ran-token-endpoint Defines rand endpoint from where token will be obtained

  • ran-pm-endpoint: Defines rand endpoint from where ZIP with PM files will be GET.

  • ran-time-zone-offset-endpoint Defines rand endpoint from where we GET the timezone from the device.

pm-rest-manager:
  synchronization-time-start: 18:00:00
  synchronization-time-frequency: 60
  mapping-config-path: ${PM_MAPPING_FILE_PATH:mapping-configuration/pm-ves-message-mapping.yaml}
  ran-token-endpoint: /auth/token
  ran-pm-endpoint: /pm/files
  ran-time-zone-offset-endpoint: /system/timeZone

Mapping Configuration

Configuration file pm-ves-message-mapping.yaml contains all definitions required to define the mapping from ZIP file with collection of csv files information to VES Message format

Note

File name can be changed as long it matches with configured mapping-config-path and file is in yaml format

  • reporting-entity-name Reporting entity name assigned to the event

  • reporting-entity-id Reporting entity id assigned to the event

  • nf-vendor-name Vendor name assigned to the event

  • event-source-type Source type assigned to the event

  • event-name Event name assigned to the event

  • measurement-interval Interval over which measurements are being reported in seconds

  • priority Priority assigned to the event

  • CSV
    • source-name Column names containing containing information

    • source-name-regex The regular expression to which source-name string value is to be matched and removed

    • event-id Collection of columns names to generate an uniqueID

    • additional-fields Collection of columns names containing information to be attached

    • additional-measurements-name Name assigned to AdditionalMeasurement array

    • additional-measurements Collection of columns names containing information to be attached

    • batch-size File will be processed and send in small batches event notifications. Size define the number of events which will contain each notification

reporting-entity-name: "NF-OAM-ADOPTER"
reporting-entity-id: "ONAP-NF-OAM-SOME-VENDOR-ADAPTER"
nf-vendor-name: "SOME-VENDOR"
event-source-type: "SNMP Agent"
event-name: "PM_Notification"
measurement-interval: 40
priority: "High"
batch-size: 200
csv:
  source-name: Name
  event-id:
    - PortId
    - Date
    - Time
  additional-fields:
    - PortId
    - Name
    - Date
    - Time
  additional-measurements-name: "Port measurements"
  additional-measurements:
    - A_Parameter
    - B_Parameter
    - C_Parameter
    - D_Parameter
    - E_Parameter

PM Adapter Configuration

PM Adapters can be instantiated at runtime

Create a PM Adapter

POST https://<SERVICE_IP>:<SERVICE_PORT>/adapters/adapter

{
  "host": "170.10.10.2",
  "mechId": {
    "username": "user1",
    "password": "secretPassword"
  }
}

Get PM Adapters

GET https://<SERVICE_IP>:<SERVICE_PORT>/adapters/

[
  "170.10.10.2",
  "170.10.10.3"
]

Delete PM Adapter

DELETE https://<SERVICE_IP>:<SERVICE_PORT>/adapters/adapter/10.53.40.50