diff options
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java | 11 |
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); |