Class: Fog::Compute::Gridscale::SnapshotSchedule
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Gridscale::SnapshotSchedule
- Defined in:
- lib/fog/compute/gridscale/models/snapshot_schedule.rb
Instance Method Summary collapse
Instance Method Details
#delete ⇒ Object
36 37 38 39 40 |
# File 'lib/fog/compute/gridscale/models/snapshot_schedule.rb', line 36 def delete requires :object_uuid response = service.ip_delete storage_uuid response.body end |
#destroy ⇒ Object
42 43 44 45 |
# File 'lib/fog/compute/gridscale/models/snapshot_schedule.rb', line 42 def destroy response = service.snapshot_schedule_delete(object_uuid) response.body end |
#save ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/compute/gridscale/models/snapshot_schedule.rb', line 21 def save raise Fog::Errors::Error.new('Re-saving an existing object may create a duplicate') if persisted? requires :storage_uuid , :name, :run_interval, :keep_snapshots = {} if attributes[:labels] [:labels] = labels end data = service.snapshot_schedule_create(storage_uuid, name, run_interval, keep_snapshots, ) merge_attributes(data.body) true end |