From: sousaedu Date: Thu, 11 Nov 2021 22:00:27 +0000 (+0000) Subject: Fix bug 1763 - adding support for persistent volumes X-Git-Tag: v12.0.0rc1~59 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=7b507b234039c3270b1bd03d2ff2173d435e90a9;p=osm%2FRO.git Fix bug 1763 - adding support for persistent volumes Change-Id: I5691f7d7b1cc5b72e676c4181c94c9aee620cbd4 Signed-off-by: sousaedu --- diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index 9841852a..ee0463a4 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -877,6 +877,15 @@ class Ns(object): if ssh_keys: cloud_config["key-pairs"] = ssh_keys + disk_list = None + if target_vdu.get("virtual-storages"): + disk_list = [ + {"size": disk["size-of-storage"]} + for disk in target_vdu["virtual-storages"] + if disk.get("type-of-storage") + == "persistent-storage:persistent-storage" + ] + extra_dict["params"] = { "name": "{}-{}-{}-{}".format( indata["name"][:16], @@ -890,7 +899,7 @@ class Ns(object): "flavor_id": "TASK-" + flavor_text, "net_list": net_list, "cloud_config": cloud_config or None, - "disk_list": None, # TODO + "disk_list": disk_list, "availability_zone_index": None, # TODO "availability_zone_list": None, # TODO }