summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2017-11-09 03:35:23 +0000
committerGerrit Code Review <gerrit@onap.org>2017-11-09 03:35:23 +0000
commite0886b3e0d1e6433e9830c21e16cfde54e8d6734 (patch)
treefc9a6020b204f109a9999baa9a15a523f8022e43
parentcce7dad05f7ac0850043edb362bbab996e4d009b (diff)
parent7056de616f534be06abb3cdb9d87e5775535b90c (diff)
Merge "Fix vfc-lcm hw vnfname adapt"v1.0.1
-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):