create port add host

Add 'binding:host_id' field when create port and update port

Change-Id: I4fecbe536fda9d4232aa7902c72f06c2e32ea1e6
This commit is contained in:
zhangxingjun 2021-01-19 15:18:28 +08:00
parent 0ced9b5a75
commit 3625e47cab
1 changed files with 4 additions and 3 deletions

View File

@ -8135,7 +8135,7 @@ class OpenStackCloud(
@_utils.valid_kwargs('name', 'admin_state_up', 'mac_address', 'fixed_ips',
'subnet_id', 'ip_address', 'security_groups',
'allowed_address_pairs', 'extra_dhcp_opts',
'device_owner', 'device_id')
'device_owner', 'device_id', 'binding:host_id')
def create_port(self, network_id, **kwargs):
"""Create a port
@ -8184,7 +8184,7 @@ class OpenStackCloud(
For example, a DHCP agent. (Optional)
:param device_id: The ID of the device that uses this port.
For example, a virtual server. (Optional)
:param binding:host_id: The ID or name of the host. (Optional)
:returns: a ``munch.Munch`` describing the created port.
:raises: ``OpenStackCloudException`` on operation error.
@ -8199,7 +8199,7 @@ class OpenStackCloud(
@_utils.valid_kwargs('name', 'admin_state_up', 'fixed_ips',
'security_groups', 'allowed_address_pairs',
'extra_dhcp_opts', 'device_owner', 'device_id')
'extra_dhcp_opts', 'device_owner', 'device_id', 'binding:host_id')
def update_port(self, name_or_id, **kwargs):
"""Update a port
@ -8245,6 +8245,7 @@ class OpenStackCloud(
:param device_owner: The ID of the entity that uses this port.
For example, a DHCP agent. (Optional)
:param device_id: The ID of the resource this port is attached to.
:param binding:host_id: The ID or name of the host. (Optional)
:returns: a ``munch.Munch`` describing the updated port.