VMware Cloud Community
qc4vmware
Virtuoso
Virtuoso

vcTag scriptable objects and custom fields

I am not sure if I missed the memo or what but it seems that in 5.1 custom fields are now read only and everything needs to be converted to tags.  I am trying to figure out how to programatically interact with the tagging as we use custom fields to sync some information to and fro from our machine database.  I see the property "tags" on most of the managed entities but I don't see where I can manipulate the tags (add/change/delete).  All I can do is get an array of the tags currently associated with the entity.

Do I need to tweak something in my vCenter configuration to keep the custom fields in place for now and useable as they were before?  The api docs all say "experimental" on that attribute and the vcTag object type.

Paul

0 Kudos
2 Replies
Burke-
VMware Employee
VMware Employee

I don't recall ever doing any work with custom fields in vCO ... whenever I have had the need to store some custom metadata in vCO projects, my team has generally used the custom properties ... these key/value pairs are stored in vCO and can be applied to any inventory item that vCO can see. Since they are stored in vCO, they do not appear in vCenter or the systems that are represented in the inventory. The objects/methods involved with this techniqe are:

Server.setCustomProperty

Server.getCustomProperty

Server.getCustomPropertyKeys

While I can't directly answer your concern, hopefully I have provided you with a usable alternative...

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
qc4vmware
Virtuoso
Virtuoso

So I think I have mostly gotten a handle on what is happening.  I think I must have happend to have something environmental causing my workflows to fail while at the same time going into the web client and attempting to interact with the custom fields.  When you attempt to modify them you are presented with this wizard:

Screen Shot 2013-01-03 at 6.34.24 PM.png

It clearly says that the custom attributes are going away and will happily convert them to tags.  Since my workflows were failing to update them I assumed they were locked out and only available read only until you convert them all to tags.  It seems that I can in fact still add/edit them via the api or the vSphere full windows client.  Unfortunately the display of the custom fields, annotations, attributes whatever you want to call them is not exposed as it is in the full client but the tags are.  We actually use the custom fields to display meaningful information and a couple of them we allow modifications to update our machine database.  I'd like to for the forseeable future keep both in sync until the custom fields get fully deprecated.  Right now I don't see a way to do that easily.

0 Kudos