aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java5
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java7
-rw-r--r--src/test/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java2
3 files changed, 11 insertions, 3 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 67f157e..1c04581 100644
--- a/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
+++ b/src/main/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java
@@ -61,7 +61,7 @@ public class ToscaInfosProcessor {
private Set<String> vnfInstanceParams = new HashSet<String>(Arrays.asList("onap_private_net_id",
"onap_private_subnet_id", "pub_key", "sec_group", "install_script_version", "demo_artifacts_version",
- "cloud_env", "public_net_id", "aic-cloud-region", "image_name", "flavor_name"));
+ "cloud_env", "public_net_id", "aic-cloud-region", "image_name", "flavor_name", "skip_post_instantiation_configuration"));
final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); // jackson databind
@@ -290,6 +290,9 @@ public class ToscaInfosProcessor {
GetInput getInput = (GetInput) property.getValue();
listOfVFLevelInputs.put(getInput.getInputName(), getInput.result());
listOfVFLevelInputs.remove(property.getName());
+ } else if(property.getName().equals("skip_post_instantiation_configuration")) {
+ //Add skip_post_instantiation_configuration as vf Level Inputs
+ listOfVFLevelInputs.put(property.getName(), property.getValue());
}
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java
index c356bdd..0cafcde 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java
@@ -288,7 +288,9 @@ public class PostSoProcessor {
instanceSpecification.putAll(vnfInstanceParams);
vnfInstanceParam.add(instanceSpecification);
} else {
- vnfInstanceParams.put("k8s-rb-profile-name", k8sRbProfileName);
+ //if skip_post_instantiation_configuration is true then add k8s-rb-profile-name
+ if(instanceSpecification.get("skip_post_instantiation_configuration").equals(true))
+ vnfInstanceParams.put("k8s-rb-profile-name", k8sRbProfileName);
vnfInstanceParam.add(vnfInstanceParams);
}
@@ -337,7 +339,8 @@ public class PostSoProcessor {
} else {
Map<String, Object> instanceParam = new HashMap<>();
- instanceParam.put("k8s-rb-profile-name", k8sRbProfileName);
+ if(instanceSpecification.get("skip_post_instantiation_configuration").equals(true))
+ instanceParam.put("k8s-rb-profile-name", k8sRbProfileName);
vfInstanceParam.add(instanceParam);
}
diff --git a/src/test/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java b/src/test/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java
index fe348de..e0a3f37 100644
--- a/src/test/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java
+++ b/src/test/java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java
@@ -356,6 +356,7 @@ public class ToscaInfosProcessorTest {
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/EnxIi7fcHMEi9VPtCGCOpQYblj9r0M/CaD5U15Cb5qHzcHiPtJpVsDMlPGzN9VHxWZG6FqQv1s6oE+PmG1xeahhb+ofrY6s8zvlUCcWGIo/bPexzb2ErvkGyd+1tQo9oLrxNdUG0xeWUX3oFkiw3RBRyxf9n4E5ajZr4cEFQ0sqJkslj87XViw/h555ydIYTY5cPNmIlsIXTObC/2z3muVWYUzaaZE8omfYJE442+UhYLHgb7Cl1JMk/SNu/r+bLrsXeBSPB+/bxVKqjpd659AQ7GRNXvBrgfq6EKNiVjrI76AbpeTM2D/LXbENuUUkvJBWptSd0gPAGkEyc9w2n");
instanceSpecificationTestData.put("public_net_id",
"60dc8a1c-86b8-4cc4-b5c8-9b0272113c1f0f1c389d-e9db-4c14-b3a2-11dca2d104ed");
+ instanceSpecificationTestData.put("skip_post_instantiation_configuration", true);
// Resources to put in response as resourceSpecification
response.put("resourceSpecification", resources);
@@ -406,6 +407,7 @@ public class ToscaInfosProcessorTest {
Map instanceSpecificationTestData = new LinkedHashMap<>();
instanceSpecificationTestData.put("vfw_cnf_13080_dummy_vf_2", "xyz");
instanceSpecificationTestData.put("vfw_cnf_13080_dummy_vf_1", "abc");
+ instanceSpecificationTestData.put("skip_post_instantiation_configuration", true);
// serviceParams Test Data
Map serviceParamsTestData = new LinkedHashMap<>();