Skip to content

Commit

Permalink
baremetal hosts: simplify cli
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Dec 26, 2023
1 parent f3ee5b1 commit 6754d0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kvirt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def start_baremetal_hosts(args):
overrides = handle_parameters(args.param, args.paramfile)
baseconfig = Kbaseconfig(client=args.client, debug=args.debug, offline=True)
iso_url = overrides.get('iso_url')
baremetal_hosts = [args.host] if args.host is not None else overrides.get('baremetal_hosts', [])
baremetal_hosts = [{'url': args.host}] if args.host is not None else overrides.get('baremetal_hosts', [])
bmc_url = overrides.get('bmc_url') or overrides.get('url')
bmc_user = overrides.get('bmc_user') or overrides.get('user') or overrides.get('bmc_username')\
or overrides.get('username') or baseconfig.bmc_user
Expand All @@ -167,7 +167,7 @@ def start_baremetal_hosts(args):
def stop_baremetal_hosts(args):
overrides = handle_parameters(args.param, args.paramfile)
baseconfig = Kbaseconfig(client=args.client, debug=args.debug, offline=True)
baremetal_hosts = [args.host] if args.host is not None else overrides.get('baremetal_hosts', [])
baremetal_hosts = [{'url': args.host}] if args.host is not None else overrides.get('baremetal_hosts', [])
bmc_url = overrides.get('bmc_url') or overrides.get('url')
bmc_user = overrides.get('bmc_user') or overrides.get('user') or overrides.get('bmc_username')\
or overrides.get('username') or baseconfig.bmc_user
Expand Down Expand Up @@ -3226,7 +3226,7 @@ def info_baremetal_host(args):
overrides = handle_parameters(args.param, args.paramfile)
full = overrides.get('full', args.full)
baseconfig = Kbaseconfig(client=args.client, debug=args.debug, offline=True)
baremetal_hosts = [args.host] if args.host is not None else overrides.get('baremetal_hosts', [])
baremetal_hosts = [{'url': args.host}] if args.host is not None else overrides.get('baremetal_hosts', [])
bmc_url = overrides.get('bmc_url') or overrides.get('url')
bmc_user = overrides.get('bmc_user') or overrides.get('user') or overrides.get('bmc_username')\
or overrides.get('username') or baseconfig.bmc_user
Expand Down

0 comments on commit 6754d0c

Please sign in to comment.