From 4f96ec0481dd173c8f45d404225756e88251b092 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 26 Mar 2016 19:41:59 +0100 Subject: [PATCH] lock: add the --arch option So that it is possible to lock a target of a given arch. The lock_many function already has the argument, it only needs to be added to the list of available options. Signed-off-by: Loic Dachary --- scripts/lock.py | 5 +++++ teuthology/lock.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/lock.py b/scripts/lock.py index 4b7de691cc..a8071825ae 100644 --- a/scripts/lock.py +++ b/scripts/lock.py @@ -158,6 +158,11 @@ def parse_args(argv): default=None, help='OS (distro) version such as "12.10"', ) + parser.add_argument( + '--arch', + default=None, + help='architecture (x86_64, i386, armv7, arm64)', + ) parser.add_argument( '--json-query', default=None, diff --git a/teuthology/lock.py b/teuthology/lock.py index 34b5331291..d9930a9178 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -333,7 +333,7 @@ def main(ctx): machines_to_update.append(machine) elif ctx.num_to_lock: result = lock_many(ctx, ctx.num_to_lock, ctx.machine_type, user, - ctx.desc, ctx.os_type, ctx.os_version) + ctx.desc, ctx.os_type, ctx.os_version, ctx.arch) if not result: ret = 1 else: