Class: Befog::Commands::List

Inherits:
Object
  • Object
show all
Includes:
Mixins::Command, Mixins::Configurable, Mixins::Help, Mixins::Safely, Mixins::Scope, Mixins::Selectable
Defined in:
lib/befog/commands/list.rb

Instance Attribute Summary

Attributes included from Mixins::Command

#options

Instance Method Summary collapse

Methods included from Mixins::Help

included

Methods included from Mixins::Selectable

included, #run_for_selected

Methods included from Mixins::Safely

#safely

Methods included from Mixins::Scope

#_bank, #account_key, #account_secret, #bank, #bank?, #bank_name, #banks, #compute, #flavor, #flavor?, #get_server, #image, #image?, #keypair, #keypair?, #price, #provider, #provider?, #provider_name, #providers, #region, #region?, #security_group, #security_group?, #servers, #servers=

Methods included from Mixins::Configurable

#_configuration, #configuration, #configuration_name, #configuration_path, included, #save

Methods included from Mixins::Command

#command, #error, included, #initialize, #log, #process_options, #usage

Instance Method Details

#runObject



31
32
33
34
35
36
# File 'lib/befog/commands/list.rb', line 31

def run
  run_for_selected do |id|
    server = compute.servers.get(id)
    log "%-15s %-15s %-15s %-45s %-10s" % [id,server.flavor_id,server.tags["Name"],(server.dns_name||"-"),server.state]
  end
end