Support networking-baremetal in Ubuntu/Debian
The required packages are already built and provided for these distros. Change-Id: I7f0d453b9a3309af346e2d77672124ce064afad6
This commit is contained in:
parent
989282da3b
commit
5c09c4f6ca
@ -147,11 +147,6 @@ class neutron::agents::ml2::networking_baremetal (
|
|||||||
include neutron::deps
|
include neutron::deps
|
||||||
include neutron::params
|
include neutron::params
|
||||||
|
|
||||||
if($::osfamily != 'RedHat') {
|
|
||||||
# Drivers are only packaged for RedHat at this time
|
|
||||||
fail("Unsupported osfamily ${::osfamily}")
|
|
||||||
}
|
|
||||||
|
|
||||||
resources { 'ironic_neutron_agent_config':
|
resources { 'ironic_neutron_agent_config':
|
||||||
purge => $purge_config,
|
purge => $purge_config,
|
||||||
}
|
}
|
||||||
|
@ -74,48 +74,51 @@ class neutron::params {
|
|||||||
$networking_ansible_package = 'python3-networking-ansible'
|
$networking_ansible_package = 'python3-networking-ansible'
|
||||||
$mlnx_agent_service = 'neutron-mlnx-agent'
|
$mlnx_agent_service = 'neutron-mlnx-agent'
|
||||||
} elsif($::osfamily == 'Debian') {
|
} elsif($::osfamily == 'Debian') {
|
||||||
$package_name = 'neutron-common'
|
$package_name = 'neutron-common'
|
||||||
if $::operatingsystem == 'Debian' {
|
if $::operatingsystem == 'Debian' {
|
||||||
$ml2_server_package = false
|
$ml2_server_package = false
|
||||||
$server_service = false
|
$server_service = false
|
||||||
$server_package = false
|
$server_package = false
|
||||||
$api_package_name = 'neutron-api'
|
$api_package_name = 'neutron-api'
|
||||||
$api_service_name = 'neutron-api'
|
$api_service_name = 'neutron-api'
|
||||||
$rpc_package_name = 'neutron-rpc-server'
|
$rpc_package_name = 'neutron-rpc-server'
|
||||||
$rpc_service_name = 'neutron-rpc-server'
|
$rpc_service_name = 'neutron-rpc-server'
|
||||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||||
} else {
|
} else {
|
||||||
$ml2_server_package = 'neutron-plugin-ml2'
|
$ml2_server_package = 'neutron-plugin-ml2'
|
||||||
$server_service = 'neutron-server'
|
$server_service = 'neutron-server'
|
||||||
$server_package = 'neutron-server'
|
$server_package = 'neutron-server'
|
||||||
$api_package_name = false
|
$api_package_name = false
|
||||||
$api_service_name = false
|
$api_service_name = false
|
||||||
$rpc_package_name = false
|
$rpc_package_name = false
|
||||||
$rpc_service_name = false
|
$rpc_service_name = false
|
||||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||||
}
|
}
|
||||||
$bgp_dragent_package = 'neutron-bgp-dragent'
|
$bgp_dragent_package = 'neutron-bgp-dragent'
|
||||||
$ovs_agent_package = 'neutron-openvswitch-agent'
|
$ovs_agent_package = 'neutron-openvswitch-agent'
|
||||||
$ovs_server_package = 'neutron-plugin-openvswitch'
|
$ovs_server_package = 'neutron-plugin-openvswitch'
|
||||||
$ovs_cleanup_service = false
|
$ovs_cleanup_service = false
|
||||||
$linuxbridge_agent_package = 'neutron-linuxbridge-agent'
|
$linuxbridge_agent_package = 'neutron-linuxbridge-agent'
|
||||||
$linuxbridge_server_package = 'neutron-plugin-linuxbridge'
|
$linuxbridge_server_package = 'neutron-plugin-linuxbridge'
|
||||||
$sriov_nic_agent_service = 'neutron-sriov-agent'
|
$sriov_nic_agent_service = 'neutron-sriov-agent'
|
||||||
$sriov_nic_agent_package = 'neutron-sriov-agent'
|
$sriov_nic_agent_package = 'neutron-sriov-agent'
|
||||||
$nvp_server_package = 'neutron-plugin-nicira'
|
$nvp_server_package = 'neutron-plugin-nicira'
|
||||||
$dhcp_agent_package = 'neutron-dhcp-agent'
|
$dhcp_agent_package = 'neutron-dhcp-agent'
|
||||||
$metering_agent_package = 'neutron-metering-agent'
|
$metering_agent_package = 'neutron-metering-agent'
|
||||||
$vpnaas_agent_package = 'python3-neutron-vpnaas'
|
$vpnaas_agent_package = 'python3-neutron-vpnaas'
|
||||||
$openswan_package = 'strongswan'
|
$openswan_package = 'strongswan'
|
||||||
$libreswan_package = false
|
$libreswan_package = false
|
||||||
$metadata_agent_package = 'neutron-metadata-agent'
|
$metadata_agent_package = 'neutron-metadata-agent'
|
||||||
$l3_agent_package = 'neutron-l3-agent'
|
$l3_agent_package = 'neutron-l3-agent'
|
||||||
$l2gw_agent_package = 'neutron-l2gateway-agent'
|
$l2gw_agent_package = 'neutron-l2gateway-agent'
|
||||||
$l2gw_package = 'python3-networking-l2gw'
|
$l2gw_package = 'python3-networking-l2gw'
|
||||||
$ovn_metadata_agent_package = 'neutron-ovn-metadata-agent'
|
$ovn_metadata_agent_package = 'neutron-ovn-metadata-agent'
|
||||||
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
|
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
|
||||||
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
|
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
|
||||||
$mlnx_agent_service = 'neutron-plugin-mlnx-agent'
|
$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 {
|
} else {
|
||||||
fail("Unsupported osfamily ${::osfamily}")
|
fail("Unsupported osfamily ${::osfamily}")
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,9 @@ class neutron::plugins::ml2::networking_baremetal(
|
|||||||
include neutron::deps
|
include neutron::deps
|
||||||
include neutron::params
|
include neutron::params
|
||||||
|
|
||||||
if($::osfamily != 'RedHat') {
|
package { 'python-networking-baremetal':
|
||||||
# Drivers are only packaged for RedHat at this time
|
ensure => $package_ensure,
|
||||||
fail("Unsupported osfamily ${::osfamily}")
|
name => $::neutron::params::networking_baremetal_package,
|
||||||
} else {
|
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
|
end
|
||||||
|
|
||||||
shared_examples 'networking-baremetal ironic-neutron-agent with ml2 plugin' do
|
shared_examples 'neutron::agents::ml2::networking_baremetal' do
|
||||||
let :p do
|
let :p do
|
||||||
default_params.merge(params)
|
default_params.merge(params)
|
||||||
end
|
end
|
||||||
@ -124,21 +124,19 @@ describe 'neutron::agents::ml2::networking_baremetal' do
|
|||||||
let (:facts) do
|
let (:facts) do
|
||||||
facts.merge!(OSDefaults.get_facts())
|
facts.merge!(OSDefaults.get_facts())
|
||||||
end
|
end
|
||||||
|
|
||||||
let (:platform_params) do
|
let (:platform_params) do
|
||||||
case facts[:osfamily]
|
case facts[:osfamily]
|
||||||
|
when 'Debian'
|
||||||
|
{ :networking_baremetal_agent_package => 'ironic-neutron-agent',
|
||||||
|
:networking_baremetal_agent_service => 'ironic-neutron-agent' }
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
{ :networking_baremetal_agent_package => 'python3-ironic-neutron-agent',
|
{ :networking_baremetal_agent_package => 'python3-ironic-neutron-agent',
|
||||||
:networking_baremetal_agent_service => 'ironic-neutron-agent' }
|
:networking_baremetal_agent_service => 'ironic-neutron-agent' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
case facts[:osfamily]
|
|
||||||
when 'RedHat'
|
it_behaves_like 'neutron::agents::ml2::networking_baremetal'
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -39,19 +39,13 @@ describe 'neutron::plugins::ml2::networking_baremetal' do
|
|||||||
let (:platform_params) do
|
let (:platform_params) do
|
||||||
case facts[:osfamily]
|
case facts[:osfamily]
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
{ :networking_baremetal_package => 'python3-networking-baremetal'}
|
{ :networking_baremetal_package => 'python3-ironic-neutron-agent'}
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
{ :networking_baremetal_package => 'python3-networking-baremetal'}
|
{ :networking_baremetal_package => 'python3-networking-baremetal'}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
case facts[:osfamily]
|
|
||||||
when 'RedHat'
|
it_behaves_like 'networking-baremetal ml2 plugin'
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user