In this recipe, we will see how to create and use custom attributes and tags. We are talking about vCenter tags and not about Orchestrator tags, which have no common ground. This recipe will also use the vAPI plugin.
You need to have a VM to which you can tag or assign a custom attribute.
For tagging, you need to have a vAPI vCenter Endpoint. See the Getting started with vAPI recipe in this chapter.
We will split this recipe into two parts. The first part concerns Custom Attributes, while the second concerns Tags.
Please note that Custom Attributes are only visible in the vSphere Client (also called Fat client or c-Client).
We will now work through the lifecycle of a Custom Attribute:
Create a new workflow.
Drag the
setOrCreateCustomField
action onto the schema. This action will create a definition and set a value to an object.Drag the
getCustomField
action onto the schema. This action will read a Custom Attribute from...