vCloud Automation Center offer a lot of extensibility features built in within the product that help you achieve your desired result while minimizing the amount of coding required. vCAC Custom Properties, Build Profiles, Property Dictionary is just an example of how you can customize the product to meet your needs while minimizing coding as well customize the input form to meet your need. As Property Dictionary seems to be the most missed/mis-understood feature of vCAC followed by Build Profiles and Custom Properties, I have decided to put a post together trying to simplify the explanation of these great features as much as possible. As well, I will be pointing you out to more resources at the end of the article to learn more in depth of each of these features.
vCAC Custom Properties:
As Custom Properties is the building block for Build Profiles and Property Dictionary, it will be very hard to explain any of the later without covering Custom Properties. As per VMware documentation, the way they define custom properties is as follow:
“VMware vCloud Automation Center™ custom properties allow you to add attributes of the machines your site provisions, or to override their standard attributes.”
What that is trying to say, vCloud Automation Center utilize particular variables (Custom Properties) that contain values that vCAC uses during machine provisioning (Ex: machine name, machine IP Address, Port Group to use, & so on). vCAC expose this to you as a Custom Properties that you can query or edit to over write these default values by a specific value or by a user input. This is a very powerful tool, as you can shape out the request form to ask the user for input (not required by the default request form) and execute upon it without requiring you to do any coding. Further, the product allow you to create your own custom properties to use with your own custom workflows.
Let’s look at a quick example of using vCAC Custom Properties. Let’s first look at the default Blueprint/VM request form in vCAC Shown in the screen capture below:
As you can see in the above screenshot the default VM request form does not ask the user for a machine hostname or IP Address. What if you wanted to allow the user to choose their VMs hostname or IP Address. You can do that using custom properties and you can get your request form to look as below:
As you can see in the above screenshot, I have used the Hostname & VirtualMachine.NetworkN.Address custom properties to allow the user to provide the desired VM hostname and IP Address that vCAC will use when creating the VM. The way I have done that is by going to Infrastructure ==> Blueprint ==> Properties , then add the two custom properties as showing in the below screenshot.
While the above is using existing vCAC Custom Properties that get used while vCAC is deploying a VM, you always can create your own custom ones that you can pass to your own workflow or just to track information within the request. For a list of custom properties available in vCAC 6, you can check: vCloud Automation Center 6 Custom Property Reference.
vCAC Build Profiles:
Build Profiles is nothing, but a collection of the custom property under single title. Imagine if you have 20 different custom properties that you need to include with every Windows Blueprint. It would not be nice to be able to just bundle them all in a build profile then go to these blueprints and assign a single Build profile instead of assigning 20 different custom properties to every Windows blueprint saving you labor and provide a better consistency. You can create a build profile by going to Infrastructure => Blueprints => Build Profiles => New Build Profile, then you just add the desired custom properties to that build profile as shown in the below screenshot.
Next step is to add that build profile to your blueprint as per the below screenshot
Using this build profile will result in exactly same result as if you have added the custom properties to the blueprint individually.
vCAC Property Dictionary
I am not sure why Property Dictionary seems to be the most misunderstood or missed feature of vCAC although its quite simple to use and add unleash a lot of power. Allowing users to provide values to custom properties using text boxes as we have shown in previous examples in this article is quite useful, but most of the time you want to limit the user choices using drop down menus, check boxes or so on. Property Dictionary is all about enabling you to do just that.
vCAC Property Dictionary enables you to define characteristics of custom properties to tailor their display in the user interface. You can customize property display in the user interface, as in the following examples:
- Associate a property name with a user control, such as a check box or drop-down menu.
- Specify constraints such as minimum and maximum values or validation against a regular expression.
- Provide descriptive display names for properties or add label text.
- Group sets of property controls together and specify the order in which they appear.
- Create a relationship between different controls, where for example a location drop down menu can update the storage and network drop down menus to show only values that is valid for that location.
To see how useful property dictionaries can be, let’s take an example where we want to create the drop down menus as illustrated in the below diagram:
The goal of this exercise is to create three drop down menus that will ask the user for location, storage path, and network path to use. Let’s ignore the relationship between the different drop down menus for now and try to focus on just creating these drop down menus. To create the property dictionary required to create these drop down menu, you will need to go to: Infrastructure => Blueprints => Property Dictionary.
Then for each drop down menu you want to create repeat the below steps, for this example I will do the location drop down menu:
- Click New Property Definition, then fill the information as shown in the below screenshot. Please note the Name must match the Custom Property Name you want to use.
- Save your property definition by clicking the green check mark
- Hit Edit under Property Attributes
- Hit New Property Attributes, then fill the Property Attributes as shown in the below screenshot
- Repeat the above steps for storage and network as showing in the below screen shots
- Now that you have all the required property definitions and property attributed created, let’s create a property layout, which is basically away of organizing how these drop boxes will be ordered when shown to the user. In my case I wanted the drop boxes to be ordered as follow: Location, Storage, Network. To do this I had to hit new property layout and fill the information as shown in the below screenshot:
- Now hit edit under the property instances under property layout and organize your property instances as shown in the below screenshot
- Let’s create a build profile that include all the custom properties involved in our property dictionary example as shown in the below screenshot
- Now all you left with is adding this build profile to your blueprint as shown below
- Now let’s check how the input of our blueprint look like:
Notice in the above example the three drop down menus that was created for Location, Storage, & Network is operating independently of each other and there is no relationship between them. In other word, choosing a particular location does not filter which options you have for storage or network. The capability of doing such filtration is property dictionary relationship which I am covering in the following two posts: