fix delete.py
This commit is contained in:
parent
ff70ab99ca
commit
0a1731f131
14
delete.py
14
delete.py
@ -12,6 +12,14 @@ for s in lbs:
|
|||||||
print(f"\tUsuwanie LB {s.data_model.name}: {action}")
|
print(f"\tUsuwanie LB {s.data_model.name}: {action}")
|
||||||
|
|
||||||
|
|
||||||
|
servers = client.servers.get_all()
|
||||||
|
print(f"Usuwanie {len(servers)} serwerów")
|
||||||
|
for s in servers:
|
||||||
|
if s.data_model.name.startswith(PREFIX):
|
||||||
|
action = client.servers.delete(s)
|
||||||
|
print(f"\tUsuwanie serwera {s.data_model.name} ({s.data_model.public_net.ipv4.ip}): {action.data_model.status}")
|
||||||
|
|
||||||
|
|
||||||
vnets = client.networks.get_all()
|
vnets = client.networks.get_all()
|
||||||
print(f"Usuwanie {len(vnets)} sieci wirtualnych")
|
print(f"Usuwanie {len(vnets)} sieci wirtualnych")
|
||||||
for s in vnets:
|
for s in vnets:
|
||||||
@ -28,9 +36,3 @@ for v in volumes:
|
|||||||
print(f"\tUsuwanie wolumenu {v.name}: {action}")
|
print(f"\tUsuwanie wolumenu {v.name}: {action}")
|
||||||
|
|
||||||
|
|
||||||
servers = client.servers.get_all()
|
|
||||||
print(f"Usuwanie {len(servers)} serwerów")
|
|
||||||
for s in servers:
|
|
||||||
if s.data_model.name.startswith(PREFIX):
|
|
||||||
action = client.servers.delete(s)
|
|
||||||
print(f"\tUsuwanie serwera {s.data_model.name} ({s.data_model.public_net.ipv4.ip}): {action.data_model.status}")
|
|
Loading…
Reference in New Issue
Block a user