From f976a3a6e39bf7a5804bb0e350a3daba74360a37 Mon Sep 17 00:00:00 2001 From: vegall Date: Fri, 2 Jun 2023 21:25:32 +0000 Subject: [PATCH] Feature 10972: Support of volume multi-attach Fixes issue with volume rename Change-Id: I067dca33b366a8ded869b0a4bb2b4bdd6fded26d Signed-off-by: vegall --- osm_nbi/instance_topics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.25.1