lib/cap-rightscale/configuration/rightscale.rb in cap-rightscale-0.4.0 vs lib/cap-rightscale/configuration/rightscale.rb in cap-rightscale-0.4.1
- old
+ new
@@ -67,11 +67,11 @@
deployment_name = dept.nickname
logger.info("Deployment #{deployment_name}:")
srvs = get_rs_instance.array_instances(array.id).select {|i| i[:state] == "operational"}
if params.include?(:except_tags)
- except_tags_params = {:resource_type => "ec2_instance", :tags => [params[:except_tags]]}
+ except_tags_params = {:resource_type => "ec2_instance", :tags => params[:except_tags]}
srvs = servers_with_tags_set(params[:deployment], srvs, except_tags_params, :minus)
return [] if srvs.size == 0 # Not found servers matching tag
end
host_list = srvs.map do |instance|
@@ -124,11 +124,11 @@
logger.info("querying rightscale for servers #{params[:name_prefix]} in deployment #{dept.nickname}...")
srvs = dept.servers.select {|s| s[:state] == "operational"}
srvs = srvs.select {|s| /#{params[:name_prefix]}/ =~ s[:nickname]} if params[:name_prefix]
if params.include?(:except_tags)
- except_tags_params = {:resource_type => "ec2_instance", :tags => [params[:except_tags]]}
+ except_tags_params = {:resource_type => "ec2_instance", :tags => params[:except_tags]}
srvs = servers_with_tags_set(params[:deployment], srvs, except_tags_params, :minus)
return [] if srvs.size == 0 # Not found servers matching tag
end
host_list = srvs.map do |server|
@@ -179,15 +179,15 @@
# Request RightScale API
dept = get_rs_instance.deployment(params[:deployment], :server_settings => 'true')
logger.info("querying rightscale for servers matching tags #{params[:tags]} in deployment #{dept.nickname}...")
srvs = dept.servers.select {|s| s[:state] == "operational"}
- ts_params = {:resource_type => "ec2_instance", :tags => [params[:tags]]}
+ ts_params = {:resource_type => "ec2_instance", :tags => params[:tags]}
srvs = servers_with_tags_set(params[:deployment], srvs, ts_params, :intersect)
return [] if srvs.size == 0 # Not found servers matching tag
if params.include?(:except_tags)
- except_tags_params = {:resource_type => "ec2_instance", :tags => [params[:except_tags]]}
+ except_tags_params = {:resource_type => "ec2_instance", :tags => params[:except_tags]}
srvs = servers_with_tags_set(params[:deployment], srvs, except_tags_params, :minus)
return [] if srvs.size == 0 # Not found servers matching tag
end
host_list = srvs.map do |server|