class Squall::DataStoreZone
OnApp DataStoreZone
Public Instance Methods
create(options = {})
click to toggle source
Public: Creates a new DataStoreZone
.
options - Params for the data store zone:
:label - Label for the data store zone
Returns a Hash.
# File lib/squall/data_store_zone.rb, line 39 def create(options = {}) request(:post, "/data_store_zones.json", query: { pack: options }) end
delete(id)
click to toggle source
Public: Deletes an existing DataStoreZone
.
id - ID of the data store zone
Returns an empty Hash.
# File lib/squall/data_store_zone.rb, line 48 def delete(id) request(:delete, "/data_store_zones/#{id}.json") end
edit(id, options = {})
click to toggle source
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.
# File lib/squall/data_store_zone.rb, line 29 def edit(id, options = {}) request(:put, "/data_store_zones/#{id}.json", query: { pack: options }) end
list()
click to toggle source
Public: List data store zones.
Returns an Array.
# File lib/squall/data_store_zone.rb, line 7 def list response = request(:get, "/data_store_zones.json") response.collect { |i| i['data_store_group'] } end
show(id)
click to toggle source
Public: Get the details for a data store zone.
id - ID of the data store zone
Returns a Hash.
# File lib/squall/data_store_zone.rb, line 17 def show(id) response = request(:get, "/data_store_zones/#{id}.json") response['data_store_group'] end