Commit 47334810 authored by Iustin Pop's avatar Iustin Pop

Export the AF_INET/AF_INET6 constants

These are needed to ensure that htools uses the same numeric values as
Python.

By the way, I'm not sure what's the best option: importing socket into
constants (this patch), or adding custom exports to
autotools/convert-constants.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 896b2850
......@@ -22,6 +22,7 @@
"""Module holding different constants."""
import re
import socket
from ganeti import _autoconf
from ganeti import _vcsversion
......@@ -636,6 +637,10 @@ IP6_ADDRESS_ANY = "::"
IP4_VERSION = 4
IP6_VERSION = 6
VALID_IP_VERSIONS = frozenset([IP4_VERSION, IP6_VERSION])
# for export to htools
IP4_FAMILY = socket.AF_INET
IP6_FAMILY = socket.AF_INET6
TCP_PING_TIMEOUT = 10
GANETI_RUNAS = "root"
DEFAULT_VG = "xenvg"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment