From e91ee2a5423cfa77ccda26777bb6f7c0f8cbef98 Mon Sep 17 00:00:00 2001 From: bravof Date: Thu, 1 Jul 2021 09:32:30 -0400 Subject: [PATCH] bugfix(ip/mac): increments only in extra VDU, not the first one. Bug 1578 Change-Id: I21a0c2e15934e58d22a3a373a6ea6ef68c9b6ebf Signed-off-by: bravof --- osm_nbi/instance_topics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index dc85a50..4e88de5 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -937,9 +937,9 @@ class NsrTopic(BaseTopic): for index in range(0, count): vdur = deepcopy(vdur) for iface in vdur["interfaces"]: - if iface.get("ip-address"): + if iface.get("ip-address") and index != 0: iface["ip-address"] = increment_ip_mac(iface["ip-address"]) - if iface.get("mac-address"): + if iface.get("mac-address") and index != 0: iface["mac-address"] = increment_ip_mac(iface["mac-address"]) vdur["_id"] = str(uuid4()) -- 2.25.1