Remove automated skip decsion from compute
* The automated skip decisions are expensive, it is visible
if you just run a single test case.
* The automated skip decisions are not fully trusted, so we should avoid them.
* Adding the flavor extra configuration option to the configuration file
until we cannot move to test case attribute based test selection.
* Adding the CLI section to the tempest.conf.sample
Change-Id: I81a408392a8de38b694b3132572b6e48700595a3
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 617c016..db6a7bd 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -124,11 +124,11 @@
# relax-xsm-sr-check
block_migrate_supports_cinder_iscsi = false
-# By default, rely on the status of the diskConfig extension to
-# decide if to execute disk config tests. When set to false, tests
-# are forced to skip, regardless of the extension status
-disk_config_enabled_override = true
+# When set to false, disk config tests are forced to skip
+disk_config_enabled = true
+# When set to false, flavor extra data tests are forced to skip
+flavor_extra_enabled = true
[whitebox]
# Whitebox options for compute. Whitebox options enable the
@@ -331,3 +331,9 @@
# ssh username for the image file
ssh_user = cirros
+
+[CLI]
+# Enable cli tests
+enabled = True
+# directory where python client binaries are located
+cli_dir = /usr/local/bin/
diff --git a/tempest/api/compute/__init__.py b/tempest/api/compute/__init__.py
index 98f198d..fb96b4a 100644
--- a/tempest/api/compute/__init__.py
+++ b/tempest/api/compute/__init__.py
@@ -15,7 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from tempest import clients
from tempest.common import log as logging
from tempest import config
from tempest.exceptions import InvalidConfiguration
@@ -26,9 +25,8 @@
CREATE_IMAGE_ENABLED = CONFIG.compute.create_image_enabled
RESIZE_AVAILABLE = CONFIG.compute.resize_available
CHANGE_PASSWORD_AVAILABLE = CONFIG.compute.change_password_available
-DISK_CONFIG_ENABLED = True
-DISK_CONFIG_ENABLED_OVERRIDE = CONFIG.compute.disk_config_enabled_override
-FLAVOR_EXTRA_DATA_ENABLED = True
+DISK_CONFIG_ENABLED = CONFIG.compute.disk_config_enabled
+FLAVOR_EXTRA_DATA_ENABLED = CONFIG.compute.flavor_extra_enabled
MULTI_USER = True
@@ -36,27 +34,7 @@
def generic_setup_package():
LOG.debug("Entering tempest.api.compute.setup_package")
- global MULTI_USER, DISK_CONFIG_ENABLED, FLAVOR_EXTRA_DATA_ENABLED
- os = clients.Manager()
- images_client = os.images_client
- flavors_client = os.flavors_client
- extensions_client = os.extensions_client
- DISK_CONFIG_ENABLED = (DISK_CONFIG_ENABLED_OVERRIDE and
- extensions_client.is_enabled('DiskConfig'))
- FLAVOR_EXTRA_DATA_ENABLED = extensions_client.is_enabled('FlavorExtraData')
-
- # Validate reference data exists
- # If not, we raise the exception here and prevent
- # going forward...
- image_ref = CONFIG.compute.image_ref
- image_ref_alt = CONFIG.compute.image_ref_alt
- images_client.get_image(image_ref)
- images_client.get_image(image_ref_alt)
-
- flavor_ref = CONFIG.compute.flavor_ref
- flavor_ref_alt = CONFIG.compute.flavor_ref_alt
- flavors_client.get_flavor_details(flavor_ref)
- flavors_client.get_flavor_details(flavor_ref_alt)
+ global MULTI_USER
# Determine if there are two regular users that can be
# used in testing. If the test cases are allowed to create
diff --git a/tempest/config.py b/tempest/config.py
index 7852eba..7196078 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -181,10 +181,12 @@
default=None,
help="Path to a private key file for SSH access to remote "
"hosts"),
- cfg.BoolOpt('disk_config_enabled_override',
+ cfg.BoolOpt('disk_config_enabled',
default=True,
- help="If false, skip config tests regardless of the "
- "extension status"),
+ help="If false, skip disk config tests"),
+ cfg.BoolOpt('flavor_extra_enabled',
+ default=True,
+ help="If false, skip flavor extra data test"),
]