diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2017-10-26 17:45:30 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2017-10-26 17:53:54 +0800 |
commit | 2375c544485790d3b10c63b868b587de3140ca85 (patch) | |
tree | 2aa384633c4e2a36e55c3e3a7757b05c1e2b8e72 | |
parent | 17430ed38d561a6da0d0b2b694728db092750d3c (diff) |
Update ns inst data save logic
Change-Id: I6280c157329c1c28ed2ba37ab7e1aed1f425787c
Issue-Id: VFC-558
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/ns/ns_instant.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lcm/ns/ns_instant.py b/lcm/ns/ns_instant.py index b0994d28..f1e464df 100644 --- a/lcm/ns/ns_instant.py +++ b/lcm/ns/ns_instant.py @@ -127,19 +127,21 @@ class InstantNSService(object): service_def_id=service_tpl['csarId'], template_name=service_tpl['templateName'], template_id=service_tpl['serviceTemplateId']).save() + + for key, val in self.req_data['additionalParamForNs'].items(): + InputParamMappingModel(service_id=self.ns_inst_id, + input_key=key, + input_value=val).save() + + for vnffg in ignore_case_get(plan_dict, "vnffgs"): + VNFFGInstModel(vnffgdid=vnffg["vnffg_id"], + vnffginstid=str(uuid.uuid4()), + nsinstid=self.ns_inst_id, + endpointnumber=0).save() else: # TODO: pass - for key, val in self.req_data['additionalParamForNs'].items(): - InputParamMappingModel(service_id=self.ns_inst_id, input_key=key, input_value=val).save() - - for vnffg in ignore_case_get(plan_dict, "vnffgs"): - VNFFGInstModel(vnffgdid=vnffg["vnffg_id"], - vnffginstid=str(uuid.uuid4()), - nsinstid=self.ns_inst_id, - endpointnumber=0).save() - if WORKFLOW_OPTION == "wso2": return self.start_wso2_workflow(job_id, ns_inst, plan_input) elif WORKFLOW_OPTION == "activiti": |