Sha256: 3b8d60b78892a1cb3e9aafe09441b8e2a560c768a7ef47e86bb17ed7f12f036b
Contents?: true
Size: 813 Bytes
Versions: 15
Compression:
Stored size: 813 Bytes
Contents
class Ey::Core::Client::Slots < Ey::Core::Collection model Ey::Core::Client::Slot self.model_root = "slot" self.model_request = :get_slot self.collection_root = "slots" self.collection_request = :get_slots def create!(options={}) response = connection.create_slots( "url" => self.url, "cluster" => options[:cluster_id] || (options[:cluster] && options[:cluster].identity), "slots" => { "names" => options[:names], "quantity" => options[:quantity], "flavor" => options[:flavor], "image" => options[:image], }.reject {|key,val| val.nil? } ) connection.slots.load(response.body["slots"]) end def create(options={}) create!(options) self rescue Ey::Core::Response::Error false end end
Version data entries
15 entries across 15 versions & 1 rubygems