Commander support for OVA/OVF parameters: Example

When you add an OVA/OVF template to the service catalog, any parameters and initial values that are defined by the template's descriptor file are encrypted and saved to the Commander database.

Commander allows you to add these parameters to the request form with a combination of custom attributes and variables.

Custom attributes allow:

  • requesters to select parameter values on the form.
  • requesters to specify a regular expression value for a parameter on the form.
  • administrators to select parameter values during manual deployment.
  • administrators to specify a regular expression value for a parameter during manual deployment.

Variables allow you to access information about the deployment destination and the request form.

When you create a custom attribute for a parameter, you can use a substitution variable to map specific values or an input type to a parameter. In this way, you can customize the input choices on the form that's provided to users making a request or a manual deployment.

To allow Service Portal users to request a deployment size when requesting the service, you'll create a custom attribute that will provide the possible values for the template's DeploymentConfiguration parameter.

  1. Add an OVA or OVF template to the catalog as described in Add vCenter Services to the Catalog.
  2. On the Attributes tab, click Add Attributes.
  3. In the Add Attributes dialog, click Create Attribute.
  4. In the Configure Custom Attribute dialog, type a name for the attribute, for example "DeploymentConfigurationValues", for the Name, and add a description.
  5. For Type, select List (to allow users to select from a list of key pairs).
  6. To allow users to specify a regular expression instead, select Text. See Work with Custom Attributes for more information.

  7. For Applies To, select All Types.
  8. Clear Edit in Service Portal and click Next.
  9. On the Configure Attribute page of the wizard, enter the allowed values for attribute.

    Note that the custom attribute's values must be exact, case-sensitive matches for the parameters provided in the template's descriptor file.

    1. Enter "small" and click Add.
    2. Enter "medium" and click Add.
    3. Enter "large" and click Add.
  10. Click Finish.
  11. The DeploymentConfigurationValues attribute is now selected in the Add Attributes dialog.

  12. Click OK.
  13. On the Attributes tab, the DeploymentConfigurationValues attribute appears. Select a default size if you want.
  14. On the Form tab, in the Attributes list, click DeploymentConfigurationValues to add it to the form that users see when they request the OVA/OVF component.
  15. Click Edit, enable the Required option, then click OK to save the form element.
  16. Back on the Parameters tab, in the DeploymentConfiguration field, click at the right of the field.
  17. Select the DeploymentConfigurationValues attribute, click Insert, then click OK.

    This adds the variable #{form.customAttribute['DeploymentConfigurationValues']. The variable will also include the default size, if you added it earlier (for example, #{form.customAttribute['DeploymentConfigurationValues']}small.

  18. Click Finish to save the service in the catalog.

Now, users must select a deployment configuration size when requesting this OVA template from the service catalog. Their selection will be passed to vCenter as a parameter through the Commander variable, unless an administrator overrides the requester's selection during manual deployment of the service request.