In my vSphere HTML plugin, I want to show a different set of options under the menu item on a datastore. I am not able to figure out how my plugin.xml should look like based on the requirement. If anyone has been in a similar situation before, I would love to know how you solved it.
Situation:
On the Datastore, based on the type of it(VMFS or VVol), I have a different set of options that I want to show. Let's call it VMFS Options and VVol Options. I have some conditions in the backend which gives me true or false based on the VMFS(isMyVMFS) or VVol(isMyVVol).
This(shown in the pluginxml.txt file) is how I tried to do it, but it shows 2 entries of the same name(org.title) when I right-click a Datastore.
What I want is a single entry of org.title which shows sub items based on the condition it satisfies for.
Hi,
If I understand correctly, you need to defined two "vise.actions.sets" objects - one with actions for VMFS and the other with actions for VVol.
Use the <propertyConditions> that you already have on the "vise.actions.sets" objects.
Then create one "vsphere.core.menus.solutionMenus" and add all action items there.
In addition, you can try using "<conditionalProperty>my_property</conditionalProperty>" on "com.vmware.actionsfw.ActionSpec>" level to filter individual actions.
For a concrete example, please refer to "vsphere-wssdk-sample" sample plugin from vSphere 6.5U1 SDK.
Let us know if you this helps.
Best Regards,
Denis
Thank you, Denis. 🙂
I referred to the sample project is the 6.5 SDK and was able to fix the plugin.xml file based on that.