Gate fix: Cap nova-network tests at Queens
Nova is working on removing the nova-network only
compute REST APIs in the Rocky release, which means
any requests to those APIs after Queens will result
in a 410 response, regardless of microversion or
whether or not neutron is being used.
The os-virtual-interfaces API is being removed in
nova change: https://review.openstack.org/569923/
As a result, os-virtual-interfaces tests will no longer
works against Rocky+ versions of nova.
nova-network tests are skipped by adding
`depends_on_nova_network = True` to the test class. The
base compute API class does a check to determine, based
on the max compute API microversion, which release is
being tested and if Rocky+ the nova-network specific
tests will be skipped.
Subsequent nova-network specific tests will be skipped
as the API removal changes are proposed in nova.
Related to blueprint remove-nova-network
Change-Id: I1d8d9aba6f44ee451e8e4d93a3e5bf5e70f7bbb3
diff --git a/patrole_tempest_plugin/tests/api/compute/test_server_actions_rbac.py b/patrole_tempest_plugin/tests/api/compute/test_server_actions_rbac.py
index 1a6869e..1fe52e9 100644
--- a/patrole_tempest_plugin/tests/api/compute/test_server_actions_rbac.py
+++ b/patrole_tempest_plugin/tests/api/compute/test_server_actions_rbac.py
@@ -293,6 +293,7 @@
self.compute_images_client.delete_image, image['id'])
@decorators.idempotent_id('9fdd4630-731c-4f7c-bce5-69fa3792c52a')
+ @decorators.attr(type='slow')
@testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
'Snapshotting not available, backup not possible.')
@utils.services('image')
diff --git a/patrole_tempest_plugin/tests/api/compute/test_server_volume_attachments_rbac.py b/patrole_tempest_plugin/tests/api/compute/test_server_volume_attachments_rbac.py
index b803fe3..a510d1e 100644
--- a/patrole_tempest_plugin/tests/api/compute/test_server_volume_attachments_rbac.py
+++ b/patrole_tempest_plugin/tests/api/compute/test_server_volume_attachments_rbac.py
@@ -25,6 +25,10 @@
CONF = config.CONF
+# FIXME(felipemonteiro): `@decorators.attr(type='slow')` are added to tests
+# below to in effect cause the tests to be non-voting in Zuul due to a high
+# rate of spurious failures related to volume attachments. This will be
+# revisited at a later date.
class ServerVolumeAttachmentRbacTest(rbac_base.BaseV2ComputeRbacTest):
@classmethod
@@ -53,6 +57,7 @@
with self.rbac_utils.override_role(self):
self.servers_client.list_volume_attachments(self.server['id'])
+ @decorators.attr(type='slow')
@rbac_rule_validation.action(
service="nova",
rule="os_compute_api:os-volumes-attachments:create")
@@ -61,6 +66,7 @@
with self.rbac_utils.override_role(self):
self.attach_volume(self.server, self.volume)
+ @decorators.attr(type='slow')
@rbac_rule_validation.action(
service="nova",
rule="os_compute_api:os-volumes-attachments:show")
diff --git a/patrole_tempest_plugin/tests/api/compute/test_virtual_interfaces_rbac.py b/patrole_tempest_plugin/tests/api/compute/test_virtual_interfaces_rbac.py
index 6edb8d9..ae77a34 100644
--- a/patrole_tempest_plugin/tests/api/compute/test_virtual_interfaces_rbac.py
+++ b/patrole_tempest_plugin/tests/api/compute/test_virtual_interfaces_rbac.py
@@ -23,10 +23,13 @@
CONF = config.CONF
+# TODO(rb560u): Remove this test class once the nova queens branch goes into
+# extended maintenance mode.
class VirtualInterfacesRbacTest(rbac_base.BaseV2ComputeRbacTest):
# The compute os-virtual-interfaces API is deprecated from the Microversion
# 2.44 onward. For more information, see:
# https://developer.openstack.org/api-ref/compute/#servers-virtual-interfaces-servers-os-virtual-interfaces-deprecated
+ depends_on_nova_network = True
max_microversion = '2.43'
@classmethod
diff --git a/patrole_tempest_plugin/tests/api/volume/test_volume_actions_rbac.py b/patrole_tempest_plugin/tests/api/volume/test_volume_actions_rbac.py
index 46f7a3e..dcc2bd5 100644
--- a/patrole_tempest_plugin/tests/api/volume/test_volume_actions_rbac.py
+++ b/patrole_tempest_plugin/tests/api/volume/test_volume_actions_rbac.py
@@ -73,6 +73,7 @@
'"volume_extension:volume_actions:attach" must be available in the '
'cloud.')
@utils.services('compute')
+ @decorators.attr(type='slow')
@rbac_rule_validation.action(
service="cinder",
rule="volume_extension:volume_actions:attach")