home.switch-rack: use password for authentication
This commit is contained in:
parent
fe7d57aca0
commit
7eb2bf68d8
3 changed files with 13 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
from os import environ
|
||||
from sys import argv
|
||||
|
||||
from bundlewrap.metagen import NodeMetadataProxy
|
||||
from bundlewrap.exceptions import FaultUnavailable
|
||||
from bundlewrap.repo import Repository
|
||||
from bundlewrap.utils import Fault
|
||||
|
@ -19,13 +20,17 @@ def print_faults(dictionary, keypath=[]):
|
|||
else:
|
||||
if '\n' not in resolved_fault:
|
||||
print('{}/{}: {}'.format('/'.join(keypath), key, value))
|
||||
elif isinstance(value, dict):
|
||||
elif isinstance(value, (list, set, tuple)):
|
||||
print_faults(dict(enumerate(value)), keypath=keypath+[key])
|
||||
elif isinstance(value, (dict, NodeMetadataProxy)):
|
||||
print_faults(value, keypath=keypath+[key])
|
||||
|
||||
|
||||
if len(argv) == 1:
|
||||
print('node name missing')
|
||||
exit(1)
|
||||
|
||||
node = repo.get_node(argv[1])
|
||||
print_faults(node.metadata)
|
||||
print_faults({
|
||||
'password': node.password,
|
||||
'metadata': node.metadata,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue