Sha256: 773d39b81dadd3710c9bacb777585767c6d641d5970ca1f13efe5452903ca6d8
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
module ForemanApi module Resources class OperatingSystem < ForemanApi::Base def index(headers = {}) call(:get, "/api/operatingsystems", :headers => headers) end def show(id, headers = {}) call(:get, "/api/operatingsystems/#{id}", :headers => headers) end def create(params = {}, headers = {}) validate_params!(params, {"operatingsystem"=>["name", "major", "minor"]}) call(:post, "/api/operatingsystems", :payload => params, :headers => headers) end def update(id, params = {}, headers = {}) validate_params!(params, {"operatingsystem"=>["name", "major", "minor"]}) call(:put, "/api/operatingsystems/#{id}", :payload => params, :headers => headers) end def destroy(id, headers = {}) call(:delete, "/api/operatingsystems/#{id}", :headers => headers) end def bootfiles(id, params = {}, headers = {}) validate_params!(params, ["medium", "architecture"]) call(:get, "/api/operatingsystems/#{id}/bootfiles", :params => params, :headers => headers) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foreman_api-0.0.2 | lib/foreman_api/resources/operating_system.rb |