From be279fb622ec1c3e7f9c2448f96acdf5dc1dae5b Mon Sep 17 00:00:00 2001 From: Tianhao He Date: Thu, 17 Aug 2017 00:27:34 -0700 Subject: [PATCH] add vc password parameter --- samples/vsphere/vcenter/setup/main.py | 2 ++ samples/vsphere/vcenter/setup/setup_cli.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/samples/vsphere/vcenter/setup/main.py b/samples/vsphere/vcenter/setup/main.py index c5fc110d..e4617faa 100644 --- a/samples/vsphere/vcenter/setup/main.py +++ b/samples/vsphere/vcenter/setup/main.py @@ -45,6 +45,8 @@ _testbed = testbed.get() # then override testbed.py values if (args.vcenterserver): _testbed.config['SERVER'] = args.vcenterserver +if (args.vcpassword): + _testbed.config['PASSWORD'] = args.vcpassword if (args.esxhost1): _testbed.config['ESX_HOST1'] = args.esxhost1 if (args.esxhost2): diff --git a/samples/vsphere/vcenter/setup/setup_cli.py b/samples/vsphere/vcenter/setup/setup_cli.py index 7b04d332..9d2493fe 100644 --- a/samples/vsphere/vcenter/setup/setup_cli.py +++ b/samples/vsphere/vcenter/setup/setup_cli.py @@ -91,6 +91,11 @@ def build_arg_parser(): help='Vcenter server IP to prepare the testbed to run the samples.' 'If not passed as argument, update testbed.py file') + parser.add_argument('-p', '--vcenterpassword', + action='store', + help='Vcenter server password' + 'If not passed as argument, update testbed.py file') + parser.add_argument('-e1', '--esxhost1', action='store', help='ESX HOST 1 IP to prepare the testbed to run the samples.'