Versions Compared

Key

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

Comparison of current CPS core output to NCMP passthrough operation output

The following details were used to compare and analyze the current CPS core output to NCMP passthrough operation output

Model

 bookstore.yang
Databookstore.json
CPS core endpoint/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node
NCMP Passthrough operation/v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running


Scenario 1: XPath is pointing to root i.e. '/'

NCMP Passthrough operation outputCPS Core output
Response




Code Block
collapsetrue
{
  "bookstore": {
    "bookstore-name": "Chapters",
    "categories": [
      {
        "code": "01",
        "name": "SciFi",
        "books": [
          {
            "lang": "en",
            "price": 895,
            "title": "Feersum Endjinn",
            "authors": [
              "Iain M. Banks"
            ],
            "pub_year": 1994
          },
          {
            "lang": "en",
            "price": 1099,
            "title": "Far Horizons",
            "authors": [
              "david Brin",
              "Ursula K. Le Guin",
              "Rober Silverberg",
              "Orson Scott Card",
              "Greg Bear",
              "Joe Haldeman",
              "Dan Simmons"
            ],
            "pub_year": 1999
          }
        ]
      },
      {
        "code": "02",
        "name": "kids",
        "books": [
          {
            "lang": "en",
            "price": 699,
            "title": "The Golden Compass",
            "authors": [
              "Philip Pullman"
            ],
            "pub_year": 1995
          }
        ]
      }
    ]
  }
}


Scenario 2: Container XPath i.e '/bookstore'

NCMP Passthrough operation outputCPS Core output
Response


Code Block
collapsetrue



Code Block
collapsetrue
{
  "bookstore": {
    "bookstore-name": "Chapters",
    "categories": [
      {
        "code": "01",
        "name": "SciFi",
        "books": [
          {
            "lang": "en",
            "price": 1099,
            "title": "Far Horizons",
            "authors": [
              "david Brin",
              "Ursula K. Le Guin",
              "Rober Silverberg",
              "Orson Scott Card",
              "Greg Bear",
              "Joe Haldeman",
              "Dan Simmons"
            ],
            "pub_year": 1999
          },
          {
            "lang": "en",
            "price": 895,
            "title": "Feersum Endjinn",
            "authors": [
              "Iain M. Banks"
            ],
            "pub_year": 1994
          }
        ]
      },
      {
        "code": "02",
        "name": "kids",
        "books": [
          {
            "lang": "en",
            "price": 699,
            "title": "The Golden Compass",
            "authors": [
              "Philip Pullman"
            ],
            "pub_year": 1995
          }
        ]
      }
    ]
  }
}


Scenario 3: List attributes XPath

'/bookstore/categories[@code='02']'

'/ncmp/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=02'


NCMP Passthrough outputCPS Core output
Response


Code Block
collapsetrue
{
    "stores:categories": [
        {
            "code": "02",
            "books": [
                {
                    "title": "A Horror book",
                    "price": "2000",
                    "pub_year": 2003,
                    "lang": "English",
                    "authors": [
                        "Joe & Rahul"
                    ]
                },
                {
                    "title": "A New book in existing category",
                    "price": "2000",
                    "pub_year": 2003,
                    "lang": "English",
                    "authors": [
                        "Joe & Rahul"
                    ]
                }
            ],
            "name": "Horror"
        }
    ]
}



Code Block
collapsetrue
{
  "categories": {
    "code": "02",
    "name": "kids",
    "books": [
      {
        "lang": "en",
        "price": 699,
        "title": "The Golden Compass",
        "authors": [
          "Philip Pullman"
        ],
        "pub_year": 1995
      }
    ]
  }
}



Modifying CPS Core output

Parsing a model prefix

Building the data node



Open Issues

IssueDescriptionResolution
Child is in a different module

If the child is in a different module should it have a prefix


Output starts with non-root element

If the output starts with non-root element should it have a prefix


Backward incompatibility

Discuss backward incompatibility with stakeholders

    1. WiPro (E2E Slicing)
    2. Ericsson
    3. Bell (Bruno has confirmed that they are not impacted ?)

Can YangTools parse it?

  • if YangTools can parse it then this is not incompatible

Is this LEGAL YANG dataCan YangTools parse it?