Parameters 编辑

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 Citrix ADM GUI as the name of this parameter.

Mandatory? No

‘description’

A help string that describes what the parameter is used for. The Citrix 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.

  • ipnetwork: It has two parts. First part is the IP address and second part is the netmask.

    IP network

    The netmask is represented by a netmask length (netmask-len) or netmask IP address (netmask_ip). The netmask length is an integer between 0-32 and 0–128 for an IPv6 address. It is used to determine the IP addresses count in a network.

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

  • password: Represents an opaque/secret string value. When the Citrix 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 Citrix ADM GUI. The uploaded certificate file is stored in the directory /var/mps/tenants/\<tenant_path>/ns_ssl_certs in Citrix ADM.

    The certificate file is added to the list of certificates managed by Citrix 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 Citrix ADM GUI. The uploaded certificate file is stored in the directory /var/mps/tenants/\<tenant_path>/ns_ssl_keys in Citrix ADM.

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

  • certkey: This type is used to select SSL certificates from the Citrix ADM certificate store. This store lists the existing SSL certificates that are uploaded to your Citrix ADM server. So, you can store SSL certificates at one place that is the Citrix ADM certificate store and reuse them whenever required.

    When creating a configuration pack, a user can add or select SSL certificates from the certificate store. Also, the user can select the same certificate for multiple configuration packs.

  • file: Represents a file.

  • object: This type is used 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 Citrix ADM IPAM network.

Citrix 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技术交流群

发布评论

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

词条统计

浏览:30 次

字数:7587

最后编辑:8年前

编辑次数:0 次

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