Class: NutanixClustermgmt::DisksApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DisksApi

Returns a new instance of DisksApi.



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

def api_client
  @api_client
end

Instance Method Details

#add_disk(ext_id, clustermgmt_v40_config_disk_addition_spec, opts = {}) ⇒ AddDisk202Response

Adds Disk to a cluster Repartitions and adds the Disk to a cluster, or adds an old Disk again to a cluster that is marked for removal.

Parameters:

  • ext_id (String)

    The external identifier of the cluster on which Disk will be added.

  • clustermgmt_v40_config_disk_addition_spec (ClustermgmtV40ConfigDiskAdditionSpec)

    Request model to add a disk to a cluster.

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

    the optional parameters

Returns:



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

def add_disk(ext_id, clustermgmt_v40_config_disk_addition_spec, opts = {})
  data, _status_code, _headers = add_disk_with_http_info(ext_id, clustermgmt_v40_config_disk_addition_spec, opts)
  data
end

#add_disk_with_http_info(ext_id, clustermgmt_v40_config_disk_addition_spec, opts = {}) ⇒ Array<(AddDisk202Response, Integer, Hash)>

Adds Disk to a cluster Repartitions and adds the Disk to a cluster, or adds an old Disk again to a cluster that is marked for removal.

Parameters:

  • ext_id (String)

    The external identifier of the cluster on which Disk will be added.

  • clustermgmt_v40_config_disk_addition_spec (ClustermgmtV40ConfigDiskAdditionSpec)

    Request model to add a disk to a cluster.

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

    the optional parameters

Returns:

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

    AddDisk202Response 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/disks_api.rb', line 39

def add_disk_with_http_info(ext_id, clustermgmt_v40_config_disk_addition_spec, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DisksApi.add_disk ...'
  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 DisksApi.add_disk"
  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 DisksApi.add_disk, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'clustermgmt_v40_config_disk_addition_spec' is set
  if @api_client.config.client_side_validation && clustermgmt_v40_config_disk_addition_spec.nil?
    fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_disk_addition_spec' when calling DisksApi.add_disk"
  end
  # resource path
  local_var_path = '/clustermgmt/v4.0/config/clusters/{extId}/$actions/add-disk'.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

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

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

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

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

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

#delete_disk_by_id(ext_id, opts = {}) ⇒ DeleteDiskById202Response

Removes Disk from a cluster Marks Disk identified by external identifier for removal.

Parameters:

  • ext_id (String)

    The external identifier of the Disk.

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

    the optional parameters

Returns:



106
107
108
109
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 106

def delete_disk_by_id(ext_id, opts = {})
  data, _status_code, _headers = delete_disk_by_id_with_http_info(ext_id, opts)
  data
end

#delete_disk_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(DeleteDiskById202Response, Integer, Hash)>

Removes Disk from a cluster Marks Disk identified by external identifier for removal.

Parameters:

  • ext_id (String)

    The external identifier of the Disk.

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

    the optional parameters

Returns:

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

    DeleteDiskById202Response data, response status code and response headers



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 116

def delete_disk_by_id_with_http_info(ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DisksApi.delete_disk_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 DisksApi.delete_disk_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 DisksApi.delete_disk_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/disks/{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']

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

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

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

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

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

#get_disk_by_id(ext_id, opts = {}) ⇒ GetDiskById200Response

Get Disk by its external identifier Fetch the details of the Disk identified by external identifier.

Parameters:

  • ext_id (String)

    The external identifier of the Disk.

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

    the optional parameters

Returns:



174
175
176
177
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 174

def get_disk_by_id(ext_id, opts = {})
  data, _status_code, _headers = get_disk_by_id_with_http_info(ext_id, opts)
  data
end

#get_disk_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetDiskById200Response, Integer, Hash)>

Get Disk by its external identifier Fetch the details of the Disk identified by external identifier.

Parameters:

  • ext_id (String)

    The external identifier of the Disk.

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

    the optional parameters

Returns:

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

    GetDiskById200Response data, response status code and response headers



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 184

def get_disk_by_id_with_http_info(ext_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DisksApi.get_disk_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 DisksApi.get_disk_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 DisksApi.get_disk_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/config/disks/{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']

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

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

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

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

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

#get_disk_stats(ext_id, start_time, end_time, opts = {}) ⇒ GetDiskStats200Response

Get stats for the existing Disk Fetch the stats information of the Disk identified by external identifier.

Parameters:

  • ext_id (String)

    The external identifier of the Disk.

  • 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)

Returns:



246
247
248
249
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 246

def get_disk_stats(ext_id, start_time, end_time, opts = {})
  data, _status_code, _headers = get_disk_stats_with_http_info(ext_id, start_time, end_time, opts)
  data
end

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

Get stats for the existing Disk Fetch the stats information of the Disk identified by external identifier.

Parameters:

  • ext_id (String)

    The external identifier of the Disk.

  • 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)

Returns:

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

    GetDiskStats200Response data, response status code and response headers



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
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
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 260

def get_disk_stats_with_http_info(ext_id, start_time, end_time, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DisksApi.get_disk_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 DisksApi.get_disk_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 DisksApi.get_disk_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 DisksApi.get_disk_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 DisksApi.get_disk_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 DisksApi.get_disk_stats, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/clustermgmt/v4.0/stats/disks/{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?

  # 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] || 'GetDiskStats200Response'

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

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

#list_disks(opts = {}) ⇒ ListDisks200Response

Get Disks for all the clusters Fetches Disk details from all clusters registered with 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: - clusterName - diskAdvanceConfig/isOnline - hostName - serialNumber - status - storageTier

  • :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: - clusterName - diskAdvanceConfig/isOnline - extId - hostName - serialNumber - status - storageTier

  • :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: - clusterName - diskAdvanceConfig/isOnline - hostName - status - storageTier

  • :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. - clusterExtId - clusterName - cvmIpAddress - diskAdvanceConfig/hasBootPartitionsOnly - diskAdvanceConfig/isBootDisk - diskAdvanceConfig/isDataMigrated - diskAdvanceConfig/isDiagnosticInfoAvailable - diskAdvanceConfig/isErrorFoundInLog - diskAdvanceConfig/isMarkedForRemoval - diskAdvanceConfig/isMounted - diskAdvanceConfig/isOnline - diskAdvanceConfig/isPasswordProtected - diskAdvanceConfig/isPlannedOutage - diskAdvanceConfig/isSelfEncryptingDrive - diskAdvanceConfig/isSelfManagedNvme - diskAdvanceConfig/isSpdkManaged - diskAdvanceConfig/isSuspectedUnhealthy - diskAdvanceConfig/isUnderDiagnosis - diskAdvanceConfig/isUnhealthy - diskSizeBytes - extId - firmwareVersion - hostName - links - location - model - mountPath - nodeExtId - nodeIpAddress - nvmePciePath - physicalCapacityBytes - serialNumber - serviceVMId - status - storagePoolExtId - storageTier - targetFirmwareVersion - tenantId - vendor

Returns:



339
340
341
342
# File 'lib/nutanix_clustermgmt/api/disks_api.rb', line 339

def list_disks(opts = {})
  data, _status_code, _headers = list_disks_with_http_info(opts)
  data
end

#list_disks_with_http_info(opts = {}) ⇒ Array<(ListDisks200Response, Integer, Hash)>

Get Disks for all the clusters Fetches Disk details from all clusters registered with 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: - clusterName - diskAdvanceConfig/isOnline - hostName - serialNumber - status - storageTier

  • :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: - clusterName - diskAdvanceConfig/isOnline - extId - hostName - serialNumber - status - storageTier

  • :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: - clusterName - diskAdvanceConfig/isOnline - hostName - status - storageTier

  • :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. - clusterExtId - clusterName - cvmIpAddress - diskAdvanceConfig/hasBootPartitionsOnly - diskAdvanceConfig/isBootDisk - diskAdvanceConfig/isDataMigrated - diskAdvanceConfig/isDiagnosticInfoAvailable - diskAdvanceConfig/isErrorFoundInLog - diskAdvanceConfig/isMarkedForRemoval - diskAdvanceConfig/isMounted - diskAdvanceConfig/isOnline - diskAdvanceConfig/isPasswordProtected - diskAdvanceConfig/isPlannedOutage - diskAdvanceConfig/isSelfEncryptingDrive - diskAdvanceConfig/isSelfManagedNvme - diskAdvanceConfig/isSpdkManaged - diskAdvanceConfig/isSuspectedUnhealthy - diskAdvanceConfig/isUnderDiagnosis - diskAdvanceConfig/isUnhealthy - diskSizeBytes - extId - firmwareVersion - hostName - links - location - model - mountPath - nodeExtId - nodeIpAddress - nvmePciePath - physicalCapacityBytes - serialNumber - serviceVMId - status - storagePoolExtId - storageTier - targetFirmwareVersion - tenantId - vendor

Returns:

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

    ListDisks200Response data, response status code and response headers



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/disks_api.rb', line 354

def list_disks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DisksApi.list_disks ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling DisksApi.list_disks, 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 DisksApi.list_disks, 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 DisksApi.list_disks, must be greater than or equal to 1.'
  end

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

  # 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] || 'ListDisks200Response'

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

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