Class: VSphereAutomation::Appliance::TechpreviewMonitoringSnmpApi

Inherits:
Object
  • Object
show all
Defined in:
lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TechpreviewMonitoringSnmpApi

Returns a new instance of TechpreviewMonitoringSnmpApi.



16
17
18
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 16

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#disable(opts = {}) ⇒ |VapiStdErrorsErrorError|nil

Stop an enabled SNMP agent.

Parameters:

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

    the optional parameters

Returns:



22
23
24
25
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 22

def disable(opts = {})
  disable_with_http_info(opts)
  nil
end

#disable_with_http_info(opts = {}) ⇒ Array<(|VapiStdErrorsErrorError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Stop an enabled SNMP agent.

Parameters:

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

    the optional parameters

Returns:



31
32
33
34
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
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 31

def disable_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.disable ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/disable'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, 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: TechpreviewMonitoringSnmpApi#disable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#enable(opts = {}) ⇒ |VapiStdErrorsErrorError|nil

Start a disabled SNMP agent.

Parameters:

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

    the optional parameters

Returns:



66
67
68
69
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 66

def enable(opts = {})
  enable_with_http_info(opts)
  nil
end

#enable_with_http_info(opts = {}) ⇒ Array<(|VapiStdErrorsErrorError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Start a disabled SNMP agent.

Parameters:

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

    the optional parameters

Returns:



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 75

def enable_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.enable ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/enable'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, 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: TechpreviewMonitoringSnmpApi#enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(opts = {}) ⇒ ApplianceTechpreviewMonitoringSnmpResult|VapiStdErrorsErrorError|

Return an SNMP agent configuration.

Parameters:

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

    the optional parameters

Returns:



110
111
112
113
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 110

def get(opts = {})
  data, _status_code, _headers = get_with_http_info(opts)
  data
end

#get_with_http_info(opts = {}) ⇒ Array<(ApplianceTechpreviewMonitoringSnmpResult|VapiStdErrorsErrorError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return an SNMP agent configuration.

Parameters:

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

    the optional parameters

Returns:



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
146
147
148
149
150
151
152
153
154
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 119

def get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.get ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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,
	:return_type => {
	  '200' => 'Appliance::ApplianceTechpreviewMonitoringSnmpResult',
	  '400' => 'Appliance::VapiStdErrorsErrorError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TechpreviewMonitoringSnmpApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#hash(request_body, opts = {}) ⇒ ApplianceTechpreviewMonitoringSnmpHashResult|VapiStdErrorsErrorError|

Generate localized keys for secure SNMPv3 communications.

Parameters:

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

    the optional parameters

Returns:



159
160
161
162
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 159

def hash(request_body, opts = {})
  data, _status_code, _headers = hash_with_http_info(request_body, opts)
  data
end

#hash_with_http_info(request_body, opts = {}) ⇒ Array<(ApplianceTechpreviewMonitoringSnmpHashResult|VapiStdErrorsErrorError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generate localized keys for secure SNMPv3 communications.

Parameters:

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

    the optional parameters

Returns:



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
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 169

def hash_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.hash ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TechpreviewMonitoringSnmpApi.hash"
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/hash'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
	:return_type => {
	  '200' => 'Appliance::ApplianceTechpreviewMonitoringSnmpHashResult',
	  '400' => 'Appliance::VapiStdErrorsErrorError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TechpreviewMonitoringSnmpApi#hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#limits(opts = {}) ⇒ ApplianceTechpreviewMonitoringSnmpLimitsResult|VapiStdErrorsErrorError|

Get SNMP limits information.

Parameters:

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

    the optional parameters

Returns:



214
215
216
217
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 214

def limits(opts = {})
  data, _status_code, _headers = limits_with_http_info(opts)
  data
end

#limits_with_http_info(opts = {}) ⇒ Array<(ApplianceTechpreviewMonitoringSnmpLimitsResult|VapiStdErrorsErrorError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Get SNMP limits information.

Parameters:

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

    the optional parameters

Returns:



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 223

def limits_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.limits ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/limits'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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,
	:return_type => {
	  '200' => 'Appliance::ApplianceTechpreviewMonitoringSnmpLimitsResult',
	  '400' => 'Appliance::VapiStdErrorsErrorError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TechpreviewMonitoringSnmpApi#limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reset(opts = {}) ⇒ |VapiStdErrorsErrorError|nil

Restore settings to factory defaults.

Parameters:

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

    the optional parameters

Returns:



262
263
264
265
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 262

def reset(opts = {})
  reset_with_http_info(opts)
  nil
end

#reset_with_http_info(opts = {}) ⇒ Array<(|VapiStdErrorsErrorError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Restore settings to factory defaults.

Parameters:

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

    the optional parameters

Returns:



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 271

def reset_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.reset ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/reset'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, 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: TechpreviewMonitoringSnmpApi#reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set(request_body, opts = {}) ⇒ |VapiStdErrorsErrorError|nil

Set SNMP configuration.

Parameters:

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

    the optional parameters

Returns:



307
308
309
310
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 307

def set(request_body, opts = {})
  set_with_http_info(request_body, opts)
  nil
end

#set_with_http_info(request_body, opts = {}) ⇒ Array<(|VapiStdErrorsErrorError|nil, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Set SNMP configuration.

Parameters:

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

    the optional parameters

Returns:



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 317

def set_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.set ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling TechpreviewMonitoringSnmpApi.set"
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_body)
  auth_names = ['api_key']
  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: TechpreviewMonitoringSnmpApi#set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#stats(opts = {}) ⇒ ApplianceTechpreviewMonitoringSnmpStatsResult|VapiStdErrorsErrorError|

Generate diagnostics report for snmp agent.

Parameters:

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

    the optional parameters

Returns:



358
359
360
361
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 358

def stats(opts = {})
  data, _status_code, _headers = stats_with_http_info(opts)
  data
end

#stats_with_http_info(opts = {}) ⇒ Array<(ApplianceTechpreviewMonitoringSnmpStatsResult|VapiStdErrorsErrorError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generate diagnostics report for snmp agent.

Parameters:

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

    the optional parameters

Returns:



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 367

def stats_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.stats ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/stats'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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,
	:return_type => {
	  '200' => 'Appliance::ApplianceTechpreviewMonitoringSnmpStatsResult',
	  '400' => 'Appliance::VapiStdErrorsErrorError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TechpreviewMonitoringSnmpApi#stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#test(opts = {}) ⇒ ApplianceTechpreviewMonitoringSnmpTestResult|VapiStdErrorsErrorError|

Send a warmStart notification to all configured traps and inform destinations (see RFC 3418).

Parameters:

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

    the optional parameters

Returns:



406
407
408
409
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 406

def test(opts = {})
  data, _status_code, _headers = test_with_http_info(opts)
  data
end

#test_with_http_info(opts = {}) ⇒ Array<(ApplianceTechpreviewMonitoringSnmpTestResult|VapiStdErrorsErrorError|, Fixnum, Hash)>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Send a warmStart notification to all configured traps and inform destinations (see RFC 3418).

Parameters:

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

    the optional parameters

Returns:



415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/vsphere-automation-appliance/api/techpreview_monitoring_snmp_api.rb', line 415

def test_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TechpreviewMonitoringSnmpApi.test ...'
  end
  # resource path
  local_var_path = '/appliance/techpreview/monitoring/snmp/test'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
	:return_type => {
	  '200' => 'Appliance::ApplianceTechpreviewMonitoringSnmpTestResult',
	  '400' => 'Appliance::VapiStdErrorsErrorError',
	})
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TechpreviewMonitoringSnmpApi#test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end