diff --git a/recipes/api-ec2.rb b/recipes/api-ec2.rb index e5ff17af..50e1c3aa 100644 --- a/recipes/api-ec2.rb +++ b/recipes/api-ec2.rb @@ -59,8 +59,8 @@ if Chef::Config[:solo] Chef::Log.warn("This recipe uses search. Chef Solo does not support search.") else # Lookup keystone api ip address - keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") - if result_count > 0 + keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") + if keystone.length > 0 Chef::Log.info("Using Keystone attributes from SEARCH") keystone_api_ip = keystone[0]['keystone']['api_ipaddress'] keystone_service_port = keystone[0]['keystone']['service_port'] diff --git a/recipes/api-metadata.rb b/recipes/api-metadata.rb index 6724b88a..69b5792b 100644 --- a/recipes/api-metadata.rb +++ b/recipes/api-metadata.rb @@ -59,8 +59,8 @@ if Chef::Config[:solo] Chef::Log.warn("This recipe uses search. Chef Solo does not support search.") else # Lookup keystone api ip address - keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") - if result_count > 0 + keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") + if keystone.length > 0 Chef::Log.info("Using Keystone attributes from SEARCH") keystone_api_ip = keystone[0]['keystone']['api_ipaddress'] keystone_service_port = keystone[0]['keystone']['service_port'] diff --git a/recipes/api-os-compute.rb b/recipes/api-os-compute.rb index 3f1521fe..8ec8e13e 100644 --- a/recipes/api-os-compute.rb +++ b/recipes/api-os-compute.rb @@ -59,8 +59,8 @@ if Chef::Config[:solo] Chef::Log.warn("This recipe uses search. Chef Solo does not support search.") else # Lookup keystone api ip address - keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") - if result_count > 0 + keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") + if keystone.length > 0 Chef::Log.info("Using Keystone attributes from SEARCH") keystone_api_ip = keystone[0]['keystone']['api_ipaddress'] keystone_service_port = keystone[0]['keystone']['service_port'] diff --git a/recipes/volume.rb b/recipes/volume.rb index cb47dd3d..84571605 100644 --- a/recipes/volume.rb +++ b/recipes/volume.rb @@ -38,8 +38,8 @@ if Chef::Config[:solo] Chef::Log.warn("This recipe uses search. Chef Solo does not support search.") else # Lookup keystone api ip address - keystone, something, result_count = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") - if result_count > 0 + keystone, something, arbitrary_value = Chef::Search::Query.new.search(:node, "roles:keystone AND chef_environment:#{node.chef_environment}") + if keystone.length > 0 Chef::Log.info("Using Keystone attributes from SEARCH") keystone_api_ip = keystone[0]['keystone']['api_ipaddress'] keystone_admin_port = keystone[0]['keystone']['admin_port']