Skip to content

Commit ab9ac5d

Browse files
committed
Adding ESXPASSWORD as commandline argument. ESXPassword cannot be hardcoded in testbed.py file since ESX doesnt have default password
1 parent c56d5af commit ab9ac5d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

samples/vsphere/vcenter/setup/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
_testbed.config['ESX_HOST2'] = args.esxhost2
5151
if (args.nfsserver):
5252
_testbed.config['NFS_HOST'] = args.nfsserver
53+
if (args.esxpassword):
54+
_testbed.config['ESX_PASS'] = args.esxpassword
5355

5456
print(_testbed.to_config_string())
5557

samples/vsphere/vcenter/setup/setup_cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def build_arg_parser():
3939
-e1, --esxhost1
4040
-e2, --esxhost2
4141
-n, --nfsserver
42+
-epassword, --esxpassword
4243
4344
"""
4445
parser = argparse.ArgumentParser(
@@ -103,4 +104,8 @@ def build_arg_parser():
103104
action='store',
104105
help='NFS Server IP to setup datastore for samples run.'
105106
'If not passed as argument, update testbed.py file')
107+
parser.add_argument('-epassword', '--esxpassword',
108+
action='store',
109+
help='ESX Server password'
110+
'If not passed as argument, update testbed.py file')
106111
return parser

0 commit comments

Comments
 (0)