def UsesIPv6Connection(host, port):
  return any(t[0] == socket.AF_INET6 for t in socket.getaddrinfo(host, port))
Returns True if the connection to a given host/port could go through IPv6.
dataset/ETHPy150Open ganeti/ganeti/qa/qa_utils.py/UsesIPv6Connection