Whamcloud - gitweb
b=1067: permit mounting of clients when OSTs are missing.
authorshaver <shaver>
Wed, 15 Oct 2003 00:17:04 +0000 (00:17 +0000)
committershaver <shaver>
Wed, 15 Oct 2003 00:17:04 +0000 (00:17 +0000)
        Use --inactive <OST_UUID> on the lconf line to specify which OST(s) are
to be skipped.  Don't do this on the MDS right now, though!
r=phik,robert

lustre/utils/Lustre/cmdline.py

index 53bb6e8..4f15cc3 100644 (file)
@@ -28,6 +28,7 @@ class Options:
     FLAG = 1
     PARAM = 2
     INTPARAM = 3
+    PARAMLIST = 4
     def __init__(self, cmd, remain_help, options):
         self.options = options
         shorts = ""
@@ -36,8 +37,9 @@ class Options:
         for opt in options:
             long = self.long(opt)
             short = self.short(opt)
-            if self.type(opt) in (Options.PARAM, Options.INTPARAM):
-                if short:  short = short + ':'
+            if self.type(opt) in (Options.PARAM, Options.INTPARAM,
+                                  Options.PARAMLIST):
+                if short: short = short + ':'
                 if long: long = long + '='
             shorts = shorts + short
             longs.append(long)
@@ -77,6 +79,8 @@ class Options:
     def default(self, option):
         if len(option) >= 4:
             return option[3]
+        if self.type(option) == Options.PARAMLIST:
+            return []
         return None
 
     def lookup_option(self, key, key_func):
@@ -104,6 +108,9 @@ class Options:
                     val = int(a)
                 except ValueError, e:
                     raise error.OptionError("option: '%s' expects integer value, got '%s' "  % (o,a))
+            elif self.type(option) == Options.PARAMLIST:
+                val = values[self.key(option)];
+                val.append(a)
             else:
                 val = 1
             values[self.key(option)] = val