summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
index f5ffdbeb92..b78241662e 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
@@ -35,6 +35,7 @@ import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi;
import org.onap.cps.ncmp.rest.model.RestDmiPluginRegistration;
import org.onap.cps.spi.FetchDescendantsOption;
import org.onap.cps.spi.model.DataNode;
+import org.onap.cps.spi.model.ModuleReference;
import org.onap.cps.utils.DataMapUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -220,6 +221,13 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
return new ResponseEntity<>(HttpStatus.CREATED);
}
+ @Override
+ public ResponseEntity<Object> getModuleReferencesByCmHandle(final String cmHandle) {
+ final Collection<ModuleReference>
+ moduleReferences = networkCmProxyDataService.getYangResourcesModuleReferences(cmHandle);
+ return new ResponseEntity<>(new Gson().toJson(moduleReferences), HttpStatus.OK);
+ }
+
private DmiPluginRegistration convertRestObjectToJavaApiObject(
final RestDmiPluginRegistration restDmiPluginRegistration) {
return objectMapper.convertValue(restDmiPluginRegistration, DmiPluginRegistration.class);