Class: IbmCloudPower::PCloudVolumesApi
- Inherits:
-
Object
- Object
- IbmCloudPower::PCloudVolumesApi
- Defined in:
- lib/ibm_cloud_power/api/p_cloud_volumes_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ PCloudVolumesApi
constructor
A new instance of PCloudVolumesApi.
-
#pcloud_cloudinstances_volumes_delete(cloud_instance_id, volume_id, opts = {}) ⇒ Object
Delete a cloud instance volume.
-
#pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a cloud instance volume.
-
#pcloud_cloudinstances_volumes_get(cloud_instance_id, volume_id, opts = {}) ⇒ Volume
Detailed information of a volume.
-
#pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Detailed information of a volume.
-
#pcloud_cloudinstances_volumes_getall(cloud_instance_id, opts = {}) ⇒ Volumes
List all volumes for this cloud instance.
-
#pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts = {}) ⇒ Array<(Volumes, Integer, Hash)>
List all volumes for this cloud instance.
-
#pcloud_cloudinstances_volumes_post(cloud_instance_id, body, opts = {}) ⇒ Volume
Create a new data volume All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types.
-
#pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Create a new data volume All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types.
-
#pcloud_cloudinstances_volumes_put(cloud_instance_id, volume_id, body, opts = {}) ⇒ Volume
Update a cloud instance volume.
-
#pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Update a cloud instance volume.
-
#pcloud_pvminstances_volumes_delete(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Object
Detach a volume from a PVM Instance.
-
#pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Detach a volume from a PVM Instance.
-
#pcloud_pvminstances_volumes_get(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Volume
Detailed information of a volume attached to a PVM Instance.
-
#pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Detailed information of a volume attached to a PVM Instance.
-
#pcloud_pvminstances_volumes_getall(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Volumes
List all volumes attached to a PVM Instance.
-
#pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(Volumes, Integer, Hash)>
List all volumes attached to a PVM Instance.
-
#pcloud_pvminstances_volumes_post(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Object
Attach a volume to a PVM Instance.
-
#pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Attach a volume to a PVM Instance.
-
#pcloud_pvminstances_volumes_put(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) ⇒ Object
Update a volume attached to a PVMInstance.
-
#pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Update a volume attached to a PVMInstance.
-
#pcloud_pvminstances_volumes_setboot_put(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Object
Set the PVMInstance volume as the boot volume.
-
#pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Set the PVMInstance volume as the boot volume.
-
#pcloud_v2_volumes_clone_post(cloud_instance_id, body, opts = {}) ⇒ CloneTaskReference
Create a volume clone for specified volumes (version 2).
-
#pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(CloneTaskReference, Integer, Hash)>
Create a volume clone for specified volumes (version 2).
-
#pcloud_v2_volumes_clonetasks_get(cloud_instance_id, clone_task_id, opts = {}) ⇒ CloneTaskStatus
Get the status of a volume clone request for the specified clone task ID.
-
#pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts = {}) ⇒ Array<(CloneTaskStatus, Integer, Hash)>
Get the status of a volume clone request for the specified clone task ID.
-
#pcloud_v2_volumes_post(cloud_instance_id, body, opts = {}) ⇒ Volumes
Create multiple data volumes from a single definition.
-
#pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(Volumes, Integer, Hash)>
Create multiple data volumes from a single definition.
-
#pcloud_volumes_clone_post(cloud_instance_id, body, opts = {}) ⇒ VolumesCloneResponse
Create a volume clone for specified volumes (version 1 - depricated).
-
#pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(VolumesCloneResponse, Integer, Hash)>
Create a volume clone for specified volumes (version 1 - depricated).
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PCloudVolumesApi
Returns a new instance of PCloudVolumesApi.
19 20 21 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_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/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#pcloud_cloudinstances_volumes_delete(cloud_instance_id, volume_id, opts = {}) ⇒ Object
Delete a cloud instance volume
27 28 29 30 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 27 def pcloud_cloudinstances_volumes_delete(cloud_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts) data end |
#pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a cloud instance volume
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 37 def pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_delete" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_delete" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_cloudinstances_volumes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_cloudinstances_volumes_get(cloud_instance_id, volume_id, opts = {}) ⇒ Volume
Detailed information of a volume
93 94 95 96 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 93 def pcloud_cloudinstances_volumes_get(cloud_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts) data end |
#pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Detailed information of a volume
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 103 def pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_get" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_get" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_cloudinstances_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_cloudinstances_volumes_getall(cloud_instance_id, opts = {}) ⇒ Volumes
List all volumes for this cloud instance
159 160 161 162 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 159 def pcloud_cloudinstances_volumes_getall(cloud_instance_id, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts) data end |
#pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts = {}) ⇒ Array<(Volumes, Integer, Hash)>
List all volumes for this cloud instance
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 169 def pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'affinity'] = opts[:'affinity'] if !opts[:'affinity'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volumes' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_cloudinstances_volumes_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_cloudinstances_volumes_post(cloud_instance_id, body, opts = {}) ⇒ Volume
Create a new data volume All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types.
223 224 225 226 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 223 def pcloud_cloudinstances_volumes_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts) data end |
#pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Create a new data volume All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types.
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 234 def pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_cloudinstances_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_cloudinstances_volumes_put(cloud_instance_id, volume_id, body, opts = {}) ⇒ Volume
Update a cloud instance volume
293 294 295 296 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 293 def pcloud_cloudinstances_volumes_put(cloud_instance_id, volume_id, body, opts = {}) data, _status_code, _headers = pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts) data end |
#pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Update a cloud instance volume
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 304 def pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_cloudinstances_volumes_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_volumes_delete(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Object
Detach a volume from a PVM Instance
367 368 369 370 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 367 def pcloud_pvminstances_volumes_delete(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end |
#pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Detach a volume from a PVM Instance
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 378 def pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_pvminstances_volumes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_volumes_get(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Volume
Detailed information of a volume attached to a PVM Instance
439 440 441 442 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 439 def pcloud_pvminstances_volumes_get(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end |
#pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Volume, Integer, Hash)>
Detailed information of a volume attached to a PVM Instance
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 450 def pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volume' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_pvminstances_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_volumes_getall(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Volumes
List all volumes attached to a PVM Instance
510 511 512 513 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 510 def pcloud_pvminstances_volumes_getall(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end |
#pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(Volumes, Integer, Hash)>
List all volumes attached to a PVM Instance
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 520 def pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_getall" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Volumes' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_pvminstances_volumes_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_volumes_post(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Object
Attach a volume to a PVM Instance
577 578 579 580 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 577 def pcloud_pvminstances_volumes_post(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end |
#pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Attach a volume to a PVM Instance
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 588 def pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_pvminstances_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_volumes_put(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) ⇒ Object
Update a volume attached to a PVMInstance
650 651 652 653 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 650 def pcloud_pvminstances_volumes_put(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts) data end |
#pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Update a volume attached to a PVMInstance
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 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 662 def pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_pvminstances_volumes_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_volumes_setboot_put(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Object
Set the PVMInstance volume as the boot volume
729 730 731 732 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 729 def pcloud_pvminstances_volumes_setboot_put(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts) data end |
#pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Set the PVMInstance volume as the boot volume
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 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 740 def pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put" end # verify the required parameter 'volume_id' is set if @api_client.config.client_side_validation && volume_id.nil? fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'volume_id' + '}', CGI.escape(volume_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_pvminstances_volumes_setboot_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_v2_volumes_clone_post(cloud_instance_id, body, opts = {}) ⇒ CloneTaskReference
Create a volume clone for specified volumes (version 2)
800 801 802 803 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 800 def pcloud_v2_volumes_clone_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts) data end |
#pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(CloneTaskReference, Integer, Hash)>
Create a volume clone for specified volumes (version 2)
810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 810 def pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_clone_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clone_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumes_clone_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'CloneTaskReference' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_v2_volumes_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_v2_volumes_clonetasks_get(cloud_instance_id, clone_task_id, opts = {}) ⇒ CloneTaskStatus
Get the status of a volume clone request for the specified clone task ID
868 869 870 871 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 868 def pcloud_v2_volumes_clonetasks_get(cloud_instance_id, clone_task_id, opts = {}) data, _status_code, _headers = pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts) data end |
#pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts = {}) ⇒ Array<(CloneTaskStatus, Integer, Hash)>
Get the status of a volume clone request for the specified clone task ID
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 878 def pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get" end # verify the required parameter 'clone_task_id' is set if @api_client.config.client_side_validation && clone_task_id.nil? fail ArgumentError, "Missing the required parameter 'clone_task_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'clone_task_id' + '}', CGI.escape(clone_task_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CloneTaskStatus' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_v2_volumes_clonetasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_v2_volumes_post(cloud_instance_id, body, opts = {}) ⇒ Volumes
Create multiple data volumes from a single definition
934 935 936 937 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 934 def pcloud_v2_volumes_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts) data end |
#pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(Volumes, Integer, Hash)>
Create multiple data volumes from a single definition
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 944 def pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumes_post" end # resource path local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Volumes' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_v2_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_volumes_clone_post(cloud_instance_id, body, opts = {}) ⇒ VolumesCloneResponse
Create a volume clone for specified volumes (version 1 - depricated)
1002 1003 1004 1005 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 1002 def pcloud_volumes_clone_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts) data end |
#pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(VolumesCloneResponse, Integer, Hash)>
Create a volume clone for specified volumes (version 1 - depricated)
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/ibm_cloud_power/api/p_cloud_volumes_api.rb', line 1012 def pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_volumes_clone_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_volumes_clone_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_volumes_clone_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'VolumesCloneResponse' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudVolumesApi#pcloud_volumes_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |