]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Revert "lock.py: is_vpm should test is_vm"
authorZack Cerza <zack@redhat.com>
Fri, 10 Jul 2015 18:28:06 +0000 (12:28 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 10 Jul 2015 18:28:06 +0000 (12:28 -0600)
This reverts commit be9aa8a6cfe6c3d182ba640ceadf1b3a2ff93d53.

is_vm() is passing 'user@host' instead of just 'host'

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/lock.py

index 73bb648ed29a788654e3d3fee95d4494d9aab72a..1fc685e4f65b2d8449c42cd89f79c4bb300000a5 100644 (file)
@@ -17,9 +17,7 @@ from .lockstatus import get_status
 
 log = logging.getLogger(__name__)
 
-
-def is_vm(name):
-    return get_status(name)['is_vm']
+is_vpm = lambda name: 'vpm' in name
 
 
 def get_distro_from_downburst():
@@ -316,7 +314,7 @@ def main(ctx):
         if ctx.owner is None and user is None:
             user = misc.get_user()
         # If none of them are vpm, do them all in one shot
-        if not filter(is_vm, machines):
+        if not filter(is_vpm, machines):
             res = unlock_many(machines, user)
             return 0 if res else 1
         for machine in machines: