Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-394

Spike: Model Retrieval from Honeycomb Simulator

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Medium Medium
    • Istanbul Release
    • None
    • NCMP

      Is supported by RestConf/NetConf operations

      tragait has done some work on this already on Netopeer 2

       https://jira.onap.org/browse/INT-1904 has details for this already.

      This is also supported by Honeycomb simulator as illustrated in https://wiki.onap.org/pages/viewpage.action?pageId=103420769 

      A/C

      • Create Wiki containing details on
        • how to retrieve list of modules
        • how to retrieve yang-source for 1 or more module-refs 
          • bulk option possible ?
      • Share findings with team

       

      ===============================================================================================================================================

       

      Investigation done is given below:

      In this honeycomb simulator image from wiki page here and sdnc image /onap/so/sdnc-adapter:1.8.1 is used for investigation.

      Attached Yang model is imported in to honeycomb-sim and its been accessed using below given requests.

      SSH connection is made to access yang model and data b/w sdnc/odl and neconf sim.

      rest request to fetch all schemas -> name , revision, format:

      http://localhost:8282/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/honeycomb/yang-ext:mount/ietf-netconf-monitoring:netconf-state/schemas
      
      { "schemas": { "schema": [ { "identifier": "nc-notifications", "version": "2008-07-14", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:netmod:notification", "location": [ "NETCONF" ] }, { "identifier": "ietf-yang-library", "version": "2016-06-21", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-library", "location": [ "NETCONF" ] }, { "identifier": "ietf-netconf-notifications", "version": "2012-02-06", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications", "location": [ "NETCONF" ] }, { "identifier": "network-topology", "version": "2013-10-21", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:TBD:params:xml:ns:yang:network-topology", "location": [ "NETCONF" ] }, { "identifier": "ietf-restconf-monitoring", "version": "2017-01-26", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring", "location": [ "NETCONF" ] }, { "identifier": "yang-ext", "version": "2013-07-09", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:opendaylight:yang:extension:yang-ext", "location": [ "NETCONF" ] }, { "identifier": "ietf-netconf-monitoring-extension", "version": "2013-12-10", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring-extension", "location": [ "NETCONF" ] }, { "identifier": "notifications", "version": "2008-07-14", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:netconf:notification:1.0", "location": [ "NETCONF" ] }, { "identifier": "ietf-netconf", "version": "2011-06-01", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:netconf:base:1.0", "location": [ "NETCONF" ] }, { "identifier": "gnodeb", "version": "2019-12-03", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:gnodeb:test", "location": [ "NETCONF" ] }, { "identifier": "ietf-netconf-monitoring", "version": "2010-10-04", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring", "location": [ "NETCONF" ] }, { "identifier": "ietf-interfaces", "version": "2014-05-08", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces", "location": [ "NETCONF" ] }, { "identifier": "iana-if-type", "version": "2014-05-08", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:iana-if-type", "location": [ "NETCONF" ] }, { "identifier": "ran-network", "version": "2020-08-06", "format": "ietf-netconf-monitoring:yang", "namespace": "org:onap:ccsdk:features:sdnr:northbound:ran-network", "location": [ "NETCONF" ] }, { "identifier": "ietf-yang-types", "version": "2013-07-15", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-yang-types", "location": [ "NETCONF" ] }, { "identifier": "ietf-inet-types", "version": "2013-07-15", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "location": [ "NETCONF" ] }, { "identifier": "odl-general-entity", "version": "2015-09-30", "format": "ietf-netconf-monitoring:yang", "namespace": "urn:opendaylight:params:xml:ns:yang:mdsal:core:general-entity", "location": [ "NETCONF" ] } ] } }
      
      http://localhost:8282/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/honeycomb/yang-ext:mount/ietf-netconf-monitoring:netconf-state/schemas/schema/gnodeb/2019-12-03/ietf-netconf-monitoring:yang

      Rest request to fetch yang schema content using odl:

      curl --location --request POST 'http://localhost:8282/restconf/operations/network-topology:network-topology/topology/topology-netconf/node/honeycomb/yang-ext:mount/ietf-netconf-monitoring:get-schema' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \ --header 'Cookie: JSESSIONID=node0b90wyt06ujdf1qpj0gowb7bq8132.node0' \ --data-raw '{ "ietf-netconf-monitoring:input":{ "identifier": "gnodeb" }}'

      Response:

      {
        "output": {
          "data": "module gnodeb {\n    yang-version 1.1;\n    namespace \"urn:gnodeb:test\";\n \n    prefix gnb;\n \n    description\n      \"Yang model for gnodeb\";\n    revision \"2019-12-03\" {\n        description\n          \"initial version\";\n    }\n \n    container cells {\n        list cellinfolist {\n            key cell-id;\n            leaf cell-id {\n                type uint16;\n            }\n            leaf cell-uuid {\n                type uint32;\n            }\n            leaf cell-description {\n                type string;\n                description\n                  \"Possible name or description\";\n            }\n             \n            leaf connected-users {\n                type uint32;\n                config false;\n                default 10;\n            }\n        }\n         \n        container antenna {\n            leaf a-id {\n                type uint16;\n            }\n             \n            leaf antenna-description {\n                type string;\n            }  \n        }\n         \n        container measurements {\n            config false;\n            leaf speed {\n                type uint16;\n                default 20;\n            }             \n        }\n         \n         \n    }\n}"
        }
      }

       

            niamhcore niamhcore
            ToineSiebelink Toine Siebelink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: