Class: Image
- Includes:
- TestPoller
- Defined in:
- lib/deltacloud/api.rb,
lib/deltacloud/models/image.rb
Instance Attribute Summary collapse
-
#architecture ⇒ Object
Returns the value of attribute architecture.
-
#creation_time ⇒ Object
Returns the value of attribute creation_time.
-
#description ⇒ Object
Returns the value of attribute description.
-
#hardware_profiles ⇒ Object
Returns the value of attribute hardware_profiles.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner_id ⇒ Object
Returns the value of attribute owner_id.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
Methods included from TestPoller
Methods inherited from BaseModel
attr_accessor, attributes, #attributes, #id, #initialize, #to_entity
Constructor Details
This class inherits a constructor from BaseModel
Instance Attribute Details
#architecture ⇒ Object
Returns the value of attribute architecture.
23 24 25 |
# File 'lib/deltacloud/models/image.rb', line 23 def architecture @architecture end |
#creation_time ⇒ Object
Returns the value of attribute creation_time.
26 27 28 |
# File 'lib/deltacloud/models/image.rb', line 26 def creation_time @creation_time end |
#description ⇒ Object
Returns the value of attribute description.
22 23 24 |
# File 'lib/deltacloud/models/image.rb', line 22 def description @description end |
#hardware_profiles ⇒ Object
Returns the value of attribute hardware_profiles.
25 26 27 |
# File 'lib/deltacloud/models/image.rb', line 25 def hardware_profiles @hardware_profiles end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/deltacloud/models/image.rb', line 20 def name @name end |
#owner_id ⇒ Object
Returns the value of attribute owner_id.
21 22 23 |
# File 'lib/deltacloud/models/image.rb', line 21 def owner_id @owner_id end |
#state ⇒ Object
Returns the value of attribute state.
24 25 26 |
# File 'lib/deltacloud/models/image.rb', line 24 def state @state end |
Instance Method Details
#to_hash(context) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/deltacloud/models/image.rb', line 28 def to_hash(context) { :id => self.id, :name => name, :description => description, :owner => owner_id, :architecture => architecture, :state => state, :creation_time => creation_time, :hardware_profiles => hardware_profiles.map { |p| { :id => p.id, :href => context.hardware_profile_url(p.id), :rel => :hardware_profile } } } end |