lib/gaptool_client/api.rb in gaptool-client-0.8.0.pre.alpha10 vs lib/gaptool_client/api.rb in gaptool-client-0.8.0.pre.beta

- old
+ new

@@ -13,27 +13,26 @@ ENV['GT_URL'], ENV['GT_AWS_ZONE'] ) end def self.query_nodes(opts) - instance = opts[:instance] - role = opts[:role] - environment = opts[:environment] - params = opts[:params] - cl = opts[:client] || client + instance = opts.delete(:instance) + role = opts.delete(:role) + environment = opts.delete(:environment) + cl = opts.delete(:client) || client if instance puts Rainbow('Ignoring role and environment as instance is set').red \ if role || environment [cl.getonenode(instance)] elsif role && environment - cl.getenvroles(role, environment, params) + cl.getenvroles(role, environment, opts) elsif role - cl.getrolenodes(role, params) + cl.getrolenodes(role, opts) elsif environment - cl.getenvnodes(environment, params) + cl.getenvnodes(environment, opts) else - cl.getallnodes(params) + cl.getallnodes(opts) end end def self.get_host(node) "#{node['role']}-#{node['environment']}-#{node['instance']}"