|
|
@ -132,12 +132,24 @@ def spawn_vcsim():
|
|
|
|
'-httptest.serve',
|
|
|
|
'-httptest.serve',
|
|
|
|
'%s:%s' % (hostname, port),
|
|
|
|
'%s:%s' % (hostname, port),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
for x in cli_opts:
|
|
|
|
|
|
|
|
name = x[0]
|
|
|
|
# esx only allows certain arguments
|
|
|
|
default = x[1]
|
|
|
|
if request.args.get('esx'):
|
|
|
|
if request.args.get(name):
|
|
|
|
cmd.append('-esx')
|
|
|
|
default = request.args.get(name)
|
|
|
|
for x in [('vm', 1), ('ds', 1)]:
|
|
|
|
cmd.append('-%s=%s' % (name, default))
|
|
|
|
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]
|
|
|
|
|
|
|
|
if request.args.get(name):
|
|
|
|
|
|
|
|
default = request.args.get(name)
|
|
|
|
|
|
|
|
cmd.append('-%s=%s' % (name, default))
|
|
|
|
cmd = ' '.join(cmd)
|
|
|
|
cmd = ' '.join(cmd)
|
|
|
|
cmd += ' 2>&1 > vcsim.log'
|
|
|
|
cmd += ' 2>&1 > vcsim.log'
|
|
|
|
|
|
|
|
|
|
|
|