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 | ||||||
---|---|---|---|---|---|---|
| ||||||
/**
* 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 | ||||||
---|---|---|---|---|---|---|
| ||||||
/**
* Returns all YANG resources
*
* @return List of ModuleReferences
*/
List<ModuleReferences> getAllYangResources(); |