From 855d2fc759bc2a96966ee1555e0f415f051db3ed Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Thu, 25 Nov 2010 18:21:05 +0100 Subject: [PATCH] backend: Add support for IPv6 in import/export Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/backend.py | 5 +++++ lib/objects.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/backend.py b/lib/backend.py index fc24694c1..2cb5ba1b7 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -2878,6 +2878,11 @@ def StartImportExportDaemon(mode, opts, host, port, instance, ieio, ieioargs): if port: cmd.append("--port=%s" % port) + if opts.ipv6: + cmd.append("--ipv6") + else: + cmd.append("--ipv4") + if opts.compress: cmd.append("--compress=%s" % opts.compress) diff --git a/lib/objects.py b/lib/objects.py index 584dc9f55..2ed721363 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -1334,6 +1334,7 @@ class ImportExportOptions(ConfigObject): @ivar ca_pem: Remote peer CA in PEM format (None for cluster certificate) @ivar compress: Compression method (one of L{constants.IEC_ALL}) @ivar magic: Used to ensure the connection goes to the right disk + @ivar ipv6: Whether to use IPv6 """ __slots__ = [ @@ -1341,6 +1342,7 @@ class ImportExportOptions(ConfigObject): "ca_pem", "compress", "magic", + "ipv6", ] -- GitLab