summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaopeng zhang <zhang.maopeng1@zte.com.cn>2018-10-17 01:57:01 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-17 01:57:01 +0000
commita78f9553c7063469b24180231d5e391946226b0a (patch)
tree42a1a098826ec972a9372a929f67f555ee3382bb
parent86002f02caa08de6cb1d0c974f28d586a4af0001 (diff)
parent0ed42c9444c93af51f06a22ee077e38a1264551b (diff)
Merge "Prepare resources for service uuid req"
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
index 5cd2559ef2..eaf3e125a1 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
@@ -340,14 +340,21 @@ public class CatalogDbAdapterRest {
uuid = modelUUID;
logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelUuid serviceModelUuid: {}" , uuid);
Service serv =serviceRepo.findOneByModelUUID(uuid);
- ret.setService(serv);
+
+ if (serv != null) {
+ ret.setNetworkResourceCustomizations(new ArrayList(serv.getNetworkCustomizations()));
+ ret.setVnfResourceCustomizations(new ArrayList(serv.getVnfCustomizations()));
+ ret.setAllottedResourceCustomizations(new ArrayList(serv.getAllottedCustomizations()));
+ }
+ ret.setService(serv);
}
else if (modelInvariantUUID != null && !"".equals(modelInvariantUUID)) {
uuid = modelInvariantUUID;
if (modelVersion != null && !"".equals(modelVersion)) {
logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelInvariantUuid serviceModelInvariantUuid: {} serviceModelVersion: {}",uuid, modelVersion);
Service serv = serviceRepo.findFirstByModelVersionAndModelInvariantUUID(modelVersion, uuid);
- ret.setService(serv);
+
+ ret.setService(serv);
}
else {
logger.debug ("Query serviceMacroHolder getAllResourcesByServiceModelInvariantUuid serviceModelUuid: {}" , uuid);