Module: PoolParty::Console

Includes:
Display
Included in:
Object
Defined in:
lib/poolparty/helpers/console.rb

Instance Method Summary collapse

Methods included from Display

#header, #pool_describe, #subheader

Instance Method Details

#help(level = 0) ⇒ Object

Print help commands for the console level 0 - Basic help level 1 - Commands



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/poolparty/helpers/console.rb', line 11

def help(level=0)
  @np = NicePrinter.new(60)
  @np.header
  @np.center "PoolParty console help"      
  @np.center "Basics"
  @np << "Load your pool with load_pool(filename)"
  @np << "Reference clouds with"
  @np << "c = cloud :cloudname"
  @np.empty
  if level >= 1
    @np.center "CloudSpeak"
    @np << "All the commands set on your cloud can be called within the console"
    @np << "instances_by_status('running') - get list of running nodes"
    @np << "list_of_pending_instances - get list of pending nodes"
    @np << "available_monitors - get list of the available monitors on the cloud"
    @np << "  note: all monitors can be called as a method on the cloud"
    @np << "    i.e. CpuMonitor makes the method cpu available on the cloud"
    @np.empty
  end
  @np.footer
  @np.print
end

#reload!Object

Clear all the pools and reload the console Call within console to reset and reload the entire poolparty base as well



37
38
39
40
41
# File 'lib/poolparty/helpers/console.rb', line 37

def reload!      
  reset!
  require File.dirname(__FILE__) + "/../../../poolparty"
  require File.dirname(__FILE__) + "/../../../poolpartycl"
end