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
(cherry picked from commit 5e167a94ad8f608a616f93d15e90b797987b484a)
(cherry picked from commit 8a900e629140f5b587dd86d173d74a33895b0a36)
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 6664e15..6f97b1f 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -182,6 +182,8 @@
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.")
class ServersTestFqdnHostnames(base.BaseV2ComputeTest):
diff --git a/tempest/config.py b/tempest/config.py
index 5dce260..a9d042d 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -622,6 +622,11 @@
cfg.BoolOpt('unified_limits',
default=False,
help='Does the test environment support unified limits?'),
+ 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.'),
]