Class: Nodeum::SystemsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/nodeum_sdk/api/systems_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SystemsApi

Returns a new instance of SystemsApi.



19
20
21
# File 'lib/nodeum_sdk/api/systems_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/nodeum_sdk/api/systems_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#download_reset_vars(reset_form, opts = {}) ⇒ File

Creates a YAML file with selected tables and downloads it

Parameters:

  • reset_form (Reset)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


26
27
28
29
# File 'lib/nodeum_sdk/api/systems_api.rb', line 26

def download_reset_vars(reset_form, opts = {})
  data, _status_code, _headers = download_reset_vars_with_http_info(reset_form, opts)
  data
end

#download_reset_vars_with_http_info(reset_form, opts = {}) ⇒ Array<(File, Integer, Hash)>

Creates a YAML file with selected tables and downloads it

Parameters:

  • reset_form (Reset)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



35
36
37
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
76
77
78
79
80
81
82
# File 'lib/nodeum_sdk/api/systems_api.rb', line 35

def download_reset_vars_with_http_info(reset_form, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SystemsApi.download_reset_vars ...'
  end
  # verify the required parameter 'reset_form' is set
  if @api_client.config.client_side_validation && reset_form.nil?
    fail ArgumentError, "Missing the required parameter 'reset_form' when calling SystemsApi.download_reset_vars"
  end
  # resource path
  local_var_path = '/systems/reset/generate_vars'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/x-yaml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(reset_form) 

  # return_type
  return_type = opts[:return_type] || 'File' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SystemsApi#download_reset_vars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#result_download_traces(job_id, opts = {}) ⇒ File

Check result of a download traces job. **API Key Scope**: systems / download_traces

Parameters:

  • job_id (String)

    ID of active job

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


89
90
91
92
# File 'lib/nodeum_sdk/api/systems_api.rb', line 89

def result_download_traces(job_id, opts = {})
  data, _status_code, _headers = result_download_traces_with_http_info(job_id, opts)
  data
end

#result_download_traces_with_http_info(job_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Check result of a download traces job. **API Key Scope**: systems / download_traces

Parameters:

  • job_id (String)

    ID of active job

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



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
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/nodeum_sdk/api/systems_api.rb', line 99

def result_download_traces_with_http_info(job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SystemsApi.result_download_traces ...'
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling SystemsApi.result_download_traces"
  end
  # resource path
  local_var_path = '/systems/download_traces'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'job_id'] = job_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/tar+gzip', 'queued', 'working', 'failed', ])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'File' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SystemsApi#result_download_traces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#trigger_download_traces(type, opts = {}) ⇒ ActiveJobStatus

Trigger a download traces request. **API Key Scope**: systems / download_traces

Parameters:

  • type (String)

    Type of traces to download

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



152
153
154
155
# File 'lib/nodeum_sdk/api/systems_api.rb', line 152

def trigger_download_traces(type, opts = {})
  data, _status_code, _headers = trigger_download_traces_with_http_info(type, opts)
  data
end

#trigger_download_traces_with_http_info(type, opts = {}) ⇒ Array<(ActiveJobStatus, Integer, Hash)>

Trigger a download traces request. **API Key Scope**: systems / download_traces

Parameters:

  • type (String)

    Type of traces to download

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ActiveJobStatus, Integer, Hash)>)

    ActiveJobStatus data, response status code and response headers



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/nodeum_sdk/api/systems_api.rb', line 162

def trigger_download_traces_with_http_info(type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SystemsApi.trigger_download_traces ...'
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling SystemsApi.trigger_download_traces"
  end
  # verify enum value
  allowable_values = ["interface", "core", "data_mining", "fuse", "library_manager", "manager", "watchdog", "system", "all"]
  if @api_client.config.client_side_validation && !allowable_values.include?(type)
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/systems/download_traces'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = type

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'queued', 'working', 'failed'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'ActiveJobStatus' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SystemsApi#trigger_download_traces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end