Skip to content
Snippets Groups Projects
Commit ede891e6 authored by istmxrein's avatar istmxrein
Browse files

fix bug in get_server_ip

parent ce7140c6
Branches
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ def provision_server( ...@@ -48,7 +48,7 @@ def provision_server(
def get_server_ip( def get_server_ip(
conn: openstack.connection.Connection, server: openstack.compute.v2.server.Server conn: openstack.connection.Connection, server: openstack.compute.v2.server.Server
) -> str: ) -> str:
ips = [ipaddress.ip_address(ip) for ip in list(conn.compute.server_ips(server.id))] ips = [ipaddress.ip_address(ip.address) for ip in list(conn.compute.server_ips(server.id))]
print(ips) print(ips)
for ip in ips: for ip in ips:
if env.SSH_IP_VERSION == str(ip.version) and ip.is_global: if env.SSH_IP_VERSION == str(ip.version) and ip.is_global:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment