Class: RightScaleCLI::Servers
- Inherits:
-
Thor
- Object
- Thor
- RightScaleCLI::Servers
- Defined in:
- lib/rightscale_cli/servers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create(name) ⇒ Object
- #destroy(server) ⇒ Object
-
#initialize(*args) ⇒ Servers
constructor
A new instance of Servers.
- #list ⇒ Object
- #show(id) ⇒ Object
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() @logger = RightScaleCLI::Logger.new() end |
Class Method Details
.banner(task, namespace = true, subcommand = false) ⇒ Object
59 60 61 |
# File 'lib/rightscale_cli/servers.rb', line 59 def self.(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 |
#list ⇒ Object
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 |