Error in NBI serviceSpecification API
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / servicecatalog / ToscaInfosProcessor.java
index 67f157e..2046ecf 100644 (file)
@@ -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
 
@@ -279,19 +279,24 @@ public class ToscaInfosProcessor {
        
        private HashMap<String, Object> getUserDefinedVFLevelInstanceParams(
                        Map<String, org.onap.sdc.toscaparser.api.Property> groupProperties, Map listOfVFLevelInputs) {
-
-               HashMap<String, Object> vnfLevelInstanceParams = new HashMap<>();
-               
-               for (Entry<String, org.onap.sdc.toscaparser.api.Property> entry : groupProperties.entrySet()) {
-
-                       org.onap.sdc.toscaparser.api.Property property = entry.getValue();
-                       
-                       if ((property.getValue().getClass() == GetInput.class)) {
-                               GetInput getInput = (GetInput) property.getValue();
-                               listOfVFLevelInputs.put(getInput.getInputName(), getInput.result());
-                               listOfVFLevelInputs.remove(property.getName());
-                       }
-               }
+        
+       if(groupProperties != null && !groupProperties.isEmpty()) {
+
+                  for (Entry<String, org.onap.sdc.toscaparser.api.Property> entry : groupProperties.entrySet()) {
+
+                          org.onap.sdc.toscaparser.api.Property property = entry.getValue();
+
+                          if ((property.getValue().getClass() == GetInput.class)) {
+                               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());
+                          }
+                  }
+               
+          }
 
                return (HashMap<String, Object>) listOfVFLevelInputs;           
        }