Application Delivery Management

这篇文章已经过机器翻译.放弃

使用目标 ADC 实例作为数据源

您也可以使用配置本身的目标 ADC 作为配置的数据源输入。在这种情况下,您可能需要参考目标 ADC 上的现有配置,在该 ADC 上创建新配置。

要使用目标实例作为数据源,您不必使用 datum 内置类型参数,因为样书用户无需选择 ADC 实例。您可以直接在样书的 components 部分中编写表达式,从目标 ADC 实例检索数据。

使用以下表达式从目标 ADC 实例中检索以下内容:

  • 馆藏:

    $current-target-as-datasource.collections.<collection-name>

    示例:

    $current-target-as-datasource.collections.lbvserver
  • 属性:

    $current-target-as-datasource.collections.attributes.<attribute>

使用目标 ADC 实例作为数据源的样书示例

以下是样书示例,用于演示如何使用目标 ADC 实例作为数据源:

--- name: lb-add-service-with-target-adc namespace: com.citrix.adc.stylebooks version: "1.1" display-name: "HTTP/SSL LoadBalancing StyleBook with Service Binding" description: "This stylebook defines a typical Load Balanced Application configuration." schema-version: "1.0" import-stylebooks: - namespace: netscaler.nitro.config prefix: ns version: "10.5" components: - name: servicegroup-comp type: ns::servicegroup properties: servicegroupname: "lb-demo-svcgrp" servicetype: "HTTP" components: - name: lbvserver-svg-binding type: ns::lbvserver_servicegroup_binding repeat: $current-target-as-datasource.collections.lbvserver repeat-item: lbvsrvr repeat-condition: $lbvsrvr.attributes.name == "lb-demo-lb" properties: name: $lbvsrvr.attributes.name servicegroupname: $parent.properties.servicegroupname

在此示例中,配置包检查目标 ADC 实例中的负载平衡虚拟服务器。而且,如果给定的负载平衡虚拟服务器 IP 地址匹配,它将检索名称和服务组名称。

将 ADC 实例作为数据源

本内容的正式版本为英文版。部分 Cloud Software Group 文档内容采用了机器翻译,仅供您参考。Cloud Software Group 无法控制机器翻译的内容,这些内容可能包含错误、不准确或不合适的语言。对于从英文原文翻译成任何其他语言的内容的准确性、可靠性、适用性或正确性,或者您的 Cloud Software Group 产品或服务沿用了任何机器翻译的内容,我们均不作任何明示或暗示的保证,并且适用的最终用户许可协议或服务条款或者与 Cloud Software Group 签订的任何其他协议(产品或服务与已进行机器翻译的任何文档保持一致)下的任何保证均不适用。对于因使用机器翻译的内容而引起的任何损害或问题,Cloud Software Group 不承担任何责任。
使用目标 ADC 实例作为数据源