Remove lingering OVA references
This commit is contained in:
parent
43feb33caa
commit
58ce133c8d
|
@ -227,11 +227,6 @@ def create_vm(
|
||||||
else:
|
else:
|
||||||
vm_data["script_arguments"] = []
|
vm_data["script_arguments"] = []
|
||||||
|
|
||||||
if profile_data.get("profile_type") == "ova":
|
|
||||||
is_ova_install = True
|
|
||||||
else:
|
|
||||||
is_ova_install = False
|
|
||||||
|
|
||||||
# Get the system details
|
# Get the system details
|
||||||
query = "SELECT * FROM system_template WHERE id = %s"
|
query = "SELECT * FROM system_template WHERE id = %s"
|
||||||
args = (profile_data["system_template"],)
|
args = (profile_data["system_template"],)
|
||||||
|
@ -446,32 +441,29 @@ def create_vm(
|
||||||
|
|
||||||
print("There is enough space on cluster to store VM volumes")
|
print("There is enough space on cluster to store VM volumes")
|
||||||
|
|
||||||
if not is_ova_install:
|
# Verify that every specified filesystem is valid
|
||||||
# Verify that every specified filesystem is valid
|
used_filesystems = list()
|
||||||
used_filesystems = list()
|
for volume in vm_data["volumes"]:
|
||||||
for volume in vm_data["volumes"]:
|
if volume["source_volume"] is not None:
|
||||||
if volume["source_volume"] is not None:
|
continue
|
||||||
continue
|
if volume["filesystem"] and volume["filesystem"] not in used_filesystems:
|
||||||
if volume["filesystem"] and volume["filesystem"] not in used_filesystems:
|
used_filesystems.append(volume["filesystem"])
|
||||||
used_filesystems.append(volume["filesystem"])
|
|
||||||
|
|
||||||
for filesystem in used_filesystems:
|
for filesystem in used_filesystems:
|
||||||
if filesystem == "swap":
|
if filesystem == "swap":
|
||||||
retcode, stdout, stderr = pvc_common.run_os_command("which mkswap")
|
retcode, stdout, stderr = pvc_common.run_os_command("which mkswap")
|
||||||
if retcode:
|
if retcode:
|
||||||
raise ProvisioningError(
|
raise ProvisioningError(
|
||||||
"Failed to find binary for mkswap: {}".format(stderr)
|
"Failed to find binary for mkswap: {}".format(stderr)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
retcode, stdout, stderr = pvc_common.run_os_command(
|
retcode, stdout, stderr = pvc_common.run_os_command(
|
||||||
"which mkfs.{}".format(filesystem)
|
"which mkfs.{}".format(filesystem)
|
||||||
|
)
|
||||||
|
if retcode:
|
||||||
|
raise ProvisioningError(
|
||||||
|
"Failed to find binary for mkfs.{}: {}".format(filesystem, stderr)
|
||||||
)
|
)
|
||||||
if retcode:
|
|
||||||
raise ProvisioningError(
|
|
||||||
"Failed to find binary for mkfs.{}: {}".format(
|
|
||||||
filesystem, stderr
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
print("All selected filesystems are valid")
|
print("All selected filesystems are valid")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue