From e186820ca58388a9a31f74f16eb3c37f32ffe67a Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 16 Sep 2015 10:24:48 -0700 Subject: [PATCH] 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 --- launch/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/launch/utils.py b/launch/utils.py index 8592d71527..997e344ca0 100644 --- a/launch/utils.py +++ b/launch/utils.py @@ -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: