Class: Fog::Compute::HP::Image
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::HP::Image
- Defined in:
- lib/fog/hp/models/compute/image.rb
Instance Attribute Summary collapse
-
#architecture ⇒ Object
readonly
Returns the value of attribute architecture.
-
#image_type ⇒ Object
readonly
Returns the value of attribute image_type.
-
#min_disk ⇒ Object
readonly
these values are extracted from metadata.
-
#min_ram ⇒ Object
readonly
Returns the value of attribute min_ram.
Instance Method Summary collapse
Instance Attribute Details
#architecture ⇒ Object (readonly)
Returns the value of attribute architecture.
23 24 25 |
# File 'lib/fog/hp/models/compute/image.rb', line 23 def architecture @architecture end |
#image_type ⇒ Object (readonly)
Returns the value of attribute image_type.
22 23 24 |
# File 'lib/fog/hp/models/compute/image.rb', line 22 def image_type @image_type end |
#min_disk ⇒ Object (readonly)
these values are extracted from metadata
20 21 22 |
# File 'lib/fog/hp/models/compute/image.rb', line 20 def min_disk @min_disk end |
#min_ram ⇒ Object (readonly)
Returns the value of attribute min_ram.
21 22 23 |
# File 'lib/fog/hp/models/compute/image.rb', line 21 def min_ram @min_ram end |
Instance Method Details
#destroy ⇒ Object
60 61 62 63 64 |
# File 'lib/fog/hp/models/compute/image.rb', line 60 def destroy requires :id service.delete_image(id) true end |
#metadata ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/fog/hp/models/compute/image.rb', line 25 def @metadata ||= begin Fog::Compute::HP::Metadata.new({ :service => service, :parent => self }) end end |
#metadata=(new_metadata = {}) ⇒ Object
34 35 36 37 38 |
# File 'lib/fog/hp/models/compute/image.rb', line 34 def (={}) = [] .each_pair {|k,v| << {"key" => k, "value" => v} } .load() end |
#ready? ⇒ Boolean
66 67 68 |
# File 'lib/fog/hp/models/compute/image.rb', line 66 def ready? status == 'ACTIVE' end |