Merge "Add QoS support"
This commit is contained in:
commit
3ce06d8f52
@ -118,6 +118,8 @@ class OVSPluginContext(context.NeutronContext):
|
||||
ovs_ctxt['neutron_security_groups'] = self.neutron_security_groups
|
||||
ovs_ctxt['l2_population'] = neutron_api_settings['l2_population']
|
||||
ovs_ctxt['distributed_routing'] = neutron_api_settings['enable_dvr']
|
||||
ovs_ctxt['extension_drivers'] = neutron_api_settings[
|
||||
'extension_drivers']
|
||||
ovs_ctxt['overlay_network_type'] = \
|
||||
neutron_api_settings['overlay_network_type']
|
||||
ovs_ctxt['polling_interval'] = neutron_api_settings['polling_interval']
|
||||
|
@ -21,6 +21,9 @@ prevent_arp_spoofing = {{ prevent_arp_spoofing }}
|
||||
veth_mtu = {{ veth_mtu }}
|
||||
{% endif -%}
|
||||
polling_interval = {{ polling_interval }}
|
||||
{% if extension_drivers -%}
|
||||
extensions = {{ extension_drivers }}
|
||||
{% endif -%}
|
||||
|
||||
[securitygroup]
|
||||
{% if neutron_security_groups and not enable_dpdk -%}
|
||||
|
@ -57,8 +57,8 @@ class NeutronOVSBasicDeployment(OpenStackAmuletDeployment):
|
||||
# We delay check for services running on neutron-openvswitch unit to
|
||||
# after verification of sriov configuration. See comment in function
|
||||
# test_301_neutron_sriov_config()
|
||||
exclude_services = ['neutron-openvswitch']
|
||||
self._auto_wait_for_status(exclude_services=exclude_services)
|
||||
self.exclude_services = ['neutron-openvswitch']
|
||||
self._auto_wait_for_status(exclude_services=self.exclude_services)
|
||||
|
||||
self.d.sentry.wait()
|
||||
self._initialize_tests()
|
||||
@ -390,6 +390,28 @@ class NeutronOVSBasicDeployment(OpenStackAmuletDeployment):
|
||||
self.d.configure(juju_service, set_default)
|
||||
u.log.debug('OK')
|
||||
|
||||
def test_400_enable_qos(self):
|
||||
"""Check qos settings set via neutron-api charm"""
|
||||
if self._get_openstack_release() >= self.trusty_mitaka:
|
||||
unit = self.n_ovs_sentry
|
||||
set_default = {'enable-qos': 'False'}
|
||||
set_alternate = {'enable-qos': 'True'}
|
||||
self.d.configure('neutron-api', set_alternate)
|
||||
time.sleep(60)
|
||||
self._auto_wait_for_status(exclude_services=self.exclude_services)
|
||||
config = u._get_config(
|
||||
unit,
|
||||
'/etc/neutron/plugins/ml2/openvswitch_agent.ini')
|
||||
extensions = config.get('agent', 'extensions').split(',')
|
||||
if 'qos' not in extensions:
|
||||
message = "qos not in extensions"
|
||||
amulet.raise_status(amulet.FAIL, msg=message)
|
||||
|
||||
u.log.debug('Setting QoS back to {}'.format(
|
||||
set_default['enable-qos']))
|
||||
self.d.configure('neutron-api', set_default)
|
||||
u.log.debug('OK')
|
||||
|
||||
def test_910_pause_and_resume(self):
|
||||
"""The services can be paused and resumed. """
|
||||
u.log.debug('Checking pause and resume actions...')
|
||||
|
@ -149,6 +149,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
rdata = {
|
||||
'neutron-security-groups': 'True',
|
||||
'l2-population': 'True',
|
||||
'enable-qos': 'True',
|
||||
'network-device-mtu': 1500,
|
||||
'overlay-network-type': 'gre',
|
||||
'enable-dvr': 'True',
|
||||
@ -160,6 +161,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'neutron_security_groups': True,
|
||||
'distributed_routing': True,
|
||||
'verbose': True,
|
||||
'extension_drivers': 'qos',
|
||||
'local_ip': '127.0.0.15',
|
||||
'network_device_mtu': 1500,
|
||||
'veth_mtu': 1500,
|
||||
@ -224,6 +226,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
rdata = {
|
||||
'neutron-security-groups': 'True',
|
||||
'l2-population': 'True',
|
||||
'enable-qos': 'True',
|
||||
'network-device-mtu': 1500,
|
||||
'overlay-network-type': 'gre',
|
||||
}
|
||||
@ -235,6 +238,7 @@ class OVSPluginContextTest(CharmTestCase):
|
||||
'neutron_alchemy_flags': {},
|
||||
'neutron_security_groups': False,
|
||||
'verbose': True,
|
||||
'extension_drivers': 'qos',
|
||||
'local_ip': '127.0.0.15',
|
||||
'veth_mtu': 1500,
|
||||
'network_device_mtu': 1500,
|
||||
|
Loading…
Reference in New Issue
Block a user