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

...

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

For this we need to create a new will use an existing model called YangResource ModuleReference in the cps-service/src/main/java/org/onap/cps/spi/model/YangResourceModuleReference.java. This model will have the following attributes.

...

...

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 all YANG resources in the databaseModuleReferences
      */
    List<YangResource>List<ModuleReferences> getAllYangResources();