Merge "Fix dependencies for Nuage plugin configuration"
This commit is contained in:
@@ -49,19 +49,14 @@ class neutron::plugins::nuage (
|
||||
|
||||
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',
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
ensure_resource('file', $::neutron::params::nuage_config_file, {
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'neutron',
|
||||
mode => '0640'}
|
||||
)
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
|
||||
path => '/etc/default/neutron-server',
|
||||
@@ -72,12 +67,22 @@ class neutron::plugins::nuage (
|
||||
}
|
||||
|
||||
if $::osfamily == 'Redhat' {
|
||||
File['/etc/neutron/plugin.ini'] ~> Exec<| title == 'neutron-db-sync' |>
|
||||
file { '/etc/neutron/plugin.ini':
|
||||
ensure => link,
|
||||
target => $::neutron::params::nuage_config_file,
|
||||
ensure => link,
|
||||
require => File['/etc/neutron/plugins/nuage/plugin.ini'],
|
||||
target => $::neutron::params::nuage_config_file,
|
||||
}
|
||||
}
|
||||
|
||||
file { '/etc/neutron/plugins/nuage/plugin.ini':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'neutron',
|
||||
require => File['/etc/neutron/plugins/nuage'],
|
||||
mode => '0640'
|
||||
}
|
||||
|
||||
$nuage_base_uri_base = '/nuage/api'
|
||||
neutron_plugin_nuage {
|
||||
'RESTPROXY/default_net_partition_name': value => $nuage_net_partition_name;
|
||||
@@ -94,8 +99,4 @@ class neutron::plugins::nuage (
|
||||
($::neutron::core_plugin != 'nuage') {
|
||||
fail('Nuage plugin should be the core_plugin in neutron.conf')
|
||||
}
|
||||
|
||||
Neutron_plugin_nuage<||> ~> Exec<| title == 'neutron-db-sync' |>
|
||||
|
||||
}
|
||||
|
||||
|
@@ -30,6 +30,15 @@ describe 'neutron::plugins::nuage' do
|
||||
|
||||
it { is_expected.to contain_class('neutron::params') }
|
||||
|
||||
it 'should have a nuage plugin ini file' do
|
||||
is_expected.to contain_file('/etc/neutron/plugins/nuage/plugin.ini').with(
|
||||
:ensure => 'file',
|
||||
:owner => 'root',
|
||||
:group => 'neutron',
|
||||
:mode => '0640'
|
||||
)
|
||||
end
|
||||
|
||||
it 'should configure neutron.conf' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/core_plugin').with_value('neutron.plugins.nuage.plugin.NuagePlugin')
|
||||
end
|
||||
|
Reference in New Issue
Block a user