From 24297403581e5f1cee61a3c9e402849eee5a1682 Mon Sep 17 00:00:00 2001 From: Chris Buben Date: Mon, 19 May 2014 11:44:42 -0700 Subject: [PATCH] rpcdaemon: allow specification of enabled plugins closes rcbops/chef-cookbooks/issues/944 --- attributes/default.rb | 2 ++ recipes/rpcdaemon.rb | 3 ++- templates/default/rpcdaemon.conf.erb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 5db1063..0b905b6 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -63,6 +63,8 @@ default["rpcdaemon"]["queue_expire"] = 60 # quantum API timeouts default["rpcdaemon"]["timeout"] = 20 +# which plugins should be enabled +default["rpcdaemon"]["enabled_plugins"] = ["L3Agent", "DHCPAgent"] # ######################################################################### # # Neutron Configuration Attributes diff --git a/recipes/rpcdaemon.rb b/recipes/rpcdaemon.rb index 78c35e0..0a0c665 100644 --- a/recipes/rpcdaemon.rb +++ b/recipes/rpcdaemon.rb @@ -30,7 +30,8 @@ "rabbit_ipaddress" => rabbit_info["host"], "check_interval" => node["rpcdaemon"]["check_interval"], "queue_expire" => node["rpcdaemon"]["queue_expire"], - "timeout" => node["rpcdaemon"]["timeout"] + "timeout" => node["rpcdaemon"]["timeout"], + "enabled_plugins" => node["rpcdaemon"]["enabled_plugins"] ) end diff --git a/templates/default/rpcdaemon.conf.erb b/templates/default/rpcdaemon.conf.erb index 61d6b98..068976b 100644 --- a/templates/default/rpcdaemon.conf.erb +++ b/templates/default/rpcdaemon.conf.erb @@ -1,7 +1,7 @@ [Daemon] # Space-separated list of plugins to load # Available plugins: L3Agent, DHCPAgent, Dump -plugins = L3Agent DHCPAgent +plugins = <%= @enabled_plugins.join(' ') %> # Rabbit server IP rpchost = <%= @rabbit_ipaddress %>