summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main
diff options
context:
space:
mode:
authorJosephKeenan <joseph.keenan@est.tech>2021-08-20 10:33:54 +0100
committerJosephKeenan <joseph.keenan@est.tech>2021-08-30 17:38:03 +0100
commit0af60de4fbb3a3e6c828e179c667b173b1539b62 (patch)
tree0694c43ec6f905e250fd74be87c3b6627bbdbf44 /cps-service/src/main
parent7edbeb6d5853206cc1d3b4cadd7ba50e96f4f04d (diff)
CPS-505 Retrieving modules for new CM handle
-Added some production code for getting missing modules for new CM handle -Groovy test template added by Toine for getting msissing modules -Added json example for test -Modified test to check map contents -Differentiated restTemplate calls based on URL -Fixed code review comment`s -Groovy test now passing -Modified behaviour for sending moduleReferences and added null to namespace (jira to follow) -Combined NetworkCmProxyDataServiceImpl tests into one class & addressed code review comments Issue-ID: CPS-505 Change-Id: I91ef65467496caea7834ba2e8af99cfe58d4f880 Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Diffstat (limited to 'cps-service/src/main')
-rw-r--r--cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java5
-rw-r--r--cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java4
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/model/ModuleReference.java1
3 files changed, 6 insertions, 4 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java b/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java
index d174085263..5c40331d74 100644
--- a/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java
+++ b/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java
@@ -51,11 +51,12 @@ public interface CpsModuleService {
* @param dataspaceName Dataspace name
* @param schemaSetName schema set name
* @param newYangResourcesModuleNameToContentMap YANG resources map where key is a module name and value is content
- * @param moduleReferenceList List of YANG resources module references
+ * @param existingModuleReferences List of YANG resources module references of the modules
+ * needed for this handle that are already in CPS
*/
void createSchemaSetFromModules(@NonNull String dataspaceName, @NonNull String schemaSetName,
@NonNull Map<String, String> newYangResourcesModuleNameToContentMap,
- @NonNull List<ModuleReference> moduleReferenceList);
+ @NonNull List<ModuleReference> existingModuleReferences);
/**
* Read schema set in the given dataspace.
diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java
index c65f827816..0597d380a5 100644
--- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java
+++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java
@@ -53,9 +53,9 @@ public class CpsModuleServiceImpl implements CpsModuleService {
@Override
public void createSchemaSetFromModules(final String dataspaceName, final String schemaSetName,
final Map<String, String> newYangResourcesModuleNameToContentMap,
- final List<ModuleReference> moduleReferenceList) {
+ final List<ModuleReference> existingModuleReferences) {
cpsModulePersistenceService.storeSchemaSetFromModules(dataspaceName, schemaSetName,
- newYangResourcesModuleNameToContentMap, moduleReferenceList);
+ newYangResourcesModuleNameToContentMap, existingModuleReferences);
}
diff --git a/cps-service/src/main/java/org/onap/cps/spi/model/ModuleReference.java b/cps-service/src/main/java/org/onap/cps/spi/model/ModuleReference.java
index 6aa68cf9e2..f9aa2b5904 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/model/ModuleReference.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/model/ModuleReference.java
@@ -38,4 +38,5 @@ public class ModuleReference implements Serializable {
private String name;
private String namespace;
private String revision;
+
}