Sha256: b4899bb11a34d05eca696746e94030ea64e9ab9c5650c61c0f2a4dfbb1413082
Contents?: true
Size: 975 Bytes
Versions: 3
Compression:
Stored size: 975 Bytes
Contents
module DcmgrResource class Instance < Base def self.list(params = {}) self.find(:all,:params => params) end def self.show(instance_id) self.get(instance_id) end def self.create(params) instance = self.new instance.image_id = params[:image_id] instance.instance_spec_id = params[:instance_spec_id] instance.host_pool_id = params[:host_pool_id] instance.host_name = params[:host_name] instance.user_data = params[:user_data] instance.nf_group = params[:nf_group] instance.ssh_key = params[:ssh_key] instance.save instance end def self.destroy(instance_id) self.delete(instance_id).body end def self.reboot(instance_id) @collection ||= self.collection_name self.collection_name = File.join(@collection,instance_id) result = self.put(:reboot) self.collection_name = @collection result.body end end end
Version data entries
3 entries across 3 versions & 1 rubygems