Class: SwaggerClient::SystemApi
- Inherits:
-
Object
- Object
- SwaggerClient::SystemApi
- Defined in:
- lib/puppet_x/modules/system_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(url) ⇒ SystemApi
constructor
A new instance of SystemApi.
-
#system_get(authorization, opts = {}) ⇒ nil
FETCH Information of System.
-
#system_get_with_http_info(authorization, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of System.
-
#system_put(authorization, system, opts = {}) ⇒ nil
EDIT Information of System.
-
#system_put_with_http_info(authorization, system, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
EDIT Information of System.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/puppet_x/modules/system_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#system_get(authorization, opts = {}) ⇒ nil
FETCH Information of System
28 29 30 |
# File 'lib/puppet_x/modules/system_api.rb', line 28 def system_get(, opts = {}) system_get_with_http_info(, opts) end |
#system_get_with_http_info(authorization, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
FETCH Information of System
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/puppet_x/modules/system_api.rb', line 38 def system_get_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SystemApi.system_get ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling SystemApi.system_get" end # resource path local_var_path = '/system?groups=System' # query parameters query_params = {} query_params[:fields] = @api_client.build_collection_param(opts[:fields], :multi) unless opts[:fields].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SystemApi#system_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#system_put(authorization, system, opts = {}) ⇒ nil
EDIT Information of System
83 84 85 |
# File 'lib/puppet_x/modules/system_api.rb', line 83 def system_put(, system, opts = {}) system_put_with_http_info(, system, opts) end |
#system_put_with_http_info(authorization, system, _opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
EDIT Information of System
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/puppet_x/modules/system_api.rb', line 93 def system_put_with_http_info(, system, _opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SystemApi.system_put ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? raise ArgumentError, "Missing the required parameter 'authorization' when calling SystemApi.system_put" end # verify the required parameter 'system' is set if @api_client.config.client_side_validation && system.nil? raise ArgumentError, "Missing the required parameter 'system' when calling SystemApi.system_put" end # resource path local_var_path = '/system' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:Authorization] = # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(system) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SystemApi#system_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |