Sha256: 37bacbd20c22a595ff3212df77f4d07020fe16d8de05d404671fdbec6f574ca1
Contents?: true
Size: 1.35 KB
Versions: 2
Compression:
Stored size: 1.35 KB
Contents
module Squall # OnApp DataStoreZone class DataStoreZone < Base # Public: List data store zones. # # Returns an Array. def list response = request(:get, "/data_store_zones.json") response.collect { |i| i['data_store_group'] } end # Public: Get the details for a data store zone. # # id - ID of the data store zone # # Returns a Hash. def show(id) response = request(:get, "/data_store_zones/#{id}.json") response['data_store_group'] end # Public: Updates an existing data store zone. # # id - ID of the data store zone # options - Params for the data store zone: # :label - Label for the data store zone # # Returns an empty Hash. def edit(id, options = {}) request(:put, "/data_store_zones/#{id}.json", query: { pack: options }) end # Public: Creates a new DataStoreZone. # # options - Params for the data store zone: # :label - Label for the data store zone # # Returns a Hash. def create(options = {}) request(:post, "/data_store_zones.json", query: { pack: options }) end # Public: Deletes an existing DataStoreZone. # # id - ID of the data store zone # # Returns an empty Hash. def delete(id) request(:delete, "/data_store_zones/#{id}.json") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
squall-1.4.0 | lib/squall/data_store_zone.rb |
squall-1.3.1 | lib/squall/data_store_zone.rb |