Parent

Class/Module Index [+]

Quicksearch

Fog::Compute::RackspaceV2::Image

Public Class Methods

new(attributes={}) click to toggle source
# File lib/fog/rackspace/models/compute_v2/image.rb, line 29
def initialize(attributes={})
  @connection = attributes[:connection]
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/rackspace/models/compute_v2/image.rb, line 58
def destroy
  requires :identity
  service.delete_image(identity)
end
metadata() click to toggle source
# File lib/fog/rackspace/models/compute_v2/image.rb, line 34
def metadata
  raise "Please save image before accessing metadata" unless identity          
  @metadata ||= begin
    Fog::Compute::RackspaceV2::Metadata.new({
      :connection => connection,
      :parent => self
    })
  end
end
metadata=(hash={}) click to toggle source
# File lib/fog/rackspace/models/compute_v2/image.rb, line 44
def metadata=(hash={})
  raise "Please save image before accessing metadata" unless identity
  metadata.from_hash(hash)
end
ready?(ready_state = ACTIVE, error_states=[ERROR]) click to toggle source
# File lib/fog/rackspace/models/compute_v2/image.rb, line 49
def ready?(ready_state = ACTIVE, error_states=[ERROR])
  if error_states
    error_states = Array(error_states)
    raise "Image should have transitioned to '#{ready_state}' not '#{state}'" if error_states.include?(state)
  end
  state == ready_state
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.