From 0e789aab3b4f5fe1f011754332e2ca8ac713399d Mon Sep 17 00:00:00 2001
From: Federico Ressi <fressi@redhat.com>
Date: Thu, 10 Oct 2019 12:46:21 +0200
Subject: [PATCH] Fix Openstack topology discovery for Python 2

On Python 2 socket.getaddrinfo() takes no keyword arguments

Change-Id: Ib36745038e530bf00829cc28894422a382b7bbf0
---
 tobiko/openstack/topology/_topology.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tobiko/openstack/topology/_topology.py b/tobiko/openstack/topology/_topology.py
index 619d94e57..a05d68718 100644
--- a/tobiko/openstack/topology/_topology.py
+++ b/tobiko/openstack/topology/_topology.py
@@ -349,8 +349,8 @@ class OpenStackTopology(tobiko.SharedFixture):
             except (netaddr.AddrFormatError, ValueError):
                 try:
                     addrinfo = socket.getaddrinfo(
-                        host=obj, port=22,
-                        flags=(socket.AI_CANONNAME | socket.IPPROTO_TCP))
+                        obj, 22, 0, 0,
+                        socket.AI_CANONNAME | socket.IPPROTO_TCP)
                 except socket.gaierror:
                     ips = tobiko.select([])
                 else: