The vCO plugin I'm working on has an inventory implementation, just like the inventory vCenter Server plugin has provided.
My question is that, when the "Reload" button for a node is clicked (like the screenshot shown above) , in the IPluginFactory implementation, which "unique" method will be invoked.
When I say "unique", I mean a method that will only be triggered when "Reload" button is clicked. In this method I'd like to clear the cache and reload the node and its children nodes.
I do know that some methods within IPluginFactory are invoked, for example find(...), findRelation(...), but it doesn't not make sense to clear cache and reload in those methods as they are not unique (meaning that they would be triggered in other places where no clearing cache should be intended).
So please let me know which method is hooked specifically for the "Reload" menuitem, or any other solution to implement what I wanted. Thanks in advance!
Wonderful, that's what I'm looking for. Thanks.
I thought of the method invalidate() before but I didn't see it being invoked when I clicked the reload menuitem, now I confirmed it does, guess I was too careless
Unfortunately no, (AFAIK) there's no way so far... unless a specific plug-in decides to make those methods (or their functionality) available for its inventory items somehow.
Thanks for your reply. Because the reload() methods of datacenter,cluster, vms, etc... doesn't seem to do what they're meant for because i can't refresh my data between 2 workflow executiions.
Is it possible that even trying to reload the data from those objects with the method "reload()" the objects haven't changed actually? Is the action that causes the change in the object's state triggered by vCO through a workflow or directly/manually from the vCenter? In the 1st case the vCenter plug-in should keep the objects up to date, and in the 2nd case then the method "reload()" should be invoked... but if none of both cases is working then it could be a bug.