Method: OpenStack::Compute::Image#initialize
- Defined in:
- lib/openstack/compute/image.rb
#initialize(compute, id) ⇒ Image
This class provides an object for the “Image” of a server. The Image refers to the Operating System type and version.
Returns the Image object identifed by the supplied ID number. Called from the get_image instance method of OpenStack::Compute::Connection, it will likely not be called directly from user code.
>> cs = OpenStack::Compute::Connection.new(USERNAME,API_KEY)
>> image = cs.get_image(2)
=> #<OpenStack::Compute::Image:0x1015371c0 ...>
>> image.name
=> "CentOS 5.2"
28 29 30 31 32 |
# File 'lib/openstack/compute/image.rb', line 28 def initialize(compute,id) @id = id @compute = compute populate end |