Class: Fog::Compute::Ovirt::Template
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Ovirt::Template
- Defined in:
- lib/fog/ovirt/models/compute/template.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
- #destroy(options = {}) ⇒ Object
- #interfaces ⇒ Object
- #ready? ⇒ Boolean
- #save ⇒ Object
- #to_s ⇒ Object
- #volumes ⇒ Object
Instance Attribute Details
#raw ⇒ Object
Returns the value of attribute raw.
7 8 9 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 7 def raw @raw end |
Instance Method Details
#destroy(options = {}) ⇒ Object
42 43 44 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 42 def destroy( = {}) service.client.destroy_template(id) end |
#interfaces ⇒ Object
24 25 26 27 28 29 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 24 def interfaces attributes[:interfaces] ||= id.nil? ? [] : Fog::Compute::Ovirt::Interfaces.new( :service => service, :vm => self ) end |
#ready? ⇒ Boolean
38 39 40 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 38 def ready? !(status =~ /down/i) end |
#save ⇒ Object
46 47 48 49 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 46 def save raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted? service.client.create_template(attributes) end |
#to_s ⇒ Object
51 52 53 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 51 def to_s name end |