1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add an option to spawn vcsim in esx mode (#31155)

This commit is contained in:
jctanner 2017-10-02 08:44:13 -04:00 committed by John R Barker
parent 614a2b403e
commit 6b6a145027

View file

@ -132,6 +132,18 @@ def spawn_vcsim():
'-httptest.serve',
'%s:%s' % (hostname, port),
]
# esx only allows certain arguments
if request.args.get('esx'):
cmd.append('-esx')
for x in [('vm', 1), ('ds', 1)]:
name = x[0]
default = x[1]
if request.args.get(name):
default = request.args.get(name)
cmd.append('-%s=%s' % (name, default))
else:
# use all other options as requested for vcenter
for x in cli_opts:
name = x[0]
default = x[1]