Model: cps-ncmp-service/src/main/resources/models/cm-data-subscriptions@2023-11-13.yang

Sample Data:

cmSubscription_sample_data.txt

cmSubscription_sample_data_2.txt



APIDescriptionResult

After onboarding the Subscription model via Application start up


  • Creation of parent node
  • Creation of datastore containers (2)

fragment table:

 
Create a node

Xpath: /datastores

Request body:

 {
    "datastore": [
      {
        "name": "datastore1",
        "cm-handles": {
          "cm-handle": [
            {
              "id": "cm-handle1",
              "filters": {
                "filter": [
                  {
                    "xpath": "x/y",
                    "subscribers": ["sub-1", "sub-2"]
                  },
                  {
                    "xpath": "x2/y2",
                    "subscribers": ["sub-2"]
                  }
                ]
              }
            }
          ]
        }
      }
    ]
}

fragment table:

Create a node

Xpath: /datastores/datastore[@name='datastore1']/cm-handles


Request body:

{
          "cm-handle": [
            {
              "id": "cm-handle2",
              "filters": {
                "filter": [
                  {
                    "xpath": "x2/y2",
                    "subscribers": ["sub-2", "sub-3"]
                  },
                  {
                    "xpath": "x3/y3",
                    "subscribers": ["sub-2"]
                  }
                ]
              }
            }
          ]
}

fragment table:

Query data nodes

CPS-path:

/datastores/datastore[@name='datastore1']

Descendants: -1


[
  {
    "cmds:datastore": {
      "name": "datastore1",
      "cm-handles": {
        "cm-handle": [
          {
            "id": "cm-handle1",
            "filters": {
              "filter": [
                {
                  "xpath": "x/y",
                  "subscribers": [
                    "sub-1",
                    "sub-2"
                  ]
                },
                {
                  "xpath": "x2/y2",
                  "subscribers": [
                    "sub-2",
                    "sub-3"
                  ]
                }
              ]
            }
          },
          {
            "id": "cm-handle2",
            "filters": {
              "filter": [
                {
                  "xpath": "x2/y2",
                  "subscribers": [
                    "sub-2",
                    "sub-3"
                  ]
                },
                {
                  "xpath": "x3/y3",
                  "subscribers": [
                    "sub-2"
                  ]
                }
              ]
            }
          }
        ]
      }
    }
  }
]

  • No labels