Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gevorg-Khachatryaan authored and Gevorg-Khachatryaan committed Oct 31, 2023
1 parent b17858a commit 3039b40
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion plugins/module_utils/prism/vms.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ def _get_default_spec(self):
}
)

def _get_default_boot_config_spec(self):
return deepcopy(
{
"boot_type": "LEGACY",
"boot_device_order_list": ["CDROM", "DISK", "NETWORK"],
}
)

def _get_default_network_spec(self):
return deepcopy(
{
Expand Down Expand Up @@ -341,7 +349,7 @@ def _build_spec_disks(self, payload, vdisks):

def _build_spec_boot_config(self, payload, param):
if not payload["spec"]["resources"].get("boot_config"):
payload["spec"]["resources"]["boot_config"] = self._get_default_spec()["spec"]["resources"]["boot_config"]
payload["spec"]["resources"]["boot_config"] = self._get_default_boot_config_spec()
boot_config = payload["spec"]["resources"]["boot_config"]

if "LEGACY" == param["boot_type"] and "boot_order" in param:
Expand Down

0 comments on commit 3039b40

Please sign in to comment.