Skip to content

Commit

Permalink
Simplify ml2_config.ini symlink resource management
Browse files Browse the repository at this point in the history
Move file resource outside conditional so it's managed once and
manage dependencies in conditional instead.

Change-Id: I56b30173db4a56cf3ad211a9656c628977eec99b
(cherry picked from commit 763ec35)
  • Loading branch information
mgagne committed Jul 11, 2014
1 parent 6f106f1 commit 06d3c52
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions manifests/plugins/ml2.pp
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,23 @@
warning('Without networking mechanism driver, ml2 will not communicate with L2 agents')
}

# 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'
}

# Some platforms do not have a dedicated ml2 plugin package
# In RH, the link is used to start Neutron process but in Debian, it's used only
# to manage database synchronization.
if $::neutron::params::ml2_server_package {
package { 'neutron-plugin-ml2':
ensure => present,
name => $::neutron::params::ml2_server_package,
}
Package['neutron-plugin-ml2'] -> Neutron_plugin_ml2<||>
file {'/etc/neutron/plugin.ini':
ensure => link,
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
require => Package['neutron-plugin-ml2']
}
Package['neutron-plugin-ml2'] -> File['/etc/neutron/plugin.ini']
} else {
file {'/etc/neutron/plugin.ini':
ensure => link,
target => '/etc/neutron/plugins/ml2/ml2_conf.ini',
require => Package['neutron']
}
Package['neutron'] -> File['/etc/neutron/plugin.ini']
}

neutron::plugins::ml2::driver { $type_drivers:
Expand Down

0 comments on commit 06d3c52

Please sign in to comment.