vCloud Automation Center: vCAC 5.1: Creating Relational Drop Down Fields
One of the great benefits of vCloud Automation Center is it''s Self-Service capabilities and although vCAC has a great Self-Service experience right out of
From the archive. Originally published on dailyhypervisor.com on April 16, 2013.
One of the great benefits of vCloud Automation Center is it''s Self-Service capabilities and although vCAC has a great Self-Service experience right out of the gate most organizations are going to want to tailor the request experience match their specific needs. vCAC has many ways this can be done, but one very simple way to do this is through the use of the Property Dictionary. The Property Dictionary allows us to create drop down lists, check boxes, date/time inputs, free form text fields, integer field and other methods of input. In this tutorial I''m going to walk you through using the Property Dictionary to create relational drop down fields that you can leverage to capture additional information from your users at the time of request.
Watch the step-bt-step video tutorial!
Configuring Property Definitions
- Go to "Enterprise Administrator", then "Property Dictionary", and select "Add Property Definition".
- Give your property definition a "Name" in this example "Datacenter", assign a "Display Name", choose the "Control Type" of "DropDownList", select "Required" and click the green check mark.
- Once your property definition is save, click "Edit" under "Property Attributes" for the property.
- Select "Add Property Attribute".
- Add an attribute with the "Type" of "ValueList" provide a "Name" and then input a comma separated list of values. I have used "Boston,New York,Dallas" and my "Value". Click the green check mark to save. Click "Ok"
- Create another property value with the "Name" "VMware.VirtualCenter.Folder" provide a "Display Name", then select "DropDownList" as the "Control Type" and click the green check mark.
- Click "Edit" under "Property Attributes" for the "VMware.VirtualCenter.Folder" property.
- Select the "Type" of "Relationship", provide a name, then enter "Datacenter" for the "Value". This tells vCAC that this drop down list is related to the "Datacenter" drop down list we created earlier.
- Now we need to create some XML data that represents the relationship between the two drop down lists. Below is an example of what the XML data looks like:
- For each property value you want to relate you need to define the following:
- FilterName
- - The name of the parent property.
- FilterValue
- - The name of the selection in your parent dropdown. (Value the user selects)
- Value
- - The value they can choose from the relation drop down, in this case the
- VMware.VirtualCenter.Folder
- . drop down list. In this example we are defining one Value for each "FilterValue" we will do multiple later in this tutorial.
- Important: Although I show an image of formatted XML your xml file needs to be one contiguous line with no carriage returns or spaces similar to below (wordwrap turned on):
- Next add another "Property Attribute" and this time choose "ValueExpression" as the "Type. Give it a name and then we need to copy and past our xml code with no carriage returns or spaces into the "Value" field.
- Click "Ok" to save the "Property Attributes"
- Click "Add Property Definition" to add another property definition.
- Name the "Property Attribute" "VirtualMachine.Network0.Name" assign a "Display Name" and select "DropDownList" as the "Control Type"
- Click "Edit" under "Property Attributes" for the "VirtualMachine.Network0.Name" "Property Definition".
- Click "Add Property Attribute" then select the "Type" of "Relationship", provide a name, then enter "Datacenter" for the "Value". This tells vCAC that this drop down list is related to the "Datacenter" drop down list we created earlier. Click the green check mark.
- Now we need to create another XML data source for this relationship. In this one there will be two choices per "Filter Value" as seen below:
- Add another "Property Attribute" make this one type "ValueExpression" assign it a name, then past your XML data into the "Value" filed. Make sure to remove carriage returns and spaces.
- Click "Ok" to save your Property Attributes.
- Select a blueprint you would like to add the drop down fields to, open it up and go to the "Propertries" tab. Enter the following properties making sure you select "Prompt User" for each. Click "Ok" to save when finished.
- Datacenter
- - Parent Property for selecting Datacenter location.
- VMware.VirtualCenter.Folder
- - Property for selecting vCenter folder.
- VirtualMachine.Network0.Name
- - Property for selecting virtual machine network.
- Go to self-service and select the blueprint you added the properties to. If you try to select a Network or Folder you will notice they do not have any values.
- Select a "Datacenter"
- Select a Network
- And finally select a Folder.