Hi all,
Just a simple question: is it possible to use a Morpheus Option List of Type REST to query VMware vCenter or is this only possible with Type Plugin (because with Plugin we can use DataSet Providers)?
We can use REST API already within scripts like Powershell, Bash and so on against VMware vCenter. This uses a two step process to get things done, like the first step is the authentication (a PUSH to get a short living Session ID) and the second step uses the Session ID with an appropriate header (vmware-api-session-id). The second step is the concrete query (like GET VM) of the VMware vCenter.
We cannot get this done with the Option List of Type REST, since this is a two step process. Should this be possible at all, and if so, how?
Thank you,
Kai
I think you will need use the Option source plugin get this to work. The following may help : Example Morpheus Option Source Plugin
2 Likes
Hi Waqas,
I already thought that this will be the only way - I am familiar with Plugins and how to create them. Some of our customers do not really prefer Plugins, since they need to develop and maintain the source code. I will take a look into the concrete problem and see your source as a very good starting point.
Thank you,
Kai
How real time do the results need to be?
I get around some of these by creating a schedule ‘Job’ that runs a script that populates a manual option list. I do that for items that don’t need to poll real time, but I can schedule that job to run really as often as I’d like.
This would allow you to do a custom authentication to VMware and create an Option List of the values you require. (I have customers doing this with Affinity Rules for example)
Hi Chris,
This would be also a solution for me, because I only want to get VMware Tag Categories and associated Tags from the VMware vCenter. This does not need to be real time, once a day would be enough.
I also thought about a script like Powershell that uses the REST API (two steps with SESSION ID) or VMware.PowerCLI (one step with User/Password) to pull the data and then to use the Morpheus REST API to create an Option List with the content or to update the manual list within the Option List.
I see the answer of Waqas as solution 1 (Plugin) and yours as solution 2 (Task + Job Schedule). Thank you to you both!
Regards,
Kai
1 Like