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

Set port properties

Options​

OptionDescription
<port>Port to modify (name or ID)
--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-domainSet 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-requiredNUMA affinity policy required to schedule this port
--numa-policy-preferredNUMA affinity policy preferred to schedule this port
--numa-policy-socketNUMA affinity policy socket to schedule this port
--numa-policy-legacyNUMA affinity policy using legacy mode to schedule this port
--hint <alias=value>Port hints as ALIAS=VALUE or as JSON. Valid hint aliases/values: ovs-tx-steering=thread, ovs-tx- steering=hash. Valid JSON values are as specified by the Neutron API. (requires port-hints extension) (requires port-hint-ovs-tx-steering extension for alias: ovs-tx-steering) (repeat option to set multiple hints).
--trustedSet port to be trusted. This will be populated into the 'binding:profile' dictionary and passed to the services which expect it in this dictionary (for example, Nova).
--not-trustedSet port to be not trusted. This will be populated into the 'binding:profile' dictionary and passed to the services which expect it in this dictionary (for example, Nova).
--enableEnable port
--disableDisable 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-ipClear 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-profileClear 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-groupClear existing security groups associated with this port
--enable-port-securityEnable port security for this port
--disable-port-securityDisable 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-addressClear 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).
--enable-uplink-status-propagationEnable uplink status propagation
--disable-uplink-status-propagationDisable uplink status propagation
--tag <tag>Tag to be added to the port (repeat option to set multiple tags)
--no-tagClear tags associated with the port. Specify both
--tag and --no-tag to overwrite current tags