Properly handle missing source_volume from OVAs
This commit is contained in:
parent
89f05ced3f
commit
2608f38d64
|
@ -447,9 +447,12 @@ def create_vm(
|
||||||
# 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.get("source_volume") is not None:
|
||||||
continue
|
continue
|
||||||
if volume["filesystem"] and volume["filesystem"] not in used_filesystems:
|
if (
|
||||||
|
volume.get("filesystem") is not None
|
||||||
|
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:
|
||||||
|
|
Loading…
Reference in New Issue