Foodcritic cleanups

Nice thing about the new syntax, you can notify resources defined later.

FC043: Prefer new notification syntax: cookbook-cinder/recipes/api.rb:91
FC043: Prefer new notification syntax: cookbook-cinder/recipes/scheduler.rb:49
FC043: Prefer new notification syntax: cookbook-cinder/recipes/volume.rb:61
FC043: Prefer new notification syntax: cookbook-cinder/recipes/volume.rb:84
This commit is contained in:
John Dewey 2013-01-03 19:58:23 -08:00
parent f056e83f0a
commit 75659d82d5
4 changed files with 7 additions and 5 deletions

View File

@ -70,6 +70,8 @@ default["cinder"]["volume"]["volume_group"] = "cinder-volumes"
default["cinder"]["volume"]["iscsi_helper"] = "tgtadm"
case platform
# FC024: Probably won't be running this on Amazon.
# when "centos", "redhat", "amazon", "scientific"
when "fedora", "redhat", "centos"
default["cinder"]["platform"] = {
"cinder_api_packages" => ["openstack-cinder", "python-cinderclient", "MySQL-python"],

View File

@ -85,7 +85,7 @@ template "/etc/cinder/cinder.conf" do
:glance_port => glance_api_endpoint.port
)
notifies :restart, resources(:service => "cinder-api"), :delayed
notifies :restart, service['cinder-api']
end
template "/etc/cinder/api-paste.ini" do
@ -98,7 +98,7 @@ template "/etc/cinder/api-paste.ini" do
"service_password" => service_pass
)
notifies :restart, resources(:service => "cinder-api"), :immediately
notifies :restart, service['cinder-api'], :immediately
end
keystone_register "Register Cinder Volume Service" do

View File

@ -59,5 +59,5 @@ template "/etc/cinder/cinder.conf" do
:glance_port => glance_api_endpoint.port
)
notifies :restart, resources(:service => "cinder-scheduler")
notifies :restart, service['cinder-scheduler']
end

View File

@ -71,7 +71,7 @@ template "/etc/cinder/cinder.conf" do
:glance_port => glance_api_endpoint.port
)
notifies :restart, resources(:service => "cinder-volume")
notifies :restart, service['cinder-volume']
end
service "iscsitarget" do
@ -85,5 +85,5 @@ template "/etc/tgt/targets.conf" do
source "targets.conf.erb"
mode 00600
notifies :restart, resources(:service => "iscsitarget"), :immediately
notifies :restart, service['iscsitarget'], :immediately
end