59.4. 端口集

设置端口属性

使用方法:

openstack port set [-h] [--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>]
                          [--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]
                          [--data-plane-status <status>] [--tag <tag>]
                          [--no-tag]
                          <port>

表 59.14. 位置参数

概述

<port>

要修改的端口(名称或 id)

表 59.15. 可选参数

概述

-h, --help

显示帮助信息并退出

--description <description>

这个端口的描述

--device <device-id>

端口设备 ID

--mac-address <mac-address>

此端口的 MAC 地址(仅管理员)

--device-owner <device-owner>

这个端口的设备所有者。这是使用端口的实体(如 network:dhcp)。

--vnic-type <vnic-type>

该端口的 vNIC 类型(direct | direct-physical | macvtap | normal | baremetal | virtio-forwarder, default: normal)

--host <host-id>

在主机 <host-id> 分配端口(仅限id)

--dns-domain dns-domain

将 dns domain 设置为此端口(需要端口的 dns_domain 扩展)

--dns-name <dns-name>

为这个端口设置 dns name (需要 dns integration extension)

--enable

启用端口

--disable

禁用端口

--name <name>

设置端口名称

--fixed-ip subnet=<subnet>,ip-address=<ip-address>

此端口所需的 ip 和/或子网(名称或 id):subnet=<subnet>,ip-address=<ip-address> (用于设置多个固定 IP 地址)

--no-fixed-ip

清除固定 ip address.Specify 和 --fixed-ip 和 --no-fixed-ip 的现有信息,以覆盖当前的固定 IP 地址。

--binding-profile <binding-profile>

要传递的自定义数据:profile. 数据可能会作为 <key>=<value> 或 JSON 传递。(重复选项可设置多个绑定:profile 数据)

--no-binding-profile

清除 binding:profile 的现有信息。指定 --binding-profile 和 --no-binding-profile 以覆盖当前的绑定:profile 信息。

--qos-policy <qos-policy>

将 qos 策略附加到此端口(名称或 id)

--security-group <security-group>

与这个端口关联的安全组(名称或 ID)(重复选项来设置多个安全组)

--no-security-group

清除与此端口关联的现有安全组

--enable-port-security

为此端口启用端口安全性

--disable-port-security

禁用此端口的端口安全性

--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]

添加与这个端口关联的 allowed-address 对: ip-address=<ip-address>[,mac-address=<mac-address>](用于设置多个 allowed-address 对)

--no-allowed-address

清除与此端口关联的现有 allowed-address 对。(指定 --allowed-address 和 --no- allowed-address 以覆盖当前的允许的地址对)

--data-plane-status <status>

设置此端口的 data plane 状态(active | down)。使用端口 unset 命令将其设定为 None (需要 data plane 状态扩展)

--tag <tag>

要添加到端口的标签(重复选项来设置多个标签)

--no-tag

与端口关联的显式标签。指定 --tag 和 --no-tag 以覆盖当前标签