Remove explicit adding QoS policy to the cleianup
The _create_qos_policy method mistakenly added the policy object
to the cleanup, whereas delete_qos_policy expects a policy_id
But in next steps qos_policy is correctly deleted by
BaseNetworkTest.cleanup_resources
Change-Id: If35d7e5dd14a508085dde4e719f6f1e4386d8e66
diff --git a/neutron_tempest_plugin/scenario/test_qos.py b/neutron_tempest_plugin/scenario/test_qos.py
index 74be216..12c862f 100644
--- a/neutron_tempest_plugin/scenario/test_qos.py
+++ b/neutron_tempest_plugin/scenario/test_qos.py
@@ -20,6 +20,7 @@
from oslo_log import log as logging
from tempest.common import utils as tutils
from tempest.common import waiters
+from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
@@ -134,13 +135,12 @@
self.security_groups[-1]['id'])
def _create_qos_policy(self):
+ name = data_utils.rand_name('test-policy')
policy = self.os_admin.network_client.create_qos_policy(
- name='test-policy',
+ name=name,
description='test-qos-policy',
shared=True)
self.qos_policies.append(policy['policy'])
- self.addCleanup(test_utils.call_and_ignore_notfound_exc,
- self.os_admin.network_client.delete_qos_policy, policy)
return policy['policy']['id']
def _create_qos_bw_limit_rule(self, policy_id, rule_data):