From 157b12f2f530f1454b15c495e5227ec5934595e2 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Wed, 23 Sep 2020 14:33:14 +0000 Subject: [PATCH] Fix IP address auto-assignment for VDU at instantiation and scaling Change-Id: I601e92b7b2becdfcf4357c9c39773f0e2c9b5a9b Signed-off-by: garciadeblas --- RO/osm_ro/nfvo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.25.1