allow additionalParams at ns_create config 57/7357/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 22 Mar 2019 14:34:39 +0000 (14:34 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 22 Mar 2019 14:34:39 +0000 (14:34 +0000)
Change-Id: Ided631b94e46934bae5d779c4e06e548cde69434
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
instancehandler/views.py

index 53dfb22..9dcb037 100644 (file)
@@ -94,6 +94,13 @@ def create(request, type=None):
                                 vnf["vimAccountId"] = ns_data["vimAccountId"]
 
                         ns_data["vnf"] = ns_config["vnf"]
+                    if "additionalParamsForNs" in ns_config:
+                        ns_data["additionalParamsForNs"] = ns_config["additionalParamsForNs"]
+                    if "additionalParamsForVnf" in ns_config:
+                        ns_data["additionalParamsForVnf"] = ns_config["additionalParamsForVnf"]
+                    if "wimAccountId" in ns_config:
+                        ns_data["wimAccountId"] = ns_config["wimAccountId"]
+
         except Exception as e:
             request.session["OSM_ERROR"] = "Error creating the NS; Invalid parameters provided."
             return __response_handler(request, {}, 'instances:list', to_redirect=True, type='ns', )