From: bravof Date: Thu, 1 Jul 2021 13:32:30 +0000 (-0400) Subject: bugfix(ip/mac): increments only in extra VDU, not the first one. Bug 1578 X-Git-Tag: release-v11.0-start~9 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=commitdiff_plain;h=b7cdee12fe9a54f6019c98edd1fe94f10acc5080;hp=bfebfc02da4ab67880be60ca0d9bf78f5cc5e6ff bugfix(ip/mac): increments only in extra VDU, not the first one. Bug 1578 Change-Id: I21a0c2e15934e58d22a3a373a6ea6ef68c9b6ebf Signed-off-by: bravof --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index ebef36e..d76b0b1 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -938,9 +938,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())