Class: RightScaleCLI::Servers

Inherits:
Thor
  • Object
show all
Defined in:
lib/rightscale_cli/servers.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Servers

Returns a new instance of Servers.



25
26
27
28
29
# File 'lib/rightscale_cli/servers.rb', line 25

def initialize(*args)
  super
  @client = RightScaleCLI::Client.new(options)
  @logger = RightScaleCLI::Logger.new()
end

Class Method Details



59
60
61
# File 'lib/rightscale_cli/servers.rb', line 59

def self.banner(task, namespace = true, subcommand = false)
  "#{basename} #{task.formatted_usage(self, true, subcommand)}"
end

Instance Method Details

#create(name) ⇒ Object



45
46
47
# File 'lib/rightscale_cli/servers.rb', line 45

def create(name)
  # todo
end

#destroy(server) ⇒ Object



50
51
52
# File 'lib/rightscale_cli/servers.rb', line 50

def destroy(server)
  # todo
end

#listObject



35
36
37
# File 'lib/rightscale_cli/servers.rb', line 35

def list()
  @client.render(@client.get('servers'), 'servers')
end

#show(id) ⇒ Object



40
41
42
# File 'lib/rightscale_cli/servers.rb', line 40

def show(id)
  @client.render(@client.show('servers', id), 'server')
end