Update skip check for ServersTestBootFromVolume
Introduce new config option boot_from_volume in compute-feature-enabled
group which specifies if booting from volume is allowed.
Change-Id: Ieaed751b55bdfd38750ab3dd659e437eca937a0a
Related-Prod: PRODX-5741
diff --git a/releasenotes/notes/add-boot-from-volume-option-312d02c0c84f2092.yaml b/releasenotes/notes/add-boot-from-volume-option-312d02c0c84f2092.yaml
new file mode 100644
index 0000000..0a0b78e
--- /dev/null
+++ b/releasenotes/notes/add-boot-from-volume-option-312d02c0c84f2092.yaml
@@ -0,0 +1,7 @@
+---
+features:
+ - A new config option in group compute-feature-enabled
+ boot_from_volume which specifies if nova allow to boot
+ instances from volume. This functionality is not available
+ on some hypervisors and cinder backends like ironic and
+ ceph.
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 48f32a8..b732b87 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -180,3 +180,5 @@
if not utils.get_service_list()['volume']:
msg = "Volume service not enabled."
raise cls.skipException(msg)
+ if not CONF.compute_feature_enabled.boot_from_volume:
+ raise cls.skipException("Booting from volume is not enabled.")
diff --git a/tempest/config.py b/tempest/config.py
index a812ad7..82cc321 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -598,6 +598,11 @@
help='Does the test environment support attaching a volume to '
'more than one instance? This depends on hypervisor and '
'volume backend/type and compute API version 2.60.'),
+ cfg.BoolOpt('boot_from_volume',
+ default=True,
+ help='Does the test environment support booting instances '
+ 'from volume. This depends on hypervisor and volume '
+ 'backend/type.'),
]