42.4. 镜像列表

列出可用的镜像

使用方法:

openstack image list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                            [--quote {all,minimal,none,nonnumeric}]
                            [--noindent] [--max-width <integer>] [--fit-width]
                            [--print-empty] [--sort-column SORT_COLUMN]
                            [--public | --private | --community | --shared]
                            [--property <key=value>] [--name <name>]
                            [--status <status>]
                            [--member-status <member-status>] [--tag <tag>]
                            [--long] [--sort <key>[:<direction>]]
                            [--limit <num-images>] [--marker <image>]

表 42.15. 可选参数

概述

-h, --help

显示帮助信息并退出

--public

仅列出公共镜像

--private

仅列出私有镜像

--community

仅列出社区镜像

--shared

仅列出共享镜像

--property <key=value>

根据属性过滤输出(重复选项来过滤多个属性)

--name <name>

根据名称过滤镜像。

--status <status>

根据状态过滤镜像。

--member-status <member-status>

根据成员状态过滤镜像。支持的选项有: accepted、pending、rejected 和 all。

--tag <tag>

根据标签过滤镜像。

--long

列出输出中的其他字段

--sort <key>[:<direction>]

通过所选键和方向(默认:name: name:asc),可以使用逗号分隔的多个键和方向对输出进行排序

--limit <num-images>

要显示的最大镜像数。

--marker <image>

上一页面的最后一个镜像。在标记后显示镜像列表。如果没有指定,则显示所有镜像。(名称或 ID)

表 42.16. 输出格式器

概述

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

输出格式,默认为 table

-c COLUMN, --column COLUMN

指定要包含的列,可以重复

--sort-column SORT_COLUMN

指定排序数据的列(指定首先具有优先级的非存在列将被忽略)可以重复

表 42.17. CSV Formatter

概述

--quote {all,minimal,none,nonnumeric}

当包含引号时,默认为 nonnumeric

表 42.18. JSON Formatter

概述

--noindent

是否禁用缩进 json

表 42.19. 表格式

概述

--max-width <integer>

最大显示宽度 <1 来禁用。您还可以使用 CLIFF_MAX_TERM_WIDTH 环境变量,但参数具有优先权。

--fit-width

适合显示宽度的表。如果 --max-width 大于 0,则意味着。将环境变量 CLIFF_FIT_WIDTH=1 设置为 always 启用

--print-empty

如果没有要显示数据,则打印空表。