Chapter 53. port This chapter describes the commands under the port command. 53.1. port create Create a new port Usage: Table 53.1. Positional arguments Value Summary <name> Name of this port Table 53.2. Command arguments Value Summary -h, --help Show this help message and exit --extra-property type=<property_type>,name=<property_name>,value=<property_value> Additional parameters can be passed using this property. Default type of the extra property is string ( str ), but other types can be used as well. Available types are: dict , list , str , bool , int . In case of list type, value can be semicolon-separated list of values. For dict value is semicolon-separated list of the key:value pairs. --network <network> Network this port belongs to (name or id) --description <description> Description of this port --device <device-id> Port device id --mac-address <mac-address> Mac address of this port (admin only) --device-owner <device-owner> Device owner of this port. this is the entity that uses the port (for example, network:dhcp). --vnic-type <vnic-type> Vnic type for this port (direct | direct-physical | macvtap | normal | baremetal | virtio-forwarder | vdpa | remote-managed, default: normal) --host <host-id> Allocate port on host <host-id> (id only) --dns-domain dns-domain Set dns domain to this port (requires dns_domain extension for ports) --dns-name <dns-name> Set dns name for this port (requires dns integration extension) --numa-policy-required Numa affinity policy required to schedule this port --numa-policy-preferred Numa affinity policy preferred to schedule this port --numa-policy-legacy Numa affinity policy using legacy mode to schedule this port --fixed-ip subnet=<subnet>,ip-address=<ip-address> Desired ip and/or subnet for this port (name or id): subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses) --no-fixed-ip No ip or subnet for this port. --binding-profile <binding-profile> Custom data to be passed as binding:profile. data may be passed as <key>=<value> or JSON. (repeat option to set multiple binding:profile data) --enable Enable port (default) --disable Disable port --enable-uplink-status-propagation Enable uplink status propagate --disable-uplink-status-propagation Disable uplink status propagate (default) --project <project> Owner's project (name or id) --project-domain <project-domain> Domain the project belongs to (name or id). this can be used in case collisions between project names exist. --extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}] Extra dhcp options to be assigned to this port: name=<name>[,value=<value>,ip-version={4,6}] (repeat option to set multiple extra DHCP options) --security-group <security-group> Security group to associate with this port (name or ID) (repeat option to set multiple security groups) --no-security-group Associate no security groups with this port --qos-policy <qos-policy> Attach qos policy to this port (name or id) --enable-port-security Enable port security for this port (default) --disable-port-security Disable port security for this port --allowed-address ip-address=<ip-address>[,mac-address=<mac-address>] Add allowed-address pair associated with this port: ip-address=<ip-address>[,mac-address=<mac-address>] (repeat option to set multiple allowed-address pairs) --device-profile <device-profile> Cyborg port device profile --tag <tag> Tag to be added to the port (repeat option to set multiple tags) --no-tag No tags associated with the port Table 53.3. Output formatter options Value Summary -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml} The output format, defaults to table -c COLUMN, --column COLUMN Specify the column(s) to include, can be repeated to show multiple columns Table 53.4. JSON formatter options Value Summary --noindent Whether to disable indenting the json Table 53.5. Shell formatter options Value Summary --prefix PREFIX Add a prefix to all variable names Table 53.6. Table formatter options Value Summary --max-width <integer> Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence. --fit-width Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable --print-empty Print empty table if there is no data to show. 53.2. port delete Delete port(s) Usage: Table 53.7. Positional arguments Value Summary <port> Port(s) to delete (name or id) Table 53.8. Command arguments Value Summary -h, --help Show this help message and exit 53.3. port list List ports Usage: Table 53.9. Command arguments Value Summary -h, --help Show this help message and exit --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 --long List 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 --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) Table 53.10. Output formatter options Value Summary -f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml} The output format, defaults to table -c COLUMN, --column COLUMN Specify the column(s) to include, can be repeated to show multiple columns --sort-column SORT_COLUMN Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated --sort-ascending Sort the column(s) in ascending order --sort-descending Sort the column(s) in descending order Table 53.11. CSV formatter options Value Summary --quote {all,minimal,none,nonnumeric} When to include quotes, defaults to nonnumeric Table 53.12. JSON formatter options Value Summary --noindent Whether to disable indenting the json Table 53.13. Table formatter options Value Summary --max-width <integer> Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence. --fit-width Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable --print-empty Print empty table if there is no data to show. 53.4. port set Set port properties Usage: Table 53.14. Positional arguments Value Summary <port> Port to modify (name or id) Table 53.15. Command arguments Value Summary -h, --help Show this help message and exit --extra-property type=<property_type>,name=<property_name>,value=<property_value> Additional parameters can be passed using this property. Default type of the extra property is string ( str ), but other types can be used as well. Available types are: dict , list , str , bool , int . In case of list type, value can be semicolon-separated list of values. For dict value is semicolon-separated list of the key:value pairs. --description <description> Description of this port --device <device-id> Port device id --mac-address <mac-address> Mac address of this port (admin only) --device-owner <device-owner> Device owner of this port. this is the entity that uses the port (for example, network:dhcp). --vnic-type <vnic-type> Vnic type for this port (direct | direct-physical | macvtap | normal | baremetal | virtio-forwarder | vdpa | remote-managed, default: normal) --host <host-id> Allocate port on host <host-id> (id only) --dns-domain dns-domain Set dns domain to this port (requires dns_domain extension for ports) --dns-name <dns-name> Set dns name for this port (requires dns integration extension) --numa-policy-required Numa affinity policy required to schedule this port --numa-policy-preferred Numa affinity policy preferred to schedule this port --numa-policy-legacy Numa affinity policy using legacy mode to schedule this port --enable Enable port --disable Disable port --name <name> Set port name --fixed-ip subnet=<subnet>,ip-address=<ip-address> Desired ip and/or subnet for this port (name or id): subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses) --no-fixed-ip Clear existing information of fixed ip addresses.Specify both --fixed-ip and --no-fixed-ip to overwrite the current fixed IP addresses. --binding-profile <binding-profile> Custom data to be passed as binding:profile. data may be passed as <key>=<value> or JSON. (repeat option to set multiple binding:profile data) --no-binding-profile Clear existing information of binding:profile. specify both --binding-profile and --no-binding-profile to overwrite the current binding:profile information. --qos-policy <qos-policy> Attach qos policy to this port (name or id) --security-group <security-group> Security group to associate with this port (name or ID) (repeat option to set multiple security groups) --no-security-group Clear existing security groups associated with this port --enable-port-security Enable port security for this port --disable-port-security Disable port security for this port --allowed-address ip-address=<ip-address>[,mac-address=<mac-address>] Add allowed-address pair associated with this port: ip-address=<ip-address>[,mac-address=<mac-address>] (repeat option to set multiple allowed-address pairs) --no-allowed-address Clear existing allowed-address pairs associated with this port. (Specify both --allowed-address and --no- allowed-address to overwrite the current allowed- address pairs) --extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}] Extra dhcp options to be assigned to this port: name=<name>[,value=<value>,ip-version={4,6}] (repeat option to set multiple extra DHCP options) --data-plane-status <status> Set data plane status of this port (active | down). Unset it to None with the port unset command (requires data plane status extension) --tag <tag> Tag to be added to the port (repeat option to set multiple tags) --no-tag Clear tags associated with the port. specify both --tag and --no-tag to overwrite current tags 53.5. port show Display port details Usage: Table 53.16. Positional arguments Value Summary <port> Port to display (name or id) Table 53.17. Command arguments Value Summary -h, --help Show this help message and exit Table 53.18. Output formatter options Value Summary -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml} The output format, defaults to table -c COLUMN, --column COLUMN Specify the column(s) to include, can be repeated to show multiple columns Table 53.19. JSON formatter options Value Summary --noindent Whether to disable indenting the json Table 53.20. Shell formatter options Value Summary --prefix PREFIX Add a prefix to all variable names Table 53.21. Table formatter options Value Summary --max-width <integer> Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence. --fit-width Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable --print-empty Print empty table if there is no data to show. 53.6. port unset Unset port properties Usage: Table 53.22. Positional arguments Value Summary <port> Port to modify (name or id) Table 53.23. Command arguments Value Summary -h, --help Show this help message and exit --extra-property type=<property_type>,name=<property_name>,value=<property_value> Additional parameters can be passed using this property. Default type of the extra property is string ( str ), but other types can be used as well. Available types are: dict , list , str , bool , int . In case of list type, value can be semicolon-separated list of values. For dict value is semicolon-separated list of the key:value pairs. --fixed-ip subnet=<subnet>,ip-address=<ip-address> Desired ip and/or subnet which should be removed from this port (name or ID): subnet=<subnet>,ip- address=<ip-address> (repeat option to unset multiple fixed IP addresses) --binding-profile <binding-profile-key> Desired key which should be removed from binding:profile (repeat option to unset multiple binding:profile data) --security-group <security-group> Security group which should be removed this port (name or ID) (repeat option to unset multiple security groups) --allowed-address ip-address=<ip-address>[,mac-address=<mac-address>] Desired allowed-address pair which should be removed from this port: ip-address=<ip-address>[,mac- address=<mac-address>] (repeat option to unset multiple allowed-address pairs) --qos-policy Remove the qos policy attached to the port --data-plane-status Clear existing information of data plane status --numa-policy Clear existing numa affinity policy --host Clear host binding for the port. --tag <tag> Tag to be removed from the port (repeat option to remove multiple tags) --all-tag Clear all tags associated with the port

Commands:
openstack port create [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width] [--print-empty] [--extra-property type=<property_type>,name=<property_name>,value=<property_value>] --network <network> [--description <description>] [--device <device-id>] [--mac-address <mac-address>] [--device-owner <device-owner>] [--vnic-type <vnic-type>] [--host <host-id>] [--dns-domain dns-domain] [--dns-name <dns-name>] [--numa-policy-required | --numa-policy-preferred | --numa-policy-legacy] [--fixed-ip subnet=<subnet>,ip-address=<ip-address> | --no-fixed-ip] [--binding-profile <binding-profile>] [--enable | --disable] [--enable-uplink-status-propagation | --disable-uplink-status-propagation] [--project <project>] [--project-domain <project-domain>] [--extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}]] [--security-group <security-group> | --no-security-group] [--qos-policy <qos-policy>] [--enable-port-security | --disable-port-security] [--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]] [--device-profile <device-profile>] [--tag <tag> | --no-tag] <name>
openstack port delete [-h] <port> [<port> ...]
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>] [--security-group <security-group>] [--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 set [-h] [--extra-property type=<property_type>,name=<property_name>,value=<property_value>] [--description <description>] [--device <device-id>] [--mac-address <mac-address>] [--device-owner <device-owner>] [--vnic-type <vnic-type>] [--host <host-id>] [--dns-domain dns-domain] [--dns-name <dns-name>] [--numa-policy-required | --numa-policy-preferred | --numa-policy-legacy] [--enable | --disable] [--name <name>] [--fixed-ip subnet=<subnet>,ip-address=<ip-address>] [--no-fixed-ip] [--binding-profile <binding-profile>] [--no-binding-profile] [--qos-policy <qos-policy>] [--security-group <security-group>] [--no-security-group] [--enable-port-security | --disable-port-security] [--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]] [--no-allowed-address] [--extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}]] [--data-plane-status <status>] [--tag <tag>] [--no-tag] <port>
openstack port show [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width] [--print-empty] <port>
openstack port unset [-h] [--extra-property type=<property_type>,name=<property_name>,value=<property_value>] [--fixed-ip subnet=<subnet>,ip-address=<ip-address>] [--binding-profile <binding-profile-key>] [--security-group <security-group>] [--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]] [--qos-policy] [--data-plane-status] [--numa-policy] [--host] [--tag <tag> | --all-tag] <port>