Remove vfc_vnflcm spare code 63/42463/1
authorying.yunlong <ying.yunlong@zte.com.cn>
Thu, 12 Apr 2018 09:35:22 +0000 (17:35 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Thu, 12 Apr 2018 09:35:22 +0000 (17:35 +0800)
Change-Id: Ie6835f2114e97308e636229b2a44de287bfaf9be
Issue-ID: VFC-873
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
lcm/lcm/nf/vnf_cancel/term_vnf.py
lcm/lcm/nf/vnf_create/inst_vnf.py

index 8657594..1dd8067 100644 (file)
@@ -38,8 +38,6 @@ class TermVnf(Thread):
         self.job_id = job_id
         self.terminationType = ignore_case_get(self.data, "terminationType")
         self.gracefulTerminationTimeout = ignore_case_get(self.data, "gracefulTerminationTimeout")
-        self.apply_result = None
-        self.notify_data = None
         self.inst_resource = {'volumn': [], 'network': [], 'subnet': [], 'port': [], 'flavor': [], 'vm': []}
 
     def run(self):
index c94bfee..9ae2515 100644 (file)
@@ -37,12 +37,7 @@ class InstVnf(Thread):
         self.data = data
         self.nf_inst_id = nf_inst_id
         self.job_id = job_id
-        self.vnfd_id = ''
         self.vim_id = ignore_case_get(ignore_case_get(self.data, "additionalParams"), "vimId")
-        self.nfvo_inst_id = ''
-        self.vnfm_inst_id = ''
-        self.package_id = ''
-        self.vnfd_info = []
 
     def run(self):
         try:
@@ -81,12 +76,13 @@ class InstVnf(Thread):
 
         self.update_cps()
         metadata = ignore_case_get(self.vnfd_info, "metadata")
+        csar_id = ignore_case_get(metadata, "id")
         version = ignore_case_get(metadata, "vnfdVersion")
         vendor = ignore_case_get(metadata, "vendor")
         netype = ignore_case_get(metadata, "type")
         vnfsoftwareversion = ignore_case_get(metadata, "version")
         NfInstModel.objects.filter(nfinstid=self.nf_inst_id).\
-            update(package_id=self.package_id,
+            update(package_id=csar_id,
                    flavour_id=ignore_case_get(self.data, "flavourId"),
                    version=version,
                    vendor=vendor,