Class: Fog::Compute::Ovirt::Template
- Defined in:
- lib/fog/ovirt/models/compute/template.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy(options = {}) ⇒ Object
25 26 27 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 25 def destroy( = {}) connection.client.destroy_template(id) end |
#ready? ⇒ Boolean
21 22 23 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 21 def ready? !(status =~ /down/i) end |
#save ⇒ Object
29 30 31 32 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 29 def save raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity connection.client.create_template(attributes) end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/fog/ovirt/models/compute/template.rb', line 34 def to_s name end |