]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: remove bugous static IP regexp 750/head
authorLoic Dachary <ldachary@redhat.com>
Wed, 9 Dec 2015 20:21:52 +0000 (21:21 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 15 Dec 2015 11:19:50 +0000 (12:19 +0100)
Instead of duplicating a bugous static IP regexp, use the get_ip()
method.

Signed-off-by: Loic Dachary <loic@dachary.org>
teuthology/openstack/__init__.py

index 4fcb8d77b65a053aa0d8e9ed2a04a9fcd512f9f1..4b14595e6d3972ea09274ccd75292978d5ea5592 100644 (file)
@@ -144,8 +144,7 @@ class OpenStackInstance(object):
         if not self.ip:
             self.ip = self.get_floating_ip()
             if not self.ip:
-                self.ip = re.findall('([\d.]+)$',
-                                     self.get_addresses())[0]
+                self.ip = self.get_ip('')
         return self.ip
 
     def destroy(self):