mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
Remove needless arg from list_locks()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
parent
59d14b8b4b
commit
ded5c219fc
@ -83,7 +83,7 @@ def unlock_one(ctx, name, user=None):
|
||||
return success
|
||||
|
||||
|
||||
def list_locks(ctx):
|
||||
def list_locks():
|
||||
success, content, _ = ls.send_request('GET', config.lock_server)
|
||||
if success:
|
||||
return json.loads(content)
|
||||
@ -181,7 +181,7 @@ def main(ctx):
|
||||
log.error("Lockserver doesn't know about machine: %s" %
|
||||
machine)
|
||||
else:
|
||||
statuses = list_locks(ctx)
|
||||
statuses = list_locks()
|
||||
vmachines = []
|
||||
|
||||
for vmachine in statuses:
|
||||
@ -196,7 +196,7 @@ def main(ctx):
|
||||
statuses = [ls.get_status(ctx, machine)
|
||||
for machine in machines]
|
||||
else:
|
||||
statuses = list_locks(ctx)
|
||||
statuses = list_locks()
|
||||
if statuses:
|
||||
if ctx.machine_type:
|
||||
statuses = [status for status in statuses
|
||||
@ -330,7 +330,7 @@ def updatekeys(ctx):
|
||||
|
||||
|
||||
def keyscan_check(ctx, machines):
|
||||
locks = list_locks(ctx)
|
||||
locks = list_locks()
|
||||
current_locks = {}
|
||||
for lock in locks:
|
||||
current_locks[lock['name']] = lock
|
||||
@ -375,7 +375,7 @@ def scan_for_locks(ctx, machines):
|
||||
|
||||
def do_summary(ctx):
|
||||
lockd = collections.defaultdict(lambda: [0, 0, 'unknown'])
|
||||
for l in list_locks(ctx):
|
||||
for l in list_locks():
|
||||
if ctx.machine_type and l['type'] != ctx.machine_type:
|
||||
continue
|
||||
who = l['locked_by'] if l['locked'] == 1 else '(free)', l['type']
|
||||
|
@ -321,7 +321,7 @@ def nuke(ctx, should_unlock, sync_clocks=True, reboot_all=True, noipmi=False):
|
||||
targets = dict(ctx.config['targets'])
|
||||
if ctx.name:
|
||||
log.info('Checking targets against current locks')
|
||||
locks = list_locks(ctx)
|
||||
locks = list_locks()
|
||||
# Remove targets who's description doesn't match archive name.
|
||||
for lock in locks:
|
||||
for target in targets:
|
||||
|
@ -255,8 +255,7 @@ def get_arch(config):
|
||||
y = yaml.safe_load(file(yamlfile))
|
||||
machine_type = y.get('machine_type')
|
||||
if machine_type:
|
||||
fakectx = []
|
||||
locks = lock.list_locks(fakectx)
|
||||
locks = lock.list_locks()
|
||||
for machine in locks:
|
||||
if machine['type'] == machine_type:
|
||||
arch = machine['arch']
|
||||
|
@ -56,7 +56,7 @@ def lock_machines(ctx, config):
|
||||
|
||||
while True:
|
||||
# make sure there are enough machines up
|
||||
machines = lock.list_locks(ctx)
|
||||
machines = lock.list_locks()
|
||||
if machines is None:
|
||||
if ctx.block:
|
||||
log.warn('error listing machines, trying again')
|
||||
|
Loading…
Reference in New Issue
Block a user