mirror of
https://github.com/OVERLORD7F/SVMU.git
synced 2025-10-01 21:52:47 +03:00
test1
test2 test3
This commit is contained in:
@@ -16,10 +16,10 @@ def data_pools(base_url , api_key): #output data pool info
|
|||||||
for x in results_data_pools_info:
|
for x in results_data_pools_info:
|
||||||
print(" "*14,"Data pool info")
|
print(" "*14,"Data pool info")
|
||||||
print(f"\nName: {x['verbose_name']}")
|
print(f"\nName: {x['verbose_name']}")
|
||||||
print(f"\nUID: {x['id']}")
|
print(f"UID: {x['id']}")
|
||||||
print(f"\ntype: {x['type']}")
|
print(f"type: {x['type']}")
|
||||||
print(f"\nstatus: {x['status']}")
|
print(f"status: {x['status']}")
|
||||||
print(f"\nsize: {round((x['size'] / 1024), 1)}Gb")
|
print(f"size: {round((x['size'] / 1024), 1)}Gb")
|
||||||
print("-" * 44)
|
print("-" * 44)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@@ -111,7 +111,6 @@ def vm_info(base_url , api_key , vm_uuids):
|
|||||||
get_disk_info(domain_all_content)
|
get_disk_info(domain_all_content)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def create_and_attach_disk(base_url , api_key , vm_id, data_pool_uuid, vdisk_size, preallocation):
|
def create_and_attach_disk(base_url , api_key , vm_id, data_pool_uuid, vdisk_size, preallocation):
|
||||||
domain_name=get_domain_info(base_url , api_key , vm_id)
|
domain_name=get_domain_info(base_url , api_key , vm_id)
|
||||||
disk_name=domain_name["verbose_name"]+"_"+secrets.token_hex(5) #generates unique hex id. this method can generate ~million unique ids
|
disk_name=domain_name["verbose_name"]+"_"+secrets.token_hex(5) #generates unique hex id. this method can generate ~million unique ids
|
||||||
|
@@ -17,6 +17,7 @@ def vm_info_short(base_url , api_key): #output data pool info
|
|||||||
print(" "*16,f"VM {x['verbose_name']}")
|
print(" "*16,f"VM {x['verbose_name']}")
|
||||||
print(f"UID: {x['id']}")
|
print(f"UID: {x['id']}")
|
||||||
print("-" * 41)
|
print("-" * 41)
|
||||||
|
#
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print(f"Failed to retrieve data {response.status_code}")
|
print(f"Failed to retrieve data {response.status_code}")
|
Reference in New Issue
Block a user