Class: RightScaleCLI::Deployments
- Inherits:
-
Thor
- Object
- Thor
- RightScaleCLI::Deployments
- Defined in:
- lib/rightscale_cli/deployments.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner(task, namespace = true, subcommand = false) ⇒ Object
49 50 51 |
# File 'lib/rightscale_cli/deployments.rb', line 49 def self.(task, namespace = true, subcommand = false) "#{basename} #{task.formatted_usage(self, true, subcommand)}" end |
Instance Method Details
#create(name) ⇒ Object
35 36 37 38 |
# File 'lib/rightscale_cli/deployments.rb', line 35 def create(name) rightscale = RightApi::Client.new(RightScaleCLI::Config::API) end |
#destroy(deployment) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/rightscale_cli/deployments.rb', line 41 def destroy(deployment) rightscale = RightApi::Client.new(RightScaleCLI::Config::API) # construct deployment deployment = Hash.new rightscale.deployments.delete({:deployment => deployment}) end |
#list ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/rightscale_cli/deployments.rb', line 26 def list() deployments = Array.new RightApi::Client.new(RightScaleCLI::Config::API).deployments.index.each { |deployment| deployments.push(deployment.raw) } puts deployments.to_yaml end |