Reference: FAST template authoring¶
There are two sections to a template that BIG-IP Next Central Manager uses when deploying an application associated with the template:
Definitions: specifies how each field displays when you use the template.
Template: defines the content for the fields in the template.
What is the definitions section in a template?¶
At the top of a BIG-IP Next Central Manager application template, you can add (or modify existing) optional definitions to make that template easier to use. This definitions section controls the appearance of the fields in the create application wizard. You can control the order of appearance of the fields, set default values, and validate field values. Add these definitions to make it easier to use your template.
How do I create new definitions for an application template?¶
You add definition entries to a template near the top of the template. The definitions section begins with the entry: definitions:
and ends with the start of the template body which begins with the entry: template: |
.
Note: For details about how to edit a template refer to: How to: Manage applications using BIG-IP Next Central Manager and FAST templates.
Here are some example definitions for several variable fields. The entries in these definitions specify how fields display and what constitutes a valid entry for each field when you use this template. The example is followed by a table that explains how the entries that comprise the definition are used, and an illustration of how this field displays in the Create Application wizard.
Example field definition¶
virtualPort:
title: Virtual Port
description: Port of the virtual server.
type: integer
default: 80
minimum: 0
maximum: 65535
application_name:
title: Application Name
accessPolicyEnum:
title : Access Policy Name
description: Select the Access policy.
type: string
preProcessCM: accessPolicyList
accessAdditionalConfigurations:
title : Access Additional Configurations (For internal use. DO NOT MODIFY)
description: Retrieves Access Internal Configurations (For internal use. DO NOT MODIFY).
type: string
default: " "
certificatesEnum:
title: Please choose a certificate
type: string
preProcessCM: certificateNames
central_manager:
preDeployCM.accessAdditionalConfigurations:
accessAdditionalConfigurations:
command: accessAdditionalConfigurations:{'policyName'= '{{accessPolicyEnum}}'}
preDeployCM.accessPolicy:
accessPolicyEnum:
command: accessPolicy:{'policyNamthis definitione'= '{{accessPolicyEnum}}'}
preDeployCM.certificate:
certificatesEnum:
command: deployCertAndKey:{'certificate_name'='{{certificatesEnum}}'}
Note: When you specify field definitions for a template, your entries must be indented correctly. If you indent an entry incorrectly, the Template Body box changes from black to red to indicate that BIG-IP Next Central Manager will ignore it. When you correct the indent, the box color changes back to black.
Field explanations¶
Entry |
Explanation |
---|---|
field-name |
Displays the name of the mustache variable in the template. The remaining entries for this definition are all indented. The field name for the definition displays first, followed by the optional, indented entries. |
title |
Specifies the field title that appears in the Create Application wizard. |
description |
Specifies the tooltip entry for this definition. When you hover your cursor over the information icon next to this field in the UI, this text displays. |
type |
Specifies the type requirements for the field described by this definition, for example string or number. |
pattern |
Specifies the regular expression that BIG-IP Next Central Manager uses to validate entries for the field described by this definition. |
default |
Specifies the default value for the field. |
minimum |
Specifies the minimum acceptable value for the field. |
maximum |
Specifies the maximum acceptable value for the field. |
disableEdit |
When this entry is set to true, you can only specify a value for this field while you are creating the application. After you create the application, you won’t be able to edit it. |
preProcessCM |
Specifies that BIG-IP Next Central Manager gets the list of existing Access policies or TLS certificates, and displays a selection list in the Create Application wizard. |
uiMetaCM |
There are several components to this entry: |
preDeployCM |
Specifies that BIG-IP Next Central Manager deploys a list of required objects to the target instance before it deploys the application. The preDeployCM entry must use the name of the variable identified in the preProcessCM entry. If you are creating a new template that includes Access policies, WAF policies, or TLS certificate references, you must include preDeployCM and preProcessCM in one of your definitions. There are multiple entries supplied in the example definition. |
This screenshot shows how the Virtual Port field appears in the Create Application wizard when these definitions are used. The tooltip displays because the cursor is hovering over the Service Port information icon .