Merge "Add a config option to select compute xml api"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 4dcf460..e60b731 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -397,6 +397,9 @@
# If false, skip all nova v3 tests. (boolean value)
#api_v3=false
+# If false skip all v2 api tests with xml (boolean value)
+#xml_api_v2=true
+
# If false, skip disk config tests (boolean value)
#disk_config=true
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index a3295eb..343a39a 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -37,6 +37,9 @@
def setUpClass(cls):
cls.set_network_resources()
super(BaseComputeTest, cls).setUpClass()
+ if getattr(cls, '_interface', None) == 'xml' and cls._api_version == 2:
+ if not CONF.compute_feature_enabled.xml_api_v2:
+ raise cls.skipException('XML API is not enabled')
# TODO(andreaf) WE should care also for the alt_manager here
# but only once client lazy load in the manager is done
diff --git a/tempest/config.py b/tempest/config.py
index 3b61700..39c2be1 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -273,6 +273,9 @@
cfg.BoolOpt('api_v3',
default=False,
help="If false, skip all nova v3 tests."),
+ cfg.BoolOpt('xml_api_v2',
+ default=True,
+ help="If false skip all v2 api tests with xml"),
cfg.BoolOpt('disk_config',
default=True,
help="If false, skip disk config tests"),