amarinov
VMware Employee
VMware Employee

Hi Shravan,

1. Is it possible to achieve the singleton plugin instance working using the given sdk sample and tools? If so what is the command options we should use to support multiple vCenters?

The provided sample does not support working with multiple vCenters.

2. What are the file/function changes we need to make in service/ui code to support this routing?

- Your plugin should accept multi-VC configuration at startup. Instead of passing multiple command line parameters in the form: "--vcenter.guid=5xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx --vcenter.thumbprint=1xxxxxxxxxxxxxxxxxxxxxxxxxx --vcenter.fqdn=vc1.com --vcenter.port=443" you should pass a JSON file that contains an array of VC configurations and parse that file to a Java object using Jackson or a similar library.
- When your plugin front-end is making a call for a specific object you should pass the target object ID and target VC GUID as part of the REST call. Then your plugin backend should make an API call to that VC, whose IP it should derive from the target VC GUID and plugin configuration. E.g. a view of your plugin is rendered in Cluster -> Monitor and you want it to show some properties of the cluster, then your REST call should contain the cluster object ID and the VC GUID.
- When your plugin front-end is making a call that queries all VCs with which your plugin is registered, then the respective plugin backend API should query all VCs present in the plugin configuration. E.g. your plugin has a global view that has to display some properties of all VCs with which your plugin is registered.

Thanks,
Aleksandar