Remove username from Parser
Removal of the --username argument from Parser and pass V_BOX_OPTIONS.username value in the install_vbox.py Closes-Bug: 2028861 Change-Id: I68422f5b436ea1d1f75a9272fb0ee3811453e846 Signed-off-by: Daniel Caires <daniel.caires@encora.com>
This commit is contained in:
parent
0c1a53cebd
commit
fc8508e97a
virtualbox/pybox
@ -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
|
||||
|
||||
@ -2184,6 +2185,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