diff --git a/delete.py b/delete.py index 86a6f97..acfbf2a 100644 --- a/delete.py +++ b/delete.py @@ -11,13 +11,6 @@ for s in lbs: action = client.load_balancers.delete(s) 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() print(f"Usuwanie {len(vnets)} sieci wirtualnych") @@ -26,6 +19,7 @@ for s in vnets: action = client.networks.delete(s) print(f"\tUsuwanie sieci wirtualnej {s.name}: {action}") + volumes = client.volumes.get_all() print(f"Usuwanie {len(volumes)} wolumenów") for v in volumes: @@ -33,3 +27,10 @@ for v in volumes: action = client.volumes.delete(v) 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}") \ No newline at end of file