Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 anode

Xpath: /datastores

Request body:

Code Block
linenumberstrue
collapsetrue
 {
    "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:

Code Block
linenumberstrue
collapsetrue
{
          "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



Code Block
linenumberstrue
collapsetrue
[
  {
    "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"
                  ]
                }
              ]
            }
          }
        ]
      }
    }
  }
]


...