vmware-archive / rvc

RVC is a Linux console UI for vSphere, built on the RbVmomi bindings to the vSphere API.
MIT License
240 stars 48 forks source link

cluster.add_host does not respect insecure when non-interactive #80

Open aburnheimer opened 11 years ago

aburnheimer commented 11 years ago

cluster.add_host does not seem to respect the --insecure option when used in rvc_exec calls, non-interactively:

$ rvc user:password@1.2.3.4
0 /
1 1.2.3.4/
> cd /1.2.3.4/my_datacenter/my_host
/1.2.3.4/my_datacenter/my_host> cluster.add_host -k new_cluster/ 5.6.7.8 -u jack -p splat
AddHost ZZ-TBD: SSLVerifyFault: Authenticity of the host's SSL certificate is not verified.
D: running ❲
   . . . command succeeds . . .

...as opposed to:

$ cat script_to_run.rvc
rvc_exec "cd /1.2.3.4/my_datacenter/my_host"
rvc_exec "cluster.add_host -k new_cluster/ 5.6.7.8 -u jack -p splat"
$ rvc user:password@1.2.3.4 -s script_to_run.rvc
$ echo $?
0
$       # . . . command appears to succeed, but . . .

...in the status field of logs in the vSphere client for Windows running on 1.2.3.4, the following shows:

Authenticity of the host's SSL certificate is not verified.

Thanks much for looking into the issue!