59.3. 端口列表
列出端口
使用方法:
openstack port 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] [--sort-ascending | --sort-descending] [--device-owner <device-owner>] [--host <host-id>] [--network <network>] [--router <router> | --server <server> | --device-id <device-id>] [--mac-address <mac-address>] [--long] [--project <project>] [--name <name>] [--project-domain <project-domain>] [--fixed-ip subnet=<subnet>,ip-address=<ip-address>,ip-substring=<ip-substring>] [--tags <tag>[,<tag>,...]] [--any-tags <tag>[,<tag>,...]] [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]
openstack port 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]
[--sort-ascending | --sort-descending]
[--device-owner <device-owner>] [--host <host-id>]
[--network <network>]
[--router <router> | --server <server> | --device-id <device-id>]
[--mac-address <mac-address>] [--long]
[--project <project>] [--name <name>]
[--project-domain <project-domain>]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>,ip-substring=<ip-substring>]
[--tags <tag>[,<tag>,...]]
[--any-tags <tag>[,<tag>,...]]
[--not-tags <tag>[,<tag>,...]]
[--not-any-tags <tag>[,<tag>,...]]
value | Summary |
---|---|
-h, --help | 显示帮助信息并退出 |
--device-owner <device-owner> | 仅列出具有指定设备所有者的端口。这是使用端口(如 network:dhcp)的实体。 |
--host <host-id> | 仅列出绑定到此主机 ID 的端口 |
--network <network> | 仅列出连接到此网络的端口(名称或 id) |
--router <router> | 仅列出附加到此路由器的端口(名称或 ID) |
--server <server> | 仅列出附加到这个服务器的端口(名称或 ID) |
--device-id <device-id> | 仅列出具有指定设备 ID 的端口 |
--mac-address <mac-address> | 仅列出使用此 mac 地址的端口 |
--long | 列出输出中的其他字段 |
--project <project> | 根据项目列出端口(名称或 id) |
--name <name> | 根据端口的名称列出端口 |
--project-domain <project-domain> | 项目所属的域(名称或 id)。这可在存在项目名称之间冲突时使用。 |
--fixed-ip subnet=<subnet>,ip-address=<ip-address>,ip-substring=<ip-substring> | 所需 ip 和/或子网用于过滤端口(名称或 ID):subnet=<subnet>,ip-address=<ip-address>,ip- substring=<ip-substring> (重复选项来设置多个固定 IP 地址) |
--tags <tag>[,<tag>,…] | 列出具有所有给定标签(comma 分隔的标签列表)的端口 |
--any-tags <tag>[,<tag>,…] | 列出具有任何给定标签(comma 分隔的标签列表)的端口 |
--not-tags <tag>[,<tag>,…] | 排除具有所有给定标签(comma 分隔的标签列表)的端口 |
--not-any-tags <tag>[,<tag>,…] | 排除具有任何给定标签(comma 分隔的标签列表)的端口 |
value | Summary |
---|---|
-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml} | 输出格式,默认为 table |
-c COLUMN, --column COLUMN | 指定要包含的列,可以重复显示多个列 |
--sort-column SORT_COLUMN | 指定排序数据的列(指定第一个指定的列具有优先级,非存在的列将被忽略)可以重复 |
--sort-ascending | 以升序对列进行排序 |
--sort-descending | 以降序对列进行排序 |
value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | 当包含引号时,则默认为非数字 |
value | Summary |
---|---|
--noindent | 是否禁用对 json 的缩进 |
value | Summary |
---|---|
--max-width <integer> | 最大显示宽度,即 <1 来禁用。您还可以使用 CLIFF_MAX_TERM_WIDTH 环境变量,但参数具有优先权。 |
--fit-width | 将表与显示宽度匹配。如果 --max 宽度大于 0,则表示表示。将环境变量 CLIFF_FIT_WIDTH=1 设置为 always 启用 |
--print-empty | 如果没有要显示数据,则打印空表。 |