This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已动态机器翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
This content has been machine translated dynamically.
This content has been machine translated dynamically.
This content has been machine translated dynamically.
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.
Este artigo foi traduzido automaticamente.
这篇文章已经过机器翻译.放弃
Translation failed!
ネストされた繰り返し
repeat構造をネストにして使用することで、コンポーネントの定義に応じて各コンポーネントに複数のrepeat構造を含めることができます。2レベルのネストになったrepeat構造を考えます。外側のリスト(最初のrepeat-list)の要素ごとに、内側のリスト(2番目のrepeat-list)の要素すべてに対してrepeatリストを作成できます。StyleBookコンパイラでは、ネストになったrepeatは最大で3つまでサポートされます。各repeatレベルには、repeat-item属性およびrepeat-index属性を関連付けます。repeat-item属性とrepeat-index属性はともにオプションです。また、repeatごとにrepeat-conditionを指定することもできます。
例:
parameters:
-
name: vips
type: ipaddress[]
-
name: vip-ports
type: tcp-port[]
components:
-
name: lbvservers-comp
type: ns::lbvserver
repeat:
repeat-list: $parameters.vips
repeat-item: ip
repeat:
repeat-list: $parameters.vip-ports
repeat-item: port
properties:
name: str("lb-") + str($ip) + '-' + str($port)
servicetype: HTTP
ipv46: $ip
port: $port
上記の例では、$parameters.vipsの項目ごとに、$parameters.vip-portsの項目すべてに対して反復処理を行います。つまり、$parameters.vipsで指定したipaddressごとに、$parameters.vip-portsで指定したすべてのポートに対してlbvserver構成オブジェクトを作成します。propertiesセクションでは、IPアドレスとポートの組み合わせにプレフィックス「lb」を付けたオブジェクト名を定義しています。このため、反復処理のたびに、$ipと$portの結合により一意のIPアドレスとポート番号の組み合わせが定義されます。
repeat-item属性を指定していない場合、コンパイラではこの属性のデフォルト値が生成されます。repeat-itemのデフォルト値は、repeatレベルごとにそれぞれ$repeat-item、$repeat-item-1、$repeat-item-2となります。同様に、repeat-index属性を指定していない場合、コンパイラではこの属性のデフォルト値が生成されます。repeat-indexのデフォルト値は、repeatレベルごとにそれぞれ$repeat-index、$repeat-index-1、$repeat-index-2となります。
以下の例では、ネストになったrepeatオブジェクトでrepeat-item属性およびrepeat-index属性を指定していない場合の命名規則を示します。
例:
components:
-
name: lbvservers-comp
type: ns::lbvserver
repeat:
repeat-list: $parameters.vips
repeat:
repeat-list: $parameters.vip-ports
properties:
name: str("lb-") + str($repeat-item) + '-' + str($repeat-item-1)
servicetype: HTTP
ipv46: $repeat-item
port: $repeat-item-1
共有
共有
この記事の概要
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.