fixes
This commit is contained in:
parent
c56b6ac4e9
commit
737cb42116
2
clean.py
2
clean.py
@ -45,7 +45,7 @@ print('\tdone.') if VERBOSE else None
|
||||
|
||||
print("Clearing load balancer... ", end='') if VERBOSE else None
|
||||
try:
|
||||
action = client.servers.delete(client.load_balancers.get_by_name(load_balancer_name))
|
||||
action = client.load_balancers.delete(client.load_balancers.get_by_name(load_balancer_name))
|
||||
action.wait_until_finished()
|
||||
except AttributeError:
|
||||
pass
|
||||
|
6
main.py
6
main.py
@ -51,8 +51,8 @@ for i in range(SERVER_COUNT):
|
||||
user_data=cloud_init
|
||||
)
|
||||
server.action.wait_until_finished()
|
||||
print(f"Tworzenie serwera: {server.action.complete}")
|
||||
lb_targets.append(LoadBalancerTarget(type="server", server=server, use_private_ip=True))
|
||||
print(f"Tworzenie serwera {i+1}: {server.action.complete}")
|
||||
lb_targets.append(LoadBalancerTarget(type="server", server=server.server, use_private_ip=True))
|
||||
|
||||
|
||||
lb = client.load_balancers.create(
|
||||
@ -76,4 +76,4 @@ lb.action.wait_until_finished()
|
||||
print(f"Mechanizm równoważenia obciążenia został utworzony: {lb.action.complete}")
|
||||
|
||||
|
||||
print(f"Webserwis pod adresem http://{lb.data_model.public_net.ipv4.ip}:8080/factors/")
|
||||
print(f"Webserwis pod adresem http://{lb.load_balancer.data_model.public_net.ipv4.ip}:8080/factors/")
|
||||
|
Loading…
Reference in New Issue
Block a user