Conditionally include nova patch config in Nuage

For configuring SRIOV, Nuage code relies on setting monkey patch parameters.
These parameters are available from nova::patch::config class. This change
includes the config class if SRIOV is present as one of the mechanism_drivers.
The change depends on the addition of nova patching configuration parameters.
This approach will not fly for Queens and later due to containerized
deployments, but as of Pike, there is no clean approach of separating out
neutron and nova completely. This review is meant for Pike and earlier
releases only. More info can be found here:
https://review.openstack.org/#/c/500107

Depends-On: I51ef3e19daff1d98cfe5c2c16475c16e6a3e3e0f
Change-Id: Ic2e912cba51a7dd585e896b785056a281104fd74
(cherry picked from commit 3530b591cd)
This commit is contained in:
Lokesh Jain 2017-10-12 16:30:26 -04:00
parent b64f49048c
commit ba5cf72dcb
1 changed files with 9 additions and 0 deletions

View File

@ -21,11 +21,20 @@
# for more details.
# Defaults to hiera('step')
#
# [*mechanism_drivers*]
# (Optional) The mechanism drivers to use with the Ml2 plugin
# Defaults to hiera('neutron::plugins::ml2::mechanism_drivers')
#
class tripleo::profile::base::neutron::plugins::ml2::nuage (
$step = hiera('step'),
$mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
) {
if $step >= 4 {
include ::neutron::plugins::ml2::nuage
if 'sriovnicswitch' in $mechanism_drivers {
include ::nova::patch::config
}
}
}