Add 'xenapi_apis' compute feature flag

Nova is removing the XenAPI virt driver. There are a number of APIs that
only work with this virt driver so those are being removed at the same
time. Once removed, they will return a HTTP 410 response, regardless of
the microversion.

Add a feature flag that allows us to skip these tests on clouds that no
longer provide these APIs. It default to False (skip). We will set this
to True (do no skip) on stable branches of nova.

Change-Id: I0ae3f7a81ca7b56f56871e61bcf196ca572ae6d6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 530c8fb..ab1b49a 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -14,10 +14,13 @@
 
 from tempest.api.compute import base
 from tempest.common import waiters
+from tempest import config
 from tempest.lib.common.utils import data_utils
 from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 
+CONF = config.CONF
+
 
 class ServersAdminTestJSON(base.BaseV2ComputeAdminTest):
     """Tests Servers API using admin privileges"""
@@ -201,6 +204,10 @@
     @decorators.idempotent_id('7a1323b4-a6a2-497a-96cb-76c07b945c71')
     def test_reset_network_inject_network_info(self):
         """Test resetting and injecting network info of a server"""
+        if not CONF.compute_feature_enabled.xenapi_apis:
+            raise self.skipException(
+                'The resetNetwork server action is not supported.')
+
         # Reset Network of a Server
         server = self.create_test_server(wait_until='ACTIVE')
         self.client.reset_network(server['id'])