+
+
+def get_volumes_from_instantiation_params(
+ vdu_instantiation_params: dict, vdud: dict
+) -> list:
+ """Get the VDU volumes from instantiation parameters
+
+ Args:
+ vdu_instantiation_params: VDU instantiation parameters
+ vdud: VDU description as a dictionary extracted from VNFD
+ Returns:
+ vdu_volume_list:(list)
+
+ """
+ vdu_volume_list = []
+ if vdu_instantiation_params.get("volume"):
+ for volume in vdu_instantiation_params["volume"]:
+ if volume.get("vim-volume-id") and volume.get("name") in vdud.get(
+ "virtual-storage-desc"
+ ):
+ vdu_volume = {
+ "name": volume["name"],
+ "vim-volume-id": volume["vim-volume-id"],
+ }
+ vdu_volume_list.append(vdu_volume)
+
+ return vdu_volume_list