Configure plugins by name
To configure core plugin or service plugins, instead of using class names, simpler names can also be used. Example: service_plugins = router, firewall, lbaas core_plugins = linuxbridge It is a new feature brought in Icehouse (thanks to stevedor): http://git.io/QfyiLw Bringing it into puppet-neutron simplifies the parameters use for end-user. Change-Id: Ib96cc8ea67e89c37226ee6b9d1ae811fa1507672 Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
@@ -8,7 +8,7 @@ class { 'neutron':
|
||||
rabbit_password => 'password',
|
||||
rabbit_user => 'guest',
|
||||
rabbit_host => 'localhost',
|
||||
service_plugins => ['neutron.services.metering.metering_plugin.MeteringPlugin']
|
||||
service_plugins => ['metering']
|
||||
}
|
||||
|
||||
# The API server talks to keystone for authorisation
|
||||
|
@@ -31,27 +31,13 @@
|
||||
#
|
||||
# [*core_plugin*]
|
||||
# (optional) Neutron plugin provider
|
||||
# Defaults to neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2 (Open-vSwitch)
|
||||
# Could be:
|
||||
# neutron.plugins.bigswitch.plugin.NeutronRestProxyV2
|
||||
# neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2
|
||||
# neutron.plugins.cisco.network_plugin.PluginV2
|
||||
# neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2
|
||||
# neutron.plugins.midonet.plugin.MidonetPluginV2
|
||||
# neutron.plugins.ml2.plugin.Ml2Plugin
|
||||
# neutron.plugins.nec.nec_plugin.NECPluginV2
|
||||
# neutron.plugins.nicira.NeutronPlugin.NvpPluginV2
|
||||
# neutron.plugins.plumgrid.plumgrid_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2
|
||||
# neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2
|
||||
# Defaults to openvswitch
|
||||
# Could be bigswitch, brocade, cisco, embrane, hyperv, linuxbridge, midonet, ml2, mlnx, nec, nicira, plumgrid, ryu
|
||||
#
|
||||
# [*service_plugins*]
|
||||
# (optional) Advanced service modules.
|
||||
# Could be an array that can have these elements:
|
||||
# neutron.services.firewall.fwaas_plugin.FirewallPlugin
|
||||
# neutron.services.loadbalancer.plugin.LoadBalancerPlugin
|
||||
# neutron.services.vpn.plugin.VPNDriverPlugin
|
||||
# neutron.services.metering.metering_plugin.MeteringPlugin
|
||||
# neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
|
||||
# router, firewall, lbaas, vpnaas, metering
|
||||
# Defaults to empty
|
||||
#
|
||||
# [*auth_strategy*]
|
||||
@@ -141,7 +127,7 @@ class neutron (
|
||||
$debug = false,
|
||||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '9696',
|
||||
$core_plugin = 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
|
||||
$core_plugin = 'openvswitch',
|
||||
$service_plugins = undef,
|
||||
$auth_strategy = 'keystone',
|
||||
$base_mac = 'fa:16:3e:00:00:00',
|
||||
|
@@ -6,7 +6,7 @@ describe 'neutron' do
|
||||
{ :package_ensure => 'present',
|
||||
:verbose => false,
|
||||
:debug => false,
|
||||
:core_plugin => 'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
|
||||
:core_plugin => 'linuxbridge',
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_hosts => false,
|
||||
@@ -159,12 +159,12 @@ describe 'neutron' do
|
||||
shared_examples_for 'with service_plugins' do
|
||||
before do
|
||||
params.merge!(
|
||||
:service_plugins => ['neutron.services.firewall.fwaas_plugin.FirewallPlugin','neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.vpn.plugin.VPNDriverPlugin']
|
||||
:service_plugins => ['router','firewall','lbaas','vpnaas','metering']
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
should contain_neutron_config('DEFAULT/service_plugins').with_value('neutron.services.firewall.fwaas_plugin.FirewallPlugin,neutron.services.loadbalancer.plugin.LoadBalancerPlugin,neutron.services.vpn.plugin.VPNDriverPlugin')
|
||||
should contain_neutron_config('DEFAULT/service_plugins').with_value('router,firewall,lbaas,vpnaas,metering')
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user