Switch to decorators.idempotent_id on compute.admin
So many modules are using test.idempotent_id and this is the first
step for switching to decorators.idempotent_id.
Change-Id: I55a61d40f18f8fa0fea8423ad65302c1e3559205
Related-Bug: #1616913
diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py
index 1c37cad..118ad60 100644
--- a/tempest/api/compute/admin/test_agents.py
+++ b/tempest/api/compute/admin/test_agents.py
@@ -14,7 +14,7 @@
from tempest.api.compute import base
from tempest.common.utils import data_utils
-from tempest import test
+from tempest.lib import decorators
class AgentsAdminTestJSON(base.BaseV2ComputeAdminTest):
@@ -44,7 +44,7 @@
kwargs[rand_key] = data_utils.rand_name(kwargs[rand_key])
return kwargs
- @test.idempotent_id('1fc6bdc8-0b6d-4cc7-9f30-9b04fabe5b90')
+ @decorators.idempotent_id('1fc6bdc8-0b6d-4cc7-9f30-9b04fabe5b90')
def test_create_agent(self):
# Create an agent.
params = self._param_helper(
@@ -56,7 +56,7 @@
for expected_item, value in params.items():
self.assertEqual(value, body[expected_item])
- @test.idempotent_id('dc9ffd51-1c50-4f0e-a820-ae6d2a568a9e')
+ @decorators.idempotent_id('dc9ffd51-1c50-4f0e-a820-ae6d2a568a9e')
def test_update_agent(self):
# Create and update an agent.
body = self.client.create_agent(**self.params_agent)['agent']
@@ -69,7 +69,7 @@
for expected_item, value in params.items():
self.assertEqual(value, body[expected_item])
- @test.idempotent_id('470e0b89-386f-407b-91fd-819737d0b335')
+ @decorators.idempotent_id('470e0b89-386f-407b-91fd-819737d0b335')
def test_delete_agent(self):
# Create an agent and delete it.
body = self.client.create_agent(**self.params_agent)['agent']
@@ -80,7 +80,7 @@
self.assertNotIn(body['agent_id'], map(lambda x: x['agent_id'],
agents))
- @test.idempotent_id('6a326c69-654b-438a-80a3-34bcc454e138')
+ @decorators.idempotent_id('6a326c69-654b-438a-80a3-34bcc454e138')
def test_list_agents(self):
# Create an agent and list all agents.
body = self.client.create_agent(**self.params_agent)['agent']
@@ -90,7 +90,7 @@
'Cannot get any agents.(%s)' % agents)
self.assertIn(body['agent_id'], map(lambda x: x['agent_id'], agents))
- @test.idempotent_id('eabadde4-3cd7-4ec4-a4b5-5a936d2d4408')
+ @decorators.idempotent_id('eabadde4-3cd7-4ec4-a4b5-5a936d2d4408')
def test_list_agents_with_filter(self):
# Create agents and list the agent builds by the filter.
body = self.client.create_agent(**self.params_agent)['agent']