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

Get module names and revision for a given cm handle and dataspace

XMLWordPrintable

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

      Get the model set for the given CMHandle
      Preliminary code already created here: https://gerrit.onap.org/r/c/cps/+/122877

      Implementation

      • Convert this to json and put it in the response and return it to the client
      • New join query to extract only the yang modules that match the cm handles
      • Return a json array containing the module_Name, revision, and namespace
      • Create a new object ModuleNameRevision that contains moduleName and revision

      A/C

      1. Implement a GET request to the given URI
          {ncmp-root}/ncmp/v1/ch/<cmHandle>/modules 

        in yaml and define the output structure

      2. Overload the method getAllYangResourcesModuleReferences in cps java API CpsModuleServiceImpl to fetch a set of modules that will contain name, revision for a given cm-handle.
      3. For an example of the response see https://wiki.onap.org/display/DW/CPS-391Spike%3A+Define+and+Agree+NCMP+REST+Interface (no.3)
      4. if the anchor exists by there is no schema set associated with it then we will return an empty array
      5. If you provide an anchor that doesn't exist that an exception will be thrown
      6. a 404 response will be returned when a module is not found
      7. See an example of response below
      8. Agree on the format with stakeholders

      Response

        [
              {
                  "moduleName": "nc-notifications",
                  "revision": "2008-07-14",
              },
              {
                  "moduleName": "ietf-tls-server",
                  "revision": "2016-11-02",
              },
              {
                  "moduleName": "ietf-ssh-server",
                  "revision": "2016-11-02",
              }
          ]
      

      Out of scope

      • no equvialant method on cps-core API

       

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

              Created:
              Updated:
              Resolved: