forked from ManageIQ/nutanix_clustermgmt-sdk-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage_containers_api.rb
More file actions
771 lines (660 loc) · 53.7 KB
/
storage_containers_api.rb
File metadata and controls
771 lines (660 loc) · 53.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
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
258
259
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
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
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
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
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
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
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
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
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
=begin
#Nutanix Cluster Management APIs
#Manage Hosts, Clusters and other Infrastructure.
The version of the OpenAPI document: 4.0.2
Generated by: https://openapi-generator.tech
Generator version: 7.19.0
=end
require 'cgi'
module NutanixClustermgmt
class StorageContainersApi
attr_accessor :api_client
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# Create a Storage Container
# Creates a new Storage Container with the specified configuration on the cluster identified by cluster’s external identifier. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param x_cluster_id [String] The external identifier of the remote cluster to forward the request.
# @param 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.
# @param clustermgmt_v40_config_storage_container [ClustermgmtV40ConfigStorageContainer]
# @param [Hash] opts the optional parameters
# @return [CreateStorageContainer202Response]
def create_storage_container(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {})
data, _status_code, _headers = create_storage_container_with_http_info(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts)
data
end
# Create a Storage Container
# Creates a new Storage Container with the specified configuration on the cluster identified by cluster’s external identifier. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param x_cluster_id [String] The external identifier of the remote cluster to forward the request.
# @param 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.
# @param clustermgmt_v40_config_storage_container [ClustermgmtV40ConfigStorageContainer]
# @param [Hash] opts the optional parameters
# @return [Array<(CreateStorageContainer202Response, Integer, Hash)>] CreateStorageContainer202Response data, response status code and response headers
def create_storage_container_with_http_info(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.create_storage_container ...'
end
# verify the required parameter 'x_cluster_id' is set
if @api_client.config.client_side_validation && x_cluster_id.nil?
fail ArgumentError, "Missing the required parameter 'x_cluster_id' when calling StorageContainersApi.create_storage_container"
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 && x_cluster_id !~ pattern
fail ArgumentError, "invalid value for 'x_cluster_id' when calling StorageContainersApi.create_storage_container, 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 StorageContainersApi.create_storage_container"
end
# verify the required parameter 'clustermgmt_v40_config_storage_container' is set
if @api_client.config.client_side_validation && clustermgmt_v40_config_storage_container.nil?
fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_storage_container' when calling StorageContainersApi.create_storage_container"
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers'
# 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[:'X-Cluster-Id'] = x_cluster_id
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_storage_container)
# return_type
return_type = opts[:debug_return_type] || 'CreateStorageContainer202Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.create_storage_container",
: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: StorageContainersApi#create_storage_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Delete a Storage Container
# Deletes an existing Storage Container identified by external identifier. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param 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.
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :ignore_small_files (default to true)
# @return [DeleteStorageContainerById202Response]
def delete_storage_container_by_id(ext_id, ntnx_request_id, opts = {})
data, _status_code, _headers = delete_storage_container_by_id_with_http_info(ext_id, ntnx_request_id, opts)
data
end
# Delete a Storage Container
# Deletes an existing Storage Container identified by external identifier. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param 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.
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :ignore_small_files (default to true)
# @return [Array<(DeleteStorageContainerById202Response, Integer, Hash)>] DeleteStorageContainerById202Response data, response status code and response headers
def delete_storage_container_by_id_with_http_info(ext_id, ntnx_request_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.delete_storage_container_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 StorageContainersApi.delete_storage_container_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 StorageContainersApi.delete_storage_container_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 StorageContainersApi.delete_storage_container_by_id"
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s))
# query parameters
query_params = opts[:query_params] || {}
query_params[:'ignoreSmallFiles'] = opts[:'ignore_small_files'] if !opts[:'ignore_small_files'].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] || 'DeleteStorageContainerById202Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.delete_storage_container_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: StorageContainersApi#delete_storage_container_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get Storage Container configuration
# Fetches the configuration details of an existing storage container identified by the external identifier. Note: The Storage Containers of PEs with versions prior to AOS 6.5 might have missing attribute data, and the PEs under the self-owned RBAC category might not be visible to non-admin users.
# @param ext_id [String] The external identifier of the Storage Container.
# @param [Hash] opts the optional parameters
# @return [GetStorageContainerById200Response]
def get_storage_container_by_id(ext_id, opts = {})
data, _status_code, _headers = get_storage_container_by_id_with_http_info(ext_id, opts)
data
end
# Get Storage Container configuration
# Fetches the configuration details of an existing storage container identified by the external identifier. Note: The Storage Containers of PEs with versions prior to AOS 6.5 might have missing attribute data, and the PEs under the self-owned RBAC category might not be visible to non-admin users.
# @param ext_id [String] The external identifier of the Storage Container.
# @param [Hash] opts the optional parameters
# @return [Array<(GetStorageContainerById200Response, Integer, Hash)>] GetStorageContainerById200Response data, response status code and response headers
def get_storage_container_by_id_with_http_info(ext_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_by_id, must conform to the pattern #{pattern}."
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers/{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] || 'GetStorageContainerById200Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.get_storage_container_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: StorageContainersApi#get_storage_container_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get Stats for a Storage Container
# Fetches the statistical information for the Storage Container identified by external identifier..
# @param ext_id [String] The external identifier of the Storage Container.
# @param 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 https://www.iso.org/standard/70907.html
# @param 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 https://www.iso.org/standard/70907.html
# @param [Hash] opts the optional parameters
# @option opts [Integer] :sampling_interval 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.
# @option opts [CommonV10StatsDownSamplingOperator] :stat_type
# @return [GetStorageContainerStats200Response]
def get_storage_container_stats(ext_id, start_time, end_time, opts = {})
data, _status_code, _headers = get_storage_container_stats_with_http_info(ext_id, start_time, end_time, opts)
data
end
# Get Stats for a Storage Container
# Fetches the statistical information for the Storage Container identified by external identifier..
# @param ext_id [String] The external identifier of the Storage Container.
# @param 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 https://www.iso.org/standard/70907.html
# @param 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 https://www.iso.org/standard/70907.html
# @param [Hash] opts the optional parameters
# @option opts [Integer] :sampling_interval 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.
# @option opts [CommonV10StatsDownSamplingOperator] :stat_type
# @return [Array<(GetStorageContainerStats200Response, Integer, Hash)>] GetStorageContainerStats200Response data, response status code and response headers
def get_storage_container_stats_with_http_info(ext_id, start_time, end_time, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_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 StorageContainersApi.get_storage_container_stats, must be greater than or equal to 1.'
end
# resource path
local_var_path = '/clustermgmt/v4.0/stats/storage-containers/{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] || 'GetStorageContainerStats200Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.get_storage_container_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: StorageContainersApi#get_storage_container_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# List datastores of a cluster
# Lists all the datastores associated with Storage Containers from a cluster.
# @param cluster_ext_id [String] The cluster from which the datastores needs to be listed.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :page 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)
# @option opts [Integer] :limit 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)
# @option opts [String] :filter 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](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'. The filter can be applied to the following fields: - containerExtId
# @return [ListDataStoresByClusterId200Response]
def list_data_stores_by_cluster_id(cluster_ext_id, opts = {})
data, _status_code, _headers = list_data_stores_by_cluster_id_with_http_info(cluster_ext_id, opts)
data
end
# List datastores of a cluster
# Lists all the datastores associated with Storage Containers from a cluster.
# @param cluster_ext_id [String] The cluster from which the datastores needs to be listed.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :page 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)
# @option opts [Integer] :limit 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)
# @option opts [String] :filter 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](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'. The filter can be applied to the following fields: - containerExtId
# @return [Array<(ListDataStoresByClusterId200Response, Integer, Hash)>] ListDataStoresByClusterId200Response data, response status code and response headers
def list_data_stores_by_cluster_id_with_http_info(cluster_ext_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.list_data_stores_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 StorageContainersApi.list_data_stores_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 StorageContainersApi.list_data_stores_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 StorageContainersApi.list_data_stores_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 StorageContainersApi.list_data_stores_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 StorageContainersApi.list_data_stores_by_cluster_id, must be greater than or equal to 1.'
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/clusters/{clusterExtId}/storage-containers/datastores'.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?
# 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] || 'ListDataStoresByClusterId200Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.list_data_stores_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: StorageContainersApi#list_data_stores_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# List Storage Containers
# Lists the Storage Containers available in the cluster. Note: The Storage Containers of PEs with versions prior to AOS 6.5 might have missing attribute data, and the PEs under the self-owned RBAC category might not be visible to non-admin users.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :page 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)
# @option opts [Integer] :limit 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)
# @option opts [String] :filter 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](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'. The filter can be applied to the following fields: - affinityHostExtId - clusterExtId - clusterName - compressionDelaySecs - containerExtId - name - ownerExtId - replicationFactor - storagePoolExtId
# @option opts [String] :orderby 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, '$orderby=templateName desc' would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - affinityHostExtId - clusterName - compressionDelaySecs - containerExtId - erasureCode - name - replicationFactor
# @option opts [String] :select 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](https://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. - affinityHostExtId - cacheDeduplication - clusterExtId - clusterName - compressionDelaySecs - containerExtId - erasureCode - erasureCodeDelaySecs - extId - hasHigherEcFaultDomainPreference - isCompressionEnabled - isEncrypted - isInlineEcEnabled - isInternal - isMarkedForRemoval - isNfsWhitelistInherited - isSoftwareEncryptionEnabled - links - logicalAdvertisedCapacityBytes - logicalExplicitReservedCapacityBytes - logicalImplicitReservedCapacityBytes - markedForRemoval - maxCapacityBytes - name - nfsWhitelistAddress - onDiskDedup - ownerExtId - replicationFactor - storagePoolExtId - tenantId
# @return [ListStorageContainers200Response]
def list_storage_containers(opts = {})
data, _status_code, _headers = list_storage_containers_with_http_info(opts)
data
end
# List Storage Containers
# Lists the Storage Containers available in the cluster. Note: The Storage Containers of PEs with versions prior to AOS 6.5 might have missing attribute data, and the PEs under the self-owned RBAC category might not be visible to non-admin users.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :page 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)
# @option opts [Integer] :limit 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)
# @option opts [String] :filter 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](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) URL conventions. For example, filter '$filter=name eq 'karbon-ntnx-1.0' would filter the result on cluster name 'karbon-ntnx1.0', filter '$filter=startswith(name, 'C')' would filter on cluster name starting with 'C'. The filter can be applied to the following fields: - affinityHostExtId - clusterExtId - clusterName - compressionDelaySecs - containerExtId - name - ownerExtId - replicationFactor - storagePoolExtId
# @option opts [String] :orderby 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, '$orderby=templateName desc' would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: - affinityHostExtId - clusterName - compressionDelaySecs - containerExtId - erasureCode - name - replicationFactor
# @option opts [String] :select 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](https://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. - affinityHostExtId - cacheDeduplication - clusterExtId - clusterName - compressionDelaySecs - containerExtId - erasureCode - erasureCodeDelaySecs - extId - hasHigherEcFaultDomainPreference - isCompressionEnabled - isEncrypted - isInlineEcEnabled - isInternal - isMarkedForRemoval - isNfsWhitelistInherited - isSoftwareEncryptionEnabled - links - logicalAdvertisedCapacityBytes - logicalExplicitReservedCapacityBytes - logicalImplicitReservedCapacityBytes - markedForRemoval - maxCapacityBytes - name - nfsWhitelistAddress - onDiskDedup - ownerExtId - replicationFactor - storagePoolExtId - tenantId
# @return [Array<(ListStorageContainers200Response, Integer, Hash)>] ListStorageContainers200Response data, response status code and response headers
def list_storage_containers_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.list_storage_containers ...'
end
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling StorageContainersApi.list_storage_containers, 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 StorageContainersApi.list_storage_containers, 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 StorageContainersApi.list_storage_containers, must be greater than or equal to 1.'
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers'
# 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] || 'ListStorageContainers200Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.list_storage_containers",
: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: StorageContainersApi#list_storage_containers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Mount Storage Container on ESX datastore
# Mounts the Storage Container identified by external identifier on an ESX datastore. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param clustermgmt_v40_config_data_store_mount [ClustermgmtV40ConfigDataStoreMount]
# @param [Hash] opts the optional parameters
# @return [MountStorageContainer202Response]
def mount_storage_container(ext_id, clustermgmt_v40_config_data_store_mount, opts = {})
data, _status_code, _headers = mount_storage_container_with_http_info(ext_id, clustermgmt_v40_config_data_store_mount, opts)
data
end
# Mount Storage Container on ESX datastore
# Mounts the Storage Container identified by external identifier on an ESX datastore. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param clustermgmt_v40_config_data_store_mount [ClustermgmtV40ConfigDataStoreMount]
# @param [Hash] opts the optional parameters
# @return [Array<(MountStorageContainer202Response, Integer, Hash)>] MountStorageContainer202Response data, response status code and response headers
def mount_storage_container_with_http_info(ext_id, clustermgmt_v40_config_data_store_mount, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.mount_storage_container ...'
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 StorageContainersApi.mount_storage_container"
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 StorageContainersApi.mount_storage_container, must conform to the pattern #{pattern}."
end
# verify the required parameter 'clustermgmt_v40_config_data_store_mount' is set
if @api_client.config.client_side_validation && clustermgmt_v40_config_data_store_mount.nil?
fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_data_store_mount' when calling StorageContainersApi.mount_storage_container"
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers/{extId}/$actions/mount'.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_data_store_mount)
# return_type
return_type = opts[:debug_return_type] || 'MountStorageContainer202Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.mount_storage_container",
: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: StorageContainersApi#mount_storage_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Unmount Storage Container from ESX datastore
# Unmounts the Storage Container identified by external identifier from the ESX datastore. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param clustermgmt_v40_config_data_store_unmount [ClustermgmtV40ConfigDataStoreUnmount]
# @param [Hash] opts the optional parameters
# @return [UnmountStorageContainer202Response]
def unmount_storage_container(ext_id, clustermgmt_v40_config_data_store_unmount, opts = {})
data, _status_code, _headers = unmount_storage_container_with_http_info(ext_id, clustermgmt_v40_config_data_store_unmount, opts)
data
end
# Unmount Storage Container from ESX datastore
# Unmounts the Storage Container identified by external identifier from the ESX datastore. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param clustermgmt_v40_config_data_store_unmount [ClustermgmtV40ConfigDataStoreUnmount]
# @param [Hash] opts the optional parameters
# @return [Array<(UnmountStorageContainer202Response, Integer, Hash)>] UnmountStorageContainer202Response data, response status code and response headers
def unmount_storage_container_with_http_info(ext_id, clustermgmt_v40_config_data_store_unmount, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.unmount_storage_container ...'
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 StorageContainersApi.unmount_storage_container"
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 StorageContainersApi.unmount_storage_container, must conform to the pattern #{pattern}."
end
# verify the required parameter 'clustermgmt_v40_config_data_store_unmount' is set
if @api_client.config.client_side_validation && clustermgmt_v40_config_data_store_unmount.nil?
fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_data_store_unmount' when calling StorageContainersApi.unmount_storage_container"
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers/{extId}/$actions/unmount'.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_data_store_unmount)
# return_type
return_type = opts[:debug_return_type] || 'UnmountStorageContainer202Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.unmount_storage_container",
: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: StorageContainersApi#unmount_storage_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Update a Storage Container
# Updates the configuration of an existing Storage Container identified by external identifier. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param 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.
# @param 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.
# @param clustermgmt_v40_config_storage_container [ClustermgmtV40ConfigStorageContainer]
# @param [Hash] opts the optional parameters
# @return [UpdateStorageContainerById202Response]
def update_storage_container_by_id(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {})
data, _status_code, _headers = update_storage_container_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts)
data
end
# Update a Storage Container
# Updates the configuration of an existing Storage Container identified by external identifier. The location header received in the API response contains the URL of the task object, which can be used to further track the status of the request.
# @param ext_id [String] The external identifier of the Storage Container.
# @param 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.
# @param 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.
# @param clustermgmt_v40_config_storage_container [ClustermgmtV40ConfigStorageContainer]
# @param [Hash] opts the optional parameters
# @return [Array<(UpdateStorageContainerById202Response, Integer, Hash)>] UpdateStorageContainerById202Response data, response status code and response headers
def update_storage_container_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: StorageContainersApi.update_storage_container_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 StorageContainersApi.update_storage_container_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 StorageContainersApi.update_storage_container_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 StorageContainersApi.update_storage_container_by_id"
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 StorageContainersApi.update_storage_container_by_id"
end
# verify the required parameter 'clustermgmt_v40_config_storage_container' is set
if @api_client.config.client_side_validation && clustermgmt_v40_config_storage_container.nil?
fail ArgumentError, "Missing the required parameter 'clustermgmt_v40_config_storage_container' when calling StorageContainersApi.update_storage_container_by_id"
end
# resource path
local_var_path = '/clustermgmt/v4.0/config/storage-containers/{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
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_storage_container)
# return_type
return_type = opts[:debug_return_type] || 'UpdateStorageContainerById202Response'
# auth_names
auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme']
new_options = opts.merge(
:operation => :"StorageContainersApi.update_storage_container_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: StorageContainersApi#update_storage_container_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end