Using Custom Attributes to Add Infrastructure Metadata

Use Embotics® vCommander® custom attributes to provide more management information about your virtualized infrastructure. For example, design your custom attributes so that budget or profit center code information for a VM or an asset number for an infrastructure element can be applied. You can also configure any custom attribute so that a Service Portal user can edit the value.

Once you have created custom attributes, they can be used in reporting, in workflows and in script execution.

You can apply custom attributes to the following infrastructure elements:

services, including VMs, load balancers, databases, virtual services, stacks and auto scaling groups

NotePencil-smallCustom attribute values applied to virtual services, stacks and auto scaling groups are not inherited by their children.

managed systems

folders

datacenters

clusters

hosts

resource pools

datastores

regions

availability zones

Amazon Virtual Private Clouds (VPCs)

Predefined custom attributes

The following predefined custom attributes are included as examples for you to get started:

Cost Center

PCI Applicable

Primary Application

Project Code

Service Type

SLA

SOX Applicable

The Additional Stack Costs custom attribute, which applies only to AWS stacks, has a special function. It captures the cost of resources in the stack which are not supported by vCommander. vCommander automatically assigns a value for this custom attribute to stacks deployed from service requests. This custom attribute cannot be edited or deleted. vCommander users can assign a value for this attribute, but Service Portal users cannot. See the "Annual Stack Cost" field in Adding an AWS Service to the Catalog for more information.

Form-only custom attributes

You can also create custom attributes that apply only to service request forms. Form attributes are useful for capturing information required only during the service request process. Form attribute values do not persist once the completion workflow has finished and are not assigned to deployed services. Note that you also need to add the Custom Attribute or the Multi-Select element to the service request form.

Relationships between custom attributes

You can create relationships between list-type custom attributes that are used on service request forms, so that the value selected for one custom attribute affects the selectable values for another custom attribute. See Creating relationships between custom attributes below.

Importing AWS tags as custom attributes

You can import AWS tags, such as Cost Center, Business Unit, Product, Tier or Version, as vCommander custom attributes. See Synchronizing AWS Tags and Embotics® vCommander® Metadata to learn how.

More information

See also the following Knowledge Base articles:

Synchronizing vCenter Notes, Tags and Annotations to Embotics® vCommander® Custom Attributes

Tagging VMs by Server Role

Enforcing custom attribute values

vCommander allows you to enforce custom attribute values using regular expressions. Enforcing a format can be helpful, for example, when values will be used as input to scripts, or when VM asset information is required in order to comply with corporate standards.

NotePencil-smallAlso check out the Embotics® Knowledge Base video Specifying Custom Attribute Format.

We recommend that you complete all in-progress service requests before you begin using a custom attribute that enforces a specific format. If a custom attribute value specified on the request form does not match the required format, automated deployment of the service will fail, and manual deployment will be required. Likewise, if a custom attribute value is specified in a completion workflow and the value doesn't match the required format, you will need to edit the workflow step for any in-progress service requests.

To avoid format conflicts, we recommend that Text Type custom attributes used in cost models do not contain regular expressions. All custom attributes used in cost models are validated as positive numbers.

Creating custom attributes

Access through:

Configuration menu > Custom Attributes

Available to:

vCommander Roles of Superuser and Enterprise Administrator

1.On the Custom Attributes pane, click Add.

2.In the Configure Custom Attribute dialog, enter a name (128 character limit) for the new custom attribute.

This is the name that appears for users to select when they apply an attribute to an infrastructure element, or for administrators to select when adding custom attributes to a request form.

bestpract-checkmark2

The custom attributes feature give you the capability to apply your own unique labels to infrastructure elements and VMs.

However, Embotics® strongly recommends that you do not create:

an attribute that duplicates the name of a policy within vCommander

an attribute that is already defined in vCommander

an attribute named Expiry Date, Primary Owner, or IT Contact, because these attributes are already available to work with the Compliance policy

However, you can create new custom attributes that are variations of the existing attributes (for example, Cost Center Europe).

3.In the Description field, enter descriptive text for the custom attribute.

This description is optional. However, if you use this field, the details that you enter here are displayed when a user selects a custom attribute name.

4.Select the attribute type.

Text allows users to enter text values. You can allow either free-form text or enforce a specific format. See About enforcing custom attribute values above for more information.

List allows you to define values that users can select from a drop-down menu.

Sublist allows you to define allowed values for each value of another custom attribute. See Creating relationships between custom attributes below.

5.If you selected Sublist in the previous step, the Sublist Of drop-down menu appears. Select the custom attribute that will act as the "parent" attribute. See Creating relationships between custom attributes below.

6.From the Apply To menu, select the virtual infrastructure element that you want the custom attribute to be available for, or select Form to create a custom attribute to capture information required only during the service request process (form attributes are not attached to deployed services). Note that Services includes all service types (VMs, load balancers, databases, virtual services, stacks and auto scaling groups).

Select All if:

the infrastructure element where you want to apply a custom attribute does not appear in the drop-down menu (for example, datacenter)

you want the custom attribute to be available for all infrastructure elements

NotePencil-small Custom attributes configured to be available for "All Types" can also be added to request forms through the Custom Attribute form element. In this case, selected values are applied to deployed services.

6.To allow a user to change the value of the attribute in the Service Portal, enable Edit in Service Portal.

Service Portal users can change the value only if their Service Portal role has the required permission.

Custom attributes created by importing AWS tags are automatically set to disallow editing by Service Portal users.

8.On the Configure Attribute page, configure the acceptable values.

Text Type

List Type

Sublist Type

a.To allow users to enter text in any format, select Free Form and click Finish.

or

b.To enforce a format, select Specific Format.

In the Regular Expression field, enter a regular expression.

In the Validation Error Message field, enter a message that users will see if they enter text that does not conform to the regular expression.

In the Entry to test against field, to test your regular expression, enter text that should pass validation. For example, if you are enforcing a project code, enter a valid project code.

To test your validation error message, enter text that will not pass validation. For example, enter an invalid project code. The validation error message should appear.

c.Click Finish.

NotePencil-small Text-type custom attribute values support a maximum of 4096 characters.

a.Enter a comma-separated list of allowed values for the attribute and click Add. The maximum number of characters for each value is 100.

Or, enter each value separately and click Add.

b.Click Finish.

For each value of the parent attribute, enter a comma-separated list of allowed values for the sublist attribute.

a.Click a value in the list and enter values in the text field, then click Add.

b.Then, click another value in the list and enter values for it, and click Add.

You can also use the Move Up and Move Down buttons to arrange the allowed values in the tree.

c.Click Finish.

What's next?

To add the custom attribute to a request form, see Customizing Service Request Forms.

To specify a fixed cost for each value of a List Type custom attribute, see Configuring Cost Models.

To calculate a custom cost for each value of a List Type custom attribute, see Calculating Custom Costs.

To edit a custom attribute: Select it and click Edit. You cannot change the attribute type. If you want to change the attribute from a text to a list type or from a list to a text type, you must delete the attribute and configure it again. You can rename a list-type attribute value, move its position in the list of selectable values, or delete it from the list of values.

To delete a custom attribute: Select it, click Delete and confirm the deletion. Note the following:

A custom attribute in use by a Compliance policy cannot be deleted.

If the custom attribute you're deleting has sublist attributes, the confirmation dialog provides a list of sublist attributes. If you confirm the deletion, the sublist attributes are also deleted.

Creating relationships between custom attributes

Access through:

Configuration menu > Custom Attributes

Available to:

vCommander Roles of Superuser and Enterprise Administrator

You can create relationships between list-type custom attributes that are used on service request forms, so that the value selected for one custom attribute affects the selectable values for one or more other custom attributes. These relationships allow you to prevent requesters from making invalid form choices.

For example, let's say you want requesters to specify the machine role, either database server or web server. If they choose database server, the form could prompt them to choose a database application (Microsoft SQL or Postgres). If they choose Postgres, the form could prompt the requester to choose from the available Postgres versions. This example is illustrated below.

NotePencil-small The relationship between two attributes is visible only on new service request forms and service change request forms. Selectable values are not filtered for sublist attributes when applying custom attributes to services in other ways, such as applying values directly in vCommander or the Service Portal, or through workflows.

Create a List custom attribute called Machine Role

1.On the Custom Attributes pane, click Add.

2.In the Configure Attribute dialog, enter Machine Role for the name.

3.From the Type menu, choose List.

4.From the Applies To menu, choose Form to create a custom attribute to capture information required only during the service request process (form attributes are not attached to deployed services), then click Next.

You can apply the custom attribute to All Types as well, which includes forms, but the relationship between attributes is visible only on request forms.

5.On the Configure Attribute page, type a comma-separated list of values that users can select from a drop-down menu list for the attribute and click Add. The maximum number of characters for each value is 100. For this example, we'll type Database Server,Web Server.

You can also enter each value separately and click Add.

6.Click Finish.

Create a Sublist attribute called Application

1.On the Custom Attributes pane, click Add.

2.In the Configure Attribute dialog, enter Application for the name.

3.From the Type menu, choose Sublist.

4.From the Sublist Of menu, choose Machine Role.

The Sublist Of option allows you to define child allowed values for the defined values of another custom attribute (in this case, Machine Role was the custom attribute created in a previous step).

Define Attribute

5.On the Configure Attribute page, for each value of the parent attribute, enter a comma-separated list of allowed values:

Click a value in the list and enter values in the text field, then click Add.

Then, click another value in the list and enter values for it, and click Add.

You can also use the Move Up and Move Down buttons to arrange the allowed values in the tree.

The image below shows that we've added two server types to Database Server, but we haven't yet added the new values for Web Server.

Configure Attribute dialog

6.Click Finish.

Create a Sublist attribute called Application Version

Now we'll create another level of relationship.

1.On the Custom Attributes pane, click Add.

2.In the Configure Attribute dialog, enter Application for the name.

3.From the Type menu, choose Sublist.

4.From the Sublist Of menu, choose Application.

5.On the Configure Attribute page, for each application, enter available versions as shown below.

Configure Attribute dialog

4.Click Finish.

Add the custom attributes to the service catalog blueprint

To make these custom attributes available on the new service request form, we need to add the three attributes to the blueprint. (We could also add these attributes to a service change request form.)

1.Edit a service catalog entry.

2.On the Component Blueprints page, go to the Attributes tab, and click Add Attributes.

3.In the Add Attributes dialog, enable all three custom attributes we created above, and click OK.

vCommander automatically places the attributes in the correct order, from parent to child to grandchild.

sublist-attrib-blueprint

4.If you want, you can select default values for one or more of the attributes. In this example, we are not setting defaults.

5.Click the Form tab of the blueprint.

6.In the Toolbox, under Attributes, click all three attributes to add them to the form.

7.Use the up and down arrow buttons to position them in a logical order.

8.We want to force requesters to select a value for each attribute, so for each attribute click Edit, enable the Required option, and the click OK.

sublist-attrib-bp-form

6.Click Finish.

Request the service

Now, when a user requests a service, the component section of the form shows the three attributes, and selecting a Machine Role limits the selectable values for Application, and selecting an Application limits the selectable values for Application Version. The example below shows a request for the service made through the Service Portal.

New Service Request

Applying custom attribute values

Access through:

Views menu > Operational, VMs and Templates, or Datastore

Available to:

Administrator and All Operator Levels of Access Rights

vCommander allows you to apply an unlimited number of custom attributes to services and infrastructure elements. You can apply custom attributes on:

an infrastructure element such as a managed system, datacenter, folder, datastore, host or resource pool

a service, such as a VM or virtual service

Notes

When you select an infrastructure element in the tree (including a virtual service), custom attribute values are not inherited by its children. To ensure that custom attribute values are applied as expected, select and right-click services in a table.

To apply a custom attribute value to a requested service, add the attribute to the request form, so that the requester specifies a value.

You can also set custom attribute values with a workflow step.

To set a custom attribute value:

1.Right-click a service or infrastructure element in the tree or in a table.

2.For a VM, right-click and choose Lifecycle Management > Set Custom Attributes.

For all other elements, right-click and choose Set Custom Attributes.

The Set Custom Attributes dialog appears, displaying all available attributes for the selected element. (To view a description of the attribute name, mouse over the name.)

3.For a list-type custom attribute, select a value in the drop-down list. For a text-type custom attribute, enter a value (up to 4096 characters) in any or all of the Value fields.

NotePencil-smallIf you have configured costs for custom attributes, use the Value field to enter the cost. Enter a number only such as 500 or 67; do not enter a currency symbol. See Specifying how costs for custom attributes are displayed.

4.Click OK.

If the custom attribute has a required format, a validation error is displayed for input that does not match the required format.

Troubleshooting: See the Knowledge Base article Warning: There Are No Custom Attributes Defined in the System.

Viewing custom attribute values

Access through:

Views menu > Operational, VMs and Templates, or Datastore

Available to:

All Access Rights Levels

For any selected VM, virtual service or infrastructure element, you can view the custom attribute fields on the Details pane if custom attributes have been set up. Select the custom attribute from the list of properties available for display (right-click in the Details pane, select Pick Properties, and select the custom attribute. For more information, see Customizing the Embotics® vCommander® Display).

You can also select an infrastructure element from the tree and click Set Custom Attributes. All available custom attributes appear in the dialog.