Sha256: 7f343fd17719c2b6c941b1c9823ef13ecb742b63fc0c247c194a0a4c8f3e8aaa
Contents?: true
Size: 850 Bytes
Versions: 1
Compression:
Stored size: 850 Bytes
Contents
module Smartdc::Api module Machine class Snapshots attr_reader :request def initialize(id, options) @id = id @request = Smartdc::Request.new(options) end def create(raw={}) request.post('my/machines/' + @id.to_s + '/snapshots/', raw) end def read(id) raise ArgumentError unless id request.get('my/machines/' + @id.to_s + '/snapshots/' + id.to_s) end def all(query={}) request.get('my/machines/' + @id.to_s + '/snapshots', query) end def destroy(id) raise ArgumentError unless id request.del('my/machines/' + @id.to_s + '/snapshots/' + id.to_s) end def start(id) raise ArgumentError unless id request.post('my/machines/' + @id.to_s + '/snapshots/' + id.to_s) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
smartdc-1.3.0 | lib/smartdc/api/machine/snapshots.rb |