class Deltacloud::Image

Attributes

architecture[RW]
creation_time[RW]
description[RW]
hardware_profiles[RW]
name[RW]
owner_id[RW]
root_type[RW]
state[RW]

Public Instance Methods

to_hash(context) click to toggle source
# File lib/deltacloud/models/image.rb, line 33
def to_hash(context)
  {
    :id => self.id,
    :href => context.image_url(self.id),
    :name => name,
    :description => description,
    :owner => owner_id,
    :architecture => architecture,
    :state => state,
    :root_type => root_type,
    :creation_time => creation_time,
    :hardware_profiles => hardware_profiles.map { |p|
      { :id => p.id, :href => context.hardware_profile_url(p.id), :rel => :hardware_profile }
    }
  }
end