From: vegall Date: Fri, 2 Jun 2023 21:25:32 +0000 (+0000) Subject: Feature 10972: Support of volume multi-attach X-Git-Tag: release-v14.0-start~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f976a3a6e39bf7a5804bb0e350a3daba74360a37;p=osm%2FNBI.git Feature 10972: Support of volume multi-attach Fixes issue with volume rename Change-Id: I067dca33b366a8ded869b0a4bb2b4bdd6fded26d Signed-off-by: vegall --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 4a5293d..4193017 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -450,7 +450,8 @@ class NsrTopic(BaseTopic): vsd.get("vdu-storage-requirements")[0].get("key") == "multiattach" and vsd.get("vdu-storage-requirements")[0].get("value") == "True" ): - if "shared" not in vsd["id"]: + # Avoid setting the volume name multiple times + if not match(f"shared-.*-{vnfd['id']}", vsd["id"]): vsd["id"] = f"shared-{vsd['id']}-{vnfd['id']}" svsd.append(vsd) if svsd: