The idea of the inventory is to store stateFULL "business objects" there. Usually this stateful information is gathered by the external system you want to integrate. For instance, in the vCenter ...
See more...
The idea of the inventory is to store stateFULL "business objects" there. Usually this stateful information is gathered by the external system you want to integrate. For instance, in the vCenter Plugin you have a list of VM objects, gathered by calls to the actual vCenter. In the easiest desing you jsut have to keep the "root level" objects of the inventory in vCO, and the for each child object a call to the external system gets the proper child object. Again: vCenter plugin example: Just the connection to the vCenter is persisted in vCO, if you dig down in the inventory tree (or find a VM via finder wizard in workflow input presentation) the plugin will call that vCenter to find the actual VM object. (Side note: That is just for example, in real world the vCenter plugin has a powerful caching mechanism implemented for better performance. But you get the idea...) So, how to persist inventory objects in vCO (root level, or even deeper levels): 1. use vCO configuration. For that you have to implement the configuration api, and create your own tab in vCO configuration. (again: vCenter Plugin configuration is done in vCO configuration). In the solar system plugin example you can find an implementation for that, too. However, this is "old style, and I do NOT recommend to use this anymore. 2. (the modern way) Persist the objects in vCO Resource Elements: Then they are stored in Resource Elements. This allows - dynamic reconfiguration at runtime via workflows - the plugin configuration is automatically backed up when backing up the vCO database, or exporting packages. All the newer Plugins use this design (REST, SOAP, Database, Powershell)... You describe that you always return new objects, that means your inventory is stateless, so you don't really need an inventory at all. Just expose the Java classes to javascript via vso.xml and instanciate them in Javascript. Cheers, Joerg