Merge "Prepare MinBwAllocationPlacementTest for new neutron API ext"
This commit is contained in:
commit
b725a58503
|
@ -176,6 +176,7 @@ class MinBwAllocationPlacementTest(manager.NetworkScenarioTest):
|
||||||
consumer)['allocations']
|
consumer)['allocations']
|
||||||
self.assertGreater(len(allocations), 0)
|
self.assertGreater(len(allocations), 0)
|
||||||
bw_resource_in_alloc = False
|
bw_resource_in_alloc = False
|
||||||
|
allocation_rp = None
|
||||||
for rp, resources in allocations.items():
|
for rp, resources in allocations.items():
|
||||||
if self.INGRESS_RESOURCE_CLASS in resources['resources']:
|
if self.INGRESS_RESOURCE_CLASS in resources['resources']:
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
@ -190,9 +191,19 @@ class MinBwAllocationPlacementTest(manager.NetworkScenarioTest):
|
||||||
# the rp uuid
|
# the rp uuid
|
||||||
for port_id in port_ids:
|
for port_id in port_ids:
|
||||||
port = self.os_admin.ports_client.show_port(port_id)
|
port = self.os_admin.ports_client.show_port(port_id)
|
||||||
self.assertEqual(
|
port_binding_alloc = port['port']['binding:profile'][
|
||||||
allocation_rp,
|
'allocation']
|
||||||
port['port']['binding:profile']['allocation'])
|
# NOTE(gibi): the format of the allocation key depends on the
|
||||||
|
# existence of port-resource-request-groups API extension.
|
||||||
|
# TODO(gibi): drop the else branch once tempest does not need
|
||||||
|
# to support Xena release any more.
|
||||||
|
if utils.is_extension_enabled(
|
||||||
|
'port-resource-request-groups', 'network'):
|
||||||
|
self.assertEqual(
|
||||||
|
{allocation_rp},
|
||||||
|
set(port_binding_alloc.values()))
|
||||||
|
else:
|
||||||
|
self.assertEqual(allocation_rp, port_binding_alloc)
|
||||||
|
|
||||||
@decorators.idempotent_id('78625d92-212c-400e-8695-dd51706858b8')
|
@decorators.idempotent_id('78625d92-212c-400e-8695-dd51706858b8')
|
||||||
@utils.services('compute', 'network')
|
@utils.services('compute', 'network')
|
||||||
|
|
Loading…
Reference in New Issue