Specify physical network in QoS fullstack tests

Since [1], those ports and networks without a physical network defined,
will reject a QoS minimum bandwidth rule.

[1] https://review.openstack.org/#/c/641712/

Change-Id: If631ed20db174b988a53d311ec9e4bf9152c17c3
Related-Bug: #1819029
Closes-Bug: #1824095
(cherry picked from commit 0db0fb71de)
This commit is contained in:
Rodolfo Alonso Hernandez 2019-03-25 10:23:50 +00:00
parent 6ba51f5662
commit f2bfb65b2b
1 changed files with 9 additions and 2 deletions

View File

@ -25,6 +25,7 @@ from neutron.agent.linux import tc_lib
from neutron.common import utils
from neutron.tests.common.agents import l2_extensions
from neutron.tests.fullstack import base
from neutron.tests.fullstack.resources import config as fullstack_config
from neutron.tests.fullstack.resources import environment
from neutron.tests.fullstack.resources import machine
from neutron.tests.fullstack import utils as fullstack_utils
@ -49,6 +50,7 @@ DSCP_MARK = 16
class BaseQoSRuleTestCase(object):
of_interface = None
number_of_hosts = 1
physical_network = None
@property
def reverse_direction(self):
@ -74,8 +76,12 @@ class BaseQoSRuleTestCase(object):
agent_type=self.l2_agent_type)['agents'][0]
self.tenant_id = uuidutils.generate_uuid()
self.network = self.safe_client.create_network(self.tenant_id,
'network-test')
network_args = {}
if self.physical_network:
network_args = {'physical_network': self.physical_network,
'network_type': 'vlan'}
self.network = self.safe_client.create_network(
self.tenant_id, name='network-test', **network_args)
self.subnet = self.safe_client.create_subnet(
self.tenant_id, self.network['id'],
cidr='10.0.0.0/24',
@ -615,6 +621,7 @@ class TestQoSPolicyIsDefault(base.BaseFullStackTestCase):
class _TestMinBwQoS(BaseQoSRuleTestCase):
number_of_hosts = 1
physical_network = fullstack_config.PHYSICAL_NETWORK_NAME
def _wait_for_min_bw_rule_removed(self, vm, direction):
# No values are provided when port doesn't have qos policy