/
NodeString Format

NodeString Format

Introduction

DirectedGraphs are not executing over the java generated objects produced by YangTools. Directed graphs execute over a Properties object.

When the data has been converted into the Properties object it can be said it is in the node strings format. To work on directed graphs the node string format must be understood.

Yang Models

Mdsal projects start with a yang model. It is the yang model that determines the structure of the rpc, config tree and operational tree. The model will also in turn determine the node strings format.

Overview

Properties are nothing more then key value pairs all of the type string.

These properties can come from 3 places:

  1. RPC input

  2. Configuration tree in Mdsal

  3. Operational tree in Mdsal

Detailed Example

The client invokes an RPC http://localhost:8181/restconf/operations/L3AVPN-PORT-API:service-configuration-notification using this XML body

<input xmlns="com:att:sdnctl:l3avpnport:v1"> <svc-request-id>TEST7</svc-request-id> <response-code>0</response-code> <response-message>Plc Activation Failed: Device gblond2005me6 Sync-from Failed. Please check device IP address and NCS setup.</response-message> <ack-final-indicator>Y</ack-final-indicator> <service-information> <service-type>AVPN</service-type> <service-instance-id>TEST7</service-instance-id> </service-information> </input>

Before the client sends this request there is already data in operational GET http://localhost:8181/restconf/operational/L3AVPN-PORT-API:services/service-list/TEST7/

{ "service-list": [ { "service-instance-id": "TEST7", "service-data": { "service-information": { "service-type": "AVPN", "service-instance-id": "ICORESITE-2751508" }, "oper-status": { "order-status": "Completed" }, "sdnc-request-header": { "svc-notification-url": "https://tst10-lpp.oss.att.com/lppbck-service/rest/ext/vpe/notification", "svc-action": "activateport", "svc-request-id": "ICORESITE-2751508" }, "request-information": { "request-id": "ICORESITE-2751508", "source": "SDNC", "notification-url": "https://tst10-lpp.oss.att.com/lppbck-service/rest/ext/vpe/notification", "request-action": "ChangeLayer3ServiceActivateRequest", "configuration-action": "Layer3ServiceActivateRequest" }, "avpn-ip-port-information": { "avpn-access-information": { "vlan-tag-control": "1Q", "access-speed-units": "Kbps", "managed-ce": "N", "access-speed": "10000", "l1-customer-handoff": "1000BASELX", "access-circuit-id": "DHEC.54831.170.ATI", "access-interface": "1G" }, "endpoint-information": { "interface-string": "ae0", "vpe-name": "gblond2005me6", "bundle-id": 33 }, "port-level-cos": { "shaping": { "pe-egress-per-class-shaping-codes": { "cos3-shaping-code": "W", "cos2v-shaping-code": "P", "cos2-shaping-code": "W" }, "pe-egress-per-class-shaping-behaviors": { "cos3-shaping": "Disable", "cos2v-shaping": "Enable", "cos2-shaping": "Disable" } }, "avpn-bundle-speed": "10000", "avpn-bundle-speed-units": "Kbps", "cos-model": "6COS", "cos-package": "MultimediaHigh", "queueing": { "pe-egress-class-queueing-policing-codes": { "cos2v-queueing-code": "P", "cos2-queueing-code": "W", "cos3-queueing-code": "W" }, "pe-per-class-queueing-behaviors": { "cos3-queueing": "WRED", "cos2-queueing": "WRED", "cos2v-queueing": "QueueLimit" } }, "ingress-profile": { "v6-policy-name-in": "classifier6_port_80:2D:10M:5M:3:0_iset33_in", "cos-profile-id": 3826, "pe-ingress-cos-profile": { "cos2v-percent": "10", "cos2-percent": "50", "cos5-percent": "0", "cos4-percent": "15", "cos3-percent": "25", "cos1-percent": "80" }, "cos-model": "6COS" }, "egress-profile": { "v6-policy-name-out": "classifier6_port_80:2P:10W:5W:3:0N_iset33_out", "cos-profile-id": 3826, "pe-egress-cos-profile": { "cos2v-percent": "10", "cos2-percent": "50", "cos5-percent": "0", "cos4-percent": "15", "cos3-percent": "25", "cos1-percent": "80" }, "cos-model": "6COS" }, "policing": { "pe-per-class-policing-behaviors": { "cos2-policing": "Remark", "cos3-policing": "Remark", "cos2v-policing": "Drop" }, "pe-per-class-policing-codes": { "cos3-policing-code": "M", "cos2-policing-code": "M", "cos2v-policing-code": "D" } } }, "contracted-port-speed": "10000", "contracted-port-speed-units": "Kbps", "port-level-cos-flag": "Y", "clli": "LONDENEH", "port-id": "ICORESITE-2751508" } }, "service-status": { "rpc-name": "service-configuration-notification", "request-status": "notifycomplete", "final-indicator": "Y", "rpc-action": "activateport", "response-timestamp": "2017-02-27T15:23:35.234Z", "l3sdn-action": "Layer3ServiceActivateRequest" } } ] }

There is also data in config GET http://localhost:8181/restconf/config/L3AVPN-PORT-API:services/service-list/TEST7/

{ "service-list": [ { "service-instance-id": "TEST7", "service-data": { "service-information": { "service-type": "AVPN", "service-instance-id": "ICORESITE-2751508" }, "oper-status": { "order-status": "Completed" }, "sdnc-request-header": { "svc-notification-url": "https://tst10-lpp.oss.att.com/lppbck-service/rest/ext/vpe/notification", "svc-action": "activateport", "svc-request-id": "ICORESITE-2751508" }, "request-information": { "request-id": "ICORESITE-2751508", "source": "SDNC", "notification-url": "https://tst10-lpp.oss.att.com/lppbck-service/rest/ext/vpe/notification", "request-action": "ChangeLayer3ServiceActivateRequest", "configuration-action": "Layer3ServiceActivateRequest" }, "avpn-ip-port-information": { "avpn-access-information": { "vlan-tag-control": "1Q", "access-speed-units": "Kbps", "managed-ce": "N", "access-speed": "10000", "l1-customer-handoff": "1000BASELX", "access-circuit-id": "DHEC.54831.170.ATI", "access-interface": "1G" }, "endpoint-information": { "interface-string": "ae0", "vpe-name": "gblondxxxxxxx", "bundle-id": 33 }, "port-level-cos": { "shaping": { "pe-egress-per-class-shaping-codes": { "cos3-shaping-code": "W", "cos2v-shaping-code": "P", "cos2-shaping-code": "W" }, "pe-egress-per-class-shaping-behaviors": { "cos3-shaping": "Disable", "cos2v-shaping": "Enable", "cos2-shaping": "Disable" } }, "avpn-bundle-speed": "10000", "avpn-bundle-speed-units": "Kbps", "cos-model": "6COS", "cos-package": "MultimediaHigh", "queueing": { "pe-egress-class-queueing-policing-codes": { "cos2v-queueing-code": "P", "cos2-queueing-code": "W", "cos3-queueing-code": "W" }, "pe-per-class-queueing-behaviors": { "cos3-queueing": "WRED", "cos2-queueing": "WRED", "cos2v-queueing": "QueueLimit" } }, "ingress-profile": { "v6-policy-name-in": "classifier6_port_80:2D:10M:5M:3:0_iset33_in", "cos-profile-id": 3826, "pe-ingress-cos-profile": { "cos2v-percent": "10", "cos2-percent": "50", "cos5-percent": "0", "cos4-percent": "15", "cos3-percent": "25", "cos1-percent": "80" }, "cos-model": "6COS" }, "egress-profile": { "v6-policy-name-out": "classifier6_port_80:2P:10W:5W:3:0N_iset33_out", "cos-profile-id": 3826, "pe-egress-cos-profile": { "cos2v-percent": "10", "cos2-percent": "50", "cos5-percent": "0", "cos4-percent": "15", "cos3-percent": "25", "cos1-percent": "80" }, "cos-model": "6COS" }, "policing": { "pe-per-class-policing-behaviors": { "cos2-policing": "Remark", "cos3-policing": "Remark", "cos2v-policing": "Drop" }, "pe-per-class-policing-codes": { "cos3-policing-code": "M", "cos2-policing-code": "M", "cos2v-policing-code": "D" } } }, "contracted-port-speed": "10000", "contracted-port-speed-units": "Kbps", "port-level-cos-flag": "Y", "clli": "LONDENEH", "port-id": "ICORESITE-2751508" } }, "service-status": { "rpc-name": "service-configuration-notification", "request-status": "notifycomplete", "final-indicator": "Y", "rpc-action": "activateport", "response-timestamp": "2017-03-15T14:51:49.035Z", "l3sdn-action": "Layer3ServiceActivateRequest" } } ] }

The provider code will load all 3 data sources into the properties object and pass this to the directed graph. This hashmap has been dumped so it can easily be read here

You should notice 3 things:

  1. The data from the operational tree is prefixed with operational-data

  2. The data from config is prefixed with service-data

  3. The data on the RPC input is prefixed with service-configuration-notification-input (the name of the RPC with input appended to the end)

Handling Lists

XML and JSON provide the support for lists. In the nodestring format these will be more like an array. Below is a snippet from the configuration tree

We can see this is a list of vnf-information. In the node string format it will appear as it is below.