Set max_microversion 2.43 for virtual_interfaces tests
The compute os-virtual-interfaces API is deprecated from the Microversion 2.44, so we should set max_microversion = '2.43' for compute virtual_interfaces tests. This is based on work in Tempest [0]. [0] Ie1793802fa33898ffbdad16b58b085894e66d4d1 Partially Implements blueprint: clear-deprecated-api Change-Id: Ib63bab15d4690d23f7ffbd8724ec1351929b94c5
This commit is contained in:
parent
d085c4617c
commit
04352eaf4b
|
@ -676,6 +676,24 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
|
||||||
self.servers_client.add_fixed_ip(self.server['id'],
|
self.servers_client.add_fixed_ip(self.server['id'],
|
||||||
networkId=network_id)
|
networkId=network_id)
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
max_microversion = '2.43'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setup_credentials(cls):
|
||||||
|
# This test needs a network and a subnet
|
||||||
|
cls.set_network_resources(network=True, subnet=True)
|
||||||
|
super(VirtualInterfacesRbacTest, cls).setup_credentials()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def resource_setup(cls):
|
||||||
|
super(VirtualInterfacesRbacTest, cls).resource_setup()
|
||||||
|
cls.server = cls.create_test_server(wait_until='ACTIVE')
|
||||||
|
|
||||||
@rbac_rule_validation.action(
|
@rbac_rule_validation.action(
|
||||||
service="nova",
|
service="nova",
|
||||||
rule="os_compute_api:os-virtual-interfaces")
|
rule="os_compute_api:os-virtual-interfaces")
|
||||||
|
@ -685,9 +703,6 @@ class MiscPolicyActionsNetworkRbacTest(rbac_base.BaseV2ComputeRbacTest):
|
||||||
|
|
||||||
If Neutron is available, then call the API and expect it to fail
|
If Neutron is available, then call the API and expect it to fail
|
||||||
with a 400 BadRequest (policy enforcement is done before that happens).
|
with a 400 BadRequest (policy enforcement is done before that happens).
|
||||||
|
|
||||||
For more information, see:
|
|
||||||
https://developer.openstack.org/api-ref/compute/#servers-virtual-interfaces-servers-os-virtual-interfaces-deprecated
|
|
||||||
"""
|
"""
|
||||||
with self.rbac_utils.override_role(self):
|
with self.rbac_utils.override_role(self):
|
||||||
if CONF.service_available.neutron:
|
if CONF.service_available.neutron:
|
||||||
|
|
Loading…
Reference in New Issue