VMware {code} Community
ChrisSmith2
Enthusiast
Enthusiast

Persistent data storage options for Flex+HTML UIs and large/HA environments?

The SDK documentation section on storing persistent data for a plugin only covers a single method, which is to store it in a local file that is specific to the VCenter instance and UI variant (Flex/HTML) that is being used at the time.

This method gives a very inconsistent user experience - changing between the two clients, or doing a failover in a VCSA HA environment effectively resets the plugin to its initial state. I expect that using linked mode would suffer similar issues, but haven't tested that as yet.

The SDK documentation just says "you must use a separate back end server or database" for complex/large data sets. However, to do that, the plugin needs to store the URL/credentials of that back-end server to be able to connect to it - so that suffers exactly the same problem as above.

Is there a way for a plugin to store a small amount of private information in the VCenter object database itself - at least enough to connect to a back-end server? I can see a workaround using tags/custom attributes, but this seems extremely ugly, and would be visible to the user (so prone to editing/corruption/information disclosure).

0 Kudos
1 Reply
laurentsd
VMware Employee
VMware Employee

hi Chris,

You're right that the SDK doesn't have a true persistence API for plugin data.  We have always felt that this was the plugin's backend responsibility to handle that.

As far as storing the backend address and credentials we could certainly do better in a future version. Right now you can store the backend address in the vCenter Extension object used to register your plugin package for instance.  But credentials should be handled separately, I assume with a UI prompt, the same way you do when configuring the plugin for the first time.

0 Kudos