Merge "Remove username from Parser"

This commit is contained in:
Zuul 2023-09-27 15:02:07 +00:00 committed by Gerrit Code Review
commit 9c38c250e7
3 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -15,6 +15,8 @@ import os
user = getpass.getuser()
USERNAME = "sysadmin"
if platform in ("win32", "win64"):
LOGPATH = "C:\\Temp\\pybox_logs"
else:

View File

@ -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