Skip to content
Snippets Groups Projects
Commit 61bee6e9 authored by Alfonso Tierno's avatar Alfonso Tierno
Browse files

LWB increase deployment timeout. Check vnf management ip is returned


Change-Id: I13f3e2d5cdac50e9f59052be615ba95d11739515
Signed-off-by: default avatartierno <alfonso.tiernosepulveda@telefonica.com>
parent 92c36fd0
Branches v3.1
Tags v3.1.0
No related merge requests found
......@@ -305,13 +305,17 @@ class ROClient:
"""
ns_ip = {"vnf": {}, "vdu": {}}
for vnf in ns_descriptor["vnfs"]:
ns_ip["vnf"][str(vnf["member_vnf_index"])] = vnf["ip_address"]
if not vnf.get("ip_address"):
raise ROClientException("No ip_address returned for ns member_vnf_index '{}'".format(
vnf["member_vnf_index"]), http_code=500)
ns_ip["vnf"][str(vnf["member_vnf_index"])] = vnf.get("ip_address")
ns_ip["vdu"][str(vnf["member_vnf_index"])] = {}
for vm in vnf["vms"]:
if vm.get("ip_address"):
ns_ip["vdu"][str(vnf["member_vnf_index"])][vm["vdu_osm_id"]] = vm["ip_address"]
return ns_ip
async def _get_item_uuid(self, session, item, item_id_name, all_tenants=False):
if all_tenants:
tenant_text = "/any"
......
......@@ -671,8 +671,6 @@ class Lcm:
db_nsr["detailed-status"] = "creating"
db_nsr["operational-status"] = "init"
deloyment_timeout = 120
RO = ROclient.ROClient(self.loop, **self.ro_config)
# get vnfds, instantiate at RO
......@@ -755,8 +753,8 @@ class Lcm:
step = ns_status_detailed = "Waiting ns ready at RO"
db_nsr["detailed-status"] = ns_status_detailed
self.logger.debug(logging_text + step + " RO_ns_id={}".format(RO_nsr_id))
deloyment_timeout = 600
while deloyment_timeout > 0:
deployment_timeout = 2*3600 # Two hours
while deployment_timeout > 0:
desc = await RO.show("ns", RO_nsr_id)
ns_status, ns_status_info = RO.check_ns_status(desc)
nsr_lcm["RO"]["nsr_status"] = ns_status
......@@ -766,14 +764,15 @@ class Lcm:
db_nsr["detailed-status"] = ns_status_detailed + "; {}".format(ns_status_info)
self.update_db("nsrs", nsr_id, db_nsr)
elif ns_status == "ACTIVE":
step = "Getting ns VNF management IP address"
nsr_lcm["nsr_ip"] = RO.get_ns_vnf_ip(desc)
break
else:
assert False, "ROclient.check_ns_status returns unknown {}".format(ns_status)
await asyncio.sleep(5, loop=self.loop)
deloyment_timeout -= 5
if deloyment_timeout <= 0:
deployment_timeout -= 5
if deployment_timeout <= 0:
raise ROclient.ROClientException("Timeout waiting ns to be ready")
db_nsr["detailed-status"] = "Configuring vnfr"
self.update_db("nsrs", nsr_id, db_nsr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment