Hello all,
How does everyone goes one with this kind of issue ? At first it seemed a good idea to create a CE with an Array of CompositeType, and the fields are normally strings.
But I'm not at a point that I have to add more and more stuff to these CE, and sometimes update a bunch of them... Via the GUI is not pratical, via an export there's also chances of errors.
At one point I thought maybe I should think about another way maybe store this in the code of an action ?
Here's what my CE looks like:
So at one point in some of my workflows, I bind that CE in my workflow, go through it with some basic values like the OS and environnement, and I would get the folder and the site to use for our Monitoring system. But this has come a lot harder to maintain because I have so many possibilities. This one can be quite simple but from time to time, the people managing the monitoring system could ask me to use a different site for a specific environnement. But yes, I agree that right now, by the look of this, I could probably simplify this.
There were already similar therads answered, please refer: https://communities.vmware.com/message/2633797#2633797
https://communities.vmware.com/message/2388538#2388538
parmarr, its funny, the first post was a older post of mine. Illian, gave me a good answer, but what I'm trying to see now, is to edit an Array of CompositeType. If I want to update only 1 field in the array. Right now I have to delete the line, re-add it, and if I want to have a neat array, I have to move the line around to make it readable, otherwise it will sit at the bottom as the last inserted element.
So I haven't found a way to manage huge arrays of compositetype, or even huge arrays of string in a CE. But yes, I could add one and delete the old one.
And the second link, its a cool info, but it doesn't help to do a inplace replace if I can say.
But ultimately, my question, is am I doing the right thing ? Or should I consider an alternative ? I mean, is it a good way of storing that amount of info that I have to update from time to time ? And add more stuff to it, and with time I fear that it will be harder to manage. I was thinking of maybe storing that huge arrat into a scriptable task or an action maybe ?
What's your use cases of CE and when you use them and when you use something else ?
Thanks!
I was thinking about this issue yesterday, I thought that I could maybe uses the Vmware Tags. Would it be a good idea ?
All I want to do is Tag objects like VM Folder, Ressources Pool, Datastore Clusters, vCenter, So lets take a VM Folder:
VMFolders would have Tags such as:
Other objects like Datastore Clusters:
And then I would have an action that would go through all vCenters, find the needed objets that fits the requested values, if I find more than one, I could potentaly return an error.
I've never used Tags before, and from what I read, it seems to be doing exactly that, and I can't see a reason not to use them.
Yes, tags should work. The only "problem" is that there are several different ways to work with tags in vRO
Also, there is Tagging plug-in by Christophe Decanini, available at https://code.vmware.com/samples?id=1437
I would like to use them with the vCenter plugin, because in the end, I will then pass that returned value to another workflow that will start the cloning process or vm creation process depending on the os type.
And I'm using 7.3, so I guess I should be good then! Yay!
I'm happy because I won't have to manually update the list of items.
OK, try with vCenter plug-in, and please report back if what the vCenter plug-in 7.3 exposes in the scripting are the "real" tags. For example, if you tag some object using vCenter plug-in scripting API, are the newly added tags/values visible in the vSphere Web Client UI views for the same object?