Class: 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.
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Attribute Details
#architecture ⇒ Object (readonly)
Returns the value of attribute architecture.
25 26 27 |
# File 'lib/fog/hp/models/compute/image.rb', line 25 def architecture @architecture end |
#image_type ⇒ Object (readonly)
Returns the value of attribute image_type.
24 25 26 |
# File 'lib/fog/hp/models/compute/image.rb', line 24 def image_type @image_type end |
#min_disk ⇒ Object (readonly)
these values are extracted from metadata
22 23 24 |
# File 'lib/fog/hp/models/compute/image.rb', line 22 def min_disk @min_disk end |
#min_ram ⇒ Object (readonly)
Returns the value of attribute min_ram.
23 24 25 |
# File 'lib/fog/hp/models/compute/image.rb', line 23 def min_ram @min_ram end |
Instance Method Details
#destroy ⇒ Object
62 63 64 65 66 |
# File 'lib/fog/hp/models/compute/image.rb', line 62 def destroy requires :id service.delete_image(id) true end |
#metadata ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/fog/hp/models/compute/image.rb', line 27 def @metadata ||= begin Fog::Compute::HP::Metadata.new({ :service => service, :parent => self }) end end |
#metadata=(new_metadata = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/fog/hp/models/compute/image.rb', line 36 def (={}) = [] .each_pair {|k,v| << {"key" => k, "value" => v} } .load() end |
#ready? ⇒ Boolean
68 69 70 |
# File 'lib/fog/hp/models/compute/image.rb', line 68 def ready? status == 'ACTIVE' end |