Class: Fog::Compute::Cloudstack::Image
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Cloudstack::Image
- Defined in:
- lib/fog/cloudstack/models/compute/image.rb
Instance Attribute Summary collapse
-
#bits ⇒ Object
Returns the value of attribute bits.
-
#requires_hvm ⇒ Object
Returns the value of attribute requires_hvm.
-
#snapshot_id ⇒ Object
Returns the value of attribute snapshot_id.
-
#url ⇒ Object
Returns the value of attribute url.
-
#virtual_machine_id ⇒ Object
Returns the value of attribute virtual_machine_id.
-
#volume_id ⇒ Object
Returns the value of attribute volume_id.
Instance Method Summary collapse
Instance Attribute Details
#bits ⇒ Object
Returns the value of attribute bits.
41 42 43 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 41 def bits @bits end |
#requires_hvm ⇒ Object
Returns the value of attribute requires_hvm.
41 42 43 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 41 def requires_hvm @requires_hvm end |
#snapshot_id ⇒ Object
Returns the value of attribute snapshot_id.
41 42 43 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 41 def snapshot_id @snapshot_id end |
#url ⇒ Object
Returns the value of attribute url.
41 42 43 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 41 def url @url end |
#virtual_machine_id ⇒ Object
Returns the value of attribute virtual_machine_id.
41 42 43 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 41 def virtual_machine_id @virtual_machine_id end |
#volume_id ⇒ Object
Returns the value of attribute volume_id.
41 42 43 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 41 def volume_id @volume_id end |
Instance Method Details
#destroy ⇒ Object
64 65 66 67 68 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 64 def destroy requires :id service.delete_template('id' => self.id) true end |
#save ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/fog/cloudstack/models/compute/image.rb', line 43 def save = { 'displaytext' => display_text, 'name' => name, 'ostypeid' => os_type_id, 'bits' => bits, 'details' => details, 'isfeatured' => is_featured, 'ispublic' => is_public, 'passwordenabled' => password_enabled, 'requireshvm' => requires_hvm, 'snapshotid' => snapshot_id, 'templatetag' => template_tag, 'url' => url, 'virtualmachineid' => virtual_machine_id, 'volumeid' => volume_id } data = service.create_template() merge_attributes(data['createtemplateresponse']) end |