From cf62a272296960db316b3743aeeaead1795bc9d7 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Thu, 2 Aug 2007 15:54:31 +0000 Subject: [PATCH] Put default bridge into constant. Reviewed-by: iustinp --- lib/constants.py | 3 +++ scripts/gnt-cluster | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/constants.py b/lib/constants.py index 2a196a72e..211d44bf8 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -84,3 +84,6 @@ INISECT_INS = "instance" # common exit codes EXIT_NOTMASTER = 11 + +# others +DEFAULT_BRIDGE = "xen-br0" diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster index 6c9a970bb..e941bbef4 100755 --- a/scripts/gnt-cluster +++ b/scripts/gnt-cluster @@ -202,15 +202,16 @@ commands = { default="xenvg",), make_option("-b", "--bridge", dest="def_bridge", help="Specify the default bridge name (cluster-wide)" - " to connect the instances to [xen-br0]", + " to connect the instances to [%s]" % + constants.DEFAULT_BRIDGE, metavar="BRIDGE", - default="xen-br0",), + default=constants.DEFAULT_BRIDGE,), make_option("--master-netdev", dest="master_netdev", help="Specify the node interface (cluster-wide)" - " on which the master IP address will be added " - " [xen-br0]", + " on which the master IP address will be added " + " [%s]" % constants.DEFAULT_BRIDGE, metavar="NETDEV", - default="xen-br0",), + default=constants.DEFAULT_BRIDGE,), ], "[opts...] <cluster_name>", "Initialises a new cluster configuration"), -- GitLab