Class: NutanixClustermgmt::StorageContainersApi
- Inherits:
-
Object
- Object
- NutanixClustermgmt::StorageContainersApi
- Defined in:
- lib/nutanix_clustermgmt/api/storage_containers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_storage_container(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ CreateStorageContainer202Response
Create a Storage Container Creates a new Storage Container with the specified configuration on the cluster identified by cluster’s external identifier.
-
#create_storage_container_with_http_info(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ Array<(CreateStorageContainer202Response, Integer, Hash)>
Create a Storage Container Creates a new Storage Container with the specified configuration on the cluster identified by cluster’s external identifier.
-
#delete_storage_container_by_id(ext_id, ntnx_request_id, opts = {}) ⇒ DeleteStorageContainerById202Response
Delete a Storage Container Deletes an existing Storage Container identified by external identifier.
-
#delete_storage_container_by_id_with_http_info(ext_id, ntnx_request_id, opts = {}) ⇒ Array<(DeleteStorageContainerById202Response, Integer, Hash)>
Delete a Storage Container Deletes an existing Storage Container identified by external identifier.
-
#get_storage_container_by_id(ext_id, opts = {}) ⇒ GetStorageContainerById200Response
Get Storage Container configuration Fetches the configuration details of an existing storage container identified by the external identifier.
-
#get_storage_container_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetStorageContainerById200Response, Integer, Hash)>
Get Storage Container configuration Fetches the configuration details of an existing storage container identified by the external identifier.
-
#get_storage_container_stats(ext_id, start_time, end_time, opts = {}) ⇒ GetStorageContainerStats200Response
Get Stats for a Storage Container Fetches the statistical information for the Storage Container identified by external identifier..
-
#get_storage_container_stats_with_http_info(ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetStorageContainerStats200Response, Integer, Hash)>
Get Stats for a Storage Container Fetches the statistical information for the Storage Container identified by external identifier..
-
#initialize(api_client = ApiClient.default) ⇒ StorageContainersApi
constructor
A new instance of StorageContainersApi.
-
#list_data_stores_by_cluster_id(cluster_ext_id, opts = {}) ⇒ ListDataStoresByClusterId200Response
List datastores of a cluster Lists all the datastores associated with Storage Containers from a cluster.
-
#list_data_stores_by_cluster_id_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListDataStoresByClusterId200Response, Integer, Hash)>
List datastores of a cluster Lists all the datastores associated with Storage Containers from a cluster.
-
#list_storage_containers(opts = {}) ⇒ ListStorageContainers200Response
List Storage Containers Lists the Storage Containers available in the cluster.
-
#list_storage_containers_with_http_info(opts = {}) ⇒ Array<(ListStorageContainers200Response, Integer, Hash)>
List Storage Containers Lists the Storage Containers available in the cluster.
-
#mount_storage_container(ext_id, clustermgmt_v40_config_data_store_mount, opts = {}) ⇒ MountStorageContainer202Response
Mount Storage Container on ESX datastore Mounts the Storage Container identified by external identifier on an ESX datastore.
-
#mount_storage_container_with_http_info(ext_id, clustermgmt_v40_config_data_store_mount, opts = {}) ⇒ Array<(MountStorageContainer202Response, Integer, Hash)>
Mount Storage Container on ESX datastore Mounts the Storage Container identified by external identifier on an ESX datastore.
-
#unmount_storage_container(ext_id, clustermgmt_v40_config_data_store_unmount, opts = {}) ⇒ UnmountStorageContainer202Response
Unmount Storage Container from ESX datastore Unmounts the Storage Container identified by external identifier from the ESX datastore.
-
#unmount_storage_container_with_http_info(ext_id, clustermgmt_v40_config_data_store_unmount, opts = {}) ⇒ Array<(UnmountStorageContainer202Response, Integer, Hash)>
Unmount Storage Container from ESX datastore Unmounts the Storage Container identified by external identifier from the ESX datastore.
-
#update_storage_container_by_id(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ UpdateStorageContainerById202Response
Update a Storage Container Updates the configuration of an existing Storage Container identified by external identifier.
-
#update_storage_container_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ Array<(UpdateStorageContainerById202Response, Integer, Hash)>
Update a Storage Container Updates the configuration of an existing Storage Container identified by external identifier.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ StorageContainersApi
Returns a new instance of StorageContainersApi.
19 20 21 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_storage_container(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ CreateStorageContainer202Response
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.
29 30 31 32 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 29 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_storage_container_with_http_info(x_cluster_id, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ Array<(CreateStorageContainer202Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 41 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'] = 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, ) 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_storage_container_by_id(ext_id, ntnx_request_id, opts = {}) ⇒ DeleteStorageContainerById202Response
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.
116 117 118 119 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 116 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_storage_container_by_id_with_http_info(ext_id, ntnx_request_id, opts = {}) ⇒ Array<(DeleteStorageContainerById202Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 128 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'] = 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, ) 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_by_id(ext_id, opts = {}) ⇒ GetStorageContainerById200Response
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.
192 193 194 195 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 192 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_by_id_with_http_info(ext_id, opts = {}) ⇒ Array<(GetStorageContainerById200Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 202 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'] = 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, ) 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_storage_container_stats(ext_id, start_time, end_time, opts = {}) ⇒ GetStorageContainerStats200Response
Get Stats for a Storage Container Fetches the statistical information for the Storage Container identified by external identifier..
264 265 266 267 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 264 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_storage_container_stats_with_http_info(ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetStorageContainerStats200Response, Integer, Hash)>
Get Stats for a Storage Container Fetches the statistical information for the Storage Container identified by external identifier..
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 278 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'] = 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, ) 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_data_stores_by_cluster_id(cluster_ext_id, opts = {}) ⇒ ListDataStoresByClusterId200Response
List datastores of a cluster Lists all the datastores associated with Storage Containers from a cluster.
355 356 357 358 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 355 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_data_stores_by_cluster_id_with_http_info(cluster_ext_id, opts = {}) ⇒ Array<(ListDataStoresByClusterId200Response, Integer, Hash)>
List datastores of a cluster Lists all the datastores associated with Storage Containers from a cluster.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 368 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'] = 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, ) 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(opts = {}) ⇒ ListStorageContainers200Response
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.
445 446 447 448 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 445 def list_storage_containers(opts = {}) data, _status_code, _headers = list_storage_containers_with_http_info(opts) data end |
#list_storage_containers_with_http_info(opts = {}) ⇒ Array<(ListStorageContainers200Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 459 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'] = 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, ) 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(ext_id, clustermgmt_v40_config_data_store_mount, opts = {}) ⇒ MountStorageContainer202Response
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.
526 527 528 529 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 526 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_with_http_info(ext_id, clustermgmt_v40_config_data_store_mount, opts = {}) ⇒ Array<(MountStorageContainer202Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 537 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'] = 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, ) 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(ext_id, clustermgmt_v40_config_data_store_unmount, opts = {}) ⇒ UnmountStorageContainer202Response
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.
605 606 607 608 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 605 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_with_http_info(ext_id, clustermgmt_v40_config_data_store_unmount, opts = {}) ⇒ Array<(UnmountStorageContainer202Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 616 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'] = 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, ) 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_storage_container_by_id(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ UpdateStorageContainerById202Response
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.
686 687 688 689 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 686 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_storage_container_by_id_with_http_info(ext_id, if_match, ntnx_request_id, clustermgmt_v40_config_storage_container, opts = {}) ⇒ Array<(UpdateStorageContainerById202Response, Integer, Hash)>
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.
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 |
# File 'lib/nutanix_clustermgmt/api/storage_containers_api.rb', line 699 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'] = 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, ) 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 |