Merge "Support networking-baremetal in Ubuntu/Debian"
This commit is contained in:
commit
ef51c8ff8b
@ -123,11 +123,6 @@ class neutron::agents::ml2::networking_baremetal (
|
||||
include neutron::deps
|
||||
include neutron::params
|
||||
|
||||
if($::osfamily != 'RedHat') {
|
||||
# Drivers are only packaged for RedHat at this time
|
||||
fail("Unsupported osfamily ${::osfamily}")
|
||||
}
|
||||
|
||||
resources { 'ironic_neutron_agent_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
@ -74,48 +74,51 @@ class neutron::params {
|
||||
$networking_ansible_package = 'python3-networking-ansible'
|
||||
$mlnx_agent_service = 'neutron-mlnx-agent'
|
||||
} elsif($::osfamily == 'Debian') {
|
||||
$package_name = 'neutron-common'
|
||||
$package_name = 'neutron-common'
|
||||
if $::operatingsystem == 'Debian' {
|
||||
$ml2_server_package = false
|
||||
$server_service = false
|
||||
$server_package = false
|
||||
$api_package_name = 'neutron-api'
|
||||
$api_service_name = 'neutron-api'
|
||||
$rpc_package_name = 'neutron-rpc-server'
|
||||
$rpc_service_name = 'neutron-rpc-server'
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
$ml2_server_package = false
|
||||
$server_service = false
|
||||
$server_package = false
|
||||
$api_package_name = 'neutron-api'
|
||||
$api_service_name = 'neutron-api'
|
||||
$rpc_package_name = 'neutron-rpc-server'
|
||||
$rpc_service_name = 'neutron-rpc-server'
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
} else {
|
||||
$ml2_server_package = 'neutron-plugin-ml2'
|
||||
$server_service = 'neutron-server'
|
||||
$server_package = 'neutron-server'
|
||||
$api_package_name = false
|
||||
$api_service_name = false
|
||||
$rpc_package_name = false
|
||||
$rpc_service_name = false
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
$server_service = 'neutron-server'
|
||||
$server_package = 'neutron-server'
|
||||
$api_package_name = false
|
||||
$api_service_name = false
|
||||
$rpc_package_name = false
|
||||
$rpc_service_name = false
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
}
|
||||
$bgp_dragent_package = 'neutron-bgp-dragent'
|
||||
$ovs_agent_package = 'neutron-openvswitch-agent'
|
||||
$ovs_server_package = 'neutron-plugin-openvswitch'
|
||||
$ovs_cleanup_service = false
|
||||
$linuxbridge_agent_package = 'neutron-linuxbridge-agent'
|
||||
$linuxbridge_server_package = 'neutron-plugin-linuxbridge'
|
||||
$sriov_nic_agent_service = 'neutron-sriov-agent'
|
||||
$sriov_nic_agent_package = 'neutron-sriov-agent'
|
||||
$nvp_server_package = 'neutron-plugin-nicira'
|
||||
$dhcp_agent_package = 'neutron-dhcp-agent'
|
||||
$metering_agent_package = 'neutron-metering-agent'
|
||||
$vpnaas_agent_package = 'python3-neutron-vpnaas'
|
||||
$openswan_package = 'strongswan'
|
||||
$libreswan_package = false
|
||||
$metadata_agent_package = 'neutron-metadata-agent'
|
||||
$l3_agent_package = 'neutron-l3-agent'
|
||||
$l2gw_agent_package = 'neutron-l2gateway-agent'
|
||||
$l2gw_package = 'python3-networking-l2gw'
|
||||
$ovn_metadata_agent_package = 'neutron-ovn-metadata-agent'
|
||||
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
|
||||
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
|
||||
$mlnx_agent_service = 'neutron-plugin-mlnx-agent'
|
||||
$bgp_dragent_package = 'neutron-bgp-dragent'
|
||||
$ovs_agent_package = 'neutron-openvswitch-agent'
|
||||
$ovs_server_package = 'neutron-plugin-openvswitch'
|
||||
$ovs_cleanup_service = false
|
||||
$linuxbridge_agent_package = 'neutron-linuxbridge-agent'
|
||||
$linuxbridge_server_package = 'neutron-plugin-linuxbridge'
|
||||
$sriov_nic_agent_service = 'neutron-sriov-agent'
|
||||
$sriov_nic_agent_package = 'neutron-sriov-agent'
|
||||
$nvp_server_package = 'neutron-plugin-nicira'
|
||||
$dhcp_agent_package = 'neutron-dhcp-agent'
|
||||
$metering_agent_package = 'neutron-metering-agent'
|
||||
$vpnaas_agent_package = 'python3-neutron-vpnaas'
|
||||
$openswan_package = 'strongswan'
|
||||
$libreswan_package = false
|
||||
$metadata_agent_package = 'neutron-metadata-agent'
|
||||
$l3_agent_package = 'neutron-l3-agent'
|
||||
$l2gw_agent_package = 'neutron-l2gateway-agent'
|
||||
$l2gw_package = 'python3-networking-l2gw'
|
||||
$ovn_metadata_agent_package = 'neutron-ovn-metadata-agent'
|
||||
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
|
||||
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
|
||||
$networking_baremetal_package = 'python3-ironic-neutron-agent'
|
||||
$networking_baremetal_agent_package = 'ironic-neutron-agent'
|
||||
$networking_baremetal_agent_service = 'ironic-neutron-agent'
|
||||
$mlnx_agent_service = 'neutron-plugin-mlnx-agent'
|
||||
} else {
|
||||
fail("Unsupported osfamily ${::osfamily}")
|
||||
}
|
||||
|
@ -17,14 +17,9 @@ class neutron::plugins::ml2::networking_baremetal(
|
||||
include neutron::deps
|
||||
include neutron::params
|
||||
|
||||
if($::osfamily != 'RedHat') {
|
||||
# Drivers are only packaged for RedHat at this time
|
||||
fail("Unsupported osfamily ${::osfamily}")
|
||||
} else {
|
||||
package { 'python-networking-baremetal':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::networking_baremetal_package,
|
||||
tag => ['openstack', 'neutron-plugin-ml2-package'],
|
||||
}
|
||||
package { 'python-networking-baremetal':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::networking_baremetal_package,
|
||||
tag => ['openstack', 'neutron-plugin-ml2-package'],
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Now this module supports configuration of networking-baremetal in Debian
|
||||
and Ubuntu. Previously it was supported in RHEL/CentOS only.
|
@ -22,7 +22,7 @@ describe 'neutron::agents::ml2::networking_baremetal' do
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples 'networking-baremetal ironic-neutron-agent with ml2 plugin' do
|
||||
shared_examples 'neutron::agents::ml2::networking_baremetal' do
|
||||
let :p do
|
||||
default_params.merge(params)
|
||||
end
|
||||
@ -124,21 +124,19 @@ describe 'neutron::agents::ml2::networking_baremetal' do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let (:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :networking_baremetal_agent_package => 'ironic-neutron-agent',
|
||||
:networking_baremetal_agent_service => 'ironic-neutron-agent' }
|
||||
when 'RedHat'
|
||||
{ :networking_baremetal_agent_package => 'python3-ironic-neutron-agent',
|
||||
:networking_baremetal_agent_service => 'ironic-neutron-agent' }
|
||||
end
|
||||
end
|
||||
case facts[:osfamily]
|
||||
when 'RedHat'
|
||||
it_behaves_like 'networking-baremetal ironic-neutron-agent with ml2 plugin'
|
||||
when facts[:osfamily] != 'RedHat'
|
||||
it 'fails with unsupported osfamily' do
|
||||
should raise_error(Puppet::Error, /Unsupported osfamily.*/)
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'neutron::agents::ml2::networking_baremetal'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -39,19 +39,13 @@ describe 'neutron::plugins::ml2::networking_baremetal' do
|
||||
let (:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :networking_baremetal_package => 'python3-networking-baremetal'}
|
||||
{ :networking_baremetal_package => 'python3-ironic-neutron-agent'}
|
||||
when 'RedHat'
|
||||
{ :networking_baremetal_package => 'python3-networking-baremetal'}
|
||||
end
|
||||
end
|
||||
case facts[:osfamily]
|
||||
when 'RedHat'
|
||||
it_behaves_like 'networking-baremetal ml2 plugin'
|
||||
when facts[:osfamily] != 'RedHat'
|
||||
it 'fails with unsupported osfamily' do
|
||||
should raise_error(Puppet::Error, /Unsupported osfamily.*/)
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'networking-baremetal ml2 plugin'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user