]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock: drop machine-type default, but require for lock-many
authorSage Weil <sage@inktank.com>
Sat, 13 Jul 2013 20:09:07 +0000 (13:09 -0700)
committerSage Weil <sage@inktank.com>
Thu, 18 Jul 2013 03:54:08 +0000 (20:54 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/lock.py

index b97e61cdc4ba9b21dd35fd39b48b56ae4e47b296..b5350aa9dd9687e4b8ed8c905b6b6167503a2d0f 100644 (file)
@@ -182,7 +182,7 @@ Lock, unlock, or query lock status of machines.
         )
     parser.add_argument(
         '--machine-type',
-        default='plana',
+        default=None,
         help='Type of machine to lock',
         )
     parser.add_argument(
@@ -267,6 +267,9 @@ Lock, unlock, or query lock status of machines.
             '--all and --owner are mutually exclusive'
         assert not machines, \
             '--all and listing specific machines are incompatible'
+    if ctx.num_to_lock:
+        assert ctx.machine_type, \
+            'must specify machine type to lock'
 
     if ctx.brief:
         assert ctx.list, '--brief only applies to --list'