Handle OVH public ips in launch-node
This is a quick hack to handle public ip addrs on OVH. A better fix is porting to shade or ansible. Change-Id: I62bba7215249521307be5b42af1c6f8fc886d982
This commit is contained in:
parent
7eab5a6f12
commit
e186820ca5
@ -89,6 +89,9 @@ def get_flavor(client, min_ram):
|
||||
|
||||
|
||||
def get_public_ip(server, version=4, floating_ip_pool=None):
|
||||
for addr in server.addresses.get('Ext-Net', []):
|
||||
if addr.get('version') == version: # OVH
|
||||
return addr['addr']
|
||||
if 'os-floating-ips' in get_extensions(server.manager.api):
|
||||
for addr in server.manager.api.floating_ips.list():
|
||||
if addr.instance_id == server.id:
|
||||
|
Loading…
x
Reference in New Issue
Block a user