CPS-1064 Support retrieval of YANG module sources for CM handle on the NCMP interface
Implementation Proposal
cps-ncmp-rest
open API
Agreed endpoint → /v1/ch/{cm-handle}/modules/definitions/
Method reference
fetchModuleDefinitionsByCmHandle
fetchYangResourcesByCmHandle
Response Schema
'RestModuleDefinition'
'YangResourceDefinition'
RestModuleDefinition:
type: object
title: Yang
properties:
moduleName:
type: string
example: my-module-name
revision:
type: string
example: my-module-revision
content:
type: string
example:
rest controller
Operation id
ResponseEntity<List<?>> getYangResourcesByCmHandle(String cmhandle)
ResponseEntity<List<?>> getModuleDefinitionsByCmHandle(String cmhandle)
Return type
cps-ncmp-service — cpsModuleService
NetworkCmProxyDataService
NetworkCmProxyDataServiceImpl
CpsModuleServiceImpl
Method
**existing → Collection<ModuleReference> getYangResourcesModuleReferences(final String cmHandleId)
getYangResourcesDefinition
Response type
**existing → ModuleReference [moduleName, revision, namespace]
Extend module reference
Create new class
YangResourceDefinition
ModuleDefinition
cps-ri
CpsModulePersistenceServiceImpl
YangResourceRepository