From 39b48a2bc7236e32e7740c036f385b7089d3e4dc Mon Sep 17 00:00:00 2001 From: Martin Gerhard Loschwitz Date: Fri, 26 Sep 2014 10:03:52 +0200 Subject: [PATCH] Make api_extensions_path a parameter for "neutron" Currently, the "neutron" class does not support the direct configuration of the "api_extensions_path" by means of a parameter. However, there is at least one plugin -- OpenContrail -- which currently requires exactly this parameter to be set to work. It is hence desireable to be able to set the parameter directly from within the "neutron" class instead of having to fiddle with "neutron_config" in local site manifests. This commit adds the desired functionality and allows the parameter via "api_extensions_path" to be set directly for the "neutron" class. Change-Id: I660848100073a3a0067ffb42791bfd80b66c808e --- manifests/init.pp | 7 +++++++ spec/classes/neutron_init_spec.rb | 1 + 2 files changed, 8 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 267ce244c..fc007f09e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -85,6 +85,11 @@ # (optional) Enables network namespaces # Defaults to false # +# [*api_extensions_path*] +# (optional) Specify additional paths for API extensions that the +# module in use needs to load. +# Defaults to undef +# # [*report_interval*] # (optional) Seconds between nodes reporting state to server; should be less than # agent_down_time, best if it is half or less than agent_down_time. @@ -209,6 +214,7 @@ class neutron ( $allow_pagination = false, $allow_sorting = false, $allow_overlapping_ips = false, + $api_extensions_path = undef, $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $report_interval = '30', $control_exchange = 'neutron', @@ -315,6 +321,7 @@ class neutron ( 'DEFAULT/allow_overlapping_ips': value => $allow_overlapping_ips; 'DEFAULT/control_exchange': value => $control_exchange; 'DEFAULT/rpc_backend': value => $rpc_backend; + 'DEFAULT/api_extensions_path': value => $api_extensions_path; 'agent/root_helper': value => $root_helper; 'agent/report_interval': value => $report_interval; } diff --git a/spec/classes/neutron_init_spec.rb b/spec/classes/neutron_init_spec.rb index 6c4053b59..03ef46508 100644 --- a/spec/classes/neutron_init_spec.rb +++ b/spec/classes/neutron_init_spec.rb @@ -121,6 +121,7 @@ describe 'neutron' do should contain_neutron_config('DEFAULT/allow_pagination').with_value(false) should contain_neutron_config('DEFAULT/allow_sorting').with_value(false) should contain_neutron_config('DEFAULT/allow_overlapping_ips').with_value(false) + should contain_neutron_config('DEFAULT/api_extensions_path').with_value(nil) should contain_neutron_config('DEFAULT/control_exchange').with_value('neutron') should contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf') should contain_neutron_config('agent/report_interval').with_value('30')