Parameters 编辑

This section lets you define all the parameters that you require in your StyleBook to create a configuration. It describes the input that your StyleBook takes. Although this section is optional, most StyleBook might need one. You can consider the parameters section to define the fields for the users who use the StyleBook to create a configuration on a Citrix ADC instance.

When you import your StyleBook into Citrix ADM and use it to create a configuration, the GUI uses this section of the StyleBook to display a form. This form takes an input for the defined parameter values.

The following section describes the attributes that you need to specify for each parameter in this section:

‘name’

The name of the parameter you want to define. You can specify an alphanumeric name.

The name must begin with an alphabet, and can include more alphabets, numbers, hyphen (-), or underscore (_).

When writing a StyleBook, you can use this “name” attribute to refer to the parameter in other sections by using the notation $parameters.<name>.

Mandatory? Yes

‘label’

A string that is displayed in the ADM GUI as the name of this parameter.

Mandatory? No

‘description’

A help string that describes what the parameter is used for. The ADM GUI displays this text when the user clicks the help icon for this parameter.

Mandatory? No

‘type’

The type of value these parameters can take. Parameters can be of any of the following built-in types:

  • string: An array of characters. If a length is not specified, the string value can take any number of characters. However, you can limit the length of a string type by using the attributes min-length and max-length.

  • number: An integer number. You can specify the minimum and maximum number that this type can take by using the attributes min-value and max-value.

  • boolean: Can be either true or false. YAML considers all the literals as booleans (for example, Yes or No).

  • ipaddress: A string that represents a valid IPv4 or IPv6 address.

  • tcp-port: A number between 0 and 65535 that represents a TCP or UDP port.

  • password: Represents an opaque/secret string value. When the ADM GUI displays a value for this parameter, it is shown as asterisks (*****).

  • certfile: Represents a certificate file. This value allows you to upload the files directly from your local system when you are creating a StyleBook configuration using the ADM GUI. The uploaded certificate file is stored in the directory /var/mps/tenants/\<tenant_path>/ns_ssl_certs in ADM.

    The certificate file is added to the list of certificates managed by ADM.

  • keyfile: Represents a certificate key file. This value allows you to upload the file directly from your local system when you are creating a StyleBook configuration using the ADM GUI. The uploaded certificate file is stored in the directory /var/mps/tenants/\<tenant_path>/ns_ssl_keys in ADM.

    The certificate key file is added to the list of certificate keys managed by ADM.

  • file: Represents a file.

  • object: This type is used when you want to group several related parameters under a parent element. Specify the parent parameter the type as “object”. A parameter of type “object” can have a nested “parameters” section to describe the parameters it contains.

  • another StyleBook: When you use this type of parameter, then this parameter expects its value to be in the form of the parameters defined in the StyleBook denoting its type.

A parameter can also have a type that is the list of types. To do so, add [] at the end of the type. For example, if the type attribute is string[], this parameter takes a list of strings as input. You can provide one, two, or several strings for this parameter when creating a configuration from this StyleBook.

Mandatory? Yes

‘network’

For type: ipaddress, you can specify the network attribute to auto-allocate an IP address from an ADM IPAM network.

ADM auto-allocates an IP address from the network attribute when you create a StyleBook configuration.

Example:

      name: virtual-ip
      label: "Load Balancer IP Address"
      type: ipaddress
      network: "network-1"
      required: true
<!--NeedCopy-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:47 次

字数:6162

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文