class Morpheus::LibraryOperatingSystemsInterface
Public Instance Methods
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 43 def create(payload) url = "#{@base_url}/api/library/operating-systems" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } opts = {method: :post, url: url, headers: headers, payload: payload.to_json} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 36 def create_image(payload) url = "#{@base_url}/api/library/operating-systems/os-types/create-image" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } opts = {method: :post, url: url, headers: headers, payload: payload.to_json} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 57 def destroy(id, payload={}) url = "#{@base_url}/api/library/operating-systems/#{id}" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } opts = {method: :delete, url: url, headers: headers, payload: payload.to_json} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 50 def destroy_image(id, payload={}) url = "#{@base_url}/api/library/operating-systems/os-types/images/#{id}" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } opts = {method: :delete, url: url, headers: headers, payload: payload.to_json} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 13 def get(id, params={}) raise "#{self.class}.get() passed a blank id!" if id.to_s == '' url = "#{@base_url}/api/library/operating-systems/os-types/#{id}" headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :get, url: url, headers: headers} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 28 def get_image(id, params={}) raise "#{self.class}.get() passed a blank id!" if id.to_s == '' url = "#{@base_url}/api/library/operating-systems/os-types/images/#{id}" headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :get, url: url, headers: headers} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 5 def list_os_types(params={}) url = "#{@base_url}/api/library/operating-systems/os-types" params['pageConfig'] = { sort:'owner,name', order:'desc,asc' } headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :get, url: url, headers: headers} execute(opts) end
Source
# File lib/morpheus/api/library_operating_systems_interface.rb, line 21 def update(id, payload) url = "#{@base_url}/api/library/operating-systems/#{id}" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } opts = {method: :put, url: url, headers: headers, payload: payload.to_json} execute(opts) end