Add IDISK_NAME and INIC_NAME constants
authorChristos Stavrakakis <cstavr@grnet.gr>
Thu, 4 Apr 2013 08:51:06 +0000 (11:51 +0300)
committerHelga Velroyen <helgav@google.com>
Wed, 17 Apr 2013 14:49:05 +0000 (16:49 +0200)
Declare IDISK_NAME and INIC_NAME constants and add them to the
IDISK_PARAMS_TYPE and INIC_PARAMS_TYPE.

Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/cmdlib.py
lib/constants.py

index dc6e907..4a5eb84 100644 (file)
@@ -7662,6 +7662,7 @@ class LUInstanceRecreateDisks(LogicalUnit):
     constants.IDISK_VG,
     constants.IDISK_METAVG,
     constants.IDISK_PROVIDER,
+    constants.IDISK_NAME,
     ]))
 
   def _RunAllocator(self):
index 7b254ca..6d781a5 100644 (file)
@@ -1328,6 +1328,7 @@ IDISK_ADOPT = "adopt"
 IDISK_VG = "vg"
 IDISK_METAVG = "metavg"
 IDISK_PROVIDER = "provider"
+IDISK_NAME = "name"
 IDISK_PARAMS_TYPES = {
   IDISK_SIZE: VTYPE_SIZE,
   IDISK_MODE: VTYPE_STRING,
@@ -1335,6 +1336,7 @@ IDISK_PARAMS_TYPES = {
   IDISK_VG: VTYPE_STRING,
   IDISK_METAVG: VTYPE_STRING,
   IDISK_PROVIDER: VTYPE_STRING,
+  IDISK_NAME: VTYPE_MAYBE_STRING,
   }
 IDISK_PARAMS = frozenset(IDISK_PARAMS_TYPES.keys())
 
@@ -1344,12 +1346,14 @@ INIC_IP = "ip"
 INIC_MODE = "mode"
 INIC_LINK = "link"
 INIC_NETWORK = "network"
+INIC_NAME = "name"
 INIC_PARAMS_TYPES = {
   INIC_IP: VTYPE_MAYBE_STRING,
   INIC_LINK: VTYPE_STRING,
   INIC_MAC: VTYPE_STRING,
   INIC_MODE: VTYPE_STRING,
   INIC_NETWORK: VTYPE_MAYBE_STRING,
+  INIC_NAME: VTYPE_MAYBE_STRING,
   }
 INIC_PARAMS = frozenset(INIC_PARAMS_TYPES.keys())