Add ability to login an extension user with a certificate #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today, the only way to connect to the vCenter Server using the rbvmomi gem is using the Login function. VMware also provides the option to login an extension user using a certificate (LoginExtensionByCertificate). If you're not familiar, an extension user is added to the vCenter Server using the vSphere client by registering a plugin in the "Manage Plug-ins" dialog.
You can see an example plugin, public certificate, and private key combo here: https://gist.github.com/3030573
With the changes I've made, you can login to the VC with the following command:
vim = RbVmomi::VIM::connect_extension_by_certificate proxyHost: 'vcenter server ip', extension_key: 'My_Extension_Key', insecure: true, cert: "server.crt", key: "server.key"
I verified that I was able to retrieve information from the vCenter Server after logging in
Let me know if you need any more information
Thanks,
Sean