From: garciadeblas Date: Wed, 23 Sep 2020 14:33:14 +0000 (+0000) Subject: Fix IP address auto-assignment for VDU at instantiation and scaling X-Git-Tag: release-v9.0-start~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F9844%2F1;p=osm%2FRO.git Fix IP address auto-assignment for VDU at instantiation and scaling Change-Id: I601e92b7b2becdfcf4357c9c39773f0e2c9b5a9b Signed-off-by: garciadeblas --- diff --git a/RO/osm_ro/nfvo.py b/RO/osm_ro/nfvo.py index 29b9dccd..3e1f377e 100644 --- a/RO/osm_ro/nfvo.py +++ b/RO/osm_ro/nfvo.py @@ -4199,7 +4199,7 @@ def instantiate_vnf(mydb, sce_vnf, params, params_out, rollbackList): i = ip.rfind(".") if i > 0: i += 1 - ip = ip[i:] + str(int(ip[:i]) + 1) + ip = ip[:i] + str(int(ip[i:]) + 1) db_vm_iface_instance["ip_address"] = ip except: db_vm_iface_instance["ip_address"] = None @@ -4921,7 +4921,7 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): i = ip.rfind(".") if i > 0: i += 1 - ip = ip[i:] + str(int(ip[:i]) + 1) + ip = ip[:i] + str(int(ip[i:]) + 1) iface["ip_address"] = ip except: iface["ip_address"] = None