Fix default qos policy when creating network
In _create_network_policy(), policy object is passed into _get_policy_obj()
although it expects to be passed policy id. This patch passes policy id
instead of policy object and adds a unit test and API tests.
Change-Id: Ic4c755c54d93d7ca3312b432b7c1e6770f25c359
Closes-bug: #1712278
diff --git a/neutron/tests/tempest/api/base.py b/neutron/tests/tempest/api/base.py
index 31285ac..207a30f 100644
--- a/neutron/tests/tempest/api/base.py
+++ b/neutron/tests/tempest/api/base.py
@@ -370,10 +370,10 @@
@classmethod
def create_qos_policy(cls, name, description=None, shared=False,
- tenant_id=None):
+ tenant_id=None, is_default=False):
"""Wrapper utility that returns a test QoS policy."""
body = cls.admin_client.create_qos_policy(
- name, description, shared, tenant_id)
+ name, description, shared, tenant_id, is_default)
qos_policy = body['policy']
cls.qos_policies.append(qos_policy)
return qos_policy