return ret
+
def do_summary(ctx):
lockd = collections.defaultdict(lambda: [0, 0, 'unknown'])
if ctx.machine_type:
level=loglevel,
)
all_ = args['--all']
- if all_:
- machines = []
- elif args['<machine>']:
+ machines = []
+ if args['<machine>']:
machines = [misc.canonicalize_hostname(m, user=None)
for m in args['<machine>']]
elif args['--targets']:
for doc in docs:
machines = [n for n in doc.get('targets', dict()).iterkeys()]
- return keys.do_update_keys(machines, all_)
\ No newline at end of file
+ return keys.do_update_keys(machines, all_)[0]
if all_:
machines = reference.keys()
keys_dict = misc.ssh_keyscan(machines)
- return push_new_keys(keys_dict, reference)
+ return push_new_keys(keys_dict, reference), keys_dict
def push_new_keys(keys_dict, reference):
if not ops.update_lock(hostname, ssh_pub_key=pubkey):
log.error('failed to update %s!', hostname)
ret = 1
- return ret
\ No newline at end of file
+ return ret
log.error('Unable to create virtual machine: %s',
machine)
unlock_one(ctx, machine, user)
+ ok_machs = keys.do_update_keys(ok_machs.keys())[1]
return ok_machs
return machines
elif response.status_code == 503:
full_name = misc.canonicalize_hostname(guest)
provision.destroy_if_vm(ctx, full_name)
provision.create_if_vm(ctx, full_name)
- if teuthology.lock.keys.do_update_keys(keys_dict):
+ if teuthology.lock.keys.do_update_keys(keys_dict)[0]:
log.info("Error in virtual machine keys")
newscandict = {}
for dkey in all_locked.iterkeys():