From ac7fbea1a4d2a04ade90d8bf124e48735ce5a873 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotjagov Date: Wed, 22 May 2019 14:01:38 +0300 Subject: [PATCH] Add ability to provide qos_policy_id for port Neutron API supports qos_policy defenition during port creation and port object already contains qos_policy_id[1] So this patch extends port_update method with the ability to provide qos_policy_id in the addition to existing parameters. [1] https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/network/v2/port.py#L109 Change-Id: Iad837fababa8d9d0c604637d326b1b1253f13c05 --- openstack/cloud/_network.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openstack/cloud/_network.py b/openstack/cloud/_network.py index 7b0d28bbd..e0f938b77 100644 --- a/openstack/cloud/_network.py +++ b/openstack/cloud/_network.py @@ -2383,7 +2383,8 @@ class NetworkCloudMixin(_normalize.Normalizer): 'subnet_id', 'ip_address', 'security_groups', 'allowed_address_pairs', 'extra_dhcp_opts', 'device_owner', 'device_id', 'binding:vnic_type', - 'binding:profile', 'port_security_enabled') + 'binding:profile', 'port_security_enabled', + 'qos_policy_id') def create_port(self, network_id, **kwargs): """Create a port @@ -2435,6 +2436,7 @@ class NetworkCloudMixin(_normalize.Normalizer): :param binding vnic_type: The type of the created port. (Optional) :param port_security_enabled: The security port state created on the network. (Optional) + :param qos_policy_id: The ID of the QoS policy to apply for port. :returns: a ``munch.Munch`` describing the created port. @@ -2452,7 +2454,7 @@ class NetworkCloudMixin(_normalize.Normalizer): 'security_groups', 'allowed_address_pairs', 'extra_dhcp_opts', 'device_owner', 'device_id', 'binding:vnic_type', 'binding:profile', - 'port_security_enabled') + 'port_security_enabled', 'qos_policy_id') def update_port(self, name_or_id, **kwargs): """Update a port @@ -2501,6 +2503,7 @@ class NetworkCloudMixin(_normalize.Normalizer): :param binding vnic_type: The type of the created port. (Optional) :param port_security_enabled: The security port state created on the network. (Optional) + :param qos_policy_id: The ID of the QoS policy to apply for port. :returns: a ``munch.Munch`` describing the updated port.