# File lib/fog/joyent/models/compute/snapshots.rb, line 16 def all(machine_id) data = service.list_machine_snapshots(machine_id).body.map do |m| m["machine_id"] = machine_id m end load(data) end
# File lib/fog/joyent/models/compute/snapshots.rb, line 10 def create(machine_id, snapshot_name) data = self.service.create_machine_snapshot(machine_id, snapshot_name).body data['machine_id'] = machine_id new(data) end
# File lib/fog/joyent/models/compute/snapshots.rb, line 24 def get(machine_id, snapshot_name) data = service.get_machine_snapshot(machine_id, snapshot_name).body if data data["machine_id"] = machine_id new(data) else nil end end