Chuyển tới nội dung chính
openstack port list

List ports

Options​

OptionDescription
--device-owner <device-owner>List only ports with the specified device owner. This is the entity that uses the port (for example, network:dhcp).
--host <host-id>List only ports bound to this host ID
--network <network>List only ports connected to this network (name or ID)
--router <router>List only ports attached to this router (name or ID)
--server <server>List only ports attached to this server (name or ID)
--device-id <device-id>List only ports with the specified device ID
--mac-address <mac-address>List only ports with this MAC address
--longList additional fields in output
--project <project>List ports according to their project (name or ID)
--name <name>List ports according to their name
--security-group <security-group>List only ports associated with this security group
--status <status>List ports according to their status ('ACTIVE', 'BUILD', 'DOWN', 'ERROR')
--project-domain <project-domain>Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.
--fixed-ip subnet=<subnet>,ip-address=<ip-address>,ip-substring=<ip-substring>Desired IP and/or subnet for filtering ports (name or ID): subnet=<subnet>,ip-address=<ip-address>,ip- substring=<ip-substring> (repeat option to set multiple fixed IP addresses)
--tags <tag>[,<tag>,...]List ports which have all given tag(s) (Comma- separated list of tags)
--any-tags <tag>[,<tag>,...]List ports which have any given tag(s) (Comma- separated list of tags)
--not-tags <tag>[,<tag>,...]Exclude ports which have all given tag(s) (Comma- separated list of tags)
--not-any-tags <tag>[,<tag>,...]Exclude ports which have any given tag(s) (Comma- separated list of tags)