From 812bc6fd62ca3e90dbe612a3eda314e5607942ca Mon Sep 17 00:00:00 2001 From: sousaedu Date: Thu, 11 Nov 2021 22:00:27 +0000 Subject: [PATCH] Fix bug 1741 - adding support for persistent volumes Change-Id: I5691f7d7b1cc5b72e676c4181c94c9aee620cbd4 Signed-off-by: sousaedu --- NG-RO/osm_ng_ro/ns.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 } -- 2.25.1