diff --git a/manifests/params.pp b/manifests/params.pp index 88f579e77..782644358 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -57,7 +57,11 @@ $server_service = 'neutron-server' $client_package = 'python-neutronclient' - $ml2_server_package = false + if $::operatingsystem == 'Ubuntu' { + $ml2_server_package = 'neutron-plugin-ml2' + } else { + $ml2_server_package = false + } $ovs_agent_package = 'neutron-plugin-openvswitch-agent' $ovs_agent_service = 'neutron-plugin-openvswitch-agent' diff --git a/spec/classes/neutron_plugins_ml2_spec.rb b/spec/classes/neutron_plugins_ml2_spec.rb index d1788ad4e..31d687136 100644 --- a/spec/classes/neutron_plugins_ml2_spec.rb +++ b/spec/classes/neutron_plugins_ml2_spec.rb @@ -212,7 +212,22 @@ {} end - it_configures 'neutron plugin ml2' + context 'on Ubuntu operating systems' do + before do + facts.merge!({:operatingsystem => 'Ubuntu'}) + platform_params.merge!(:ml2_server_package => 'neutron-plugin-ml2') + end + + it_configures 'neutron plugin ml2' + end + + context 'on non-Ubuntu operating systems' do + before do + facts.merge!({:operatingsystem => 'Debian'}) + end + + it_configures 'neutron plugin ml2' + end end context 'on RedHat platforms' do