Class: RightScaleCLI::MultiCloudImages
- Inherits:
-
Thor
- Object
- Thor
- RightScaleCLI::MultiCloudImages
- Defined in:
- lib/rightscale_cli/multi_cloud_images.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create(name, description) ⇒ Object
- #destroy(multi_cloud_image_id) ⇒ Object
-
#initialize(*args) ⇒ MultiCloudImages
constructor
A new instance of MultiCloudImages.
- #list ⇒ Object
Constructor Details
#initialize(*args) ⇒ MultiCloudImages
Returns a new instance of MultiCloudImages.
27 28 29 30 31 |
# File 'lib/rightscale_cli/multi_cloud_images.rb', line 27 def initialize(*args) super @client = RightScaleCLI::Client.new() @logger = RightScaleCLI::Logger.new() end |
Class Method Details
.banner(task, namespace = true, subcommand = false) ⇒ Object
52 53 54 |
# File 'lib/rightscale_cli/multi_cloud_images.rb', line 52 def self.(task, namespace = true, subcommand = false) "#{basename} #{task.formatted_usage(self, true, subcommand)}" end |
Instance Method Details
#create(name, description) ⇒ Object
43 44 45 |
# File 'lib/rightscale_cli/multi_cloud_images.rb', line 43 def create(name, description) @client.create('multi_cloud_image', { :name => name, :description => description }) end |
#destroy(multi_cloud_image_id) ⇒ Object
48 49 50 |
# File 'lib/rightscale_cli/multi_cloud_images.rb', line 48 def destroy(multi_cloud_image_id) @client.destroy('multi_cloud_image', multi_cloud_image_id) end |
#list ⇒ Object
37 38 39 40 |
# File 'lib/rightscale_cli/multi_cloud_images.rb', line 37 def list() @logger.info('Retrieving all MultiCloud Images...') @client.render(@client.get('multi_cloud_images'), 'multi_cloud_images', ) end |