Class: Fog::Compute::Joyent::Snapshot
- Defined in:
- lib/fog/joyent/models/compute/snapshot.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #symbolize_keys, #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 ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/fog/joyent/models/compute/snapshot.rb', line 28 def destroy requires :name requires :machine_id self.connection.delete_machine_snapshot(self.machine_id, self.name) true end |
#machine ⇒ Object
36 37 38 39 40 |
# File 'lib/fog/joyent/models/compute/snapshot.rb', line 36 def machine requires :machine_id self.connection.servers.get(self.machine_id) end |
#reload ⇒ Object
13 14 15 16 17 18 |
# File 'lib/fog/joyent/models/compute/snapshot.rb', line 13 def reload requires :name requires :machine_id self.connection.snapshots.get(self.machine_id, self.name) end |
#start ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/fog/joyent/models/compute/snapshot.rb', line 20 def start requires :name requires :machine_id self.connection.start_machine_from_snapshot(self.machine_id, self.name) true end |