From 23a9fcc45932f062053beed77ce6a4763a28e5cd Mon Sep 17 00:00:00 2001 From: aleemraja Date: Wed, 16 Sep 2020 20:47:08 +0530 Subject: Enhancement to SO macro flow support - Added skip_post_instantiation_configuration as Vnf Level Params - Decision to set k8s-rb-profile name as default or not Issue-ID: EXTAPI-513 Signed-off-by: aleemraja Change-Id: I6bb9786660f6760c19669132e2c254e7f9b23323 --- .../java/org/onap/nbi/apis/servicecatalog/ToscaInfosProcessor.java | 5 ++++- .../org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main') 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 vnfInstanceParams = new HashSet(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 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); } -- cgit 1.2.3-korg