summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-11-09 11:29:39 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-11-09 11:29:39 +0800
commit7056de616f534be06abb3cdb9d87e5775535b90c (patch)
tree6ae54730a6bde5659991a01ec439b81f7bbcac9c
parent7b0cf6bcfba0c207fcd2062e36162804b00e50c1 (diff)
Fix vfc-lcm hw vnfname adapt
Change-Id: Iae12bb1d259e5ae8b1a693633fbaa36b5de55f7a Issue-ID: VFC-589 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/ns/vnfs/create_vnfs.py5
-rw-r--r--lcm/workflows/build_in.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/lcm/ns/vnfs/create_vnfs.py b/lcm/ns/vnfs/create_vnfs.py
index 9356ed72..a2f01b3a 100644
--- a/lcm/ns/vnfs/create_vnfs.py
+++ b/lcm/ns/vnfs/create_vnfs.py
@@ -81,6 +81,7 @@ class CreateVnfs(Thread):
if REPORT_TO_AAI:
self.create_vnf_in_aai()
self.create_vserver_in_aai()
+ JobUtil.add_job_status(self.job_id, 100, 'vnf instantiation success', 0)
except NSLCMException as e:
self.vnf_inst_failed_handle(e.message)
except Exception:
@@ -119,7 +120,8 @@ class CreateVnfs(Thread):
if self.vnf_id == vnf_info['vnf_id']:
self.vnfd_id = vnf_info['properties']['id']
if 'name' not in vnf_info['properties']:
- self.vnf_inst_name = self.vnfd_id + str(uuid.uuid4())
+ # HW vnf instance name must start with alphabet
+ self.vnf_inst_name = 'vnf' + self.vnfd_id + str(uuid.uuid4())
else:
self.vnf_inst_name = vnf_info['properties']['name'] + str(uuid.uuid4())
self.vnf_inst_name = self.vnf_inst_name[:30]
@@ -255,7 +257,6 @@ class CreateVnfs(Thread):
logger.debug("save_info_to_db start")
do_biz_with_share_lock("set-vnflist-in-vnffginst-%s" % self.ns_inst_id, self.save_vnf_inst_id_in_vnffg)
NfInstModel.objects.filter(nfinstid=self.nf_inst_id).update(status=VNF_STATUS.ACTIVE, lastuptime=now_time())
- JobUtil.add_job_status(self.job_id, 100, 'vnf instantiation success', 0)
logger.debug("save_info_to_db end")
def vnf_inst_failed_handle(self, error_msg):
diff --git a/lcm/workflows/build_in.py b/lcm/workflows/build_in.py
index f58ec7e5..9086bc8b 100644
--- a/lcm/workflows/build_in.py
+++ b/lcm/workflows/build_in.py
@@ -192,7 +192,7 @@ class JobWaitThread(Thread):
self.job_id = job_id
self.ns_job_id = ns_job_id
self.index = index
- self.retry_count = 60
+ self.retry_count = 600
self.interval_second = 3
def run(self):