Hi, I am looking for some guidance to working with the vSphere API and Ruby. Here are some questions someone might be able to help me with;
- Do you have any advice on how to learn/work with the SOAP API in vSphere. Fairly open ended question so maybe the next two give some more context.
- Here is a Ruby script that does the initial authentication to get the cookie that is required for subsequent calls, can you check the script and give me guidance on who it is actually written, I am concerned that I have actually written out the soap envelope, when actually this could be done by a ruby method? Also is this your experience, having to get the cookie first?
http://pastebin.com/embed.php?i=aDgu8ukP
- The ManagedObjectReference seems to be required everywhere in the SOAP API, e.g. you cannot call any of the SOAP API without having to give it some sort of MOR, do you have some code as examples how you have navigated through vSphere MOR? I am thinking things like the UI Folders view must use that extensively?
I do have a use case, and thats âImporting an OVA form HTTP source into vSphereâ, I know this needs to be done using the importvapp function in the api, but is proving very difficult to work with, I guess if I can get a good grounding in the api first then any function will be easily understood.
Many thanks