Sha256: 0842cd6a1451795424a3e31185bd43c55155b219d7affd09fa33cb763c220c6b
Contents?: true
Size: 1.44 KB
Versions: 4
Compression:
Stored size: 1.44 KB
Contents
module Squall # OnApp DataStoreZone class DataStoreZone < Base # Returns a list of data store zones def list response = request(:get, "/data_store_zones.json") response.collect { |i| i['data_store_group'] } end # Get the details for a data store zone # # ==== Params # # * +id+ - ID of the data store zone def show(id) response = request(:get, "/data_store_zones/#{id}.json") response['data_store_group'] end # Updates an existing data store zone # # ==== Params # # * +id+ - ID of the data store zone # * +options+ - Params for the data store zone # # ==== Options # # * +label*+ - Label for the data store zone def edit(id, options = {}) params.required(:label).validate!(options) response = request(:put, "/data_store_zones/#{id}.json", :query => {:pack => options}) end # Creates a new DataStoreZone # # ==== Params # # * +options+ - Params for the data store zone # # ==== Options # # * +label*+ - Label for the data store zone def create(options = {}) params.required(:label).validate!(options) response = request(:post, "/data_store_zones.json", :query => {:pack => options}) end # Deletes an existing DataStoreZone # # ==== Params # # * +id+ - ID of the data store zone def delete(id) request(:delete, "/data_store_zones/#{id}.json") end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
squall-1.3.0 | lib/squall/data_store_zone.rb |
squall-1.2.1beta1 | lib/squall/data_store_zone.rb |
squall-1.2.0beta1 | lib/squall/data_store_zone.rb |
squall-1.1.0 | lib/squall/data_store_zone.rb |