Bag of hacks to get local libvirt working

This commit is contained in:
3wc
2021-07-14 00:42:28 +02:00
parent 2e6894ad14
commit a580b04659
4 changed files with 20 additions and 18 deletions

View File

@ -214,12 +214,13 @@ class CapsulFlaskHub(VirtualizationInterface):
except:
# no need to do anything here since if it cant be parsed then generic_operation will handle it.
pass
if error_message != "":
raise ValueError(f"create capsul operation {operation_id} on {assigned_hosts} failed with {error_message}")
if number_of_assigned != 1:
assigned_hosts_string = ", ".join(assigned_hosts)
raise ValueError(f"expected create capsul operation {operation_id} to be assigned to one host, it was assigned to {number_of_assigned} ({assigned_hosts_string})")
if error_message != "":
raise ValueError(f"create capsul operation {operation_id} on {assigned_hosts_string} failed with {error_message}")
def destroy(self, email: str, id: str):