Class: NutanixClustermgmt::ClustersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/nutanix_clustermgmt/api/clusters_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ClustersApi

Returns a new instance of ClustersApi.



19
20
21
# File 'lib/nutanix_clustermgmt/api/clusters_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/nutanix_clustermgmt/api/clusters_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_snmp_transport(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {}) ⇒ AddSnmpTransport202Response

Add SNMP transport ports and protocol details Adds transport ports and protocol details to the SNMP configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_transport (ClustermgmtV40ConfigSnmpTransport)

    SNMP transports to add.

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 28

def add_snmp_transport(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {})
  data, _status_code, _headers = add_snmp_transport_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts)
  data
end

#add_snmp_transport_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {}) ⇒ Array<(AddSnmpTransport202Response, Integer, Hash)>

Add SNMP transport ports and protocol details Adds transport ports and protocol details to the SNMP configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_transport (ClustermgmtV40ConfigSnmpTransport)

    SNMP transports to add.

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

    the optional parameters

Returns:

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

    AddSnmpTransport202Response data, response status code and response headers



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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 39

def add_snmp_transport_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.add_snmp_transport ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.add_snmp_transport"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.add_snmp_transport, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_snmp_transport' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_transport.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_transport' when calling ClustersApi.add_snmp_transport"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/$actions/add-transports'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'AddSnmpTransport202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.add_snmp_transport",
    :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: ClustersApi#add_snmp_transport\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#associate_categories_to_cluster(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {}) ⇒ AssociateCategoriesToCluster202Response

Associate categories to the cluster Attach categories to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_category_entity_references (ClustermgmtV40ConfigCategoryEntityReferences)

    The specifications required for updating categories to the entity.

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

    the optional parameters

Returns:



107
108
109
110
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 107

def associate_categories_to_cluster(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {})
  data, _status_code, _headers = associate_categories_to_cluster_with_http_info(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts)
  data
end

#associate_categories_to_cluster_with_http_info(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {}) ⇒ Array<(AssociateCategoriesToCluster202Response, Integer, Hash)>

Associate categories to the cluster Attach categories to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_category_entity_references (ClustermgmtV40ConfigCategoryEntityReferences)

    The specifications required for updating categories to the entity.

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

    the optional parameters

Returns:



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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 118

def associate_categories_to_cluster_with_http_info(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.associate_categories_to_cluster ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.associate_categories_to_cluster"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.associate_categories_to_cluster, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_category_entity_references' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_category_entity_references.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_category_entity_references' when calling ClustersApi.associate_categories_to_cluster"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/associate-categories'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'AssociateCategoriesToCluster202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.associate_categories_to_cluster",
    :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: ClustersApi#associate_categories_to_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#check_hypervisor_requirements(cluster_ext_id, clustermgmt_v40_config_hypervisor_upload_param, opts = {}) ⇒ CheckHypervisorRequirements202Response

Get hypervisor ISO upload information Provides information on whether hypervisor ISO upload is required or not. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_hypervisor_upload_param (ClustermgmtV40ConfigHypervisorUploadParam)

    Parameters to get information on whether hypervisor ISO upload is required or not.

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

    the optional parameters

Returns:



186
187
188
189
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 186

def check_hypervisor_requirements(cluster_ext_id, clustermgmt_v40_config_hypervisor_upload_param, opts = {})
  data, _status_code, _headers = check_hypervisor_requirements_with_http_info(cluster_ext_id, clustermgmt_v40_config_hypervisor_upload_param, opts)
  data
end

#check_hypervisor_requirements_with_http_info(cluster_ext_id, clustermgmt_v40_config_hypervisor_upload_param, opts = {}) ⇒ Array<(CheckHypervisorRequirements202Response, Integer, Hash)>

Get hypervisor ISO upload information Provides information on whether hypervisor ISO upload is required or not. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_hypervisor_upload_param (ClustermgmtV40ConfigHypervisorUploadParam)

    Parameters to get information on whether hypervisor ISO upload is required or not.

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

    the optional parameters

Returns:



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
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
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 197

def check_hypervisor_requirements_with_http_info(cluster_ext_id, clustermgmt_v40_config_hypervisor_upload_param, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.check_hypervisor_requirements ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.check_hypervisor_requirements"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.check_hypervisor_requirements, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_hypervisor_upload_param' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_hypervisor_upload_param.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_hypervisor_upload_param' when calling ClustersApi.check_hypervisor_requirements"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/check-hypervisor-requirements'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CheckHypervisorRequirements202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.check_hypervisor_requirements",
    :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: ClustersApi#check_hypervisor_requirements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_cluster(ntnx_request_id, clustermgmt_v40_config_cluster, opts = {}) ⇒ CreateCluster202Response

Create a cluster Cluster create operation.

Parameters:

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_config_cluster (ClustermgmtV40ConfigCluster)

    The required parameters for cluster create workflow.

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

    the optional parameters

Options Hash (opts):

  • :dryrun (Boolean)

    A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true.

Returns:



266
267
268
269
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 266

def create_cluster(ntnx_request_id, clustermgmt_v40_config_cluster, opts = {})
  data, _status_code, _headers = create_cluster_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster, opts)
  data
end

#create_cluster_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster, opts = {}) ⇒ Array<(CreateCluster202Response, Integer, Hash)>

Create a cluster Cluster create operation.

Parameters:

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_config_cluster (ClustermgmtV40ConfigCluster)

    The required parameters for cluster create workflow.

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

    the optional parameters

Options Hash (opts):

  • :dryrun (Boolean)

    A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true.

Returns:

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

    CreateCluster202Response data, response status code and response headers



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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 278

def create_cluster_with_http_info(ntnx_request_id, clustermgmt_v40_config_cluster, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.create_cluster ...'
  end
  # verify the required parameter 'ntnx_request_id' is set
  if @api_client.config.client_side_validation && ntnx_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClustersApi.create_cluster"
  end
  # verify the required parameter 'clustermgmt_v40_config_cluster' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_cluster.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_cluster' when calling ClustersApi.create_cluster"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$dryrun'] = opts[:'dryrun'] if !opts[:'dryrun'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'NTNX-Request-Id'] = ntnx_request_id

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CreateCluster202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.create_cluster",
    :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: ClustersApi#create_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rsyslog_server(cluster_ext_id, clustermgmt_v40_config_rsyslog_server, opts = {}) ⇒ CreateRsyslogServer202Response

Add RSYSLOG server configuration Adds RSYSLOG server configuration to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_rsyslog_server (ClustermgmtV40ConfigRsyslogServer)

    RSYSLOG server to add.

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

    the optional parameters

Returns:



343
344
345
346
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 343

def create_rsyslog_server(cluster_ext_id, clustermgmt_v40_config_rsyslog_server, opts = {})
  data, _status_code, _headers = create_rsyslog_server_with_http_info(cluster_ext_id, clustermgmt_v40_config_rsyslog_server, opts)
  data
end

#create_rsyslog_server_with_http_info(cluster_ext_id, clustermgmt_v40_config_rsyslog_server, opts = {}) ⇒ Array<(CreateRsyslogServer202Response, Integer, Hash)>

Add RSYSLOG server configuration Adds RSYSLOG server configuration to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_rsyslog_server (ClustermgmtV40ConfigRsyslogServer)

    RSYSLOG server to add.

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

    the optional parameters

Returns:



354
355
356
357
358
359
360
361
362
363
364
365
366
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
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 354

def create_rsyslog_server_with_http_info(cluster_ext_id, clustermgmt_v40_config_rsyslog_server, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.create_rsyslog_server ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.create_rsyslog_server"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.create_rsyslog_server, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_rsyslog_server' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_rsyslog_server.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_rsyslog_server' when calling ClustersApi.create_rsyslog_server"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rsyslog-servers'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CreateRsyslogServer202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.create_rsyslog_server",
    :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: ClustersApi#create_rsyslog_server\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_snmp_trap(cluster_ext_id, clustermgmt_v40_config_snmp_trap, opts = {}) ⇒ CreateSnmpTrap202Response

Add SNMP trap Add SNMP trap configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_trap (ClustermgmtV40ConfigSnmpTrap)

    SNMP trap to add.

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

    the optional parameters

Returns:



422
423
424
425
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 422

def create_snmp_trap(cluster_ext_id, clustermgmt_v40_config_snmp_trap, opts = {})
  data, _status_code, _headers = create_snmp_trap_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_trap, opts)
  data
end

#create_snmp_trap_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_trap, opts = {}) ⇒ Array<(CreateSnmpTrap202Response, Integer, Hash)>

Add SNMP trap Add SNMP trap configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_trap (ClustermgmtV40ConfigSnmpTrap)

    SNMP trap to add.

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

    the optional parameters

Returns:

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

    CreateSnmpTrap202Response data, response status code and response headers



433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 433

def create_snmp_trap_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_trap, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.create_snmp_trap ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.create_snmp_trap"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.create_snmp_trap, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_snmp_trap' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_trap.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_trap' when calling ClustersApi.create_snmp_trap"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/traps'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CreateSnmpTrap202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.create_snmp_trap",
    :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: ClustersApi#create_snmp_trap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_snmp_user(cluster_ext_id, clustermgmt_v40_config_snmp_user, opts = {}) ⇒ CreateSnmpUser202Response

Add SNMP user Adds SNMP user configuration to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_user (ClustermgmtV40ConfigSnmpUser)

    SNMP user to add.

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

    the optional parameters

Returns:



501
502
503
504
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 501

def create_snmp_user(cluster_ext_id, clustermgmt_v40_config_snmp_user, opts = {})
  data, _status_code, _headers = create_snmp_user_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_user, opts)
  data
end

#create_snmp_user_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_user, opts = {}) ⇒ Array<(CreateSnmpUser202Response, Integer, Hash)>

Add SNMP user Adds SNMP user configuration to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_user (ClustermgmtV40ConfigSnmpUser)

    SNMP user to add.

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

    the optional parameters

Returns:

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

    CreateSnmpUser202Response data, response status code and response headers



512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 512

def create_snmp_user_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.create_snmp_user ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.create_snmp_user"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.create_snmp_user, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_snmp_user' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_user.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_user' when calling ClustersApi.create_snmp_user"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/users'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'CreateSnmpUser202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.create_snmp_user",
    :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: ClustersApi#create_snmp_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_cluster_by_id(ext_id, ntnx_request_id, opts = {}) ⇒ DeleteClusterById202Response

Delete a cluster Deletes the cluster identified by extId.

Parameters:

  • ext_id (String)

    Cluster UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

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

    the optional parameters

Options Hash (opts):

  • :dryrun (Boolean)

    A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true.

Returns:



581
582
583
584
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 581

def delete_cluster_by_id(ext_id, ntnx_request_id, opts = {})
  data, _status_code, _headers = delete_cluster_by_id_with_http_info(ext_id, ntnx_request_id, opts)
  data
end

#delete_cluster_by_id_with_http_info(ext_id, ntnx_request_id, opts = {}) ⇒ Array<(DeleteClusterById202Response, Integer, Hash)>

Delete a cluster Deletes the cluster identified by extId.

Parameters:

  • ext_id (String)

    Cluster UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

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

    the optional parameters

Options Hash (opts):

  • :dryrun (Boolean)

    A URL query parameter that allows long running operations to execute in a dry-run mode providing ability to identify trouble spots and system failures without performing the actual operation. Additionally this mode also offers a summary snapshot of the resultant system in order to better understand how things fit together. The operation runs in dry-run mode only if the provided value is true.

Returns:



593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 593

def delete_cluster_by_id_with_http_info(ext_id, ntnx_request_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.delete_cluster_by_id ...'
  end
  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.delete_cluster_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.delete_cluster_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ntnx_request_id' is set
  if @api_client.config.client_side_validation && ntnx_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClustersApi.delete_cluster_by_id"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$dryrun'] = opts[:'dryrun'] if !opts[:'dryrun'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  header_params[:'NTNX-Request-Id'] = ntnx_request_id

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteClusterById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.delete_cluster_by_id",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClustersApi#delete_cluster_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_rsyslog_server_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ DeleteRsyslogServerById202Response

Delete RSYSLOG server configuration Deletes RSYSLOG server configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    RSYSLOG server UUID.

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

    the optional parameters

Returns:



658
659
660
661
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 658

def delete_rsyslog_server_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = delete_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#delete_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(DeleteRsyslogServerById202Response, Integer, Hash)>

Delete RSYSLOG server configuration Deletes RSYSLOG server configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    RSYSLOG server UUID.

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

    the optional parameters

Returns:



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 669

def delete_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.delete_rsyslog_server_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.delete_rsyslog_server_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.delete_rsyslog_server_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.delete_rsyslog_server_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.delete_rsyslog_server_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rsyslog-servers/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteRsyslogServerById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.delete_rsyslog_server_by_id",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClustersApi#delete_rsyslog_server_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_snmp_trap_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ DeleteSnmpTrapById202Response

Delete SNMP trap Deletes SNMP trap configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP trap UUID.

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

    the optional parameters

Returns:



737
738
739
740
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 737

def delete_snmp_trap_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = delete_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#delete_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(DeleteSnmpTrapById202Response, Integer, Hash)>

Delete SNMP trap Deletes SNMP trap configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP trap UUID.

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

    the optional parameters

Returns:



748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 748

def delete_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.delete_snmp_trap_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.delete_snmp_trap_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.delete_snmp_trap_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.delete_snmp_trap_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.delete_snmp_trap_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/traps/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteSnmpTrapById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.delete_snmp_trap_by_id",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClustersApi#delete_snmp_trap_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_snmp_user_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ DeleteSnmpUserById202Response

Delete SNMP user Deletes SNMP user configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP user UUID.

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

    the optional parameters

Returns:



816
817
818
819
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 816

def delete_snmp_user_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = delete_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#delete_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(DeleteSnmpUserById202Response, Integer, Hash)>

Delete SNMP user Deletes SNMP user configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP user UUID.

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

    the optional parameters

Returns:



827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 827

def delete_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.delete_snmp_user_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.delete_snmp_user_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.delete_snmp_user_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.delete_snmp_user_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.delete_snmp_user_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/users/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteSnmpUserById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.delete_snmp_user_by_id",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClustersApi#delete_snmp_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#disassociate_categories_from_cluster(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {}) ⇒ DisassociateCategoriesFromCluster202Response

Disassociate categories from the cluster Detach categories from the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_category_entity_references (ClustermgmtV40ConfigCategoryEntityReferences)

    The specifications required for updating categories to the entity.

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

    the optional parameters

Returns:



895
896
897
898
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 895

def disassociate_categories_from_cluster(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {})
  data, _status_code, _headers = disassociate_categories_from_cluster_with_http_info(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts)
  data
end

#disassociate_categories_from_cluster_with_http_info(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {}) ⇒ Array<(DisassociateCategoriesFromCluster202Response, Integer, Hash)>

Disassociate categories from the cluster Detach categories from the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_category_entity_references (ClustermgmtV40ConfigCategoryEntityReferences)

    The specifications required for updating categories to the entity.

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

    the optional parameters

Returns:



906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 906

def disassociate_categories_from_cluster_with_http_info(cluster_ext_id, clustermgmt_v40_config_category_entity_references, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.disassociate_categories_from_cluster ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.disassociate_categories_from_cluster"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.disassociate_categories_from_cluster, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_category_entity_references' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_category_entity_references.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_category_entity_references' when calling ClustersApi.disassociate_categories_from_cluster"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/disassociate-categories'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'DisassociateCategoriesFromCluster202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.disassociate_categories_from_cluster",
    :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: ClustersApi#disassociate_categories_from_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#discover_unconfigured_nodes(cluster_ext_id, clustermgmt_v40_config_node_discovery_params, opts = {}) ⇒ DiscoverUnconfiguredNodes202Response

Discover unconfigured nodes Get the unconfigured node details such as node UUID, node position, node IP, foundation version and more.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_node_discovery_params (ClustermgmtV40ConfigNodeDiscoveryParams)

    Discover unconfigured node details.

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

    the optional parameters

Returns:



974
975
976
977
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 974

def discover_unconfigured_nodes(cluster_ext_id, clustermgmt_v40_config_node_discovery_params, opts = {})
  data, _status_code, _headers = discover_unconfigured_nodes_with_http_info(cluster_ext_id, clustermgmt_v40_config_node_discovery_params, opts)
  data
end

#discover_unconfigured_nodes_with_http_info(cluster_ext_id, clustermgmt_v40_config_node_discovery_params, opts = {}) ⇒ Array<(DiscoverUnconfiguredNodes202Response, Integer, Hash)>

Discover unconfigured nodes Get the unconfigured node details such as node UUID, node position, node IP, foundation version and more.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_node_discovery_params (ClustermgmtV40ConfigNodeDiscoveryParams)

    Discover unconfigured node details.

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

    the optional parameters

Returns:



985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 985

def discover_unconfigured_nodes_with_http_info(cluster_ext_id, clustermgmt_v40_config_node_discovery_params, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.discover_unconfigured_nodes ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.discover_unconfigured_nodes"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.discover_unconfigured_nodes, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_node_discovery_params' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_node_discovery_params.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_node_discovery_params' when calling ClustersApi.discover_unconfigured_nodes"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/discover-unconfigured-nodes'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'DiscoverUnconfiguredNodes202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.discover_unconfigured_nodes",
    :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: ClustersApi#discover_unconfigured_nodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#enter_host_maintenance(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_enter_host_maintenance_spec, opts = {}) ⇒ EnterHostMaintenance202Response

Enter host into maintenance mode Enter host identified by extId into maintenance mode belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_operations_enter_host_maintenance_spec (ClustermgmtV40OperationsEnterHostMaintenanceSpec)

    Property of the host to be put into maintenance mode.

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

    the optional parameters

Returns:



1055
1056
1057
1058
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1055

def enter_host_maintenance(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_enter_host_maintenance_spec, opts = {})
  data, _status_code, _headers = enter_host_maintenance_with_http_info(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_enter_host_maintenance_spec, opts)
  data
end

#enter_host_maintenance_with_http_info(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_enter_host_maintenance_spec, opts = {}) ⇒ Array<(EnterHostMaintenance202Response, Integer, Hash)>

Enter host into maintenance mode Enter host identified by extId into maintenance mode belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_operations_enter_host_maintenance_spec (ClustermgmtV40OperationsEnterHostMaintenanceSpec)

    Property of the host to be put into maintenance mode.

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

    the optional parameters

Returns:



1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1068

def enter_host_maintenance_with_http_info(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_enter_host_maintenance_spec, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.enter_host_maintenance ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.enter_host_maintenance"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.enter_host_maintenance, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.enter_host_maintenance"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.enter_host_maintenance, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ntnx_request_id' is set
  if @api_client.config.client_side_validation && ntnx_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClustersApi.enter_host_maintenance"
  end
  # verify the required parameter 'clustermgmt_v40_operations_enter_host_maintenance_spec' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_operations_enter_host_maintenance_spec.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_operations_enter_host_maintenance_spec' when calling ClustersApi.enter_host_maintenance"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/enter-host-maintenance'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'NTNX-Request-Id'] = ntnx_request_id

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'EnterHostMaintenance202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.enter_host_maintenance",
    :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: ClustersApi#enter_host_maintenance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#exit_host_maintenance(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_host_maintenance_common_spec, opts = {}) ⇒ ExitHostMaintenance202Response

Exit host from maintenance mode Exit host identified by extId from maintenance mode belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_operations_host_maintenance_common_spec (ClustermgmtV40OperationsHostMaintenanceCommonSpec)

    Property of the host to be exited from maintenance mode.

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

    the optional parameters

Returns:



1152
1153
1154
1155
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1152

def exit_host_maintenance(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_host_maintenance_common_spec, opts = {})
  data, _status_code, _headers = exit_host_maintenance_with_http_info(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_host_maintenance_common_spec, opts)
  data
end

#exit_host_maintenance_with_http_info(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_host_maintenance_common_spec, opts = {}) ⇒ Array<(ExitHostMaintenance202Response, Integer, Hash)>

Exit host from maintenance mode Exit host identified by extId from maintenance mode belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_operations_host_maintenance_common_spec (ClustermgmtV40OperationsHostMaintenanceCommonSpec)

    Property of the host to be exited from maintenance mode.

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

    the optional parameters

Returns:



1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1165

def exit_host_maintenance_with_http_info(cluster_ext_id, ext_id, ntnx_request_id, clustermgmt_v40_operations_host_maintenance_common_spec, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.exit_host_maintenance ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.exit_host_maintenance"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.exit_host_maintenance, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.exit_host_maintenance"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.exit_host_maintenance, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ntnx_request_id' is set
  if @api_client.config.client_side_validation && ntnx_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClustersApi.exit_host_maintenance"
  end
  # verify the required parameter 'clustermgmt_v40_operations_host_maintenance_common_spec' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_operations_host_maintenance_common_spec.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_operations_host_maintenance_common_spec' when calling ClustersApi.exit_host_maintenance"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/operations/clusters/{clusterExtId}/hosts/{extId}/$actions/exit-host-maintenance'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'NTNX-Request-Id'] = ntnx_request_id

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ExitHostMaintenance202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.exit_host_maintenance",
    :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: ClustersApi#exit_host_maintenance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#expand_cluster(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_expand_cluster_params, opts = {}) ⇒ ExpandCluster202Response

Add node on a cluster Add node on a cluster. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_config_expand_cluster_params (ClustermgmtV40ConfigExpandClusterParams)

    Property of the node to be added.

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

    the optional parameters

Returns:



1248
1249
1250
1251
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1248

def expand_cluster(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_expand_cluster_params, opts = {})
  data, _status_code, _headers = expand_cluster_with_http_info(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_expand_cluster_params, opts)
  data
end

#expand_cluster_with_http_info(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_expand_cluster_params, opts = {}) ⇒ Array<(ExpandCluster202Response, Integer, Hash)>

Add node on a cluster Add node on a cluster. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_config_expand_cluster_params (ClustermgmtV40ConfigExpandClusterParams)

    Property of the node to be added.

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

    the optional parameters

Returns:

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

    ExpandCluster202Response data, response status code and response headers



1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1260

def expand_cluster_with_http_info(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_expand_cluster_params, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.expand_cluster ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.expand_cluster"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.expand_cluster, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ntnx_request_id' is set
  if @api_client.config.client_side_validation && ntnx_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClustersApi.expand_cluster"
  end
  # verify the required parameter 'clustermgmt_v40_config_expand_cluster_params' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_expand_cluster_params.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_expand_cluster_params' when calling ClustersApi.expand_cluster"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/expand-cluster'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'NTNX-Request-Id'] = ntnx_request_id

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ExpandCluster202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.expand_cluster",
    :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: ClustersApi#expand_cluster\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#fetch_node_networking_details(cluster_ext_id, clustermgmt_v40_config_node_details, opts = {}) ⇒ FetchNodeNetworkingDetails202Response

Get network information of unconfigured nodes Get a dictionary of cluster networks and available uplinks on the given nodes. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_node_details (ClustermgmtV40ConfigNodeDetails)

    Node specific details required to fetch node networking information.

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

    the optional parameters

Returns:



1333
1334
1335
1336
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1333

def fetch_node_networking_details(cluster_ext_id, clustermgmt_v40_config_node_details, opts = {})
  data, _status_code, _headers = fetch_node_networking_details_with_http_info(cluster_ext_id, clustermgmt_v40_config_node_details, opts)
  data
end

#fetch_node_networking_details_with_http_info(cluster_ext_id, clustermgmt_v40_config_node_details, opts = {}) ⇒ Array<(FetchNodeNetworkingDetails202Response, Integer, Hash)>

Get network information of unconfigured nodes Get a dictionary of cluster networks and available uplinks on the given nodes. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_node_details (ClustermgmtV40ConfigNodeDetails)

    Node specific details required to fetch node networking information.

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

    the optional parameters

Returns:



1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1344

def fetch_node_networking_details_with_http_info(cluster_ext_id, clustermgmt_v40_config_node_details, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.fetch_node_networking_details ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.fetch_node_networking_details"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.fetch_node_networking_details, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_node_details' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_node_details.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_node_details' when calling ClustersApi.fetch_node_networking_details"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/fetch-node-networking-details'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'FetchNodeNetworkingDetails202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.fetch_node_networking_details",
    :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: ClustersApi#fetch_node_networking_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#fetch_task_response(ext_id, task_response_type, opts = {}) ⇒ FetchTaskResponse200Response

Get task response based on the type of request Get task response based on the type of request.

Parameters:

Returns:



1412
1413
1414
1415
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1412

def fetch_task_response(ext_id, task_response_type, opts = {})
  data, _status_code, _headers = fetch_task_response_with_http_info(ext_id, task_response_type, opts)
  data
end

#fetch_task_response_with_http_info(ext_id, task_response_type, opts = {}) ⇒ Array<(FetchTaskResponse200Response, Integer, Hash)>

Get task response based on the type of request Get task response based on the type of request.

Parameters:

Returns:



1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1423

def fetch_task_response_with_http_info(ext_id, task_response_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.fetch_task_response ...'
  end
  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.fetch_task_response"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.fetch_task_response, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'task_response_type' is set
  if @api_client.config.client_side_validation && task_response_type.nil?
    fail ArgumentError, "Missing the required parameter 'task_response_type' when calling ClustersApi.fetch_task_response"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/task-response/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'FetchTaskResponse200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.fetch_task_response",
    :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: ClustersApi#fetch_task_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_cluster_by_id(ext_id, opts = {}) ⇒ GetClusterById200Response

Get details of a cluster Fetches the cluster entity details identified by extId.

Parameters:

  • ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported. - clusterProfile - storageSummary

Returns:



1487
1488
1489
1490
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1487

def get_cluster_by_id(ext_id, opts = {})
  data, _status_code, _headers = get_cluster_by_id_with_http_info(ext_id, opts)
  data
end

#get_cluster_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetClusterById200Response, Integer, Hash)>

Get details of a cluster Fetches the cluster entity details identified by extId.

Parameters:

  • ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported. - clusterProfile - storageSummary

Returns:

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

    GetClusterById200Response data, response status code and response headers



1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1498

def get_cluster_by_id_with_http_info(ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_cluster_by_id ...'
  end
  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_cluster_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_cluster_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetClusterById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_cluster_by_id",
    :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: ClustersApi#get_cluster_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_cluster_stats(ext_id, start_time, end_time, opts = {}) ⇒ GetClusterStats200Response

Get cluster statistics Get the statistics data of the cluster identified by clusterExtId.

Parameters:

  • ext_id (String)

    Cluster UUID.

  • start_time (Time)

    The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

  • end_time (Time)

    The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

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

    the optional parameters

Options Hash (opts):

  • :sampling_interval (Integer)

    The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30.

  • :stat_type (CommonV10StatsDownSamplingOperator)
  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - aggregateHypervisorMemoryUsagePpm - aggregateHypervisorMemoryUsagePpmLowerBuf - aggregateHypervisorMemoryUsagePpmUpperBuf - controllerAvgIoLatencyUsecs - controllerAvgIoLatencyUsecsLowerBuf - controllerAvgIoLatencyUsecsUpperBuf - controllerAvgReadIoLatencyUsecs - controllerAvgReadIoLatencyUsecsLowerBuf - controllerAvgReadIoLatencyUsecsUpperBuf - controllerAvgWriteIoLatencyUsecs - controllerAvgWriteIoLatencyUsecsLowerBuf - controllerAvgWriteIoLatencyUsecsUpperBuf - controllerNumIops - controllerNumIopsLowerBuf - controllerNumIopsUpperBuf - controllerNumReadIops - controllerNumReadIopsLowerBuf - controllerNumReadIopsUpperBuf - controllerNumWriteIops - controllerNumWriteIopsLowerBuf - controllerNumWriteIopsUpperBuf - controllerReadIoBandwidthKbps - controllerReadIoBandwidthKbpsLowerBuf - controllerReadIoBandwidthKbpsUpperBuf - controllerWriteIoBandwidthKbps - controllerWriteIoBandwidthKbpsLowerBuf - controllerWriteIoBandwidthKbpsUpperBuf - cpuCapacityHz - cpuUsageHz - freePhysicalStorageBytes - healthCheckScore - hypervisorCpuUsagePpm - hypervisorCpuUsagePpmLowerBuf - hypervisorCpuUsagePpmUpperBuf - ioBandwidthKbps - ioBandwidthKbpsLowerBuf - ioBandwidthKbpsUpperBuf - logicalStorageUsageBytes - memoryCapacityBytes - overallMemoryUsageBytes - overallSavingsBytes - overallSavingsRatio - powerConsumptionInstantWatt - recycleBinUsageBytes - snapshotCapacityBytes - storageCapacityBytes - storageUsageBytes

Returns:



1562
1563
1564
1565
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1562

def get_cluster_stats(ext_id, start_time, end_time, opts = {})
  data, _status_code, _headers = get_cluster_stats_with_http_info(ext_id, start_time, end_time, opts)
  data
end

#get_cluster_stats_with_http_info(ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetClusterStats200Response, Integer, Hash)>

Get cluster statistics Get the statistics data of the cluster identified by clusterExtId.

Parameters:

  • ext_id (String)

    Cluster UUID.

  • start_time (Time)

    The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

  • end_time (Time)

    The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

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

    the optional parameters

Options Hash (opts):

  • :sampling_interval (Integer)

    The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30.

  • :stat_type (CommonV10StatsDownSamplingOperator)
  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - aggregateHypervisorMemoryUsagePpm - aggregateHypervisorMemoryUsagePpmLowerBuf - aggregateHypervisorMemoryUsagePpmUpperBuf - controllerAvgIoLatencyUsecs - controllerAvgIoLatencyUsecsLowerBuf - controllerAvgIoLatencyUsecsUpperBuf - controllerAvgReadIoLatencyUsecs - controllerAvgReadIoLatencyUsecsLowerBuf - controllerAvgReadIoLatencyUsecsUpperBuf - controllerAvgWriteIoLatencyUsecs - controllerAvgWriteIoLatencyUsecsLowerBuf - controllerAvgWriteIoLatencyUsecsUpperBuf - controllerNumIops - controllerNumIopsLowerBuf - controllerNumIopsUpperBuf - controllerNumReadIops - controllerNumReadIopsLowerBuf - controllerNumReadIopsUpperBuf - controllerNumWriteIops - controllerNumWriteIopsLowerBuf - controllerNumWriteIopsUpperBuf - controllerReadIoBandwidthKbps - controllerReadIoBandwidthKbpsLowerBuf - controllerReadIoBandwidthKbpsUpperBuf - controllerWriteIoBandwidthKbps - controllerWriteIoBandwidthKbpsLowerBuf - controllerWriteIoBandwidthKbpsUpperBuf - cpuCapacityHz - cpuUsageHz - freePhysicalStorageBytes - healthCheckScore - hypervisorCpuUsagePpm - hypervisorCpuUsagePpmLowerBuf - hypervisorCpuUsagePpmUpperBuf - ioBandwidthKbps - ioBandwidthKbpsLowerBuf - ioBandwidthKbpsUpperBuf - logicalStorageUsageBytes - memoryCapacityBytes - overallMemoryUsageBytes - overallSavingsBytes - overallSavingsRatio - powerConsumptionInstantWatt - recycleBinUsageBytes - snapshotCapacityBytes - storageCapacityBytes - storageUsageBytes

Returns:

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

    GetClusterStats200Response data, response status code and response headers



1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1577

def get_cluster_stats_with_http_info(ext_id, start_time, end_time, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_cluster_stats ...'
  end
  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_cluster_stats"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_cluster_stats, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'start_time' is set
  if @api_client.config.client_side_validation && start_time.nil?
    fail ArgumentError, "Missing the required parameter 'start_time' when calling ClustersApi.get_cluster_stats"
  end
  # verify the required parameter 'end_time' is set
  if @api_client.config.client_side_validation && end_time.nil?
    fail ArgumentError, "Missing the required parameter 'end_time' when calling ClustersApi.get_cluster_stats"
  end
  if @api_client.config.client_side_validation && !opts[:'sampling_interval'].nil? && opts[:'sampling_interval'] < 1
    fail ArgumentError, 'invalid value for "opts[:"sampling_interval"]" when calling ClustersApi.get_cluster_stats, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/stats/clusters/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$startTime'] = start_time
  query_params[:'$endTime'] = end_time
  query_params[:'$samplingInterval'] = opts[:'sampling_interval'] if !opts[:'sampling_interval'].nil?
  query_params[:'$statType'] = opts[:'stat_type'] if !opts[:'stat_type'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetClusterStats200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_cluster_stats",
    :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: ClustersApi#get_cluster_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_host_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ GetHostById200Response

Get the details of host associated with the cluster Fetches the details of the host identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

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

    the optional parameters

Returns:



1653
1654
1655
1656
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1653

def get_host_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_host_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#get_host_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(GetHostById200Response, Integer, Hash)>

Get the details of host associated with the cluster Fetches the details of the host identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

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

    the optional parameters

Returns:

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

    GetHostById200Response data, response status code and response headers



1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1664

def get_host_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_host_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_host_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_host_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_host_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_host_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/hosts/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetHostById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_host_by_id",
    :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: ClustersApi#get_host_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_host_nic_by_id(cluster_ext_id, host_ext_id, ext_id, opts = {}) ⇒ GetHostNicById200Response

Get host NIC Get the host NIC entity of the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

  • ext_id (String)

    Host NIC UUID.

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

    the optional parameters

Returns:



1733
1734
1735
1736
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1733

def get_host_nic_by_id(cluster_ext_id, host_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_host_nic_by_id_with_http_info(cluster_ext_id, host_ext_id, ext_id, opts)
  data
end

#get_host_nic_by_id_with_http_info(cluster_ext_id, host_ext_id, ext_id, opts = {}) ⇒ Array<(GetHostNicById200Response, Integer, Hash)>

Get host NIC Get the host NIC entity of the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

  • ext_id (String)

    Host NIC UUID.

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

    the optional parameters

Returns:

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

    GetHostNicById200Response data, response status code and response headers



1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1745

def get_host_nic_by_id_with_http_info(cluster_ext_id, host_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_host_nic_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_host_nic_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_host_nic_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'host_ext_id' is set
  if @api_client.config.client_side_validation && host_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'host_ext_id' when calling ClustersApi.get_host_nic_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && host_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'host_ext_id' when calling ClustersApi.get_host_nic_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_host_nic_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_host_nic_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'hostExtId' + '}', CGI.escape(host_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetHostNicById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_host_nic_by_id",
    :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: ClustersApi#get_host_nic_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_host_stats(cluster_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ GetHostStats200Response

Get host statistics Get the statistics data of the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

  • start_time (Time)

    The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

  • end_time (Time)

    The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

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

    the optional parameters

Options Hash (opts):

  • :sampling_interval (Integer)

    The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30.

  • :stat_type (CommonV10StatsDownSamplingOperator)
  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - aggregateHypervisorMemoryUsagePpm - aggregateHypervisorMemoryUsagePpmLowerBuf - aggregateHypervisorMemoryUsagePpmUpperBuf - controllerAvgIoLatencyUsecs - controllerAvgIoLatencyUsecsLowerBuf - controllerAvgIoLatencyUsecsUpperBuf - controllerAvgReadIoLatencyUsecs - controllerAvgReadIoLatencyUsecsLowerBuf - controllerAvgReadIoLatencyUsecsUpperBuf - controllerAvgWriteIoLatencyUsecs - controllerAvgWriteIoLatencyUsecsLowerBuf - controllerAvgWriteIoLatencyUsecsUpperBuf - controllerNumIops - controllerNumIopsLowerBuf - controllerNumIopsUpperBuf - controllerNumReadIops - controllerNumReadIopsLowerBuf - controllerNumReadIopsUpperBuf - controllerNumWriteIops - controllerNumWriteIopsLowerBuf - controllerNumWriteIopsUpperBuf - controllerReadIoBandwidthKbps - controllerReadIoBandwidthKbpsLowerBuf - controllerReadIoBandwidthKbpsUpperBuf - controllerWriteIoBandwidthKbps - controllerWriteIoBandwidthKbpsLowerBuf - controllerWriteIoBandwidthKbpsUpperBuf - cpuCapacityHz - cpuUsageHz - freePhysicalStorageBytes - healthCheckScore - hypervisorCpuUsagePpm - hypervisorCpuUsagePpmLowerBuf - hypervisorCpuUsagePpmUpperBuf - ioBandwidthKbps - ioBandwidthKbpsLowerBuf - ioBandwidthKbpsUpperBuf - logicalStorageUsageBytes - memoryCapacityBytes - overallMemoryUsageBytes - overallMemoryUsagePpm - overallMemoryUsagePpmLowerBuf - overallMemoryUsagePpmUpperBuf - powerConsumptionInstantWatt - storageCapacityBytes - storageUsageBytes

Returns:



1827
1828
1829
1830
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1827

def get_host_stats(cluster_ext_id, ext_id, start_time, end_time, opts = {})
  data, _status_code, _headers = get_host_stats_with_http_info(cluster_ext_id, ext_id, start_time, end_time, opts)
  data
end

#get_host_stats_with_http_info(cluster_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetHostStats200Response, Integer, Hash)>

Get host statistics Get the statistics data of the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Host UUID.

  • start_time (Time)

    The start time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, start time of 2022-04-23T01:23:45.678+09:00 would consider all stats starting at 1:23:45.678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

  • end_time (Time)

    The end time of the period for which stats should be reported. The value should be in extended ISO-8601 format. For example, end time of 2022-04-23T013:23:45.678+09:00 would consider all stats till 13:23:45 .678 on the 23rd of April 2022. Details around ISO-8601 format can be found at www.iso.org/standard/70907.html

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

    the optional parameters

Options Hash (opts):

  • :sampling_interval (Integer)

    The sampling interval in seconds at which statistical data should be collected. For example, if you want performance statistics every 30 seconds, then provide the value as 30.

  • :stat_type (CommonV10StatsDownSamplingOperator)
  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - aggregateHypervisorMemoryUsagePpm - aggregateHypervisorMemoryUsagePpmLowerBuf - aggregateHypervisorMemoryUsagePpmUpperBuf - controllerAvgIoLatencyUsecs - controllerAvgIoLatencyUsecsLowerBuf - controllerAvgIoLatencyUsecsUpperBuf - controllerAvgReadIoLatencyUsecs - controllerAvgReadIoLatencyUsecsLowerBuf - controllerAvgReadIoLatencyUsecsUpperBuf - controllerAvgWriteIoLatencyUsecs - controllerAvgWriteIoLatencyUsecsLowerBuf - controllerAvgWriteIoLatencyUsecsUpperBuf - controllerNumIops - controllerNumIopsLowerBuf - controllerNumIopsUpperBuf - controllerNumReadIops - controllerNumReadIopsLowerBuf - controllerNumReadIopsUpperBuf - controllerNumWriteIops - controllerNumWriteIopsLowerBuf - controllerNumWriteIopsUpperBuf - controllerReadIoBandwidthKbps - controllerReadIoBandwidthKbpsLowerBuf - controllerReadIoBandwidthKbpsUpperBuf - controllerWriteIoBandwidthKbps - controllerWriteIoBandwidthKbpsLowerBuf - controllerWriteIoBandwidthKbpsUpperBuf - cpuCapacityHz - cpuUsageHz - freePhysicalStorageBytes - healthCheckScore - hypervisorCpuUsagePpm - hypervisorCpuUsagePpmLowerBuf - hypervisorCpuUsagePpmUpperBuf - ioBandwidthKbps - ioBandwidthKbpsLowerBuf - ioBandwidthKbpsUpperBuf - logicalStorageUsageBytes - memoryCapacityBytes - overallMemoryUsageBytes - overallMemoryUsagePpm - overallMemoryUsagePpmLowerBuf - overallMemoryUsagePpmUpperBuf - powerConsumptionInstantWatt - storageCapacityBytes - storageUsageBytes

Returns:

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

    GetHostStats200Response data, response status code and response headers



1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1843

def get_host_stats_with_http_info(cluster_ext_id, ext_id, start_time, end_time, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_host_stats ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_host_stats"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_host_stats, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_host_stats"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_host_stats, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'start_time' is set
  if @api_client.config.client_side_validation && start_time.nil?
    fail ArgumentError, "Missing the required parameter 'start_time' when calling ClustersApi.get_host_stats"
  end
  # verify the required parameter 'end_time' is set
  if @api_client.config.client_side_validation && end_time.nil?
    fail ArgumentError, "Missing the required parameter 'end_time' when calling ClustersApi.get_host_stats"
  end
  if @api_client.config.client_side_validation && !opts[:'sampling_interval'].nil? && opts[:'sampling_interval'] < 1
    fail ArgumentError, 'invalid value for "opts[:"sampling_interval"]" when calling ClustersApi.get_host_stats, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/stats/clusters/{clusterExtId}/hosts/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$startTime'] = start_time
  query_params[:'$endTime'] = end_time
  query_params[:'$samplingInterval'] = opts[:'sampling_interval'] if !opts[:'sampling_interval'].nil?
  query_params[:'$statType'] = opts[:'stat_type'] if !opts[:'stat_type'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetHostStats200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_host_stats",
    :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: ClustersApi#get_host_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rackable_unit_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ GetRackableUnitById200Response

Get the rackable unit details Fetches the rackable unit entity details identified by extId of the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Rackable unit UUID.

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

    the optional parameters

Returns:



1928
1929
1930
1931
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1928

def get_rackable_unit_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_rackable_unit_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#get_rackable_unit_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(GetRackableUnitById200Response, Integer, Hash)>

Get the rackable unit details Fetches the rackable unit entity details identified by extId of the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    Rackable unit UUID.

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

    the optional parameters

Returns:



1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 1939

def get_rackable_unit_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_rackable_unit_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_rackable_unit_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_rackable_unit_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_rackable_unit_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_rackable_unit_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rackable-units/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetRackableUnitById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_rackable_unit_by_id",
    :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: ClustersApi#get_rackable_unit_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rsyslog_server_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ GetRsyslogServerById200Response

Get RSYSLOG server configuration Fetches the RSYSLOG server configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    RSYSLOG server UUID.

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

    the optional parameters

Returns:



2007
2008
2009
2010
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2007

def get_rsyslog_server_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#get_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(GetRsyslogServerById200Response, Integer, Hash)>

Get RSYSLOG server configuration Fetches the RSYSLOG server configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    RSYSLOG server UUID.

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

    the optional parameters

Returns:



2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2018

def get_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_rsyslog_server_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_rsyslog_server_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_rsyslog_server_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_rsyslog_server_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_rsyslog_server_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rsyslog-servers/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetRsyslogServerById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_rsyslog_server_by_id",
    :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: ClustersApi#get_rsyslog_server_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_snmp_config_by_cluster_id(cluster_ext_id, opts = {}) ⇒ GetSnmpConfigByClusterId200Response

Get SNMP config details of a cluster Fetches SNMP config details of the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Returns:



2085
2086
2087
2088
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2085

def get_snmp_config_by_cluster_id(cluster_ext_id, opts = {})
  data, _status_code, _headers = get_snmp_config_by_cluster_id_with_http_info(cluster_ext_id, opts)
  data
end

#get_snmp_config_by_cluster_id_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(GetSnmpConfigByClusterId200Response, Integer, Hash)>

Get SNMP config details of a cluster Fetches SNMP config details of the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Returns:



2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2095

def get_snmp_config_by_cluster_id_with_http_info(cluster_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_snmp_config_by_cluster_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_snmp_config_by_cluster_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_snmp_config_by_cluster_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetSnmpConfigByClusterId200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_snmp_config_by_cluster_id",
    :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: ClustersApi#get_snmp_config_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_snmp_trap_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ GetSnmpTrapById200Response

Get SNMP trap configuration details

Fetches SNMP trap configuration details identified by {extId} associated with the cluster identified by {clusterExtId}.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP trap UUID.

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

    the optional parameters

Returns:



2154
2155
2156
2157
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2154

def get_snmp_trap_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#get_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(GetSnmpTrapById200Response, Integer, Hash)>

Get SNMP trap configuration details

Fetches SNMP trap configuration details identified by {extId} associated with the cluster identified by {clusterExtId}.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP trap UUID.

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

    the optional parameters

Returns:

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

    GetSnmpTrapById200Response data, response status code and response headers



2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2165

def get_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_snmp_trap_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_snmp_trap_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_snmp_trap_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_snmp_trap_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_snmp_trap_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/traps/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetSnmpTrapById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_snmp_trap_by_id",
    :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: ClustersApi#get_snmp_trap_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_snmp_user_by_id(cluster_ext_id, ext_id, opts = {}) ⇒ GetSnmpUserById200Response

Get SNMP user information Fetches SNMP user configuration details identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP user UUID.

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

    the optional parameters

Returns:



2233
2234
2235
2236
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2233

def get_snmp_user_by_id(cluster_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, opts)
  data
end

#get_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, opts = {}) ⇒ Array<(GetSnmpUserById200Response, Integer, Hash)>

Get SNMP user information Fetches SNMP user configuration details identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP user UUID.

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

    the optional parameters

Returns:

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

    GetSnmpUserById200Response data, response status code and response headers



2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2244

def get_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_snmp_user_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_snmp_user_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_snmp_user_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_snmp_user_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_snmp_user_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/users/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetSnmpUserById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_snmp_user_by_id",
    :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: ClustersApi#get_snmp_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_virtual_nic_by_id(cluster_ext_id, host_ext_id, ext_id, opts = {}) ⇒ GetVirtualNicById200Response

Get virtual NIC Get the virtual NIC entity of the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

  • ext_id (String)

    Virtual NIC UUID.

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

    the optional parameters

Returns:



2313
2314
2315
2316
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2313

def get_virtual_nic_by_id(cluster_ext_id, host_ext_id, ext_id, opts = {})
  data, _status_code, _headers = get_virtual_nic_by_id_with_http_info(cluster_ext_id, host_ext_id, ext_id, opts)
  data
end

#get_virtual_nic_by_id_with_http_info(cluster_ext_id, host_ext_id, ext_id, opts = {}) ⇒ Array<(GetVirtualNicById200Response, Integer, Hash)>

Get virtual NIC Get the virtual NIC entity of the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

  • ext_id (String)

    Virtual NIC UUID.

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

    the optional parameters

Returns:



2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2325

def get_virtual_nic_by_id_with_http_info(cluster_ext_id, host_ext_id, ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.get_virtual_nic_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.get_virtual_nic_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.get_virtual_nic_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'host_ext_id' is set
  if @api_client.config.client_side_validation && host_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'host_ext_id' when calling ClustersApi.get_virtual_nic_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && host_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'host_ext_id' when calling ClustersApi.get_virtual_nic_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.get_virtual_nic_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.get_virtual_nic_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'hostExtId' + '}', CGI.escape(host_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'GetVirtualNicById200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.get_virtual_nic_by_id",
    :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: ClustersApi#get_virtual_nic_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_clusters(opts = {}) ⇒ ListClusters200Response

Get the list of clusters Lists all cluster entities registered to Prism Central.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - backupEligibilityScore - clusterProfileExtId - config/buildInfo/version - config/clusterFunction - config/encryptionInTransitStatus - config/encryptionOption - config/encryptionScope - config/hypervisorTypes - config/isAvailable - extId - name - network/keyManagementServerType - upgradeStatus

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - backupEligibilityScore - config/buildInfo/version - config/isAvailable - extId - inefficientVmCount - name - network/keyManagementServerType - nodes/numberOfNodes - upgradeStatus - vmCount

  • :apply (String)

    A URL query parameter that allows clients to specify a sequence of transformations to the entity set, such as groupby, filter, aggregate etc. As of now only support for groupby exists.For example &#39;$apply&#x3D;groupby((templateName))&#39; would get all templates grouped by templateName. The groupby can be applied on the following fields: - config/buildInfo/version - nodes/numberOfNodes

  • :expand (String)

    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported. - clusterProfile - storageSummary

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - backupEligibilityScore - inefficientVmCount - name - upgradeStatus - vmCount

Returns:



2407
2408
2409
2410
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2407

def list_clusters(opts = {})
  data, _status_code, _headers = list_clusters_with_http_info(opts)
  data
end

#list_clusters_with_http_info(opts = {}) ⇒ Array<(ListClusters200Response, Integer, Hash)>

Get the list of clusters Lists all cluster entities registered to Prism Central.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - backupEligibilityScore - clusterProfileExtId - config/buildInfo/version - config/clusterFunction - config/encryptionInTransitStatus - config/encryptionOption - config/encryptionScope - config/hypervisorTypes - config/isAvailable - extId - name - network/keyManagementServerType - upgradeStatus

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - backupEligibilityScore - config/buildInfo/version - config/isAvailable - extId - inefficientVmCount - name - network/keyManagementServerType - nodes/numberOfNodes - upgradeStatus - vmCount

  • :apply (String)

    A URL query parameter that allows clients to specify a sequence of transformations to the entity set, such as groupby, filter, aggregate etc. As of now only support for groupby exists.For example &#39;$apply&#x3D;groupby((templateName))&#39; would get all templates grouped by templateName. The groupby can be applied on the following fields: - config/buildInfo/version - nodes/numberOfNodes

  • :expand (String)

    A URL query parameter that allows clients to request related resources when a resource that satisfies a particular request is retrieved. Each expanded item is evaluated relative to the entity containing the property being expanded. Other query options can be applied to an expanded property by appending a semicolon-separated list of query options, enclosed in parentheses, to the property name. Permissible system query options are $filter, $select and $orderby. The following expansion keys are supported. - clusterProfile - storageSummary

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - backupEligibilityScore - inefficientVmCount - name - upgradeStatus - vmCount

Returns:

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

    ListClusters200Response data, response status code and response headers



2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2423

def list_clusters_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_clusters ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_clusters, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_clusters, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_clusters, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
  query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListClusters200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_clusters",
    :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: ClustersApi#list_clusters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_host_nics_by_host_id(cluster_ext_id, host_ext_id, opts = {}) ⇒ ListHostNicsByHostId200Response

Get the list of host NICs Lists all host NICs for the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - discoveryProtocol - extId - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - rxRingSizeInBytes - switchDeviceId - switchMacAddress - switchPortId - switchVlanId - txRingSizeInBytes

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - extId - name

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - discoveryProtocol - hostDescription - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - rxRingSizeInBytes - switchDeviceId - switchMacAddress - switchManagementIp - switchPortId - switchVlanId - txRingSizeInBytes

Returns:



2497
2498
2499
2500
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2497

def list_host_nics_by_host_id(cluster_ext_id, host_ext_id, opts = {})
  data, _status_code, _headers = list_host_nics_by_host_id_with_http_info(cluster_ext_id, host_ext_id, opts)
  data
end

#list_host_nics_by_host_id_with_http_info(cluster_ext_id, host_ext_id, opts = {}) ⇒ Array<(ListHostNicsByHostId200Response, Integer, Hash)>

Get the list of host NICs Lists all host NICs for the host identified by hostExtId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - discoveryProtocol - extId - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - rxRingSizeInBytes - switchDeviceId - switchMacAddress - switchPortId - switchVlanId - txRingSizeInBytes

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - extId - name

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - discoveryProtocol - hostDescription - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - rxRingSizeInBytes - switchDeviceId - switchMacAddress - switchManagementIp - switchPortId - switchVlanId - txRingSizeInBytes

Returns:



2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2513

def list_host_nics_by_host_id_with_http_info(cluster_ext_id, host_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_host_nics_by_host_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_host_nics_by_host_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_host_nics_by_host_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'host_ext_id' is set
  if @api_client.config.client_side_validation && host_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'host_ext_id' when calling ClustersApi.list_host_nics_by_host_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && host_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'host_ext_id' when calling ClustersApi.list_host_nics_by_host_id, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_host_nics_by_host_id, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_host_nics_by_host_id, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_host_nics_by_host_id, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/hosts/{hostExtId}/host-nics'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'hostExtId' + '}', CGI.escape(host_ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListHostNicsByHostId200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_host_nics_by_host_id",
    :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: ClustersApi#list_host_nics_by_host_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_hosts(opts = {}) ⇒ ListHosts200Response

Get the list of all host entities Lists all host entities across clusters registered to Prism Central.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - bootTimeUsecs - cluster/name - cluster/uuid - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - extId - gpuDriverVersion - gpuList - hostName - hypervisor/type - memorySizeBytes - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - cluster/name - extId - hostName - hostType - hypervisor/type - memorySizeBytes

  • :apply (String)

    A URL query parameter that allows clients to specify a sequence of transformations to the entity set, such as groupby, filter, aggregate etc. As of now only support for groupby exists.For example &#39;$apply&#x3D;groupby((templateName))&#39; would get all templates grouped by templateName. The groupby can be applied on the following fields: - cluster/name - hypervisor/type

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - blockModel - blockSerial - bootTimeUsecs - cluster - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - failoverClusterFqdn - failoverClusterNodeStatus - gpuDriverVersion - gpuList - hostName - hostType - isRebootPending - maintenanceState - memorySizeBytes - nodeStatus - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

Returns:



2602
2603
2604
2605
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2602

def list_hosts(opts = {})
  data, _status_code, _headers = list_hosts_with_http_info(opts)
  data
end

#list_hosts_by_cluster_id(cluster_ext_id, opts = {}) ⇒ ListHostsByClusterId200Response

Get the list of hosts associated with a cluster Lists all the hosts associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - bootTimeUsecs - cluster/name - cluster/uuid - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - extId - gpuDriverVersion - gpuList - hostName - hypervisor/type - memorySizeBytes - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - cluster/name - extId - hostName - hostType - hypervisor/type - memorySizeBytes

  • :apply (String)

    A URL query parameter that allows clients to specify a sequence of transformations to the entity set, such as groupby, filter, aggregate etc. As of now only support for groupby exists.For example &#39;$apply&#x3D;groupby((templateName))&#39; would get all templates grouped by templateName. The groupby can be applied on the following fields: - cluster/name - hypervisor/type

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - blockModel - blockSerial - bootTimeUsecs - cluster - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - failoverClusterFqdn - failoverClusterNodeStatus - gpuDriverVersion - gpuList - hostName - hostType - isRebootPending - maintenanceState - memorySizeBytes - nodeStatus - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

Returns:



2690
2691
2692
2693
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2690

def list_hosts_by_cluster_id(cluster_ext_id, opts = {})
  data, _status_code, _headers = list_hosts_by_cluster_id_with_http_info(cluster_ext_id, opts)
  data
end

#list_hosts_by_cluster_id_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListHostsByClusterId200Response, Integer, Hash)>

Get the list of hosts associated with a cluster Lists all the hosts associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - bootTimeUsecs - cluster/name - cluster/uuid - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - extId - gpuDriverVersion - gpuList - hostName - hypervisor/type - memorySizeBytes - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - cluster/name - extId - hostName - hostType - hypervisor/type - memorySizeBytes

  • :apply (String)

    A URL query parameter that allows clients to specify a sequence of transformations to the entity set, such as groupby, filter, aggregate etc. As of now only support for groupby exists.For example &#39;$apply&#x3D;groupby((templateName))&#39; would get all templates grouped by templateName. The groupby can be applied on the following fields: - cluster/name - hypervisor/type

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - blockModel - blockSerial - bootTimeUsecs - cluster - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - failoverClusterFqdn - failoverClusterNodeStatus - gpuDriverVersion - gpuList - hostName - hostType - isRebootPending - maintenanceState - memorySizeBytes - nodeStatus - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

Returns:



2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2706

def list_hosts_by_cluster_id_with_http_info(cluster_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_hosts_by_cluster_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_hosts_by_cluster_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_hosts_by_cluster_id, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_hosts_by_cluster_id, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_hosts_by_cluster_id, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_hosts_by_cluster_id, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/hosts'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListHostsByClusterId200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_hosts_by_cluster_id",
    :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: ClustersApi#list_hosts_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_hosts_with_http_info(opts = {}) ⇒ Array<(ListHosts200Response, Integer, Hash)>

Get the list of all host entities Lists all host entities across clusters registered to Prism Central.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - bootTimeUsecs - cluster/name - cluster/uuid - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - extId - gpuDriverVersion - gpuList - hostName - hypervisor/type - memorySizeBytes - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - cluster/name - extId - hostName - hostType - hypervisor/type - memorySizeBytes

  • :apply (String)

    A URL query parameter that allows clients to specify a sequence of transformations to the entity set, such as groupby, filter, aggregate etc. As of now only support for groupby exists.For example &#39;$apply&#x3D;groupby((templateName))&#39; would get all templates grouped by templateName. The groupby can be applied on the following fields: - cluster/name - hypervisor/type

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - blockModel - blockSerial - bootTimeUsecs - cluster - cpuCapacityHz - cpuFrequencyHz - cpuModel - defaultVhdContainerUuid - defaultVhdLocation - defaultVmContainerUuid - defaultVmLocation - failoverClusterFqdn - failoverClusterNodeStatus - gpuDriverVersion - gpuList - hostName - hostType - isRebootPending - maintenanceState - memorySizeBytes - nodeStatus - numberOfCpuCores - numberOfCpuSockets - numberOfCpuThreads

Returns:

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

    ListHosts200Response data, response status code and response headers



2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2617

def list_hosts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_hosts ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_hosts, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_hosts, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_hosts, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/hosts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListHosts200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_hosts",
    :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: ClustersApi#list_hosts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_physical_gpu_profiles(cluster_ext_id, opts = {}) ⇒ ListPhysicalGpuProfiles200Response

List Physical GPU profiles. List Physical GPU profiles.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - physicalGpuConfig/deviceId - physicalGpuConfig/deviceName - physicalGpuConfig/frameBufferSizeBytes - physicalGpuConfig/isInUse - physicalGpuConfig/type - physicalGpuConfig/vendorName

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - physicalGpuConfig/deviceId - physicalGpuConfig/frameBufferSizeBytes

Returns:



2786
2787
2788
2789
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2786

def list_physical_gpu_profiles(cluster_ext_id, opts = {})
  data, _status_code, _headers = list_physical_gpu_profiles_with_http_info(cluster_ext_id, opts)
  data
end

#list_physical_gpu_profiles_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListPhysicalGpuProfiles200Response, Integer, Hash)>

List Physical GPU profiles. List Physical GPU profiles.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - physicalGpuConfig/deviceId - physicalGpuConfig/deviceName - physicalGpuConfig/frameBufferSizeBytes - physicalGpuConfig/isInUse - physicalGpuConfig/type - physicalGpuConfig/vendorName

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - physicalGpuConfig/deviceId - physicalGpuConfig/frameBufferSizeBytes

Returns:



2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2800

def list_physical_gpu_profiles_with_http_info(cluster_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_physical_gpu_profiles ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_physical_gpu_profiles"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_physical_gpu_profiles, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_physical_gpu_profiles, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_physical_gpu_profiles, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_physical_gpu_profiles, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/physical-gpu-profiles'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListPhysicalGpuProfiles200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_physical_gpu_profiles",
    :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: ClustersApi#list_physical_gpu_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_rackable_units_by_cluster_id(cluster_ext_id, opts = {}) ⇒ ListRackableUnitsByClusterId200Response

Get the list of rackable units Lists the rackable units of the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Returns:



2874
2875
2876
2877
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2874

def list_rackable_units_by_cluster_id(cluster_ext_id, opts = {})
  data, _status_code, _headers = list_rackable_units_by_cluster_id_with_http_info(cluster_ext_id, opts)
  data
end

#list_rackable_units_by_cluster_id_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListRackableUnitsByClusterId200Response, Integer, Hash)>

Get the list of rackable units Lists the rackable units of the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Returns:



2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2884

def list_rackable_units_by_cluster_id_with_http_info(cluster_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_rackable_units_by_cluster_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_rackable_units_by_cluster_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_rackable_units_by_cluster_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rackable-units'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListRackableUnitsByClusterId200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_rackable_units_by_cluster_id",
    :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: ClustersApi#list_rackable_units_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_rsyslog_servers_by_cluster_id(cluster_ext_id, opts = {}) ⇒ ListRsyslogServersByClusterId200Response

Get the list of RSYSLOG server configurations Lists the RSYSLOG server configurations associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Returns:



2942
2943
2944
2945
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2942

def list_rsyslog_servers_by_cluster_id(cluster_ext_id, opts = {})
  data, _status_code, _headers = list_rsyslog_servers_by_cluster_id_with_http_info(cluster_ext_id, opts)
  data
end

#list_rsyslog_servers_by_cluster_id_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListRsyslogServersByClusterId200Response, Integer, Hash)>

Get the list of RSYSLOG server configurations Lists the RSYSLOG server configurations associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Returns:



2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 2952

def list_rsyslog_servers_by_cluster_id_with_http_info(cluster_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_rsyslog_servers_by_cluster_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_rsyslog_servers_by_cluster_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_rsyslog_servers_by_cluster_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rsyslog-servers'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListRsyslogServersByClusterId200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_rsyslog_servers_by_cluster_id",
    :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: ClustersApi#list_rsyslog_servers_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_virtual_gpu_profiles(cluster_ext_id, opts = {}) ⇒ ListVirtualGpuProfiles200Response

List Virtual GPU profiles. List Virtual GPU profiles.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - virtualGpuConfig/deviceId - virtualGpuConfig/deviceName - virtualGpuConfig/frameBufferSizeBytes - virtualGpuConfig/isInUse - virtualGpuConfig/maxInstancesPerVm - virtualGpuConfig/type - virtualGpuConfig/vendorName

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - virtualGpuConfig/deviceId - virtualGpuConfig/frameBufferSizeBytes

Returns:



3014
3015
3016
3017
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3014

def list_virtual_gpu_profiles(cluster_ext_id, opts = {})
  data, _status_code, _headers = list_virtual_gpu_profiles_with_http_info(cluster_ext_id, opts)
  data
end

#list_virtual_gpu_profiles_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListVirtualGpuProfiles200Response, Integer, Hash)>

List Virtual GPU profiles. List Virtual GPU profiles.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - virtualGpuConfig/deviceId - virtualGpuConfig/deviceName - virtualGpuConfig/frameBufferSizeBytes - virtualGpuConfig/isInUse - virtualGpuConfig/maxInstancesPerVm - virtualGpuConfig/type - virtualGpuConfig/vendorName

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - virtualGpuConfig/deviceId - virtualGpuConfig/frameBufferSizeBytes

Returns:



3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3028

def list_virtual_gpu_profiles_with_http_info(cluster_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_virtual_gpu_profiles ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_virtual_gpu_profiles"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_virtual_gpu_profiles, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_virtual_gpu_profiles, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_virtual_gpu_profiles, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_virtual_gpu_profiles, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/virtual-gpu-profiles'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListVirtualGpuProfiles200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_virtual_gpu_profiles",
    :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: ClustersApi#list_virtual_gpu_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_virtual_nics_by_host_id(cluster_ext_id, host_ext_id, opts = {}) ⇒ ListVirtualNicsByHostId200Response

Get the list of virtual NICs Lists all virtual NICs for the host identified by extId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - extId - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - vlanId

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - extId - name

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - hostDescription - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - vlanId

Returns:



3108
3109
3110
3111
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3108

def list_virtual_nics_by_host_id(cluster_ext_id, host_ext_id, opts = {})
  data, _status_code, _headers = list_virtual_nics_by_host_id_with_http_info(cluster_ext_id, host_ext_id, opts)
  data
end

#list_virtual_nics_by_host_id_with_http_info(cluster_ext_id, host_ext_id, opts = {}) ⇒ Array<(ListVirtualNicsByHostId200Response, Integer, Hash)>

Get the list of virtual NICs Lists all virtual NICs for the host identified by extId belonging to the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • host_ext_id (String)

    Host UUID.

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results. (default to 0)

  • :limit (Integer)

    A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set. (default to 50)

  • :filter (String)

    A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter &#39;$filter&#x3D;name eq &#39;karbon-ntnx-1.0&#39; would filter the result on cluster name &#39;karbon-ntnx1.0&#39;, filter &#39;$filter&#x3D;startswith(name, &#39;C&#39;)&#39; would filter on cluster name starting with &#39;C&#39;. The filter can be applied to the following fields: - extId - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - vlanId

  • :orderby (String)

    A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, &#39;$orderby&#x3D;templateName desc&#39; would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - extId - name

  • :select (String)

    A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the [OData V4.01](docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. - hostDescription - interfaceStatus - isDhcpEnabled - linkSpeedInKbps - macAddress - mtuInBytes - name - nodeUuid - vlanId

Returns:



3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3124

def list_virtual_nics_by_host_id_with_http_info(cluster_ext_id, host_ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.list_virtual_nics_by_host_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.list_virtual_nics_by_host_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.list_virtual_nics_by_host_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'host_ext_id' is set
  if @api_client.config.client_side_validation && host_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'host_ext_id' when calling ClustersApi.list_virtual_nics_by_host_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && host_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'host_ext_id' when calling ClustersApi.list_virtual_nics_by_host_id, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClustersApi.list_virtual_nics_by_host_id, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_virtual_nics_by_host_id, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ClustersApi.list_virtual_nics_by_host_id, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/hosts/{hostExtId}/virtual-nics'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'hostExtId' + '}', CGI.escape(host_ext_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ListVirtualNicsByHostId200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.list_virtual_nics_by_host_id",
    :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: ClustersApi#list_virtual_nics_by_host_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_node(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_node_removal_params, opts = {}) ⇒ RemoveNode202Response

Remove nodes from the cluster Removes nodes from cluster identified by extId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_config_node_removal_params (ClustermgmtV40ConfigNodeRemovalParams)

    Parameters to remove nodes from cluster.

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

    the optional parameters

Returns:



3210
3211
3212
3213
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3210

def remove_node(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_node_removal_params, opts = {})
  data, _status_code, _headers = remove_node_with_http_info(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_node_removal_params, opts)
  data
end

#remove_node_with_http_info(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_node_removal_params, opts = {}) ⇒ Array<(RemoveNode202Response, Integer, Hash)>

Remove nodes from the cluster Removes nodes from cluster identified by extId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ntnx_request_id (String)

    A unique identifier that is associated with each request. The provided value must be opaque and preferably in Universal Unique Identifier (UUID) format. This identifier is also used as an idempotence token for safely retrying requests in case of network errors. All the supported Nutanix API clients add this auto-generated request identifier to each request.

  • clustermgmt_v40_config_node_removal_params (ClustermgmtV40ConfigNodeRemovalParams)

    Parameters to remove nodes from cluster.

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

    the optional parameters

Returns:

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

    RemoveNode202Response data, response status code and response headers



3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3222

def remove_node_with_http_info(cluster_ext_id, ntnx_request_id, clustermgmt_v40_config_node_removal_params, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.remove_node ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.remove_node"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.remove_node, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ntnx_request_id' is set
  if @api_client.config.client_side_validation && ntnx_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'ntnx_request_id' when calling ClustersApi.remove_node"
  end
  # verify the required parameter 'clustermgmt_v40_config_node_removal_params' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_node_removal_params.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_node_removal_params' when calling ClustersApi.remove_node"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/remove-node'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'NTNX-Request-Id'] = ntnx_request_id

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'RemoveNode202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.remove_node",
    :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: ClustersApi#remove_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_snmp_transport(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {}) ⇒ RemoveSnmpTransport202Response

Remove SNMP transport ports and protocol details Removes transport ports and protocol detail from the SNMP configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_transport (ClustermgmtV40ConfigSnmpTransport)

    SNMP transports to remove.

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

    the optional parameters

Returns:



3295
3296
3297
3298
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3295

def remove_snmp_transport(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {})
  data, _status_code, _headers = remove_snmp_transport_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts)
  data
end

#remove_snmp_transport_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {}) ⇒ Array<(RemoveSnmpTransport202Response, Integer, Hash)>

Remove SNMP transport ports and protocol details Removes transport ports and protocol detail from the SNMP configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_transport (ClustermgmtV40ConfigSnmpTransport)

    SNMP transports to remove.

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

    the optional parameters

Returns:



3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3306

def remove_snmp_transport_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_transport, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.remove_snmp_transport ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.remove_snmp_transport"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.remove_snmp_transport, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_snmp_transport' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_transport.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_transport' when calling ClustersApi.remove_snmp_transport"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/$actions/remove-transports'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'RemoveSnmpTransport202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.remove_snmp_transport",
    :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: ClustersApi#remove_snmp_transport\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_cluster_by_id(ext_id, if_match, clustermgmt_v40_config_cluster, opts = {}) ⇒ UpdateClusterById202Response

Update cluster Update cluster operation.

Parameters:

  • ext_id (String)

    Cluster UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_cluster (ClustermgmtV40ConfigCluster)

    Cluster resource to update.

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

    the optional parameters

Returns:



3375
3376
3377
3378
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3375

def update_cluster_by_id(ext_id, if_match, clustermgmt_v40_config_cluster, opts = {})
  data, _status_code, _headers = update_cluster_by_id_with_http_info(ext_id, if_match, clustermgmt_v40_config_cluster, opts)
  data
end

#update_cluster_by_id_with_http_info(ext_id, if_match, clustermgmt_v40_config_cluster, opts = {}) ⇒ Array<(UpdateClusterById202Response, Integer, Hash)>

Update cluster Update cluster operation.

Parameters:

  • ext_id (String)

    Cluster UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_cluster (ClustermgmtV40ConfigCluster)

    Cluster resource to update.

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

    the optional parameters

Returns:



3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3387

def update_cluster_by_id_with_http_info(ext_id, if_match, clustermgmt_v40_config_cluster, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.update_cluster_by_id ...'
  end
  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.update_cluster_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.update_cluster_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'if_match' is set
  if @api_client.config.client_side_validation && if_match.nil?
    fail ArgumentError, "Missing the required parameter 'if_match' when calling ClustersApi.update_cluster_by_id"
  end
  # verify the required parameter 'clustermgmt_v40_config_cluster' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_cluster.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_cluster' when calling ClustersApi.update_cluster_by_id"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'If-Match'] = if_match

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateClusterById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.update_cluster_by_id",
    :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: ClustersApi#update_cluster_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rsyslog_server_by_id(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_rsyslog_server, opts = {}) ⇒ UpdateRsyslogServerById202Response

Update RSYSLOG server configuration Update RSYSLOG server configuration except RSYSLOG server name as it is a primary key of the entity.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    RSYSLOG server UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_rsyslog_server (ClustermgmtV40ConfigRsyslogServer)

    RSYSLOG server to update.

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

    the optional parameters

Returns:



3462
3463
3464
3465
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3462

def update_rsyslog_server_by_id(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_rsyslog_server, opts = {})
  data, _status_code, _headers = update_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_rsyslog_server, opts)
  data
end

#update_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_rsyslog_server, opts = {}) ⇒ Array<(UpdateRsyslogServerById202Response, Integer, Hash)>

Update RSYSLOG server configuration Update RSYSLOG server configuration except RSYSLOG server name as it is a primary key of the entity.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    RSYSLOG server UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_rsyslog_server (ClustermgmtV40ConfigRsyslogServer)

    RSYSLOG server to update.

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

    the optional parameters

Returns:



3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3475

def update_rsyslog_server_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_rsyslog_server, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.update_rsyslog_server_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.update_rsyslog_server_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.update_rsyslog_server_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.update_rsyslog_server_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.update_rsyslog_server_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'if_match' is set
  if @api_client.config.client_side_validation && if_match.nil?
    fail ArgumentError, "Missing the required parameter 'if_match' when calling ClustersApi.update_rsyslog_server_by_id"
  end
  # verify the required parameter 'clustermgmt_v40_config_rsyslog_server' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_rsyslog_server.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_rsyslog_server' when calling ClustersApi.update_rsyslog_server_by_id"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/rsyslog-servers/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'If-Match'] = if_match

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateRsyslogServerById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.update_rsyslog_server_by_id",
    :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: ClustersApi#update_rsyslog_server_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_snmp_status(cluster_ext_id, clustermgmt_v40_config_snmp_status_param, opts = {}) ⇒ UpdateSnmpStatus202Response

Update SNMP status Updates the status of SNMP configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_status_param (ClustermgmtV40ConfigSnmpStatusParam)

    SNMP status.

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

    the optional parameters

Returns:



3557
3558
3559
3560
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3557

def update_snmp_status(cluster_ext_id, clustermgmt_v40_config_snmp_status_param, opts = {})
  data, _status_code, _headers = update_snmp_status_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_status_param, opts)
  data
end

#update_snmp_status_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_status_param, opts = {}) ⇒ Array<(UpdateSnmpStatus202Response, Integer, Hash)>

Update SNMP status Updates the status of SNMP configuration associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_snmp_status_param (ClustermgmtV40ConfigSnmpStatusParam)

    SNMP status.

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

    the optional parameters

Returns:

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

    UpdateSnmpStatus202Response data, response status code and response headers



3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3568

def update_snmp_status_with_http_info(cluster_ext_id, clustermgmt_v40_config_snmp_status_param, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.update_snmp_status ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.update_snmp_status"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.update_snmp_status, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_snmp_status_param' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_status_param.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_status_param' when calling ClustersApi.update_snmp_status"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/$actions/update-status'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateSnmpStatus202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.update_snmp_status",
    :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: ClustersApi#update_snmp_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_snmp_trap_by_id(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_trap, opts = {}) ⇒ UpdateSnmpTrapById202Response

Update SNMP trap Update SNMP trap configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP trap UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_snmp_trap (ClustermgmtV40ConfigSnmpTrap)

    SNMP trap to update.

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

    the optional parameters

Returns:



3638
3639
3640
3641
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3638

def update_snmp_trap_by_id(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_trap, opts = {})
  data, _status_code, _headers = update_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_trap, opts)
  data
end

#update_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_trap, opts = {}) ⇒ Array<(UpdateSnmpTrapById202Response, Integer, Hash)>

Update SNMP trap Update SNMP trap configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP trap UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_snmp_trap (ClustermgmtV40ConfigSnmpTrap)

    SNMP trap to update.

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

    the optional parameters

Returns:



3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3651

def update_snmp_trap_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_trap, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.update_snmp_trap_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.update_snmp_trap_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.update_snmp_trap_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.update_snmp_trap_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.update_snmp_trap_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'if_match' is set
  if @api_client.config.client_side_validation && if_match.nil?
    fail ArgumentError, "Missing the required parameter 'if_match' when calling ClustersApi.update_snmp_trap_by_id"
  end
  # verify the required parameter 'clustermgmt_v40_config_snmp_trap' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_trap.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_trap' when calling ClustersApi.update_snmp_trap_by_id"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/traps/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'If-Match'] = if_match

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateSnmpTrapById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.update_snmp_trap_by_id",
    :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: ClustersApi#update_snmp_trap_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_snmp_user_by_id(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_user, opts = {}) ⇒ UpdateSnmpUserById202Response

Update SNMP user Updates SNMP user configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP user UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_snmp_user (ClustermgmtV40ConfigSnmpUser)

    SNMP user to update.

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

    the optional parameters

Returns:



3735
3736
3737
3738
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3735

def update_snmp_user_by_id(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_user, opts = {})
  data, _status_code, _headers = update_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_user, opts)
  data
end

#update_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_user, opts = {}) ⇒ Array<(UpdateSnmpUserById202Response, Integer, Hash)>

Update SNMP user Updates SNMP user configuration identified by extId associated with the cluster identified by clusterExtId.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • ext_id (String)

    SNMP user UUID.

  • if_match (String)

    The If-Match request header makes the request conditional. When not provided, the server will respond with an HTTP-428 (Precondition Required) response code indicating that the server requires the request to be conditional. The server will allow the successful completion of PUT and PATCH operations, if the resource matches the ETag value returned to the response of a GET operation. If the conditional does not match, then an HTTP-412 (Precondition Failed) response will be returned.

  • clustermgmt_v40_config_snmp_user (ClustermgmtV40ConfigSnmpUser)

    SNMP user to update.

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

    the optional parameters

Returns:



3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3748

def update_snmp_user_by_id_with_http_info(cluster_ext_id, ext_id, if_match, clustermgmt_v40_config_snmp_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.update_snmp_user_by_id ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.update_snmp_user_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.update_snmp_user_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'ext_id' is set
  if @api_client.config.client_side_validation && ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'ext_id' when calling ClustersApi.update_snmp_user_by_id"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && ext_id !~ pattern
    fail ArgumentError, "invalid value for 'ext_id' when calling ClustersApi.update_snmp_user_by_id, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'if_match' is set
  if @api_client.config.client_side_validation && if_match.nil?
    fail ArgumentError, "Missing the required parameter 'if_match' when calling ClustersApi.update_snmp_user_by_id"
  end
  # verify the required parameter 'clustermgmt_v40_config_snmp_user' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_snmp_user.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_snmp_user' when calling ClustersApi.update_snmp_user_by_id"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/snmp/users/{extId}'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'If-Match'] = if_match

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'UpdateSnmpUserById202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.update_snmp_user_by_id",
    :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: ClustersApi#update_snmp_user_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#validate_node(cluster_ext_id, clustermgmt_v40_config_validate_node_param, opts = {}) ⇒ ValidateNode202Response

Validates hypervisor bundle and node uplinks Validates hypervisor bundle and node uplinks of the node. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_validate_node_param (ClustermgmtV40ConfigValidateNodeParam)

    Request body for node validation. It can be OneOf between hypervisor bundle and node uplinks.

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

    the optional parameters

Returns:



3830
3831
3832
3833
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3830

def validate_node(cluster_ext_id, clustermgmt_v40_config_validate_node_param, opts = {})
  data, _status_code, _headers = validate_node_with_http_info(cluster_ext_id, clustermgmt_v40_config_validate_node_param, opts)
  data
end

#validate_node_with_http_info(cluster_ext_id, clustermgmt_v40_config_validate_node_param, opts = {}) ⇒ Array<(ValidateNode202Response, Integer, Hash)>

Validates hypervisor bundle and node uplinks Validates hypervisor bundle and node uplinks of the node. This API is not supported for XEN hypervisor type.

Parameters:

  • cluster_ext_id (String)

    Cluster UUID.

  • clustermgmt_v40_config_validate_node_param (ClustermgmtV40ConfigValidateNodeParam)

    Request body for node validation. It can be OneOf between hypervisor bundle and node uplinks.

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

    the optional parameters

Returns:

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

    ValidateNode202Response data, response status code and response headers



3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
# File 'lib/nutanix_clustermgmt/api/clusters_api.rb', line 3841

def validate_node_with_http_info(cluster_ext_id, clustermgmt_v40_config_validate_node_param, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClustersApi.validate_node ...'
  end
  # verify the required parameter 'cluster_ext_id' is set
  if @api_client.config.client_side_validation && cluster_ext_id.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_ext_id' when calling ClustersApi.validate_node"
  end
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if @api_client.config.client_side_validation && cluster_ext_id !~ pattern
    fail ArgumentError, "invalid value for 'cluster_ext_id' when calling ClustersApi.validate_node, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_validate_node_param' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_validate_node_param.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_validate_node_param' when calling ClustersApi.validate_node"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/$actions/validate-node'.sub('{' + 'clusterExtId' + '}', CGI.escape(cluster_ext_id.to_s))

  # 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/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'ValidateNode202Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']

  new_options = opts.merge(
    :operation => :"ClustersApi.validate_node",
    :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: ClustersApi#validate_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end