Merge "Remove username from Parser"
This commit is contained in:
commit
9c38c250e7
@ -126,12 +126,6 @@ def parse_setup_config(parser: ArgumentParser):
|
||||
""",
|
||||
type=str, choices=['serial', 'graphical'],
|
||||
default='serial')
|
||||
parser.add_argument("--username", help=
|
||||
"""
|
||||
Username. default is 'sysadmin'
|
||||
""",
|
||||
type=str,
|
||||
default="sysadmin")
|
||||
parser.add_argument("--password", help=
|
||||
"""
|
||||
admin password
|
||||
|
@ -15,6 +15,8 @@ import os
|
||||
|
||||
user = getpass.getuser()
|
||||
|
||||
USERNAME = "sysadmin"
|
||||
|
||||
if platform in ("win32", "win64"):
|
||||
LOGPATH = "C:\\Temp\\pybox_logs"
|
||||
else:
|
||||
|
@ -32,6 +32,7 @@ from helper.install_lab import exec_cmd, fault_tolerant
|
||||
from consts.node import Nodes
|
||||
from consts.networking import NICs, OAM, MGMT, Serial
|
||||
from consts.timeout import HostTimeout
|
||||
from consts import env
|
||||
|
||||
from Parser import handle_args
|
||||
|
||||
@ -2362,6 +2363,8 @@ def load_config():
|
||||
global V_BOX_OPTIONS # pylint: disable=global-statement
|
||||
V_BOX_OPTIONS = handle_args().parse_args()
|
||||
|
||||
V_BOX_OPTIONS.username = env.USERNAME
|
||||
|
||||
if V_BOX_OPTIONS.sysadmin_password is None:
|
||||
V_BOX_OPTIONS.sysadmin_password = V_BOX_OPTIONS.password
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user