Make one agent untouchable in test_agent_management

In test_agent_management some tests depend on one agent to be unmodified
which was not guaranteed as some tests updated that agent.
The update happened because the update test assumed that neutron will
return list of agents in different order.
The fix is only to select always different agent for update than the one
used for other tests.

Change-Id: I7af97ac0ee396d2eb132459d29e938bd5f3de9aa
Closes-Bug: #1845330
diff --git a/neutron_tempest_plugin/api/admin/test_agent_management.py b/neutron_tempest_plugin/api/admin/test_agent_management.py
index ad0368a..4a37904 100644
--- a/neutron_tempest_plugin/api/admin/test_agent_management.py
+++ b/neutron_tempest_plugin/api/admin/test_agent_management.py
@@ -66,10 +66,7 @@
     @decorators.idempotent_id('68a94a14-1243-46e6-83bf-157627e31556')
     def test_update_agent_description(self):
         agents = self.admin_client.list_agents()['agents']
-        try:
-            dyn_agent = agents[1]
-        except IndexError:
-            raise self.skipException("This test requires at least two agents.")
+        dyn_agent = self._select_one_agent_for_update(agents)
 
         self.useFixture(tempest_fixtures.LockFixture('agent_description'))
         description = 'description for update agent.'
@@ -86,3 +83,10 @@
         origin_agent = {'description': description}
         self.admin_client.update_agent(agent_id=dyn_agent['id'],
                                        agent_info=origin_agent)
+
+    def _select_one_agent_for_update(self, agents):
+        """Return one agent that is not the one selected at resource_setup"""
+        for agent in agents:
+            if self.agent['id'] != agent['id']:
+                return agent
+        raise self.skipException("This test requires at least two agents.")