fix delete.py
This commit is contained in:
parent
bc3d43a82b
commit
ff70ab99ca
15
delete.py
15
delete.py
@ -11,13 +11,6 @@ for s in lbs:
|
|||||||
action = client.load_balancers.delete(s)
|
action = client.load_balancers.delete(s)
|
||||||
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")
|
||||||
@ -26,6 +19,7 @@ for s in vnets:
|
|||||||
action = client.networks.delete(s)
|
action = client.networks.delete(s)
|
||||||
print(f"\tUsuwanie sieci wirtualnej {s.name}: {action}")
|
print(f"\tUsuwanie sieci wirtualnej {s.name}: {action}")
|
||||||
|
|
||||||
|
|
||||||
volumes = client.volumes.get_all()
|
volumes = client.volumes.get_all()
|
||||||
print(f"Usuwanie {len(volumes)} wolumenów")
|
print(f"Usuwanie {len(volumes)} wolumenów")
|
||||||
for v in volumes:
|
for v in volumes:
|
||||||
@ -33,3 +27,10 @@ for v in volumes:
|
|||||||
action = client.volumes.delete(v)
|
action = client.volumes.delete(v)
|
||||||
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