Class: CloudControl::API::Image

Inherits:
Core
  • Object
show all
Defined in:
lib/cloudcontrol/api/image.rb

Instance Attribute Summary

Attributes inherited from Core

#client

Instance Method Summary collapse

Methods inherited from Core

#endpoint, #get, #get_simple, #initialize, #log, #org_endpoint, #org_id, #perform, #post, #post_simple, #query_params, #request_query_string, #request_simple_body, #request_xml_body, #simple_params, #single, #xml_params

Constructor Details

This class inherits a constructor from CloudControl::API::Core

Instance Method Details

#deployed_list(options = {}) ⇒ Object



8
9
10
11
12
# File 'lib/cloudcontrol/api/image.rb', line 8

def deployed_list(options = {})
  endpoint "/#{org_id}/image/deployed"
  query_params options
  get
end

#server_listObject



3
4
5
6
# File 'lib/cloudcontrol/api/image.rb', line 3

def server_list
  endpoint '/base/image'
  get
end

#show(image_id) ⇒ Object



19
20
21
22
# File 'lib/cloudcontrol/api/image.rb', line 19

def show(image_id)
  endpoint "/#{org_id}/image/#{image_id}"
  get
end

#show_by_name(name, options = {}) ⇒ Object



14
15
16
17
# File 'lib/cloudcontrol/api/image.rb', line 14

def show_by_name(name, options = {})
  options[:name] = name
  single(deployed_list(options))
end