stein: switch to FWaaS v2
FWaaS v1 has been removed as of the latest Stein snapshots. Switch to configuration of v2 service provider. This commit also switches >= rocky to use the lbaasv2 entry point rather than the fully qualified class name for the lbaas service provider. Change-Id: Id0fd808a33dff25d48610bcf97d12c512a21fc40
This commit is contained in:
parent
e6f66cd15b
commit
25ec688145
@ -567,19 +567,23 @@ class NeutronCCContext(context.NeutronContext):
|
|||||||
'rocky': ['router', 'firewall', 'metering', 'segments',
|
'rocky': ['router', 'firewall', 'metering', 'segments',
|
||||||
('neutron_dynamic_routing.'
|
('neutron_dynamic_routing.'
|
||||||
'services.bgp.bgp_plugin.BgpPlugin')],
|
'services.bgp.bgp_plugin.BgpPlugin')],
|
||||||
|
'stein': ['router', 'firewall_v2', 'metering', 'segments',
|
||||||
|
('neutron_dynamic_routing.'
|
||||||
|
'services.bgp.bgp_plugin.BgpPlugin')],
|
||||||
}
|
}
|
||||||
if cmp_release >= 'rocky':
|
if cmp_release >= 'rocky':
|
||||||
if ctxt.get('load_balancer_name', None):
|
if ctxt.get('load_balancer_name', None):
|
||||||
# TODO(fnordahl): Remove when ``neutron_lbaas`` is retired
|
# TODO(fnordahl): Remove when ``neutron_lbaas`` is retired
|
||||||
service_plugins['rocky'].append('lbaasv2-proxy')
|
service_plugins[release].append('lbaasv2-proxy')
|
||||||
else:
|
else:
|
||||||
# TODO(fnordahl): Remove fall-back in next charm release
|
# TODO(fnordahl): Remove fall-back in next charm release
|
||||||
service_plugins['rocky'].append(
|
service_plugins[release].append('lbaasv2')
|
||||||
'neutron_lbaas.services.loadbalancer.plugin.'
|
|
||||||
'LoadBalancerPluginv2')
|
if cmp_release >= 'stein':
|
||||||
|
ctxt['firewall_v2'] = True
|
||||||
|
|
||||||
ctxt['service_plugins'] = service_plugins.get(
|
ctxt['service_plugins'] = service_plugins.get(
|
||||||
release, service_plugins['rocky'])
|
release, service_plugins['stein'])
|
||||||
|
|
||||||
if is_nsg_logging_enabled():
|
if is_nsg_logging_enabled():
|
||||||
ctxt['service_plugins'].append('log')
|
ctxt['service_plugins'].append('log')
|
||||||
|
@ -133,4 +133,9 @@ base_url = {{ load_balancer_base_url }}
|
|||||||
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
|
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if firewall_v2 -%}
|
||||||
|
[service_providers]
|
||||||
|
service_provider = FIREWALL_V2:fwaas_db:neutron_fwaas.services.firewall.service_drivers.agents.agents.FirewallAgentDriver:default
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include "section-oslo-middleware" %}
|
{% include "section-oslo-middleware" %}
|
||||||
|
@ -953,9 +953,22 @@ class NeutronCCContextTest(CharmTestCase):
|
|||||||
service_plugins = (
|
service_plugins = (
|
||||||
'router,firewall,metering,segments,'
|
'router,firewall,metering,segments,'
|
||||||
'neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin,'
|
'neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin,'
|
||||||
'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2')
|
'lbaasv2')
|
||||||
self.assertEqual(context.NeutronCCContext()()['service_plugins'],
|
ncc_context = context.NeutronCCContext()()
|
||||||
|
self.assertEqual(ncc_context['service_plugins'],
|
||||||
service_plugins)
|
service_plugins)
|
||||||
|
|
||||||
|
# stein
|
||||||
|
self.os_release.return_value = 'stein'
|
||||||
|
service_plugins = (
|
||||||
|
'router,firewall_v2,metering,segments,'
|
||||||
|
'neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin,'
|
||||||
|
'lbaasv2')
|
||||||
|
ncc_context = context.NeutronCCContext()()
|
||||||
|
self.assertEqual(ncc_context['service_plugins'],
|
||||||
|
service_plugins)
|
||||||
|
self.assertTrue(ncc_context['firewall_v2'])
|
||||||
|
|
||||||
# rocky and related to charm through neutron-load-balancer interface
|
# rocky and related to charm through neutron-load-balancer interface
|
||||||
self.os_release.return_value = 'rocky'
|
self.os_release.return_value = 'rocky'
|
||||||
service_plugins = (
|
service_plugins = (
|
||||||
|
Loading…
Reference in New Issue
Block a user