Assigning QoS policies
Alongside the default QoS policy, you can assign QoS policies to specific network ports, floating IP addresses, and entire networks.
Prerequisites
- A QoS policy is created, as described in Creating QoS policies.
To assign a QoS policy to a network port
Find out the ID of the required network port, and then set the policy with openstack port set --qos-policy <qos-policy>
. For example:
# openstack --insecure port list +--------------------------------------+-----+----------------------------+ | ID | <…> | Fixed IP Addresses | +--------------------------------------+-----+----------------------------+ | c0ea690f-4993-4467-afd5-5389016a0658 | | ip_address='10.136.18.133' | +--------------------------------------+-----+----------------------------+ # openstack --insecure port set --qos-policy policy1 c0ea690f-4993-4467-afd5-5389016a0658
To assign a QoS policy to a floating IP address
Find out the ID of the required floating IP, and then set the policy with openstack floating ip set --qos-policy <qos-policy>
. For example:
# openstack --insecure floating ip list +--------------------------------------+---------------------+-----+ | ID | Floating IP Address | <…> | +--------------------------------------+---------------------+-----+ | 866203a2-4e1c-459f-807f-14ed563409f1 | 10.136.18.135 | | +--------------------------------------+---------------------+-----+ # openstack --insecure floating ip set --qos-policy policy1 866203a2-4e1c-459f-807f-14ed563409f1
To assign a QoS policy to all ports in a network
Find out the ID or name of the required network, and then set the policy with openstack network set --qos-policy <qos-policy>
. For example:
# openstack --insecure network list +--------------------------------------+----------+-----+ | ID | Name | <…> | +--------------------------------------+----------+-----+ | c6ee561e-9cf7-489b-bbab-7bca557ee7a5 | public | | +--------------------------------------+----------+-----+ # openstack --insecure network set --qos-policy policy1 public