
Cisco Evolved Programmable Network Manager API
Evolved Programmable Network Manager API Documentation

# Getting Started with Evolved Programmable Network Manager NBI Notifications

Deprecated

Notifications API has been deprecated. NBI Server-Sent Events resources should be used instead

This section provides an overview of how to get started to consume Evolved Programmable Network Manager NBI notifications and also describes the notification message payload XML structure. In order to consume NBI notifications from Evolved Programmable Network Manager, the following points provide a high level summary of the necessary key steps.

- Implement a valid MessageListener class that implements "javax.jms.MessageListener" and has the necessary business logic to handle notification messages. This entails the creation of a valid onMessage() implementation which is capable of handling messages of type "javax.jms.ObjectMessage" that contain our NBI notification XML message payload, provided as an object of type "java.lang.String".
- To connect to our remote Evolved Programmable Network Manager JMS broker, you need to create a JMS Connection, by providing the appropriate broker URL.
- Using the JMS connection object, you create a JMS MessageConsumer for our Evolved Programmable Network Manager NBI Notification JMS Topic, and register your MessageListener to this consumer, so that it can handle any message that is published by Evolved Programmable Network Manager to that JMS topic.

## Configuration Details and Samples

JMS Connection and Topic Details

Evolved Programmable Network Manager NBI Notifications are published to a JMS Topic with name: "NBI_NOTIFICATIONS". You will have to use this value for the JMS topic name, when creating a consumer that subscribes to the Evolved Programmable Network Manager Notification messages.

The JMS Broker URL to be used to connect with the Evolved Programmable Network Manager JMS broker is as follows: "ssl://<ncs-server-host-ip-address>:<ncs-jms-broker-port>?wireFormat.maxInactivityDuration=0", where <ncs-server-host-ip-address> is the IP address of the Evolved Programmable Network Manager server, and <ncs-jms-broker-port> is the port to which JMS is configured in Evolved Programmable Network Manager. By default, the Evolved Programmable Network Manager installation will have the port specified as 61617. You may have to check with the exact configuration of the corresponding Evolved Programmable Network Manager server from which you are subscribing for NBI notifications.

The client will need an SSL keystore and truststore. The broker's certificate needs to be exported from the broker's keystore and imported to the client's truststore as described here: Using SSL with ActiveMQ

NBI Notification XML Payload Schema and Samples

## Parameters

Attribute | Description
--- | ---
notificationType NBINotificationType | An enumeration type that provides the event type of all messages grouped in this NBI notification message. Allowed values: DEVICE_LIFECYCLE MODULE_LIFECYCLE CONFIG_OPERATION
notifications Set<Notification> | A Set of associated notification objects.
Attribute | Description
--- | ---
id String | A unique notification id.
className String | The internal class name of the object that is modified.
instanceId String | The instance Id of the object being changed.
businessKey String | The business key of the object being changed.
operationType String | The operation type pertaining to this notification message. Possible values: CREATE, DELETE, or UPDATE.
workflowId String | The workflowId for the transaction that changed this object.
modifiedTime String | The time when this change happened in the database.
message String | A message that describes details regarding the notification.
updatedProperties Set<Property> | A set of updated properties that were changed as part of the update operation.
Attribute | Description
--- | ---
name String | The name of the property.
type String | The type of the property.
oldValue String | The old value of the property.
newValue String | The updated new value of the property.
alarmDataProperties Set<AlarmData> | A set of key value pairs with data pertaining to the Alarms notification.
Attribute | Description
--- | ---
key String | The key field of the Alarms data.
value String | The value field of the Alarms data.

The XML schema for the NBI notification XML payload is provided below for reference:

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="alarmData" type="AlarmData"/>
        <xs:element name="nbiNotification" type="NBINotification"/>
        <xs:element name="notification" type="Notification"/>
        <xs:element name="property" type="Property"/>
        <xs:complexType name="NBINotification">
            <xs:sequence>
                <xs:element minOccurs="0" name="notificationType" type="NBINotificationType"/>
                <xs:element minOccurs="0" name="notifications">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element maxOccurs="unbounded" minOccurs="0" ref="notification"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="Notification">
            <xs:sequence>
                <xs:element minOccurs="0" name="id" type="xs:string"/>
                <xs:element minOccurs="0" name="className" type="xs:string"/>
                <xs:element minOccurs="0" name="instanceId" type="xs:string"/>
                <xs:element minOccurs="0" name="businessKey" type="xs:string"/>
                <xs:element minOccurs="0" name="operationType" type="xs:string"/>
                <xs:element minOccurs="0" name="workflowId" type="xs:string"/>
                <xs:element minOccurs="0" name="modifiedTime" type="xs:string"/>
                <xs:element minOccurs="0" name="message" type="xs:string"/>
                <xs:element minOccurs="0" name="updatedProperties">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element maxOccurs="unbounded" minOccurs="0" ref="property"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element minOccurs="0" name="alarmDataProperties">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element maxOccurs="unbounded" minOccurs="0" ref="alarmData"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="Property">
            <xs:sequence>
                <xs:element minOccurs="0" name="name" type="xs:string"/>
                <xs:element minOccurs="0" name="type" type="xs:string"/>
                <xs:element minOccurs="0" name="oldValue" type="xs:string"/>
                <xs:element minOccurs="0" name="newValue" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="AlarmData">
            <xs:sequence>
                <xs:element minOccurs="0" name="key" type="xs:string"/>
                <xs:element minOccurs="0" name="value" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
        <xs:simpleType name="NBINotificationType">
            <xs:restriction base="xs:string">
                <xs:enumeration value="DEVICE_LIFECYCLE"/>
                <xs:enumeration value="MODULE_LIFECYCLE"/>
                <xs:enumeration value="CONFIG_OPERATION"/>
                <xs:enumeration value="CREDENTIALS"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:schema>

Three sample XML NBI Notification message payloads are provided here for reference:

    <nbiNotification>
        <notificationType>DEVICE_LIFECYCLE</notificationType>
        <notifications>
            <notification>
                <id>6632</id>
                <className>com.cisco.xmp.model.foundation.resourceManager.ManagementAccessInformation</className>
                <instanceId>128132</instanceId>
                <operationType>DELETE</operationType>
                <workflowId>835</workflowId>
                <modifiedTime>2012-04-02 14:29:12.11</modifiedTime>
                <message>DEVICE_LIFECYCLE Notification: DELETE of DEVICE: 128132</message>
            </notification>
            <notification>
                <id>6633</id>
                <className>com.cisco.xmp.model.foundation.resourceManager.ManagementAccessInformation</className>
                <instanceId>137138</instanceId>
                <operationType>CREATE</operationType>
                <workflowId>843</workflowId>
                <modifiedTime>2012-04-02 14:29:15.089</modifiedTime>
                <message>DEVICE_LIFECYCLE Notification: CREATE of DEVICE: 137138</message>
            </notification>
            <notification>
                <id>6640</id>
                <className>com.cisco.xmp.model.foundation.resourceManager.ManagementAccessInformation</className>
                <instanceId>137139</instanceId>
                <operationType>CREATE</operationType>
                <workflowId>860</workflowId>
                <modifiedTime>2012-04-02 14:29:21.33</modifiedTime>
                <message>DEVICE_LIFECYCLE Notification: CREATE of DEVICE: 137139</message>
            </notification>
        </notifications>
    </nbiNotification>

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <nbiNotification>
        <notificationType>CONFIG_OPERATION</notificationType>
        <notifications>
            <notification>
                <id>21462</id>
                <className>com.cisco.xmp.model.foundation.resourceManager.ManagementAccessInformation</className>
                <instanceId>210210</instanceId>
                <operationType>UPDATE</operationType>
                <workflowId>852</workflowId>
                <modifiedTime>2012-04-11 11:22:35.05</modifiedTime>
                <message>CONFIG_OPERATION Notification: UPDATE of com.cisco.xmp.model.foundation.resourceManager.ManagementAccessInformation: 210210</message>
                <updatedProperties>
                    <property>
                        <name>entityId</name>
                        <type>string</type>
                        <oldValue></oldValue>
                        <newValue>210210</newValue>
                    </property>
                </updatedProperties>
            </notification>
        </notifications>
    </nbiNotification>

- Home
- Getting Started with Evolved Programmable Network Manager NBI Notifications
- NBI Notifications