Class: Gaptool::InfoCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/gaptool-client.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/gaptool-client.rb', line 170

def execute
  @nodes = Array.new
  if instance
    @nodes = [$api.getonenode(instance)]
  elsif role && environment
    @nodes = $api.getenvroles(role, environment)
  elsif role && !environment
    @nodes = $api.getrolenodes(role)
  else
    @nodes = $api.getallnodes()
  end
  infohelper(@nodes, parseable?, grepable?)
end