From c5e489f7e17b9008593d3d0d90c5724d2ee4f093 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 19 Jan 2009 14:35:03 +0000
Subject: [PATCH] Move the default MAC prefix to the constants file

Instead of having the default live in the gnt-cluster script, we move it
to the constants file. The patch also fixes a typo on constants.py.

Reviewed-by: ultrotter
---
 lib/constants.py    | 3 ++-
 scripts/gnt-cluster | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/constants.py b/lib/constants.py
index c21a7f4d4..a483165fb 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -242,6 +242,7 @@ GANETI_RUNAS = "root"
 DEFAULT_VG = "xenvg"
 BIND_ADDRESS_GLOBAL = "0.0.0.0"
 MIN_VG_SIZE = 20480
+DEFAULT_MAC_PREFIX = "aa:00:00"
 
 # RPC constants
 (RPC_ENCODING_NONE,
@@ -401,7 +402,7 @@ ELOG_PROGRESS = "progress"
 RAPI_ENABLE = True
 RAPI_PORT = 5080
 
-# max dynamnic devices
+# max dynamic devices
 MAX_NICS = 8
 MAX_DISKS = 16
 
diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index 09c1eb261..862d36426 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -541,7 +541,7 @@ commands = {
                         help="Specify the mac prefix for the instance IP"
                         " addresses, in the format XX:XX:XX",
                         metavar="PREFIX",
-                        default="aa:00:00",),
+                        default=constants.DEFAULT_MAC_PREFIX,),
             make_option("-g", "--vg-name", dest="vg_name",
                         help="Specify the volume group name "
                         " (cluster-wide) for disk allocation [xenvg]",
-- 
GitLab