aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2018-04-24 16:08:16 +0200
committerromaingimbert <romain.gimbert@orange.com>2018-04-24 16:08:16 +0200
commited3d183036a0295a6b5ae9357eead53e16765106 (patch)
tree3a0ddca6f289c9a26cfa4e8668bb8dbd763ba804
parente71a543f91d6b612be63c181cefcd1655e0b3b0e (diff)
modelCustomizationName from SDC
- modelCustomizationName set from resourceInstanceName - add test case Change-Id: I5bd870343a5b87464bd06267b38300b51b568154 Issue-ID: EXTAPI-56 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
-rw-r--r--src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java1
-rw-r--r--src/main/resources/jolt/getServiceCatalog.json1
-rw-r--r--src/test/java/org/onap/nbi/apis/assertions/ServiceCatalogAssertions.java1
3 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java b/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
index e3dbbd7..34aed18 100644
--- a/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
+++ b/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
@@ -77,7 +77,6 @@ public class ToscaInfosProcessor {
LinkedHashMap toscaInfosFromResourceId = getToscaInfosFromResourceUUID(nodeTemplate, id);
if (toscaInfosFromResourceId != null) {
resourceSpecification.put("modelCustomizationId", toscaInfosFromResourceId.get("customizationUUID"));
- resourceSpecification.put("modelCustomizationName", toscaInfosFromResourceId.get("name"));
}
}
diff --git a/src/main/resources/jolt/getServiceCatalog.json b/src/main/resources/jolt/getServiceCatalog.json
index cac223e..f0b3787 100644
--- a/src/main/resources/jolt/getServiceCatalog.json
+++ b/src/main/resources/jolt/getServiceCatalog.json
@@ -8,6 +8,7 @@
"invariantUUID": "invariantUUID",
"toscaModelURL": "toscaModelURL",
"toscaResourceName": "toscaResourceName",
+ "resourceInstanceName" : "modelCustomizationName",
"category ": "category",
"subcategory": "subcategory",
"distributionStatus": "distributionStatus",
diff --git a/src/test/java/org/onap/nbi/apis/assertions/ServiceCatalogAssertions.java b/src/test/java/org/onap/nbi/apis/assertions/ServiceCatalogAssertions.java
index 648241d..f67dda5 100644
--- a/src/test/java/org/onap/nbi/apis/assertions/ServiceCatalogAssertions.java
+++ b/src/test/java/org/onap/nbi/apis/assertions/ServiceCatalogAssertions.java
@@ -37,6 +37,7 @@ public class ServiceCatalogAssertions {
.isEqualTo("/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel");
assertThat(service.get("distributionStatus")).isEqualTo("DISTRIBUTED");
assertThat(service.get("version")).isEqualTo("2.0");
+ assertThat(service.get("modelCustomizationName")).isEqualTo("vFW-vSINK 0");
assertThat(service.get("lifecycleStatus")).isEqualTo("CERTIFIED");
assertThat(service.get("@type")).isEqualTo("ONAPservice");
assertThat(((ArrayList) service.get("attachment")).size()).isEqualTo(5);