aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
authorSourabh Sourabh <sourabh.sourabh@est.tech>2022-09-01 14:40:03 +0000
committerGerrit Code Review <gerrit@onap.org>2022-09-01 14:40:03 +0000
commit33236ba508ca3536dbacce944b19f880aa6ff944 (patch)
tree527fdbe2ada77f91b147469adeea165710ce7d17 /cps-ncmp-rest/src/main
parent673a8578e6c381589e137c92415644722b5ca354 (diff)
parentd340047f82a8301453fc3872e474090366b68472 (diff)
Merge "Get all cm handles by DMI plugin Identifier"
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
index 105a6a559c..0c428e4423 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
@@ -22,6 +22,7 @@
package org.onap.cps.ncmp.rest.controller;
import java.util.List;
+import java.util.Set;
import java.util.stream.Collectors;
import javax.validation.Valid;
import lombok.RequiredArgsConstructor;
@@ -47,6 +48,19 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor
private final NcmpRestInputMapper ncmpRestInputMapper;
/**
+ * Get all cm-handle IDs under a registered DMI plugin.
+ *
+ * @param dmiPluginIdentifier DMI plugin identifier
+ * @return list of cm handle IDs
+ */
+ @Override
+ public ResponseEntity<List<String>> getAllCmHandleIdsForRegisteredDmi(final String dmiPluginIdentifier) {
+ final Set<String> cmHandleIds =
+ networkCmProxyDataService.getAllCmHandleIdsByDmiPluginIdentifier(dmiPluginIdentifier);
+ return ResponseEntity.ok(List.copyOf(cmHandleIds));
+ }
+
+ /**
* Update DMI Plugin Registration (used for first registration also).
*
* @param restDmiPluginRegistration the registration data
@@ -69,7 +83,6 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor
return dmiPluginRegistrationErrorResponse.getFailedCreatedCmHandles().isEmpty()
&& dmiPluginRegistrationErrorResponse.getFailedUpdatedCmHandles().isEmpty()
&& dmiPluginRegistrationErrorResponse.getFailedRemovedCmHandles().isEmpty();
-
}
private DmiPluginRegistrationErrorResponse getFailureRegistrationResponse(
@@ -103,5 +116,3 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor
}
}
-
-