class Fog::Compute::OpenStack::Image

Public Class Methods

new(attributes) click to toggle source
Calls superclass method Fog::Model.new
# File lib/fog/openstack/models/compute/image.rb, line 23
def initialize(attributes)
  @connection = attributes[:connection]
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/openstack/models/compute/image.rb, line 43
def destroy
  requires :id
  connection.delete_image(id)
  true
end
metadata() click to toggle source
# File lib/fog/openstack/models/compute/image.rb, line 28
def metadata
  @metadata ||= begin
    Fog::Compute::OpenStack::Metadata.new({
      :connection => connection,
      :parent => self
    })
  end
end
metadata=(new_metadata={}) click to toggle source
# File lib/fog/openstack/models/compute/image.rb, line 37
def metadata=(new_metadata={})
  metas = []
  new_metadata.each_pair {|k,v| metas << {"key" => k, "value" => v} }
  metadata.load(metas)
end
ready?() click to toggle source
# File lib/fog/openstack/models/compute/image.rb, line 49
def ready?
  status == 'ACTIVE'
end