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)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
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.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
组件
StyleBook 中的组件构造被认为是 StyleBook 中最重要的部分。在此部分中,您可以定义要创建的配置对象。使用此构造,您可以构建一个或多个相同类型的配置对象。
组件构造可以使用参数部分中提供的输入来调整 StyleBook 生成的配置。这是一个可选部分,尽管大多数 StyleBook 都包含组件部分。
下表描述了组件的主要属性。
| 属性 | 描述 |
|---|---|
| name | 组件的名称。您可以指定一个字母数字名称。名称必须以字母开头,并且可以包含其他字母、数字、连字符 (-) 或下划线 (_)。 |
| description | 此组件在 StyleBook 中的作用描述。 |
| type | 类型决定了此组件提供的属性。组件有两种类型:内置类型:此类型由系统提供,您无需定义,例如 NITRO 实体类型“lbvserver”或“servicegroup”。当组件具有内置类型属性时,它会在 NetScaler 上创建该类型的配置对象。例如,如果组件引用内置类型“lbvserver”,则此组件会在作为配置目标的 NetScaler 实例上创建负载平衡虚拟服务器。复合类型:此类型引用您创建并导入到 NetScaler ADM 中的现有 StyleBook。当组件具有复合类型属性时,它会在作为配置目标的 NetScaler 实例上创建引用 StyleBook 中指定的所有配置对象。这使您能够组合多个 StyleBook,其中每个 StyleBook 创建最终配置的一部分。有关复合 StyleBook 的更多信息,请参阅创建复合 StyleBook。 |
| properties | 可用于组件类型属性的子属性。组件的有效属性由其类型决定。对于内置类型,这些是相应 Nitro 对象的属性。对于类型为另一个 StyleBook(即复合类型)的组件,这些属性对应于该 StyleBook 中定义的参数。 |
示例:
components:
-
name: my-lbvserver-comp
type: ns::lbvserver
properties:
name: $parameters.name
servicetype: HTTP
ipv46: $parameters.ip
port: 80
lbmethod: $parameters.lb-alg
<!--NeedCopy-->
在此示例中,您定义了一个名为 my-lbvserver-comp 的组件。此组件的类型为 ns::lbvserver(一种内置类型),其中“ns”是引用您在 import-stylebooks 部分中指定的命名空间 netscaler.nitro.config 和版本 10.5 的前缀,“lbvserver”是此命名空间中的 NITRO 资源。
此部分中的属性包括“lbvserver”资源的四个强制属性和一个可选属性 (lbmethod),并允许您为这些属性指定值。在此示例中,您为 servicetype 和 port 指定了静态值,而 name、ipv46 和 lbmethod 属性的值则来自输入参数。您可以使用 $parameters.<name> 表示法引用参数部分中定义的参数名称,例如 $parameters.ip。
注意
NITRO 资源类型(其组件属性)的属性名称必须使用小写。否则,StyleBook 的导入将失败。
共享
共享
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group 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 Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.