Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the software install, config and service dependency chain. This allows external modules to manage software installation (virtualenv, containers, etc) and service management (pacemaker) without needing rely on resources that may change or be renamed. Change-Id: Idb1332dd498bb3065720f2ccaf68e6b0e9fa80c3
This commit is contained in:
parent
30dbdd2e59
commit
8b2319e210
@ -25,5 +25,9 @@ Puppet::Type.newtype(:neutron_plugin_nuage) do
|
||||
'neutron-plugin-nuage'
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
'/etc/neutron/plugins/nuage/plugin.ini'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
@ -23,6 +23,8 @@ class neutron::agents::bigswitch (
|
||||
$agent_enabled = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
if($::osfamily != 'Redhat') {
|
||||
fail("Unsupported osfamily ${::osfamily}")
|
||||
}
|
||||
@ -32,13 +34,13 @@ class neutron::agents::bigswitch (
|
||||
package { 'bigswitch-lldp':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::bigswitch_lldp_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
|
||||
package { 'bigswitch-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::bigswitch_agent_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
|
||||
if $lldp_enabled {
|
||||
@ -54,18 +56,16 @@ class neutron::agents::bigswitch (
|
||||
}
|
||||
|
||||
service { 'bigswitch-lldp':
|
||||
ensure => $lldp_service_ensure,
|
||||
name => $::neutron::params::bigswitch_lldp_service,
|
||||
enable => $lldp_enabled,
|
||||
require => [Class['neutron'], Package['bigswitch-lldp']],
|
||||
tag => 'neutron-service',
|
||||
ensure => $lldp_service_ensure,
|
||||
name => $::neutron::params::bigswitch_lldp_service,
|
||||
enable => $lldp_enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
|
||||
service { 'bigswitch-agent':
|
||||
ensure => $agent_service_ensure,
|
||||
name => $::neutron::params::bigswitch_agent_service,
|
||||
enable => $agent_enabled,
|
||||
require => [Class['neutron'], Package['bigswitch-agent']],
|
||||
tag => 'neutron-service',
|
||||
ensure => $agent_service_ensure,
|
||||
name => $::neutron::params::bigswitch_agent_service,
|
||||
enable => $agent_enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
|
@ -102,11 +102,9 @@ class neutron::agents::dhcp (
|
||||
$dhcp_domain = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_config<||> ~> Service['neutron-dhcp-service']
|
||||
Neutron_dhcp_agent_config<||> ~> Service['neutron-dhcp-service']
|
||||
|
||||
case $dhcp_driver {
|
||||
/\.Dnsmasq/: {
|
||||
Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |>
|
||||
@ -156,18 +154,11 @@ class neutron::agents::dhcp (
|
||||
}
|
||||
|
||||
if $::neutron::params::dhcp_agent_package {
|
||||
Package['neutron'] -> Package['neutron-dhcp-agent']
|
||||
Package['neutron-dhcp-agent'] -> Neutron_config<||>
|
||||
Package['neutron-dhcp-agent'] -> Neutron_dhcp_agent_config<||>
|
||||
package { 'neutron-dhcp-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::dhcp_agent_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
} else {
|
||||
# Some platforms (RedHat) do not provide a neutron DHCP agent package.
|
||||
# The neutron DHCP agent config file is provided by the neutron package.
|
||||
Package['neutron'] -> Neutron_dhcp_agent_config<||>
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
@ -176,17 +167,12 @@ class neutron::agents::dhcp (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-dhcp-service']
|
||||
if $::neutron::params::dhcp_agent_package {
|
||||
Package['neutron-dhcp-agent'] ~> Service['neutron-dhcp-service']
|
||||
}
|
||||
}
|
||||
|
||||
service { 'neutron-dhcp-service':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::dhcp_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::dhcp_agent_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
|
@ -123,6 +123,7 @@ class neutron::agents::l3 (
|
||||
$router_id = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
if ! is_service_default ($external_network_bridge) {
|
||||
@ -162,37 +163,24 @@ class neutron::agents::l3 (
|
||||
}
|
||||
|
||||
if $::neutron::params::l3_agent_package {
|
||||
Package['neutron-l3'] -> Neutron_l3_agent_config<||>
|
||||
package { 'neutron-l3':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::l3_agent_package,
|
||||
require => Package['neutron'],
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::l3_agent_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
} else {
|
||||
# Some platforms (RedHat) does not provide a neutron L3 agent package.
|
||||
# The neutron L3 agent config file is provided by the neutron package.
|
||||
Package['neutron'] -> Neutron_l3_agent_config<||>
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
Neutron_config<||> ~> Service['neutron-l3']
|
||||
Neutron_l3_agent_config<||> ~> Service['neutron-l3']
|
||||
if $enabled {
|
||||
$service_ensure = 'running'
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-l3']
|
||||
if $::neutron::params::l3_agent_package {
|
||||
Package['neutron-l3'] ~> Service['neutron-l3']
|
||||
}
|
||||
service { 'neutron-l3':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::l3_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::l3_agent_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,11 +59,9 @@ class neutron::agents::lbaas (
|
||||
$enable_v2 = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_config<||> ~> Service['neutron-lbaas-service']
|
||||
Neutron_lbaas_agent_config<||> ~> Service['neutron-lbaas-service']
|
||||
|
||||
if $enable_v1 and $enable_v2 {
|
||||
fail('neutron agents LBaaS enable_v1 and enable_v2 parameters cannot both be true')
|
||||
}
|
||||
@ -119,23 +117,19 @@ class neutron::agents::lbaas (
|
||||
$service_v1_ensure = 'stopped'
|
||||
$service_v2_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-lbaas-service']
|
||||
Package['neutron-lbaas-agent'] ~> Service['neutron-lbaas-service']
|
||||
}
|
||||
|
||||
service { 'neutron-lbaas-service':
|
||||
ensure => $service_v1_ensure,
|
||||
name => $::neutron::params::lbaas_agent_service,
|
||||
enable => $enable_v1,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_v1_ensure,
|
||||
name => $::neutron::params::lbaas_agent_service,
|
||||
enable => $enable_v1,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
|
||||
service { 'neutron-lbaasv2-service':
|
||||
ensure => $service_v2_ensure,
|
||||
name => $::neutron::params::lbaasv2_agent_service,
|
||||
enable => $enable_v2,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_v2_ensure,
|
||||
name => $::neutron::params::lbaasv2_agent_service,
|
||||
enable => $enable_v2,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
|
@ -80,11 +80,9 @@ class neutron::agents::metadata (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_config<||> ~> Service['neutron-metadata']
|
||||
Neutron_metadata_agent_config<||> ~> Service['neutron-metadata']
|
||||
|
||||
resources { 'neutron_metadata_agent_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -113,13 +111,10 @@ class neutron::agents::metadata (
|
||||
}
|
||||
|
||||
if $::neutron::params::metadata_agent_package {
|
||||
Package['neutron-metadata'] -> Service['neutron-metadata']
|
||||
Package['neutron-metadata'] -> Neutron_metadata_agent_config<||>
|
||||
package { 'neutron-metadata':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::metadata_agent_package,
|
||||
require => Package['neutron'],
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::metadata_agent_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,17 +124,12 @@ class neutron::agents::metadata (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-metadata']
|
||||
if $::neutron::params::metadata_agent_package {
|
||||
Package['neutron-metadata'] ~> Service['neutron-metadata']
|
||||
}
|
||||
}
|
||||
|
||||
service { 'neutron-metadata':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::metadata_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::metadata_agent_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
|
@ -66,11 +66,9 @@ class neutron::agents::metering (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_config<||> ~> Service['neutron-metering-service']
|
||||
Neutron_metering_agent_config<||> ~> Service['neutron-metering-service']
|
||||
|
||||
resources { 'neutron_metering_agent_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -87,7 +85,6 @@ class neutron::agents::metering (
|
||||
}
|
||||
|
||||
if $::neutron::params::metering_agent_package {
|
||||
Package['neutron'] -> Package['neutron-metering-agent']
|
||||
package { 'neutron-metering-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::metering_agent_package,
|
||||
@ -101,17 +98,12 @@ class neutron::agents::metering (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-metering-service']
|
||||
if $::neutron::params::metering_agent_package {
|
||||
Package['neutron-metering-agent'] ~> Service['neutron-metering-service']
|
||||
}
|
||||
}
|
||||
|
||||
service { 'neutron-metering-service':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::metering_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::metering_agent_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
|
@ -82,10 +82,9 @@ class neutron::agents::ml2::linuxbridge (
|
||||
validate_array($tunnel_types)
|
||||
validate_array($physical_interface_mappings)
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_agent_linuxbridge<||> ~> Service['neutron-plugin-linuxbridge-agent']
|
||||
|
||||
resources { 'neutron_agent_linuxbridge':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -156,8 +155,6 @@ class neutron::agents::ml2::linuxbridge (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-plugin-linuxbridge-agent']
|
||||
Package['neutron-plugin-linuxbridge-agent'] ~> Service['neutron-plugin-linuxbridge-agent']
|
||||
}
|
||||
|
||||
if $::neutron::rpc_backend == 'neutron.openstack.common.rpc.impl_kombu' {
|
||||
@ -170,7 +167,6 @@ class neutron::agents::ml2::linuxbridge (
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::linuxbridge_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
subscribe => $linuxbridge_agent_subscribe,
|
||||
}
|
||||
|
@ -171,6 +171,7 @@ class neutron::agents::ml2::ovs (
|
||||
$prevent_arp_spoofing = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
if $manage_vswitch {
|
||||
require vswitch::ovs
|
||||
@ -194,8 +195,6 @@ class neutron::agents::ml2::ovs (
|
||||
warning('The prevent_arp_spoofing parameter is deprecated and will be removed in Ocata release')
|
||||
}
|
||||
|
||||
Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service']
|
||||
|
||||
resources { 'neutron_agent_ovs':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -305,20 +304,16 @@ class neutron::agents::ml2::ovs (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-ovs-agent-service']
|
||||
Package['neutron-ovs-agent'] ~> Service['neutron-ovs-agent-service']
|
||||
}
|
||||
|
||||
service { 'neutron-ovs-agent-service':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::ovs_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::ovs_agent_service,
|
||||
enable => $enabled,
|
||||
tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
}
|
||||
|
||||
if $::neutron::params::ovs_cleanup_service {
|
||||
Package[['neutron', 'neutron-ovs-agent']] -> Service['ovs-cleanup-service']
|
||||
service { 'ovs-cleanup-service':
|
||||
name => $::neutron::params::ovs_cleanup_service,
|
||||
enable => $enabled,
|
||||
|
@ -72,10 +72,9 @@ class neutron::agents::ml2::sriov (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_sriov_agent_config <||> ~> Service['neutron-sriov-nic-agent-service']
|
||||
|
||||
resources { 'neutron_sriov_agent_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -87,7 +86,6 @@ class neutron::agents::ml2::sriov (
|
||||
'agent/extensions': value => join(any2array($extensions), ',');
|
||||
}
|
||||
|
||||
Package['neutron-sriov-nic-agent'] -> Neutron_sriov_agent_config <||>
|
||||
package { 'neutron-sriov-nic-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::sriov_nic_agent_package,
|
||||
@ -100,16 +98,13 @@ class neutron::agents::ml2::sriov (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-sriov-nic-agent-service']
|
||||
Package['neutron-sriov-nic-agent'] ~> Service['neutron-sriov-nic-agent-service']
|
||||
}
|
||||
|
||||
service { 'neutron-sriov-nic-agent-service':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::sriov_nic_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::sriov_nic_agent_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ class neutron::agents::n1kv_vem (
|
||||
$fastpath_flood = 'enable'
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
require vswitch::ovs
|
||||
|
||||
@ -147,7 +148,8 @@ class neutron::agents::n1kv_vem (
|
||||
|
||||
package { 'libnl':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::libnl_package
|
||||
name => $::neutron::params::libnl_package,
|
||||
tag => ['neutron-support-package'],
|
||||
}
|
||||
|
||||
file {
|
||||
@ -187,7 +189,7 @@ class neutron::agents::n1kv_vem (
|
||||
ensure => $n1kv_version,
|
||||
provider => $::neutron::params::package_provider,
|
||||
source => $vemtgtimg,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
require => File[$vemtgtimg]
|
||||
}
|
||||
} else {
|
||||
@ -206,7 +208,7 @@ class neutron::agents::n1kv_vem (
|
||||
}
|
||||
package {'nexus1000v':
|
||||
ensure => $package_ensure,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
}
|
||||
warning('nexus1000v package management is deprecated, it will be dropped in a future release.')
|
||||
|
@ -61,17 +61,16 @@ class neutron::agents::vpnaas (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_config<||> ~> Service['neutron-vpnaas-service']
|
||||
Neutron_vpnaas_agent_config<||> ~> Service['neutron-vpnaas-service']
|
||||
|
||||
case $vpn_device_driver {
|
||||
/\.OpenSwan/: {
|
||||
Package['openswan'] -> Package<| title == 'neutron-vpnaas-agent' |>
|
||||
package { 'openswan':
|
||||
ensure => present,
|
||||
name => $::neutron::params::openswan_package,
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
}
|
||||
/\.LibreSwan/: {
|
||||
@ -82,6 +81,7 @@ class neutron::agents::vpnaas (
|
||||
package { 'libreswan':
|
||||
ensure => present,
|
||||
name => $::neutron::params::libreswan_package,
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,6 @@ class neutron::agents::vpnaas (
|
||||
}
|
||||
|
||||
if $::neutron::params::vpnaas_agent_package {
|
||||
Package['neutron'] -> Package['neutron-vpnaas-agent']
|
||||
ensure_resource( 'package', 'neutron-vpnaas-agent', {
|
||||
'ensure' => $package_ensure,
|
||||
'name' => $::neutron::params::vpnaas_agent_package,
|
||||
@ -126,17 +125,12 @@ class neutron::agents::vpnaas (
|
||||
} else {
|
||||
$service_ensure = 'stopped'
|
||||
}
|
||||
Package['neutron'] ~> Service['neutron-vpnaas-service']
|
||||
if $::neutron::params::vpnaas_agent_package {
|
||||
Package['neutron-vpnaas-agent'] ~> Service['neutron-vpnaas-service']
|
||||
}
|
||||
}
|
||||
|
||||
service { 'neutron-vpnaas-service':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::vpnaas_agent_service,
|
||||
enable => $enabled,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::vpnaas_agent_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
}
|
||||
|
@ -12,12 +12,13 @@ class neutron::client (
|
||||
$package_ensure = present
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
package { 'python-neutronclient':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::client_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -102,6 +102,8 @@ class neutron::config (
|
||||
$plugin_ml2_config = {},
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
validate_hash($server_config)
|
||||
validate_hash($api_config)
|
||||
validate_hash($l3_agent_config)
|
||||
|
@ -49,6 +49,8 @@ class neutron::db (
|
||||
$database_db_max_retries = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
||||
# to use neutron::<myparam> if neutron::db::<myparam> isn't specified.
|
||||
$database_connection_real = pick($::neutron::server::database_connection, $database_connection)
|
||||
|
@ -34,9 +34,10 @@ class neutron::db::mysql (
|
||||
$allowed_hosts = undef,
|
||||
$charset = 'utf8',
|
||||
$collate = 'utf8_general_ci',
|
||||
# DEPRECATED
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
validate_string($password)
|
||||
|
||||
::openstacklib::db::mysql { 'neutron':
|
||||
@ -48,6 +49,8 @@ class neutron::db::mysql (
|
||||
collate => $collate,
|
||||
allowed_hosts => $allowed_hosts,
|
||||
}
|
||||
::Openstacklib::Db::Mysql['neutron'] ~> Service <| title == 'neutron-server' |>
|
||||
::Openstacklib::Db::Mysql['neutron'] ~> Exec <| title == 'neutron-db-sync' |>
|
||||
|
||||
Anchor['neutron::db::begin']
|
||||
~> Class['neutron::db::mysql']
|
||||
~> Anchor['neutron::db::end']
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ class neutron::db::postgresql(
|
||||
$privileges = 'ALL',
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
::openstacklib::db::postgresql { 'neutron':
|
||||
password_hash => postgresql_password($user, $password),
|
||||
dbname => $dbname,
|
||||
@ -40,6 +42,7 @@ class neutron::db::postgresql(
|
||||
privileges => $privileges,
|
||||
}
|
||||
|
||||
::Openstacklib::Db::Postgresql['neutron'] ~> Service <| title == 'neutron-server' |>
|
||||
::Openstacklib::Db::Postgresql['neutron'] ~> Exec <| title == 'neutron-db-sync' |>
|
||||
Anchor['neutron::db::begin']
|
||||
~> Class['neutron::db::postgresql']
|
||||
~> Anchor['neutron::db::end']
|
||||
}
|
||||
|
@ -14,18 +14,19 @@ class neutron::db::sync(
|
||||
$extra_params = '--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini',
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Package<| tag == 'neutron-package' |> ~> Exec['neutron-db-sync']
|
||||
Exec['neutron-db-sync'] ~> Service <| tag == 'neutron-db-sync-service' |>
|
||||
|
||||
Neutron_config<||> ~> Exec['neutron-db-sync']
|
||||
Neutron_config<| title == 'database/connection' |> ~> Exec['neutron-db-sync']
|
||||
|
||||
exec { 'neutron-db-sync':
|
||||
command => "neutron-db-manage ${extra_params} upgrade head",
|
||||
path => '/usr/bin',
|
||||
refreshonly => true,
|
||||
logoutput => on_failure,
|
||||
subscribe => [
|
||||
Anchor['neutron::install::end'],
|
||||
Anchor['neutron::config::end'],
|
||||
Anchor['neutron::dbsync::begin']
|
||||
],
|
||||
notify => Anchor['neutron::dbsync::end'],
|
||||
}
|
||||
}
|
||||
|
87
manifests/deps.pp
Normal file
87
manifests/deps.pp
Normal file
@ -0,0 +1,87 @@
|
||||
# == Class: neutron::deps
|
||||
#
|
||||
# neutron anchors and dependency management
|
||||
#
|
||||
class neutron::deps {
|
||||
# Setup anchors for install, config and service phases of the module. These
|
||||
# anchors allow external modules to hook the begin and end of any of these
|
||||
# phases. Package or service management can also be replaced by ensuring the
|
||||
# package is absent or turning off service management and having the
|
||||
# replacement depend on the appropriate anchors. When applicable, end tags
|
||||
# should be notified so that subscribers can determine if installation,
|
||||
# config or service state changed and act on that if needed.
|
||||
anchor { 'neutron::install::begin': }
|
||||
-> Package<| tag == 'neutron-package'|>
|
||||
~> anchor { 'neutron::install::end': }
|
||||
-> anchor { 'neutron::config::begin': }
|
||||
-> File<| tag == 'neutron-config-file' |>
|
||||
~> anchor { 'neutron::config::end': }
|
||||
-> anchor { 'neutron::db::begin': }
|
||||
-> anchor { 'neutron::db::end': }
|
||||
~> anchor { 'neutron::dbsync::begin': }
|
||||
-> anchor { 'neutron::dbsync::end': }
|
||||
~> anchor { 'neutron::service::begin': }
|
||||
~> Service<| tag == 'neutron-service' |>
|
||||
~> anchor { 'neutron::service::end': }
|
||||
|
||||
# Ensure files are modified in the config block
|
||||
Anchor['neutron::config::begin']
|
||||
-> File_line<| tag == 'neutron-file-line' |>
|
||||
~> Anchor['neutron::config::end']
|
||||
|
||||
# Ensure all files are in place before modifying them
|
||||
File<| tag == 'neutron-config-file' |> -> File_line<| tag == 'neutron-file-line' |>
|
||||
|
||||
# All other inifile providers need to be processed in the config block
|
||||
Anchor['neutron::config::begin'] -> Neutron_agent_linuxbridge<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_agent_ovs<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_api_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_dhcp_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_fwaas_service_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_l3_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_lbaas_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_lbaas_service_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_lbaas_service_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_metadata_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_metering_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_credentials<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_db_conn<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_cisco<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_l2network<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_linuxbridge<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_midonet<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_ml2<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_nuage<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_nvp<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_opencontrail<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_ovn<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_plumgrid<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plugin_sriov<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_plumlib_plumgrid<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_sriov_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_vpnaas_agent_config<||> ~> Anchor['neutron::config::end']
|
||||
Anchor['neutron::config::begin'] -> Neutron_vpnaas_service_config<||> ~> Anchor['neutron::config::end']
|
||||
|
||||
# Support packages need to be installed in the install phase, but we don't
|
||||
# put them in the chain above because we don't want any false dependencies
|
||||
# between packages with the neutron-package tag and the neutron-support-package
|
||||
# tag. Note: the package resources here will have a 'before' relationshop on
|
||||
# the neutron::install::end anchor. The line between neutron-support-package and
|
||||
# neutron-package should be whether or not neutron services would need to be
|
||||
# restarted if the package state was changed.
|
||||
Anchor['neutron::install::begin']
|
||||
-> Package<| tag == 'neutron-support-package'|>
|
||||
-> Anchor['neutron::install::end']
|
||||
|
||||
Anchor['neutron::service::end'] -> Neutron_l3_ovs_bridge<||>
|
||||
Anchor['neutron::service::end'] -> Neutron_network<||>
|
||||
Anchor['neutron::service::end'] -> Neutron_port<||>
|
||||
Anchor['neutron::service::end'] -> Neutron_router<||>
|
||||
Anchor['neutron::service::end'] -> Neutron_subnet<||>
|
||||
|
||||
# Installation or config changes will always restart services.
|
||||
Anchor['neutron::install::end'] ~> Anchor['neutron::service::begin']
|
||||
Anchor['neutron::config::end'] ~> Anchor['neutron::service::begin']
|
||||
}
|
@ -457,6 +457,7 @@ class neutron (
|
||||
$log_facility = undef,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
if $manage_logging {
|
||||
include ::neutron::logging
|
||||
@ -502,9 +503,6 @@ class neutron (
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
|
||||
# Make sure all services get restarted if neutron-common package is upgraded
|
||||
Package['neutron'] ~> Service<| tag == 'neutron-service' |>
|
||||
|
||||
resources { 'neutron_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
@ -77,6 +77,8 @@ class neutron::keystone::auth (
|
||||
$internal_url = 'http://127.0.0.1:9696',
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
if $configure_endpoint {
|
||||
Keystone_endpoint["${region}/${service_name}::${service_type}"] ~> Service <| title == 'neutron-server' |>
|
||||
}
|
||||
|
@ -132,6 +132,8 @@ class neutron::logging (
|
||||
$log_facility = undef,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
$debug_real = pick($::neutron::debug,$debug)
|
||||
$use_syslog_real = pick($::neutron::use_syslog,$use_syslog)
|
||||
$use_stderr_real = pick($::neutron::use_stderr,$use_stderr)
|
||||
|
@ -121,9 +121,7 @@ class neutron::plugins::cisco(
|
||||
$purge_config = false,
|
||||
)
|
||||
{
|
||||
Neutron_plugin_cisco<||> ~> Service['neutron-server']
|
||||
Neutron_plugin_cisco_db_conn<||> ~> Service['neutron-server']
|
||||
Neutron_plugin_cisco_l2network<||> ~> Service['neutron-server']
|
||||
include ::neutron::deps
|
||||
|
||||
ensure_resource('file', '/etc/neutron/plugins', {
|
||||
ensure => directory,
|
||||
@ -139,32 +137,19 @@ class neutron::plugins::cisco(
|
||||
mode => '0640'}
|
||||
)
|
||||
|
||||
# Ensure the neutron package is installed before config is set
|
||||
# under both RHEL and Ubuntu
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> Neutron_plugin_cisco<||>
|
||||
Package['neutron-server'] -> Neutron_plugin_cisco_db_conn<||>
|
||||
Package['neutron-server'] -> Neutron_plugin_cisco_l2network<||>
|
||||
} else {
|
||||
Package['neutron'] -> Neutron_plugin_cisco<||>
|
||||
Package['neutron'] -> Neutron_plugin_cisco_db_conn<||>
|
||||
Package['neutron'] -> Neutron_plugin_cisco_l2network<||>
|
||||
}
|
||||
|
||||
if $::operatingsystem == 'Ubuntu' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::cisco_config_file}",
|
||||
require => [ Package['neutron-server'], Package['neutron-plugin-cisco'] ],
|
||||
notify => Service['neutron-server'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::cisco_config_file}",
|
||||
tag => 'neutron-file-line',
|
||||
}
|
||||
}
|
||||
|
||||
package { 'neutron-plugin-cisco':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::cisco_server_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-support-package', 'openstack'],
|
||||
}
|
||||
|
||||
# Setting purge for all configs
|
||||
@ -233,9 +218,9 @@ class neutron::plugins::cisco(
|
||||
}
|
||||
else {
|
||||
file {'/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => '/etc/neutron/plugins/cisco/cisco_plugins.ini',
|
||||
require => Package['neutron-plugin-cisco'],
|
||||
ensure => link,
|
||||
target => '/etc/neutron/plugins/cisco/cisco_plugins.ini',
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -81,10 +81,9 @@ class neutron::plugins::midonet (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_plugin_midonet<||> ~> Service['neutron-server']
|
||||
|
||||
ensure_resource('file', '/etc/neutron/plugins/midonet', {
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
@ -92,14 +91,6 @@ class neutron::plugins::midonet (
|
||||
mode => '0640'}
|
||||
)
|
||||
|
||||
# Ensure the neutron package is installed before config is set
|
||||
# under both RHEL and Ubuntu
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> Neutron_plugin_midonet<||>
|
||||
} else {
|
||||
Package['neutron'] -> Neutron_plugin_midonet<||>
|
||||
}
|
||||
|
||||
resources { 'neutron_plugin_midonet':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -113,11 +104,10 @@ class neutron::plugins::midonet (
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::midonet_config_file}",
|
||||
require => [ Package['neutron-server'], Package[$::neutron::params::midonet_server_package] ],
|
||||
notify => Service['neutron-server'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::midonet_config_file}",
|
||||
tag => 'neutron-file-line',
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,21 +118,22 @@ class neutron::plugins::midonet (
|
||||
}
|
||||
else {
|
||||
file {'/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => $::neutron::params::midonet_config_file,
|
||||
require => Package[$::neutron::params::midonet_server_package]
|
||||
ensure => link,
|
||||
target => $::neutron::params::midonet_config_file,
|
||||
tag => 'neutron-config-file'
|
||||
}
|
||||
}
|
||||
|
||||
if $sync_db {
|
||||
|
||||
Package<| title == $::neutron::params::midonet_server_package |> ~> Exec['midonet-db-sync']
|
||||
|
||||
exec { 'midonet-db-sync':
|
||||
command => 'midonet-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head',
|
||||
path => '/usr/bin',
|
||||
before => Service['neutron-server'],
|
||||
subscribe => Neutron_config['database/connection'],
|
||||
subscribe => [
|
||||
Anchor['neutron::install::end'],
|
||||
Anchor['neutron::config::end'],
|
||||
Anchor['neutron::dbsync::begin']
|
||||
],
|
||||
notify => Anchor['neutron::dbsync::end'],
|
||||
refreshonly => true
|
||||
}
|
||||
}
|
||||
|
@ -150,10 +150,9 @@ class neutron::plugins::ml2 (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_plugin_ml2<||> ~> Service<| title == 'neutron-server' |>
|
||||
|
||||
if ! $mechanism_drivers {
|
||||
warning('Without networking mechanism driver, ml2 will not communicate with L2 agents')
|
||||
}
|
||||
@ -164,27 +163,26 @@ class neutron::plugins::ml2 (
|
||||
|
||||
if $::operatingsystem == 'Ubuntu' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini',
|
||||
require => File['/etc/default/neutron-server','/etc/neutron/plugin.ini'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini',
|
||||
tag => 'neutron-file-line'
|
||||
}
|
||||
Package<| title == 'neutron-server' |>
|
||||
-> File_line['/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG']
|
||||
~> Service<| title == 'neutron-server' |>
|
||||
}
|
||||
|
||||
# In RH, the link is used to start Neutron process but in Debian, it's used only
|
||||
# to manage database synchronization.
|
||||
file {'/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
file {'/etc/default/neutron-server':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644'
|
||||
mode => '0644',
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
|
||||
# Some platforms do not have a dedicated ml2 plugin package
|
||||
@ -192,15 +190,8 @@ class neutron::plugins::ml2 (
|
||||
package { 'neutron-plugin-ml2':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::ml2_server_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-package', 'openstack'],
|
||||
}
|
||||
Package['neutron-plugin-ml2'] -> File['/etc/neutron/plugin.ini']
|
||||
Package['neutron-plugin-ml2'] -> File['/etc/default/neutron-server']
|
||||
Package['neutron-plugin-ml2'] -> Neutron_plugin_sriov<||>
|
||||
} else {
|
||||
Package['neutron'] -> File['/etc/neutron/plugin.ini']
|
||||
Package['neutron'] -> File['/etc/default/neutron-server']
|
||||
Package['neutron'] -> Neutron_plugin_sriov<||>
|
||||
}
|
||||
|
||||
resources { 'neutron_plugin_ml2':
|
||||
@ -239,5 +230,5 @@ class neutron::plugins::ml2 (
|
||||
neutron_plugin_ml2 {
|
||||
'ml2/physical_network_mtus': value => join($physical_network_mtus, ',');
|
||||
}
|
||||
} Neutron_plugin_ml2<||> ~> Exec<| title == 'neutron-db-sync' |>
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ class neutron::plugins::ml2::arista(
|
||||
$use_fqdn = $::os_service_default,
|
||||
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
require ::neutron::plugins::ml2
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
|
@ -56,6 +56,8 @@ class neutron::plugins::ml2::arista::l3(
|
||||
$use_vrf = $::os_service_default
|
||||
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
require ::neutron::plugins::ml2
|
||||
|
||||
if !is_service_default($mlag_config) {
|
||||
|
@ -12,6 +12,8 @@
|
||||
class neutron::plugins::ml2::bigswitch (
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
require ::neutron::plugins::ml2
|
||||
|
||||
|
@ -64,6 +64,8 @@ class neutron::plugins::ml2::bigswitch::restproxy (
|
||||
$auth_user = 'neutron',
|
||||
$auth_url = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
require ::neutron::plugins::ml2::bigswitch
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
|
@ -14,6 +14,8 @@
|
||||
class neutron::plugins::ml2::cisco (
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
require ::neutron::plugins::ml2
|
||||
|
||||
|
@ -111,6 +111,8 @@ class neutron::plugins::ml2::cisco::nexus (
|
||||
$vxlan_global_config = true,
|
||||
$host_key_checks = false
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::plugins::ml2::cisco
|
||||
|
||||
if ! is_service_default($switch_replay_count) {
|
||||
|
@ -87,6 +87,8 @@ class neutron::plugins::ml2::cisco::nexus1000v (
|
||||
$enable_vif_type_n1kv = 'False',
|
||||
)
|
||||
{
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::plugins::ml2::cisco
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
|
@ -86,19 +86,13 @@ define neutron::plugins::ml2::cisco::nexus_creds(
|
||||
$physnet = undef,
|
||||
|
||||
) {
|
||||
# Ensure Neutron server is installed before configuring ssh keys
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> File['/var/lib/neutron/.ssh']
|
||||
Package['neutron-server'] -> Exec["nexus_creds_${name}"]
|
||||
} else {
|
||||
Package['neutron'] -> File['/var/lib/neutron/.ssh']
|
||||
Package['neutron'] -> Exec["nexus_creds_${name}"]
|
||||
}
|
||||
include ::neutron::deps
|
||||
|
||||
ensure_resource('file', '/var/lib/neutron/.ssh',
|
||||
{
|
||||
ensure => directory,
|
||||
owner => 'neutron',
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
)
|
||||
|
||||
@ -117,6 +111,6 @@ define neutron::plugins::ml2::cisco::nexus_creds(
|
||||
unless => $check_known_hosts,
|
||||
command => "/usr/bin/ssh-keyscan -t rsa ${ip_address} >> /var/lib/neutron/.ssh/known_hosts",
|
||||
user => 'neutron',
|
||||
require => [Exec["ping_test_${name}"], File['/var/lib/neutron/.ssh']]
|
||||
require => [Exec["ping_test_${name}"], Anchor['neutron::config::end']]
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,9 @@ define neutron::plugins::ml2::cisco::nexus_switch(
|
||||
$nve_src_intf = $::os_service_default,
|
||||
$physnet = $::os_service_default
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
$section = "ML2_MECH_CISCO_NEXUS:${ip_address}"
|
||||
neutron_plugin_ml2 {
|
||||
"${section}/username": value => $username;
|
||||
|
@ -26,6 +26,9 @@ define neutron::plugins::ml2::cisco::nexus_switch_server(
|
||||
$ports,
|
||||
$hostname = $title,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
$section = "ML2_MECH_CISCO_NEXUS:${switch_ip_address}"
|
||||
neutron_plugin_ml2 {
|
||||
"${section}/${hostname}": value => $ports;
|
||||
|
@ -25,6 +25,7 @@ class neutron::plugins::ml2::cisco::type_nexus_vxlan (
|
||||
$vni_ranges,
|
||||
$mcast_ranges,
|
||||
) {
|
||||
include ::neutron::deps
|
||||
include ::neutron::plugins::ml2::cisco
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
|
@ -35,6 +35,8 @@ class neutron::plugins::ml2::cisco::ucsm (
|
||||
$ucsm_host_list,
|
||||
$supported_pci_devs = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::plugins::ml2::cisco
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
|
@ -30,6 +30,9 @@ define neutron::plugins::ml2::mech_driver (
|
||||
$supported_pci_vendor_devs,
|
||||
$sriov_agent_required = true,
|
||||
){
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
if ($name == 'sriovnicswitch') {
|
||||
neutron_plugin_sriov {
|
||||
'ml2_sriov/supported_pci_vendor_devs': value => join(any2array($supported_pci_vendor_devs), ',');
|
||||
|
@ -25,6 +25,8 @@ class neutron::plugins::ml2::midonet (
|
||||
$project_id = 'services',
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
'MIDONET/midonet_uri' : value => $midonet_uri;
|
||||
'MIDONET/username' : value => $username;
|
||||
|
@ -31,6 +31,8 @@ class neutron::plugins::ml2::opendaylight (
|
||||
$odl_password = $::os_service_default,
|
||||
$odl_url = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
require ::neutron::plugins::ml2
|
||||
|
||||
ensure_resource('package', 'python-networking-odl',
|
||||
|
@ -46,6 +46,9 @@ define neutron::plugins::ml2::type_driver (
|
||||
$vni_ranges,
|
||||
$vxlan_group
|
||||
){
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
if ($name == 'flat') {
|
||||
neutron_plugin_ml2 {
|
||||
'ml2_type_flat/flat_networks': value => join(any2array($flat_networks), ',');
|
||||
|
@ -52,31 +52,29 @@ class neutron::plugins::nuage (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
File['/etc/neutron/plugins/nuage/plugin.ini'] -> Neutron_plugin_nuage<||>
|
||||
Neutron_plugin_nuage<||> ~> Service['neutron-server']
|
||||
Neutron_plugin_nuage<||> ~> Exec<| title == 'neutron-db-sync' |>
|
||||
|
||||
file { '/etc/neutron/plugins/nuage':
|
||||
ensure => directory,
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::nuage_config_file}",
|
||||
notify => Service['neutron-server'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::nuage_config_file}",
|
||||
tag => 'neutron-file-line',
|
||||
}
|
||||
}
|
||||
|
||||
if $::osfamily == 'Redhat' {
|
||||
File['/etc/neutron/plugin.ini'] ~> Exec<| title == 'neutron-db-sync' |>
|
||||
file { '/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
require => File['/etc/neutron/plugins/nuage/plugin.ini'],
|
||||
target => $::neutron::params::nuage_config_file,
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +83,8 @@ class neutron::plugins::nuage (
|
||||
owner => 'root',
|
||||
group => 'neutron',
|
||||
require => File['/etc/neutron/plugins/nuage'],
|
||||
mode => '0640'
|
||||
mode => '0640',
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
|
||||
resources { 'neutron_plugin_nuage':
|
||||
|
@ -40,16 +40,15 @@ class neutron::plugins::nvp (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Package['neutron'] -> Package['neutron-plugin-nvp']
|
||||
Neutron_plugin_nvp<||> ~> Service<| title == 'neutron-server' |>
|
||||
Package['neutron-plugin-nvp'] -> Service<| title == 'neutron-server' |>
|
||||
|
||||
package { 'neutron-plugin-nvp':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::nvp_server_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-package', 'openstack'],
|
||||
}
|
||||
|
||||
validate_array($nvp_controllers)
|
||||
@ -74,9 +73,9 @@ class neutron::plugins::nvp (
|
||||
# In RH, this link is used to start Neutron process but in Debian, it's used only
|
||||
# to manage database synchronization.
|
||||
file {'/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => '/etc/neutron/plugins/nicira/nvp.ini',
|
||||
require => Package['neutron-plugin-nvp']
|
||||
ensure => link,
|
||||
target => '/etc/neutron/plugins/nicira/nvp.ini',
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ class neutron::plugins::opencontrail (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
validate_array($contrail_extensions)
|
||||
@ -73,11 +74,9 @@ class neutron::plugins::opencontrail (
|
||||
package { 'neutron-plugin-contrail':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::opencontrail_plugin_package,
|
||||
tag => 'openstack',
|
||||
tag => ['neutron-package', 'openstack'],
|
||||
}
|
||||
|
||||
Neutron_plugin_opencontrail<||> ~> Service['neutron-server']
|
||||
|
||||
ensure_resource('file', '/etc/neutron/plugins/opencontrail', {
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
@ -85,21 +84,12 @@ class neutron::plugins::opencontrail (
|
||||
mode => '0640'}
|
||||
)
|
||||
|
||||
# Ensure the neutron package is installed before config is set
|
||||
# under both RHEL and Ubuntu
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> Neutron_plugin_opencontrail<||>
|
||||
} else {
|
||||
Package['neutron'] -> Neutron_plugin_opencontrail<||>
|
||||
}
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::opencontrail_config_file}",
|
||||
require => [ Package['neutron-server'], Package[$::neutron::params::opencontrail_plugin_package] ],
|
||||
notify => Service['neutron-server'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::opencontrail_config_file}",
|
||||
tag => 'neutron-file-line',
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,6 +98,7 @@ class neutron::plugins::opencontrail (
|
||||
ensure => link,
|
||||
target => $::neutron::params::opencontrail_config_file,
|
||||
require => Package[$::neutron::params::opencontrail_plugin_package],
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ class neutron::plugins::ovn(
|
||||
$vif_type = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
if ! is_service_default($ovn_l3_mode) {
|
||||
@ -57,11 +58,9 @@ class neutron::plugins::ovn(
|
||||
package {'neutron-plugin-ovn':
|
||||
ensure => present,
|
||||
name => $::neutron::params::ovn_plugin_package,
|
||||
tag => 'openstack'
|
||||
tag => ['neutron-package', 'openstack'],
|
||||
}
|
||||
|
||||
Neutron_plugin_ovn<||> ~> Service['neutron-server']
|
||||
|
||||
ensure_resource('file', '/etc/neutron/plugins/networking-ovn', {
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
@ -69,21 +68,12 @@ class neutron::plugins::ovn(
|
||||
mode => '0640'}
|
||||
)
|
||||
|
||||
# Ensure the neutron package is installed before config is set
|
||||
# under both RHEL and Ubuntu
|
||||
if $::neutron::params::server_package {
|
||||
Package['neutron-server'] -> Neutron_plugin_ovn<||>
|
||||
} else {
|
||||
Package['neutron'] -> Neutron_plugin_ovn<||>
|
||||
}
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::ovn_config_file}",
|
||||
require => [ Package['neutron-server'], Package['neutron-plugin-ovn'] ],
|
||||
notify => Service['neutron-server'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::ovn_config_file}",
|
||||
tag => 'neutron-file-line',
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,6 +82,7 @@ class neutron::plugins::ovn(
|
||||
ensure => link,
|
||||
target => $::neutron::params::ovn_config_file,
|
||||
require => Package[$::neutron::params::ovn_plugin_package],
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#
|
||||
define neutron::plugins::ovs::bridge {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
$mapping = split($name, ':')
|
||||
$bridge = $mapping[1]
|
||||
|
||||
|
@ -46,6 +46,9 @@ class neutron::plugins::ovs::opendaylight (
|
||||
$retry_interval = 60,
|
||||
$retry_count = 20,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
# Handle the case where ODL controller is also on this host
|
||||
Service<| title == 'opendaylight' |> -> Exec <| title == 'Wait for NetVirt OVSDB to come up' |>
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#
|
||||
define neutron::plugins::ovs::port {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
$mapping = split($name, ':')
|
||||
vs_port {$mapping[1]:
|
||||
ensure => present,
|
||||
|
@ -116,12 +116,9 @@ class neutron::plugins::plumgrid (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
Neutron_plugin_plumgrid<||> ~> Service['neutron-server']
|
||||
Neutron_plumlib_plumgrid<||> ~> Service['neutron-server']
|
||||
Neutron_plugin_plumgrid<||> ~> Exec<| title == 'neutron-db-sync' |>
|
||||
|
||||
ensure_resource('file', '/etc/neutron/plugins/plumgrid', {
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
@ -129,16 +126,6 @@ class neutron::plugins::plumgrid (
|
||||
mode => '0640'}
|
||||
)
|
||||
|
||||
# Ensure the neutron package is installed before config is set
|
||||
# under both RHEL and Ubuntu
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> Neutron_plugin_plumgrid<||>
|
||||
Package['neutron-server'] -> Neutron_plumlib_plumgrid<||>
|
||||
} else {
|
||||
Package['neutron'] -> Neutron_plugin_plumgrid<||>
|
||||
Package['neutron'] -> Neutron_plumlib_plumgrid<||>
|
||||
}
|
||||
|
||||
package { 'neutron-plugin-plumgrid':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::plumgrid_plugin_package
|
||||
@ -151,19 +138,18 @@ class neutron::plugins::plumgrid (
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::plumgrid_config_file}",
|
||||
require => [ Package['neutron-server'], Package['neutron-plugin-plumgrid'] ],
|
||||
notify => Service['neutron-server'],
|
||||
path => '/etc/default/neutron-server',
|
||||
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::plumgrid_config_file}",
|
||||
tag => 'neutron-file-line',
|
||||
}
|
||||
}
|
||||
|
||||
if $::osfamily == 'Redhat' {
|
||||
file { '/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => $::neutron::params::plumgrid_config_file,
|
||||
require => Package['neutron-plugin-plumgrid'],
|
||||
ensure => link,
|
||||
target => $::neutron::params::plumgrid_config_file,
|
||||
tag => 'neutron-config-file',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,8 @@ class neutron::policy (
|
||||
|
||||
Openstacklib::Policy::Base {
|
||||
file_path => $policy_path,
|
||||
require => Anchor['neutron::config::begin'],
|
||||
notify => Anchor['neutron::config::end'],
|
||||
}
|
||||
|
||||
create_resources('openstacklib::policy::base', $policies)
|
||||
|
@ -110,6 +110,8 @@ class neutron::quota (
|
||||
$quota_vip = $::os_service_default
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
neutron_config {
|
||||
'quotas/default_quota': value => $default_quota;
|
||||
'quotas/quota_network': value => $quota_network;
|
||||
|
@ -360,6 +360,7 @@ class neutron::server (
|
||||
$ensure_lbaas_package = false,
|
||||
) inherits ::neutron::params {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::db
|
||||
include ::neutron::policy
|
||||
# Work-around LP#1551974. neutron requires the keystoneclient to auth tokens
|
||||
@ -420,14 +421,6 @@ class neutron::server (
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Neutron_config<||> ~> Service['neutron-server']
|
||||
Neutron_api_config<||> ~> Service['neutron-server']
|
||||
Neutron_lbaas_service_config<||> ~> Service['neutron-server']
|
||||
Class['neutron::policy'] ~> Service['neutron-server']
|
||||
Neutron_config<||> -> Neutron_network<||>
|
||||
|
||||
if $min_l3_agents_per_router <= $max_l3_agents_per_router or $max_l3_agents_per_router == 0 {
|
||||
neutron_config {
|
||||
'DEFAULT/l3_ha': value => $l3_ha;
|
||||
@ -482,21 +475,11 @@ class neutron::server (
|
||||
neutron_config { 'qos/notification_drivers': value => join(any2array($qos_notification_drivers), ',') }
|
||||
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> Neutron_api_config<||>
|
||||
Package['neutron-server'] -> Neutron_config<||>
|
||||
Package['neutron-server'] -> Neutron_lbaas_service_config<||>
|
||||
Package['neutron-server'] -> Service['neutron-server']
|
||||
Package['neutron-server'] -> Class['neutron::policy']
|
||||
package { 'neutron-server':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::server_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
} else {
|
||||
# Some platforms (RedHat) does not provide a neutron-server package.
|
||||
# The neutron api config file is provided by the neutron package.
|
||||
Package['neutron'] -> Class['neutron::policy']
|
||||
Package['neutron'] -> Neutron_api_config<||>
|
||||
}
|
||||
|
||||
neutron_config {
|
||||
@ -594,7 +577,6 @@ class neutron::server (
|
||||
enable => $enabled,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
require => Class['neutron'],
|
||||
tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,8 @@ class neutron::server::notifications (
|
||||
$nova_url = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
# Depend on the specified keystone_user resource, if it exists.
|
||||
Keystone_user <| title == 'nova' |> -> Class[neutron::server::notifications]
|
||||
|
||||
|
@ -49,25 +49,22 @@ class neutron::services::fwaas (
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
# FWaaS needs to be enabled before starting Neutron L3 agent
|
||||
Neutron_fwaas_service_config<||> ~> Service['neutron-l3']
|
||||
|
||||
if ($::osfamily == 'Debian') {
|
||||
# Debian platforms
|
||||
if $vpnaas_agent_package {
|
||||
ensure_resource( 'package', $::neutron::params::vpnaas_agent_package, {
|
||||
'ensure' => $neutron::package_ensure,
|
||||
'tag' => 'openstack'
|
||||
'tag' => ['neutron-package', 'openstack'],
|
||||
})
|
||||
Package[$::neutron::params::vpnaas_agent_package] -> Neutron_fwaas_service_config<||>
|
||||
}
|
||||
else {
|
||||
ensure_resource( 'package', 'neutron-fwaas' , {
|
||||
'name' => $::neutron::params::fwaas_package,
|
||||
'ensure' => $neutron::package_ensure,
|
||||
'tag' => 'openstack'
|
||||
'tag' => ['neutron-package', 'openstack'],
|
||||
})
|
||||
}
|
||||
} elsif($::osfamily == 'Redhat') {
|
||||
@ -75,7 +72,7 @@ class neutron::services::fwaas (
|
||||
ensure_resource( 'package', 'neutron-fwaas', {
|
||||
'name' => $::neutron::params::fwaas_package,
|
||||
'ensure' => $neutron::package_ensure,
|
||||
'tag' => 'openstack'
|
||||
'tag' => ['neutron-package', 'openstack'],
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@ class neutron::services::lbaas (
|
||||
$package_ensure = false,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
include ::neutron::params
|
||||
|
||||
if $ensure_lbaas_driver_package {
|
||||
@ -78,6 +79,5 @@ class neutron::services::lbaas (
|
||||
neutron_lbaas_service_config { 'service_providers/service_provider':
|
||||
value => $service_providers,
|
||||
}
|
||||
Package<| tag == 'neutron-package' |> -> Neutron_lbaas_service_config<||>
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ class neutron::services::lbaas::haproxy(
|
||||
$jinja_config_template = $::os_service_default
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
neutron_config {
|
||||
'haproxy/interface_driver': value => $interface_driver;
|
||||
'haproxy/periodic_interval': value => $periodic_interval;
|
||||
|
@ -48,6 +48,8 @@ class neutron::services::lbaas::octavia(
|
||||
$allocates_vip = $::os_service_default
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
|
||||
neutron_config {
|
||||
'octavia/base_url': value => $base_url;
|
||||
'octavia/request_poll_interval': value => $request_poll_interval;
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
prelude: >
|
||||
Add hooks for external install & svc management.
|
||||
features:
|
||||
- This adds defined anchor points for external modules to
|
||||
hook into the software install, config and service dependency
|
||||
chain. This allows external modules to manage software
|
||||
installation (virtualenv, containers, etc) and service management
|
||||
(pacemaker) without needing rely on resources that may change or
|
||||
be renamed.
|
@ -60,11 +60,13 @@ describe 'neutron::agents::dhcp' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-dhcp-agent\]/)
|
||||
is_expected.to contain_package('neutron-dhcp-agent').with_before(/Neutron_dhcp_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-dhcp-agent').with_before(/Neutron_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]')
|
||||
is_expected.to contain_package('neutron-dhcp-agent').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron-dhcp-agent').that_notifies('Anchor[neutron::install::end]')
|
||||
else
|
||||
is_expected.to contain_package('neutron').with_before(/Neutron_dhcp_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -73,10 +75,10 @@ describe 'neutron::agents::dhcp' do
|
||||
:name => platform_params[:dhcp_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Package[neutron]')
|
||||
is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-dhcp-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
it 'passes purge to resource' do
|
||||
@ -210,7 +212,7 @@ describe 'neutron::agents::dhcp' do
|
||||
it_configures 'neutron dhcp agent with dnsmasq_config_file specified'
|
||||
it_configures 'neutron dhcp agent with dnsmasq_dns_servers set'
|
||||
it 'configures subscription to neutron-dhcp-agent package' do
|
||||
is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Package[neutron-dhcp-agent]')
|
||||
is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -61,12 +61,13 @@ describe 'neutron::agents::l3' do
|
||||
is_expected.to contain_package('neutron-l3').with(
|
||||
:name => platform_params[:l3_agent_package],
|
||||
:ensure => p[:package_ensure],
|
||||
:require => 'Package[neutron]',
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron-l3').with_before(/Neutron_l3_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-l3').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron-l3').that_notifies('Anchor[neutron::install::end]')
|
||||
else
|
||||
is_expected.to contain_package('neutron').with_before(/Neutron_l3_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -79,10 +80,10 @@ describe 'neutron::agents::l3' do
|
||||
:name => platform_params[:l3_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-l3').that_subscribes_to('Package[neutron]')
|
||||
is_expected.to contain_service('neutron-l3').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-l3').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -132,7 +133,8 @@ describe 'neutron::agents::l3' do
|
||||
|
||||
it_configures 'neutron l3 agent'
|
||||
it 'configures neutron-l3 package subscription' do
|
||||
is_expected.to contain_service('neutron-l3').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-l3]' ] )
|
||||
is_expected.to contain_service('neutron-l3').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-l3').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -64,10 +64,10 @@ describe 'neutron::agents::lbaas' do
|
||||
:name => platform_params[:lbaas_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-lbaas-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-lbaas-agent]' ] )
|
||||
is_expected.to contain_service('neutron-lbaas-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-lbaas-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
|
@ -31,10 +31,10 @@ describe 'neutron::agents::metadata' do
|
||||
:name => platform_params[:metadata_agent_service],
|
||||
:enable => params[:enabled],
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-metadata').that_subscribes_to('Package[neutron]')
|
||||
is_expected.to contain_service('neutron-metadata').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-metadata').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
@ -106,7 +106,8 @@ describe 'neutron::agents::metadata' do
|
||||
it_configures 'neutron metadata agent'
|
||||
it_configures 'neutron metadata agent with auth_ca_cert set'
|
||||
it 'configures subscription to neutron-metadata package' do
|
||||
is_expected.to contain_service('neutron-metadata').that_subscribes_to('Package[neutron-metadata]')
|
||||
is_expected.to contain_service('neutron-metadata').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-metadata').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -76,7 +76,8 @@ describe 'neutron::agents::metering' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-metering-agent\]/)
|
||||
is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -85,10 +86,10 @@ describe 'neutron::agents::metering' do
|
||||
:name => platform_params[:metering_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Package[neutron]')
|
||||
is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-metering-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
@ -124,7 +125,8 @@ describe 'neutron::agents::metering' do
|
||||
|
||||
it_configures 'neutron metering agent'
|
||||
it 'configures subscription to neutron-metering-agent package' do
|
||||
is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Package[neutron-metering-agent]')
|
||||
is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-metering-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -65,10 +65,10 @@ describe 'neutron::agents::ml2::linuxbridge' do
|
||||
:name => platform_params[:linuxbridge_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-plugin-linuxbridge-agent').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-plugin-linuxbridge-agent]' ] )
|
||||
is_expected.to contain_service('neutron-plugin-linuxbridge-agent').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-plugin-linuxbridge-agent').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
|
@ -81,10 +81,10 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
:name => platform_params[:ovs_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
)
|
||||
is_expected.to contain_service('neutron-ovs-agent-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-ovs-agent]' ] )
|
||||
is_expected.to contain_service('neutron-ovs-agent-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-ovs-agent-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
@ -321,7 +321,8 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
:name => platform_params[:ovs_cleanup_service],
|
||||
:enable => true
|
||||
)
|
||||
is_expected.to contain_package('neutron-ovs-agent').with_before(/Service\[ovs-cleanup-service\]/)
|
||||
is_expected.to contain_package('neutron-ovs-agent').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron-ovs-agent').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -56,7 +56,8 @@ describe 'neutron::agents::ml2::sriov' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron-sriov-nic-agent').with_before(/Neutron_sriov_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-sriov-nic-agent').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron-sriov-nic-agent').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
|
||||
it 'configures neutron sriov agent service' do
|
||||
@ -64,10 +65,10 @@ describe 'neutron::agents::ml2::sriov' do
|
||||
:name => platform_params[:sriov_nic_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-sriov-nic-agent-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-sriov-nic-agent]' ] )
|
||||
is_expected.to contain_service('neutron-sriov-nic-agent-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-sriov-nic-agent-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
|
@ -18,7 +18,6 @@ describe 'neutron::agents::n1kv_vem' do
|
||||
end
|
||||
|
||||
it 'install n1kv-vem' do
|
||||
is_expected.to contain_package('libnl').with_before(['Package[nexus1000v]'])
|
||||
is_expected.to contain_service('openvswitch').with_notify(['Package[nexus1000v]'])
|
||||
is_expected.to contain_package('nexus1000v').with_notify(['Service[nexus1000v]'])
|
||||
is_expected.to contain_service('nexus1000v').with_ensure('running')
|
||||
|
@ -86,7 +86,8 @@ describe 'neutron::agents::vpnaas' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-vpnaas-agent\]/)
|
||||
is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -95,10 +96,10 @@ describe 'neutron::agents::vpnaas' do
|
||||
:name => platform_params[:vpnaas_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Package[neutron]')
|
||||
is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-vpnaas-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
@ -114,7 +115,7 @@ describe 'neutron::agents::vpnaas' do
|
||||
shared_examples_for 'openswan vpnaas_driver' do
|
||||
it 'installs openswan packages' do
|
||||
if platform_params.has_key?(:vpnaas_agent_package)
|
||||
is_expected.to contain_package('openswan').with_before(['Package[neutron-vpnaas-agent]'])
|
||||
is_expected.to contain_package('openswan')
|
||||
end
|
||||
is_expected.to contain_package('openswan').with(
|
||||
:ensure => 'present',
|
||||
@ -138,7 +139,8 @@ describe 'neutron::agents::vpnaas' do
|
||||
|
||||
it_configures 'neutron vpnaas agent'
|
||||
it 'configures subscription to neutron-vpnaas-agent package' do
|
||||
is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Package[neutron-vpnaas-agent]')
|
||||
is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-vpnaas-service').that_notifies('Anchor[neutron::service::end]')
|
||||
end
|
||||
|
||||
context 'when configuring the LibreSwan driver' do
|
||||
|
@ -50,8 +50,9 @@ describe 'neutron::plugins::cisco' do
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').with(
|
||||
:ensure => 'link',
|
||||
:target => '/etc/neutron/plugins/cisco/cisco_plugins.ini',
|
||||
:require => 'Package[neutron-plugin-cisco]'
|
||||
)
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
|
||||
it 'should have a plugin config folder' do
|
||||
@ -177,9 +178,11 @@ describe 'neutron::plugins::cisco' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/cisco/cisco_plugins.ini',
|
||||
:require => ['Package[neutron-server]', 'Package[neutron-plugin-cisco]'],
|
||||
:notify => 'Service[neutron-server]'
|
||||
:tag => 'neutron-file-line',
|
||||
)
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
|
||||
end
|
||||
it_configures 'default cisco plugin'
|
||||
end
|
||||
|
@ -38,8 +38,9 @@ describe 'neutron::plugins::midonet' do
|
||||
it 'should create plugin symbolic link' do
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').with(
|
||||
:ensure => 'link',
|
||||
:target => '/etc/neutron/plugins/midonet/midonet.ini',
|
||||
:require => 'Package[python-networking-midonet]')
|
||||
:target => '/etc/neutron/plugins/midonet/midonet.ini')
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
|
||||
it 'passes purge to resource' do
|
||||
@ -69,9 +70,9 @@ describe 'neutron::plugins::midonet' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/midonet/midonet.ini',
|
||||
:require => ['Package[neutron-server]', 'Package[python-networking-midonet]'],
|
||||
:notify => 'Service[neutron-server]'
|
||||
)
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
it_configures 'neutron midonet plugin'
|
||||
end
|
||||
|
@ -93,8 +93,10 @@ describe 'neutron::plugins::ml2' do
|
||||
is_expected.to contain_package('neutron-plugin-ml2').with(
|
||||
:name => platform_params[:ml2_server_package],
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
:tag => ['neutron-package', 'openstack'],
|
||||
)
|
||||
is_expected.to contain_package('neutron-plugin-ml2').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron-plugin-ml2').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -236,7 +238,7 @@ describe 'neutron::plugins::ml2' do
|
||||
is_expected.to contain_package('neutron-plugin-ml2').with(
|
||||
:name => platform_params[:ml2_server_package],
|
||||
:ensure => params[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
:tag => ['neutron-package', 'openstack'],
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -265,8 +267,9 @@ describe 'neutron::plugins::ml2' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini',
|
||||
:require => ['File[/etc/default/neutron-server]','File[/etc/neutron/plugin.ini]']
|
||||
)
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -102,8 +102,9 @@ describe 'neutron::plugins::nuage' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/nuage/plugin.ini',
|
||||
:notify => 'Service[neutron-server]'
|
||||
)
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
|
||||
it_configures 'neutron plugin nuage'
|
||||
|
@ -44,7 +44,7 @@ describe 'neutron::plugins::nvp' do
|
||||
is_expected.to contain_package('neutron-plugin-nvp').with(
|
||||
:name => platform_params[:nvp_server_package],
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
:tag => ['neutron-package', 'openstack'],
|
||||
)
|
||||
end
|
||||
|
||||
@ -56,8 +56,9 @@ describe 'neutron::plugins::nvp' do
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').with(
|
||||
:ensure => 'link',
|
||||
:target => '/etc/neutron/plugins/nicira/nvp.ini',
|
||||
:require => 'Package[neutron-plugin-nvp]'
|
||||
)
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
|
||||
it 'passes purge to resource' do
|
||||
|
@ -73,9 +73,10 @@ describe 'neutron::plugins::opencontrail' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/opencontrail/ContrailPlugin.ini',
|
||||
:require => ['Package[neutron-server]', 'Package[neutron-plugin-contrail]'],
|
||||
:notify => 'Service[neutron-server]'
|
||||
:tag => 'neutron-file-line',
|
||||
)
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
it_configures 'neutron opencontrail plugin'
|
||||
end
|
||||
|
@ -81,8 +81,9 @@ describe 'neutron::plugins::ovn' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/networking-ovn/networking-ovn.ini',
|
||||
:require => ['Package[neutron-server]', 'Package[neutron-plugin-ovn]'],
|
||||
:notify => 'Service[neutron-server]')
|
||||
:tag => 'neutron-file-line')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -108,9 +108,10 @@ describe 'neutron::plugins::plumgrid' do
|
||||
:path => '/etc/default/neutron-server',
|
||||
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
|
||||
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/plumgrid/plumgrid.ini',
|
||||
:require => ['Package[neutron-server]', 'Package[neutron-plugin-plumgrid]'],
|
||||
:notify => 'Service[neutron-server]'
|
||||
:tag => 'neutron-file-line',
|
||||
)
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
|
||||
it_configures 'neutron plumgrid plugin'
|
||||
@ -128,7 +129,9 @@ describe 'neutron::plugins::plumgrid' do
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').with(
|
||||
:ensure => 'link',
|
||||
:target => '/etc/neutron/plugins/plumgrid/plumgrid.ini',
|
||||
:require => 'Package[neutron-plugin-plumgrid]')
|
||||
:tag => 'neutron-config-file')
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]')
|
||||
is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]')
|
||||
end
|
||||
|
||||
it_configures 'neutron plumgrid plugin'
|
||||
|
@ -72,11 +72,11 @@ describe 'neutron::server' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron-server').with_before(/Neutron_api_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-server').with_before(/Neutron_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-server').with_before(/Service\[neutron-server\]/)
|
||||
is_expected.to contain_package('neutron-server').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron-server').that_notifies('Anchor[neutron::install::end]')
|
||||
else
|
||||
is_expected.to contain_package('neutron').with_before(/Neutron_api_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]')
|
||||
is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]')
|
||||
end
|
||||
end
|
||||
|
||||
@ -85,9 +85,10 @@ describe 'neutron::server' do
|
||||
:name => platform_params[:server_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
)
|
||||
is_expected.to contain_service('neutron-server').that_subscribes_to('Anchor[neutron::service::begin]')
|
||||
is_expected.to contain_service('neutron-server').that_notifies('Anchor[neutron::service::end]')
|
||||
is_expected.not_to contain_class('neutron::db::sync')
|
||||
is_expected.to contain_service('neutron-server').with_name('neutron-server')
|
||||
is_expected.to contain_neutron_config('DEFAULT/api_workers').with_value(facts[:processorcount])
|
||||
|
@ -72,7 +72,7 @@ describe 'neutron::services::fwaas' do
|
||||
it 'installs neutron fwaas package' do
|
||||
is_expected.to contain_package('neutron-fwaas').with(
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack',
|
||||
:tag => ['neutron-package', 'openstack'],
|
||||
:name => 'python-neutron-fwaas',
|
||||
)
|
||||
end
|
||||
@ -92,7 +92,7 @@ describe 'neutron::services::fwaas' do
|
||||
it 'installs neutron fwaas package' do
|
||||
is_expected.to contain_package('neutron-fwaas').with(
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack',
|
||||
:tag => ['neutron-package', 'openstack'],
|
||||
:name => 'python-neutron-fwaas',
|
||||
)
|
||||
end
|
||||
@ -114,7 +114,7 @@ describe 'neutron::services::fwaas' do
|
||||
it 'installs neutron vpnaas agent package' do
|
||||
is_expected.to contain_package('neutron-vpn-agent').with(
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack'
|
||||
:tag => ['neutron-package', 'openstack'],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user