Versions Compared

Key

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

Table of Contents

...

The cps-ri/src/main/resources/changelog/changelog-master.yaml will also include the following at the end of the file

  • - include:
    file: changelog/db/changes/10-add-column-to-yang-resources-table.yaml

...

Finally, we need  to add a method to cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java to retrieve all modules and version known by CPS.

Code Block
languagejava
themeMidnight
titleMethod added to CpsModuleService.java
    /**
     * Retrieve all modules and revisions known by CPS
     * @return a list of ModuleReferences
     */
    List<ModuleReferences> getAllYangResources();

For this we will use an existing model called ModuleReference in the cps-service/src/main/java/org/onap/cps/spi/model/ModuleReference.java

Another method getAllYangResources will also need to be added in the cps-service/src/main/java/org/onap/cps/spi/CpsModulePersistenceService.java

Code Block
languagejava
themeMidnight
titleMethod added to CpsModulePersistenceService.java
    /**
     * Returns all YANG resources
     *
     * @return List of ModuleReferences
     */
    List<ModuleReferences> getAllYangResources();