51.14. 优化 audittemplate create
创建新审计模板。
使用方法:
openstack optimize audittemplate create [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width] [--print-empty]
[-s <strategy>]
[-d <description>]
[--scope <path>]
<name> <goal>
| value | Summary |
|---|---|
| <name> | 此审计模板的名称。 |
|
| 与此审计模板关联的目标 uuid 或 name。 |
| value | Summary |
|---|---|
| -h, --help | 显示帮助信息并退出 |
| -s <strategy>, --strategy <strategy> | 与这个审计模板关联的策略 uuid 或 name。 |
| -d <description>, --description <description> | audit 模板的描述。 |
| --scope <path> | 将在其上执行审计的集群的一部分。可以在 yaml 或 json 文件中提供。YAML 示例: - compute: - host_aggregates: - id: 1 - id: 2 - id: 3 - availability_zones: - name: AZ1 - name: AZ2 - exclude: - instances: - uuid: UUID1 - uuid: UUID2 - compute_nodes: - name: compute1 - storage: - availability_zones: - name: AZ1 - name: AZ2 - volume_types: - name: lvm1 - name: lvm2 - exclude: - storage_pools: - name: host0@backend0""pool0 - name: host1@backend1:pool1 - volumes: - uuid: UUID1 - uuid: UUID2 - 项目: - uuid : UUID1 - uuid: UUID2 JSON 示例: [ {"compute": [{"host_aggregates": [ {"id": 1}, {"id": 2}, {"id": 3}}, {"availability_zones": [ {"name": "AZ1"}, {"name": "AZ2"}]}, {"exclude": [ {"instances": [ {"uuid": "UUID1"}, {"uuid": "UUID2"} ]}, {"compute_nodes": [ {"name": "compute1"} ]} ]}] }, {"storage": [{"availability_zones": [ {"name": "AZ1"}, {"name": "AZ2"}]}, {"volume_types": [ {"name": "lvm1"}, {"name": "lvm2"}]}, {"exclude": [ {"storage_pools": [ {"name": "host0@backend0", {"name": "lvm2"} {"name": "host1@backend1650pool1"} ]}, {"volumes": [ {"uuid": "UUID1"}, {"uuid": "UUID2"} ]}, {"projects": [ {"uuid": "UUID1"}, {"uuid": "UUID2"} ]}, ]}] } ] |
| value | Summary |
|---|---|
| -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml} | 输出格式,默认为 table |
| -c COLUMN, --column COLUMN | 指定要包含的列,可以重复显示多个列 |
| value | Summary |
|---|---|
| --noindent | 是否禁用对 json 的缩进 |
| value | Summary |
|---|---|
| --prefix PREFIX | 在所有变量名称中添加前缀 |
| value | Summary |
|---|---|
| --max-width <integer> | 最大显示宽度,即 <1 来禁用。您还可以使用 CLIFF_MAX_TERM_WIDTH 环境变量,但参数具有优先权。 |
| --fit-width | 将表与显示宽度匹配。如果 --max 宽度大于 0,则表示表示。将环境变量 CLIFF_FIT_WIDTH=1 设置为 always 启用 |
| --print-empty | 如果没有要显示数据,则打印空表。 |