Add host filtering for test_aggregate_add_existent_host and test_aggregate_remove_host_as_user tests

The resource_setup method is allocating all available compute
hosts as potential candidates, but in certain scenarios only
a subset of hosts should be acceptable. This patch filter out
hosts for those scenrios based on CONF.compute.target_hosts_to_avoid

Change-Id: Ie8886092e4e79eec164a3fe1939ea504200ea36b
diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py
index c284370..575d7fc 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -157,12 +157,14 @@
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate = self._create_test_aggregate()
 
-        self.client.add_host(aggregate['id'], host=self.hosts[0])
+        hosts = [host for host in self.hosts if (
+            host not in CONF.compute.target_hosts_to_avoid)]
+        self.client.add_host(aggregate['id'], host=hosts[0])
         self.addCleanup(self.client.remove_host, aggregate['id'],
-                        host=self.hosts[0])
+                        host=hosts[0])
 
         self.assertRaises(lib_exc.Conflict, self.client.add_host,
-                          aggregate['id'], host=self.hosts[0])
+                          aggregate['id'], host=hosts[0])
 
     @decorators.attr(type=['negative'])
     @decorators.idempotent_id('7a53af20-137a-4e44-a4ae-e19260e626d9')
@@ -171,13 +173,15 @@
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate = self._create_test_aggregate()
 
-        self.client.add_host(aggregate['id'], host=self.hosts[0])
+        hosts = [host for host in self.hosts if (
+            host not in CONF.compute.target_hosts_to_avoid)]
+        self.client.add_host(aggregate['id'], host=hosts[0])
         self.addCleanup(self.client.remove_host, aggregate['id'],
-                        host=self.hosts[0])
+                        host=hosts[0])
 
         self.assertRaises(lib_exc.Forbidden,
                           self.aggregates_client.remove_host,
-                          aggregate['id'], host=self.hosts[0])
+                          aggregate['id'], host=hosts[0])
 
     @decorators.attr(type=['negative'])
     @decorators.idempotent_id('95d6a6fa-8da9-4426-84d0-eec0329f2e4d')