Fixes issue with volume rename
Change-Id: I067dca33b366a8ded869b0a4bb2b4bdd6fded26d
Signed-off-by: vegall <lvega@whitestack.com>
vsd.get("vdu-storage-requirements")[0].get("key") == "multiattach"
and vsd.get("vdu-storage-requirements")[0].get("value") == "True"
):
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:
vsd["id"] = f"shared-{vsd['id']}-{vnfd['id']}"
svsd.append(vsd)
if svsd: