ibm_cloud_power 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +255 -0
- data/Rakefile +10 -0
- data/docs/CloneTaskReference.md +19 -0
- data/docs/CloneTaskStatus.md +23 -0
- data/docs/ClonedVolume.md +19 -0
- data/docs/ClonedVolumeDetail.md +19 -0
- data/docs/CloudInstance.md +37 -0
- data/docs/CloudInstanceCreate.md +29 -0
- data/docs/CloudInstanceReference.md +31 -0
- data/docs/CloudInstanceUpdate.md +25 -0
- data/docs/CloudInstanceUsageLimits.md +37 -0
- data/docs/CreateDataVolume.md +29 -0
- data/docs/CreateImage.md +37 -0
- data/docs/Error.md +19 -0
- data/docs/Event.md +33 -0
- data/docs/EventUser.md +21 -0
- data/docs/Events.md +17 -0
- data/docs/ExportImage.md +23 -0
- data/docs/IPAddressRange.md +19 -0
- data/docs/Image.md +39 -0
- data/docs/ImageReference.md +33 -0
- data/docs/ImageSpecifications.md +29 -0
- data/docs/ImageVolume.md +23 -0
- data/docs/Images.md +17 -0
- data/docs/MinMaxDefault.md +21 -0
- data/docs/MultiVolumesCreate.md +29 -0
- data/docs/Network.md +37 -0
- data/docs/NetworkCreate.md +29 -0
- data/docs/NetworkIpAddressMetrics.md +23 -0
- data/docs/NetworkPort.md +29 -0
- data/docs/NetworkPortCreate.md +19 -0
- data/docs/NetworkPortPvmInstance.md +19 -0
- data/docs/NetworkPortUpdate.md +19 -0
- data/docs/NetworkPorts.md +17 -0
- data/docs/NetworkReference.md +27 -0
- data/docs/NetworkUpdate.md +23 -0
- data/docs/Networks.md +17 -0
- data/docs/Operations.md +21 -0
- data/docs/PCloudEventsApi.md +114 -0
- data/docs/PCloudImagesApi.md +342 -0
- data/docs/PCloudInstancesApi.md +148 -0
- data/docs/PCloudNetworksApi.md +504 -0
- data/docs/PCloudPVMInstancesApi.md +809 -0
- data/docs/PCloudSAPApi.md +150 -0
- data/docs/PCloudSnapshotsApi.md +200 -0
- data/docs/PCloudSystemPoolsApi.md +54 -0
- data/docs/PCloudTasksApi.md +100 -0
- data/docs/PCloudTenantsApi.md +102 -0
- data/docs/PCloudTenantsSSHKeysApi.md +248 -0
- data/docs/PCloudVolumesApi.md +746 -0
- data/docs/PVMInstance.md +77 -0
- data/docs/PVMInstanceAction.md +17 -0
- data/docs/PVMInstanceAddNetwork.md +19 -0
- data/docs/PVMInstanceCapture.md +29 -0
- data/docs/PVMInstanceClone.md +31 -0
- data/docs/PVMInstanceConsole.md +17 -0
- data/docs/PVMInstanceCreate.md +53 -0
- data/docs/PVMInstanceFault.md +23 -0
- data/docs/PVMInstanceHealth.md +21 -0
- data/docs/PVMInstanceMultiCreate.md +21 -0
- data/docs/PVMInstanceNetwork.md +33 -0
- data/docs/PVMInstanceNetworks.md +17 -0
- data/docs/PVMInstanceOperation.md +19 -0
- data/docs/PVMInstanceReference.md +71 -0
- data/docs/PVMInstanceRemoveNetwork.md +17 -0
- data/docs/PVMInstanceUpdate.md +33 -0
- data/docs/PVMInstanceUpdateResponse.md +27 -0
- data/docs/PVMInstanceVolumeUpdate.md +17 -0
- data/docs/PVMInstances.md +17 -0
- data/docs/PeeringNetwork.md +21 -0
- data/docs/PinPolicy.md +16 -0
- data/docs/SAPCreate.md +33 -0
- data/docs/SAPProfile.md +25 -0
- data/docs/SAPProfileReference.md +19 -0
- data/docs/SAPProfiles.md +17 -0
- data/docs/SRC.md +19 -0
- data/docs/SSHKey.md +21 -0
- data/docs/SSHKeys.md +17 -0
- data/docs/Snapshot.md +35 -0
- data/docs/SnapshotCreate.md +21 -0
- data/docs/SnapshotCreateResponse.md +17 -0
- data/docs/SnapshotRestore.md +17 -0
- data/docs/SnapshotUpdate.md +19 -0
- data/docs/Snapshots.md +17 -0
- data/docs/SoftwareLicenses.md +25 -0
- data/docs/StockImage.md +21 -0
- data/docs/System.md +21 -0
- data/docs/SystemPool.md +31 -0
- data/docs/Task.md +33 -0
- data/docs/TaskReference.md +19 -0
- data/docs/Tenant.md +29 -0
- data/docs/TenantUpdate.md +19 -0
- data/docs/UpdateVolume.md +23 -0
- data/docs/VirtualCores.md +21 -0
- data/docs/Volume.md +41 -0
- data/docs/VolumeInfo.md +19 -0
- data/docs/VolumeReference.md +43 -0
- data/docs/Volumes.md +17 -0
- data/docs/VolumesClone.md +31 -0
- data/docs/VolumesCloneAsyncRequest.md +19 -0
- data/docs/VolumesCloneCancel.md +17 -0
- data/docs/VolumesCloneCreate.md +19 -0
- data/docs/VolumesCloneDetail.md +33 -0
- data/docs/VolumesCloneExecute.md +19 -0
- data/docs/VolumesCloneRequest.md +19 -0
- data/docs/VolumesCloneResponse.md +17 -0
- data/docs/VolumesClones.md +17 -0
- data/git_push.sh +58 -0
- data/ibm_cloud_power.gemspec +38 -0
- data/lib/ibm_cloud_power.rb +144 -0
- data/lib/ibm_cloud_power/api/p_cloud_events_api.rb +163 -0
- data/lib/ibm_cloud_power/api/p_cloud_images_api.rb +473 -0
- data/lib/ibm_cloud_power/api/p_cloud_instances_api.rb +210 -0
- data/lib/ibm_cloud_power/api/p_cloud_networks_api.rb +719 -0
- data/lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb +1166 -0
- data/lib/ibm_cloud_power/api/p_cloud_sap_api.rb +216 -0
- data/lib/ibm_cloud_power/api/p_cloud_snapshots_api.rb +288 -0
- data/lib/ibm_cloud_power/api/p_cloud_system_pools_api.rb +82 -0
- data/lib/ibm_cloud_power/api/p_cloud_tasks_api.rb +142 -0
- data/lib/ibm_cloud_power/api/p_cloud_tenants_api.rb +150 -0
- data/lib/ibm_cloud_power/api/p_cloud_tenants_ssh_keys_api.rb +356 -0
- data/lib/ibm_cloud_power/api/p_cloud_volumes_api.rb +1065 -0
- data/lib/ibm_cloud_power/api_client.rb +387 -0
- data/lib/ibm_cloud_power/api_error.rb +57 -0
- data/lib/ibm_cloud_power/configuration.rb +241 -0
- data/lib/ibm_cloud_power/models/clone_task_reference.rb +229 -0
- data/lib/ibm_cloud_power/models/clone_task_status.rb +285 -0
- data/lib/ibm_cloud_power/models/cloned_volume.rb +219 -0
- data/lib/ibm_cloud_power/models/cloned_volume_detail.rb +227 -0
- data/lib/ibm_cloud_power/models/cloud_instance.rb +361 -0
- data/lib/ibm_cloud_power/models/cloud_instance_create.rb +294 -0
- data/lib/ibm_cloud_power/models/cloud_instance_reference.rb +315 -0
- data/lib/ibm_cloud_power/models/cloud_instance_update.rb +249 -0
- data/lib/ibm_cloud_power/models/cloud_instance_usage_limits.rb +334 -0
- data/lib/ibm_cloud_power/models/create_data_volume.rb +313 -0
- data/lib/ibm_cloud_power/models/create_image.rb +360 -0
- data/lib/ibm_cloud_power/models/error.rb +217 -0
- data/lib/ibm_cloud_power/models/event.rb +357 -0
- data/lib/ibm_cloud_power/models/event_user.rb +234 -0
- data/lib/ibm_cloud_power/models/events.rb +216 -0
- data/lib/ibm_cloud_power/models/export_image.rb +249 -0
- data/lib/ibm_cloud_power/models/image.rb +351 -0
- data/lib/ibm_cloud_power/models/image_reference.rb +333 -0
- data/lib/ibm_cloud_power/models/image_specifications.rb +269 -0
- data/lib/ibm_cloud_power/models/image_volume.rb +259 -0
- data/lib/ibm_cloud_power/models/images.rb +216 -0
- data/lib/ibm_cloud_power/models/ip_address_range.rb +229 -0
- data/lib/ibm_cloud_power/models/min_max_default.rb +244 -0
- data/lib/ibm_cloud_power/models/multi_volumes_create.rb +313 -0
- data/lib/ibm_cloud_power/models/network.rb +395 -0
- data/lib/ibm_cloud_power/models/network_create.rb +314 -0
- data/lib/ibm_cloud_power/models/network_ip_address_metrics.rb +260 -0
- data/lib/ibm_cloud_power/models/network_port.rb +293 -0
- data/lib/ibm_cloud_power/models/network_port_create.rb +219 -0
- data/lib/ibm_cloud_power/models/network_port_pvm_instance.rb +220 -0
- data/lib/ibm_cloud_power/models/network_port_update.rb +219 -0
- data/lib/ibm_cloud_power/models/network_ports.rb +216 -0
- data/lib/ibm_cloud_power/models/network_reference.rb +325 -0
- data/lib/ibm_cloud_power/models/network_update.rb +243 -0
- data/lib/ibm_cloud_power/models/networks.rb +216 -0
- data/lib/ibm_cloud_power/models/operations.rb +287 -0
- data/lib/ibm_cloud_power/models/peering_network.rb +241 -0
- data/lib/ibm_cloud_power/models/pin_policy.rb +37 -0
- data/lib/ibm_cloud_power/models/pvm_instance.rb +612 -0
- data/lib/ibm_cloud_power/models/pvm_instance_action.rb +248 -0
- data/lib/ibm_cloud_power/models/pvm_instance_add_network.rb +224 -0
- data/lib/ibm_cloud_power/models/pvm_instance_capture.rb +317 -0
- data/lib/ibm_cloud_power/models/pvm_instance_clone.rb +328 -0
- data/lib/ibm_cloud_power/models/pvm_instance_console.rb +214 -0
- data/lib/ibm_cloud_power/models/pvm_instance_create.rb +483 -0
- data/lib/ibm_cloud_power/models/pvm_instance_fault.rb +240 -0
- data/lib/ibm_cloud_power/models/pvm_instance_health.rb +230 -0
- data/lib/ibm_cloud_power/models/pvm_instance_multi_create.rb +279 -0
- data/lib/ibm_cloud_power/models/pvm_instance_network.rb +290 -0
- data/lib/ibm_cloud_power/models/pvm_instance_networks.rb +216 -0
- data/lib/ibm_cloud_power/models/pvm_instance_operation.rb +262 -0
- data/lib/ibm_cloud_power/models/pvm_instance_reference.rb +566 -0
- data/lib/ibm_cloud_power/models/pvm_instance_remove_network.rb +209 -0
- data/lib/ibm_cloud_power/models/pvm_instance_update.rb +322 -0
- data/lib/ibm_cloud_power/models/pvm_instance_update_response.rb +292 -0
- data/lib/ibm_cloud_power/models/pvm_instance_volume_update.rb +214 -0
- data/lib/ibm_cloud_power/models/pvm_instances.rb +216 -0
- data/lib/ibm_cloud_power/models/sap_create.rb +311 -0
- data/lib/ibm_cloud_power/models/sap_profile.rb +310 -0
- data/lib/ibm_cloud_power/models/sap_profile_reference.rb +229 -0
- data/lib/ibm_cloud_power/models/sap_profiles.rb +216 -0
- data/lib/ibm_cloud_power/models/snapshot.rb +321 -0
- data/lib/ibm_cloud_power/models/snapshot_create.rb +236 -0
- data/lib/ibm_cloud_power/models/snapshot_create_response.rb +214 -0
- data/lib/ibm_cloud_power/models/snapshot_restore.rb +211 -0
- data/lib/ibm_cloud_power/models/snapshot_update.rb +219 -0
- data/lib/ibm_cloud_power/models/snapshots.rb +216 -0
- data/lib/ibm_cloud_power/models/software_licenses.rb +257 -0
- data/lib/ibm_cloud_power/models/src.rb +219 -0
- data/lib/ibm_cloud_power/models/ssh_key.rb +239 -0
- data/lib/ibm_cloud_power/models/ssh_keys.rb +216 -0
- data/lib/ibm_cloud_power/models/stock_image.rb +230 -0
- data/lib/ibm_cloud_power/models/system.rb +239 -0
- data/lib/ibm_cloud_power/models/system_pool.rb +277 -0
- data/lib/ibm_cloud_power/models/task.rb +334 -0
- data/lib/ibm_cloud_power/models/task_reference.rb +229 -0
- data/lib/ibm_cloud_power/models/tenant.rb +295 -0
- data/lib/ibm_cloud_power/models/tenant_update.rb +221 -0
- data/lib/ibm_cloud_power/models/update_volume.rb +239 -0
- data/lib/ibm_cloud_power/models/virtual_cores.rb +253 -0
- data/lib/ibm_cloud_power/models/volume.rb +356 -0
- data/lib/ibm_cloud_power/models/volume_info.rb +219 -0
- data/lib/ibm_cloud_power/models/volume_reference.rb +396 -0
- data/lib/ibm_cloud_power/models/volumes.rb +216 -0
- data/lib/ibm_cloud_power/models/volumes_clone.rb +284 -0
- data/lib/ibm_cloud_power/models/volumes_clone_async_request.rb +231 -0
- data/lib/ibm_cloud_power/models/volumes_clone_cancel.rb +209 -0
- data/lib/ibm_cloud_power/models/volumes_clone_create.rb +231 -0
- data/lib/ibm_cloud_power/models/volumes_clone_detail.rb +296 -0
- data/lib/ibm_cloud_power/models/volumes_clone_execute.rb +224 -0
- data/lib/ibm_cloud_power/models/volumes_clone_request.rb +231 -0
- data/lib/ibm_cloud_power/models/volumes_clone_response.rb +211 -0
- data/lib/ibm_cloud_power/models/volumes_clones.rb +211 -0
- data/lib/ibm_cloud_power/version.rb +15 -0
- data/spec/api/p_cloud_events_api_spec.rb +62 -0
- data/spec/api/p_cloud_images_api_spec.rb +117 -0
- data/spec/api/p_cloud_instances_api_spec.rb +69 -0
- data/spec/api/p_cloud_networks_api_spec.rb +161 -0
- data/spec/api/p_cloud_pvm_instances_api_spec.rb +240 -0
- data/spec/api/p_cloud_sap_api_spec.rb +70 -0
- data/spec/api/p_cloud_snapshots_api_spec.rb +83 -0
- data/spec/api/p_cloud_system_pools_api_spec.rb +46 -0
- data/spec/api/p_cloud_tasks_api_spec.rb +57 -0
- data/spec/api/p_cloud_tenants_api_spec.rb +58 -0
- data/spec/api/p_cloud_tenants_ssh_keys_api_spec.rb +95 -0
- data/spec/api/p_cloud_volumes_api_spec.rb +223 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/clone_task_reference_spec.rb +47 -0
- data/spec/models/clone_task_status_spec.rb +63 -0
- data/spec/models/cloned_volume_detail_spec.rb +47 -0
- data/spec/models/cloned_volume_spec.rb +47 -0
- data/spec/models/cloud_instance_create_spec.rb +77 -0
- data/spec/models/cloud_instance_reference_spec.rb +83 -0
- data/spec/models/cloud_instance_spec.rb +101 -0
- data/spec/models/cloud_instance_update_spec.rb +65 -0
- data/spec/models/cloud_instance_usage_limits_spec.rb +101 -0
- data/spec/models/create_data_volume_spec.rb +81 -0
- data/spec/models/create_image_spec.rb +109 -0
- data/spec/models/error_spec.rb +47 -0
- data/spec/models/event_spec.rb +93 -0
- data/spec/models/event_user_spec.rb +53 -0
- data/spec/models/events_spec.rb +41 -0
- data/spec/models/export_image_spec.rb +59 -0
- data/spec/models/image_reference_spec.rb +89 -0
- data/spec/models/image_spec.rb +107 -0
- data/spec/models/image_specifications_spec.rb +77 -0
- data/spec/models/image_volume_spec.rb +59 -0
- data/spec/models/images_spec.rb +41 -0
- data/spec/models/ip_address_range_spec.rb +47 -0
- data/spec/models/min_max_default_spec.rb +53 -0
- data/spec/models/multi_volumes_create_spec.rb +81 -0
- data/spec/models/network_create_spec.rb +81 -0
- data/spec/models/network_ip_address_metrics_spec.rb +59 -0
- data/spec/models/network_port_create_spec.rb +47 -0
- data/spec/models/network_port_pvm_instance_spec.rb +47 -0
- data/spec/models/network_port_spec.rb +77 -0
- data/spec/models/network_port_update_spec.rb +47 -0
- data/spec/models/network_ports_spec.rb +41 -0
- data/spec/models/network_reference_spec.rb +75 -0
- data/spec/models/network_spec.rb +105 -0
- data/spec/models/network_update_spec.rb +59 -0
- data/spec/models/networks_spec.rb +41 -0
- data/spec/models/operations_spec.rb +65 -0
- data/spec/models/peering_network_spec.rb +53 -0
- data/spec/models/pin_policy_spec.rb +35 -0
- data/spec/models/pvm_instance_action_spec.rb +45 -0
- data/spec/models/pvm_instance_add_network_spec.rb +47 -0
- data/spec/models/pvm_instance_capture_spec.rb +81 -0
- data/spec/models/pvm_instance_clone_spec.rb +87 -0
- data/spec/models/pvm_instance_console_spec.rb +41 -0
- data/spec/models/pvm_instance_create_spec.rb +161 -0
- data/spec/models/pvm_instance_fault_spec.rb +59 -0
- data/spec/models/pvm_instance_health_spec.rb +53 -0
- data/spec/models/pvm_instance_multi_create_spec.rb +61 -0
- data/spec/models/pvm_instance_network_spec.rb +89 -0
- data/spec/models/pvm_instance_networks_spec.rb +41 -0
- data/spec/models/pvm_instance_operation_spec.rb +51 -0
- data/spec/models/pvm_instance_reference_spec.rb +207 -0
- data/spec/models/pvm_instance_remove_network_spec.rb +41 -0
- data/spec/models/pvm_instance_spec.rb +225 -0
- data/spec/models/pvm_instance_update_response_spec.rb +75 -0
- data/spec/models/pvm_instance_update_spec.rb +93 -0
- data/spec/models/pvm_instance_volume_update_spec.rb +41 -0
- data/spec/models/pvm_instances_spec.rb +41 -0
- data/spec/models/sap_create_spec.rb +89 -0
- data/spec/models/sap_profile_reference_spec.rb +47 -0
- data/spec/models/sap_profile_spec.rb +69 -0
- data/spec/models/sap_profiles_spec.rb +41 -0
- data/spec/models/snapshot_create_response_spec.rb +41 -0
- data/spec/models/snapshot_create_spec.rb +53 -0
- data/spec/models/snapshot_restore_spec.rb +41 -0
- data/spec/models/snapshot_spec.rb +95 -0
- data/spec/models/snapshot_update_spec.rb +47 -0
- data/spec/models/snapshots_spec.rb +41 -0
- data/spec/models/software_licenses_spec.rb +65 -0
- data/spec/models/src_spec.rb +47 -0
- data/spec/models/ssh_key_spec.rb +53 -0
- data/spec/models/ssh_keys_spec.rb +41 -0
- data/spec/models/stock_image_spec.rb +53 -0
- data/spec/models/system_pool_spec.rb +83 -0
- data/spec/models/system_spec.rb +53 -0
- data/spec/models/task_reference_spec.rb +47 -0
- data/spec/models/task_spec.rb +89 -0
- data/spec/models/tenant_spec.rb +77 -0
- data/spec/models/tenant_update_spec.rb +47 -0
- data/spec/models/update_volume_spec.rb +59 -0
- data/spec/models/virtual_cores_spec.rb +53 -0
- data/spec/models/volume_info_spec.rb +47 -0
- data/spec/models/volume_reference_spec.rb +119 -0
- data/spec/models/volume_spec.rb +113 -0
- data/spec/models/volumes_clone_async_request_spec.rb +47 -0
- data/spec/models/volumes_clone_cancel_spec.rb +41 -0
- data/spec/models/volumes_clone_create_spec.rb +47 -0
- data/spec/models/volumes_clone_detail_spec.rb +89 -0
- data/spec/models/volumes_clone_execute_spec.rb +47 -0
- data/spec/models/volumes_clone_request_spec.rb +47 -0
- data/spec/models/volumes_clone_response_spec.rb +47 -0
- data/spec/models/volumes_clone_spec.rb +83 -0
- data/spec/models/volumes_clones_spec.rb +41 -0
- data/spec/models/volumes_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +519 -0
|
@@ -0,0 +1,1065 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Power Cloud API
|
|
3
|
+
|
|
4
|
+
#IBM Power Cloud API for Power Hardware / Infrastructure
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: kylej@us.ibm.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module IbmCloudPower
|
|
16
|
+
class PCloudVolumesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Delete a cloud instance volume
|
|
23
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
24
|
+
# @param volume_id [String] Volume ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Object]
|
|
27
|
+
def pcloud_cloudinstances_volumes_delete(cloud_instance_id, volume_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Delete a cloud instance volume
|
|
33
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
34
|
+
# @param volume_id [String] Volume ID
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
37
|
+
def pcloud_cloudinstances_volumes_delete_with_http_info(cloud_instance_id, volume_id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_delete ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_delete"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'volume_id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_delete"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
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))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:body]
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:return_type] || 'Object'
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:auth_names] || []
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Detailed information of a volume
|
|
89
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
90
|
+
# @param volume_id [String] Volume ID
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @return [Volume]
|
|
93
|
+
def pcloud_cloudinstances_volumes_get(cloud_instance_id, volume_id, opts = {})
|
|
94
|
+
data, _status_code, _headers = pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts)
|
|
95
|
+
data
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Detailed information of a volume
|
|
99
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
100
|
+
# @param volume_id [String] Volume ID
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [Array<(Volume, Integer, Hash)>] Volume data, response status code and response headers
|
|
103
|
+
def pcloud_cloudinstances_volumes_get_with_http_info(cloud_instance_id, volume_id, opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_get ...'
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
108
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_get"
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'volume_id' is set
|
|
112
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_get"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
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))
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
125
|
+
|
|
126
|
+
# form parameters
|
|
127
|
+
form_params = opts[:form_params] || {}
|
|
128
|
+
|
|
129
|
+
# http body (model)
|
|
130
|
+
post_body = opts[:body]
|
|
131
|
+
|
|
132
|
+
# return_type
|
|
133
|
+
return_type = opts[:return_type] || 'Volume'
|
|
134
|
+
|
|
135
|
+
# auth_names
|
|
136
|
+
auth_names = opts[:auth_names] || []
|
|
137
|
+
|
|
138
|
+
new_options = opts.merge(
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# List all volumes for this cloud instance
|
|
155
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @option opts [String] :affinity A pvmInstance (id or name), limits a volumes list response to only volumes that have affinity to the pvmInstance
|
|
158
|
+
# @return [Volumes]
|
|
159
|
+
def pcloud_cloudinstances_volumes_getall(cloud_instance_id, opts = {})
|
|
160
|
+
data, _status_code, _headers = pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts)
|
|
161
|
+
data
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# List all volumes for this cloud instance
|
|
165
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
166
|
+
# @param [Hash] opts the optional parameters
|
|
167
|
+
# @option opts [String] :affinity A pvmInstance (id or name), limits a volumes list response to only volumes that have affinity to the pvmInstance
|
|
168
|
+
# @return [Array<(Volumes, Integer, Hash)>] Volumes data, response status code and response headers
|
|
169
|
+
def pcloud_cloudinstances_volumes_getall_with_http_info(cloud_instance_id, opts = {})
|
|
170
|
+
if @api_client.config.debugging
|
|
171
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_getall ...'
|
|
172
|
+
end
|
|
173
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
174
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
175
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_getall"
|
|
176
|
+
end
|
|
177
|
+
# resource path
|
|
178
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
|
179
|
+
|
|
180
|
+
# query parameters
|
|
181
|
+
query_params = opts[:query_params] || {}
|
|
182
|
+
query_params[:'affinity'] = opts[:'affinity'] if !opts[:'affinity'].nil?
|
|
183
|
+
|
|
184
|
+
# header parameters
|
|
185
|
+
header_params = opts[:header_params] || {}
|
|
186
|
+
# HTTP header 'Accept' (if needed)
|
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
188
|
+
|
|
189
|
+
# form parameters
|
|
190
|
+
form_params = opts[:form_params] || {}
|
|
191
|
+
|
|
192
|
+
# http body (model)
|
|
193
|
+
post_body = opts[:body]
|
|
194
|
+
|
|
195
|
+
# return_type
|
|
196
|
+
return_type = opts[:return_type] || 'Volumes'
|
|
197
|
+
|
|
198
|
+
# auth_names
|
|
199
|
+
auth_names = opts[:auth_names] || []
|
|
200
|
+
|
|
201
|
+
new_options = opts.merge(
|
|
202
|
+
:header_params => header_params,
|
|
203
|
+
:query_params => query_params,
|
|
204
|
+
:form_params => form_params,
|
|
205
|
+
:body => post_body,
|
|
206
|
+
:auth_names => auth_names,
|
|
207
|
+
:return_type => return_type
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
+
end
|
|
214
|
+
return data, status_code, headers
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Create a new data volume
|
|
218
|
+
# All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types.
|
|
219
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
220
|
+
# @param body [CreateDataVolume] Parameters for the creation of a new data volume
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [Volume]
|
|
223
|
+
def pcloud_cloudinstances_volumes_post(cloud_instance_id, body, opts = {})
|
|
224
|
+
data, _status_code, _headers = pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts)
|
|
225
|
+
data
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Create a new data volume
|
|
229
|
+
# All regions use Tier 1 (NVMe-based flash storage) or Tier 3 (SSD flash storage) storage types.
|
|
230
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
231
|
+
# @param body [CreateDataVolume] Parameters for the creation of a new data volume
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @return [Array<(Volume, Integer, Hash)>] Volume data, response status code and response headers
|
|
234
|
+
def pcloud_cloudinstances_volumes_post_with_http_info(cloud_instance_id, body, opts = {})
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_post ...'
|
|
237
|
+
end
|
|
238
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
239
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_post"
|
|
241
|
+
end
|
|
242
|
+
# verify the required parameter 'body' is set
|
|
243
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
244
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_post"
|
|
245
|
+
end
|
|
246
|
+
# resource path
|
|
247
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
|
248
|
+
|
|
249
|
+
# query parameters
|
|
250
|
+
query_params = opts[:query_params] || {}
|
|
251
|
+
|
|
252
|
+
# header parameters
|
|
253
|
+
header_params = opts[:header_params] || {}
|
|
254
|
+
# HTTP header 'Accept' (if needed)
|
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
256
|
+
# HTTP header 'Content-Type'
|
|
257
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
258
|
+
|
|
259
|
+
# form parameters
|
|
260
|
+
form_params = opts[:form_params] || {}
|
|
261
|
+
|
|
262
|
+
# http body (model)
|
|
263
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
264
|
+
|
|
265
|
+
# return_type
|
|
266
|
+
return_type = opts[:return_type] || 'Volume'
|
|
267
|
+
|
|
268
|
+
# auth_names
|
|
269
|
+
auth_names = opts[:auth_names] || []
|
|
270
|
+
|
|
271
|
+
new_options = opts.merge(
|
|
272
|
+
:header_params => header_params,
|
|
273
|
+
:query_params => query_params,
|
|
274
|
+
:form_params => form_params,
|
|
275
|
+
:body => post_body,
|
|
276
|
+
:auth_names => auth_names,
|
|
277
|
+
:return_type => return_type
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
281
|
+
if @api_client.config.debugging
|
|
282
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
283
|
+
end
|
|
284
|
+
return data, status_code, headers
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Update a cloud instance volume
|
|
288
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
289
|
+
# @param volume_id [String] Volume ID
|
|
290
|
+
# @param body [UpdateVolume] Parameters to update a cloud instance volume
|
|
291
|
+
# @param [Hash] opts the optional parameters
|
|
292
|
+
# @return [Volume]
|
|
293
|
+
def pcloud_cloudinstances_volumes_put(cloud_instance_id, volume_id, body, opts = {})
|
|
294
|
+
data, _status_code, _headers = pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts)
|
|
295
|
+
data
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Update a cloud instance volume
|
|
299
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
300
|
+
# @param volume_id [String] Volume ID
|
|
301
|
+
# @param body [UpdateVolume] Parameters to update a cloud instance volume
|
|
302
|
+
# @param [Hash] opts the optional parameters
|
|
303
|
+
# @return [Array<(Volume, Integer, Hash)>] Volume data, response status code and response headers
|
|
304
|
+
def pcloud_cloudinstances_volumes_put_with_http_info(cloud_instance_id, volume_id, body, opts = {})
|
|
305
|
+
if @api_client.config.debugging
|
|
306
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_cloudinstances_volumes_put ...'
|
|
307
|
+
end
|
|
308
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
309
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
310
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put"
|
|
311
|
+
end
|
|
312
|
+
# verify the required parameter 'volume_id' is set
|
|
313
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
314
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put"
|
|
315
|
+
end
|
|
316
|
+
# verify the required parameter 'body' is set
|
|
317
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
318
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_cloudinstances_volumes_put"
|
|
319
|
+
end
|
|
320
|
+
# resource path
|
|
321
|
+
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))
|
|
322
|
+
|
|
323
|
+
# query parameters
|
|
324
|
+
query_params = opts[:query_params] || {}
|
|
325
|
+
|
|
326
|
+
# header parameters
|
|
327
|
+
header_params = opts[:header_params] || {}
|
|
328
|
+
# HTTP header 'Accept' (if needed)
|
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
330
|
+
# HTTP header 'Content-Type'
|
|
331
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
332
|
+
|
|
333
|
+
# form parameters
|
|
334
|
+
form_params = opts[:form_params] || {}
|
|
335
|
+
|
|
336
|
+
# http body (model)
|
|
337
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
338
|
+
|
|
339
|
+
# return_type
|
|
340
|
+
return_type = opts[:return_type] || 'Volume'
|
|
341
|
+
|
|
342
|
+
# auth_names
|
|
343
|
+
auth_names = opts[:auth_names] || []
|
|
344
|
+
|
|
345
|
+
new_options = opts.merge(
|
|
346
|
+
:header_params => header_params,
|
|
347
|
+
:query_params => query_params,
|
|
348
|
+
:form_params => form_params,
|
|
349
|
+
:body => post_body,
|
|
350
|
+
:auth_names => auth_names,
|
|
351
|
+
:return_type => return_type
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
355
|
+
if @api_client.config.debugging
|
|
356
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_cloudinstances_volumes_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
357
|
+
end
|
|
358
|
+
return data, status_code, headers
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Detach a volume from a PVM Instance
|
|
362
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
363
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
364
|
+
# @param volume_id [String] Volume ID
|
|
365
|
+
# @param [Hash] opts the optional parameters
|
|
366
|
+
# @return [Object]
|
|
367
|
+
def pcloud_pvminstances_volumes_delete(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
368
|
+
data, _status_code, _headers = pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts)
|
|
369
|
+
data
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Detach a volume from a PVM Instance
|
|
373
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
374
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
375
|
+
# @param volume_id [String] Volume ID
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
378
|
+
def pcloud_pvminstances_volumes_delete_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
379
|
+
if @api_client.config.debugging
|
|
380
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_delete ...'
|
|
381
|
+
end
|
|
382
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
383
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
384
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete"
|
|
385
|
+
end
|
|
386
|
+
# verify the required parameter 'pvm_instance_id' is set
|
|
387
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
|
388
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete"
|
|
389
|
+
end
|
|
390
|
+
# verify the required parameter 'volume_id' is set
|
|
391
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
392
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_delete"
|
|
393
|
+
end
|
|
394
|
+
# resource path
|
|
395
|
+
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))
|
|
396
|
+
|
|
397
|
+
# query parameters
|
|
398
|
+
query_params = opts[:query_params] || {}
|
|
399
|
+
|
|
400
|
+
# header parameters
|
|
401
|
+
header_params = opts[:header_params] || {}
|
|
402
|
+
# HTTP header 'Accept' (if needed)
|
|
403
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
404
|
+
|
|
405
|
+
# form parameters
|
|
406
|
+
form_params = opts[:form_params] || {}
|
|
407
|
+
|
|
408
|
+
# http body (model)
|
|
409
|
+
post_body = opts[:body]
|
|
410
|
+
|
|
411
|
+
# return_type
|
|
412
|
+
return_type = opts[:return_type] || 'Object'
|
|
413
|
+
|
|
414
|
+
# auth_names
|
|
415
|
+
auth_names = opts[:auth_names] || []
|
|
416
|
+
|
|
417
|
+
new_options = opts.merge(
|
|
418
|
+
:header_params => header_params,
|
|
419
|
+
:query_params => query_params,
|
|
420
|
+
:form_params => form_params,
|
|
421
|
+
:body => post_body,
|
|
422
|
+
:auth_names => auth_names,
|
|
423
|
+
:return_type => return_type
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
427
|
+
if @api_client.config.debugging
|
|
428
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
429
|
+
end
|
|
430
|
+
return data, status_code, headers
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Detailed information of a volume attached to a PVM Instance
|
|
434
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
435
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
436
|
+
# @param volume_id [String] Volume ID
|
|
437
|
+
# @param [Hash] opts the optional parameters
|
|
438
|
+
# @return [Volume]
|
|
439
|
+
def pcloud_pvminstances_volumes_get(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
440
|
+
data, _status_code, _headers = pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts)
|
|
441
|
+
data
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Detailed information of a volume attached to a PVM Instance
|
|
445
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
446
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
447
|
+
# @param volume_id [String] Volume ID
|
|
448
|
+
# @param [Hash] opts the optional parameters
|
|
449
|
+
# @return [Array<(Volume, Integer, Hash)>] Volume data, response status code and response headers
|
|
450
|
+
def pcloud_pvminstances_volumes_get_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_get ...'
|
|
453
|
+
end
|
|
454
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
455
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
456
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get"
|
|
457
|
+
end
|
|
458
|
+
# verify the required parameter 'pvm_instance_id' is set
|
|
459
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
|
460
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get"
|
|
461
|
+
end
|
|
462
|
+
# verify the required parameter 'volume_id' is set
|
|
463
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
464
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_get"
|
|
465
|
+
end
|
|
466
|
+
# resource path
|
|
467
|
+
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))
|
|
468
|
+
|
|
469
|
+
# query parameters
|
|
470
|
+
query_params = opts[:query_params] || {}
|
|
471
|
+
|
|
472
|
+
# header parameters
|
|
473
|
+
header_params = opts[:header_params] || {}
|
|
474
|
+
# HTTP header 'Accept' (if needed)
|
|
475
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
476
|
+
|
|
477
|
+
# form parameters
|
|
478
|
+
form_params = opts[:form_params] || {}
|
|
479
|
+
|
|
480
|
+
# http body (model)
|
|
481
|
+
post_body = opts[:body]
|
|
482
|
+
|
|
483
|
+
# return_type
|
|
484
|
+
return_type = opts[:return_type] || 'Volume'
|
|
485
|
+
|
|
486
|
+
# auth_names
|
|
487
|
+
auth_names = opts[:auth_names] || []
|
|
488
|
+
|
|
489
|
+
new_options = opts.merge(
|
|
490
|
+
:header_params => header_params,
|
|
491
|
+
:query_params => query_params,
|
|
492
|
+
:form_params => form_params,
|
|
493
|
+
:body => post_body,
|
|
494
|
+
:auth_names => auth_names,
|
|
495
|
+
:return_type => return_type
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
499
|
+
if @api_client.config.debugging
|
|
500
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
501
|
+
end
|
|
502
|
+
return data, status_code, headers
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
# List all volumes attached to a PVM Instance
|
|
506
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
507
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
508
|
+
# @param [Hash] opts the optional parameters
|
|
509
|
+
# @return [Volumes]
|
|
510
|
+
def pcloud_pvminstances_volumes_getall(cloud_instance_id, pvm_instance_id, opts = {})
|
|
511
|
+
data, _status_code, _headers = pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts)
|
|
512
|
+
data
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
# List all volumes attached to a PVM Instance
|
|
516
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
517
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
518
|
+
# @param [Hash] opts the optional parameters
|
|
519
|
+
# @return [Array<(Volumes, Integer, Hash)>] Volumes data, response status code and response headers
|
|
520
|
+
def pcloud_pvminstances_volumes_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
|
|
521
|
+
if @api_client.config.debugging
|
|
522
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_getall ...'
|
|
523
|
+
end
|
|
524
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
525
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
526
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_getall"
|
|
527
|
+
end
|
|
528
|
+
# verify the required parameter 'pvm_instance_id' is set
|
|
529
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
|
530
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_getall"
|
|
531
|
+
end
|
|
532
|
+
# resource path
|
|
533
|
+
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))
|
|
534
|
+
|
|
535
|
+
# query parameters
|
|
536
|
+
query_params = opts[:query_params] || {}
|
|
537
|
+
|
|
538
|
+
# header parameters
|
|
539
|
+
header_params = opts[:header_params] || {}
|
|
540
|
+
# HTTP header 'Accept' (if needed)
|
|
541
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
542
|
+
|
|
543
|
+
# form parameters
|
|
544
|
+
form_params = opts[:form_params] || {}
|
|
545
|
+
|
|
546
|
+
# http body (model)
|
|
547
|
+
post_body = opts[:body]
|
|
548
|
+
|
|
549
|
+
# return_type
|
|
550
|
+
return_type = opts[:return_type] || 'Volumes'
|
|
551
|
+
|
|
552
|
+
# auth_names
|
|
553
|
+
auth_names = opts[:auth_names] || []
|
|
554
|
+
|
|
555
|
+
new_options = opts.merge(
|
|
556
|
+
:header_params => header_params,
|
|
557
|
+
:query_params => query_params,
|
|
558
|
+
:form_params => form_params,
|
|
559
|
+
:body => post_body,
|
|
560
|
+
:auth_names => auth_names,
|
|
561
|
+
:return_type => return_type
|
|
562
|
+
)
|
|
563
|
+
|
|
564
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
565
|
+
if @api_client.config.debugging
|
|
566
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
567
|
+
end
|
|
568
|
+
return data, status_code, headers
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Attach a volume to a PVM Instance
|
|
572
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
573
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
574
|
+
# @param volume_id [String] Volume ID
|
|
575
|
+
# @param [Hash] opts the optional parameters
|
|
576
|
+
# @return [Object]
|
|
577
|
+
def pcloud_pvminstances_volumes_post(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
578
|
+
data, _status_code, _headers = pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts)
|
|
579
|
+
data
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
# Attach a volume to a PVM Instance
|
|
583
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
584
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
585
|
+
# @param volume_id [String] Volume ID
|
|
586
|
+
# @param [Hash] opts the optional parameters
|
|
587
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
588
|
+
def pcloud_pvminstances_volumes_post_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
589
|
+
if @api_client.config.debugging
|
|
590
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_post ...'
|
|
591
|
+
end
|
|
592
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
593
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
594
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post"
|
|
595
|
+
end
|
|
596
|
+
# verify the required parameter 'pvm_instance_id' is set
|
|
597
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
|
598
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post"
|
|
599
|
+
end
|
|
600
|
+
# verify the required parameter 'volume_id' is set
|
|
601
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
602
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_post"
|
|
603
|
+
end
|
|
604
|
+
# resource path
|
|
605
|
+
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))
|
|
606
|
+
|
|
607
|
+
# query parameters
|
|
608
|
+
query_params = opts[:query_params] || {}
|
|
609
|
+
|
|
610
|
+
# header parameters
|
|
611
|
+
header_params = opts[:header_params] || {}
|
|
612
|
+
# HTTP header 'Accept' (if needed)
|
|
613
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
614
|
+
|
|
615
|
+
# form parameters
|
|
616
|
+
form_params = opts[:form_params] || {}
|
|
617
|
+
|
|
618
|
+
# http body (model)
|
|
619
|
+
post_body = opts[:body]
|
|
620
|
+
|
|
621
|
+
# return_type
|
|
622
|
+
return_type = opts[:return_type] || 'Object'
|
|
623
|
+
|
|
624
|
+
# auth_names
|
|
625
|
+
auth_names = opts[:auth_names] || []
|
|
626
|
+
|
|
627
|
+
new_options = opts.merge(
|
|
628
|
+
:header_params => header_params,
|
|
629
|
+
:query_params => query_params,
|
|
630
|
+
:form_params => form_params,
|
|
631
|
+
:body => post_body,
|
|
632
|
+
:auth_names => auth_names,
|
|
633
|
+
:return_type => return_type
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
637
|
+
if @api_client.config.debugging
|
|
638
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
639
|
+
end
|
|
640
|
+
return data, status_code, headers
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
# Update a volume attached to a PVMInstance
|
|
644
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
645
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
646
|
+
# @param volume_id [String] Volume ID
|
|
647
|
+
# @param body [PVMInstanceVolumeUpdate] Parameters to update a volume attached to a PVMInstance
|
|
648
|
+
# @param [Hash] opts the optional parameters
|
|
649
|
+
# @return [Object]
|
|
650
|
+
def pcloud_pvminstances_volumes_put(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {})
|
|
651
|
+
data, _status_code, _headers = pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts)
|
|
652
|
+
data
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
# Update a volume attached to a PVMInstance
|
|
656
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
657
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
658
|
+
# @param volume_id [String] Volume ID
|
|
659
|
+
# @param body [PVMInstanceVolumeUpdate] Parameters to update a volume attached to a PVMInstance
|
|
660
|
+
# @param [Hash] opts the optional parameters
|
|
661
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
662
|
+
def pcloud_pvminstances_volumes_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, body, opts = {})
|
|
663
|
+
if @api_client.config.debugging
|
|
664
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_put ...'
|
|
665
|
+
end
|
|
666
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
667
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
668
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put"
|
|
669
|
+
end
|
|
670
|
+
# verify the required parameter 'pvm_instance_id' is set
|
|
671
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
|
672
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put"
|
|
673
|
+
end
|
|
674
|
+
# verify the required parameter 'volume_id' is set
|
|
675
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
676
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put"
|
|
677
|
+
end
|
|
678
|
+
# verify the required parameter 'body' is set
|
|
679
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
680
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_put"
|
|
681
|
+
end
|
|
682
|
+
# resource path
|
|
683
|
+
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))
|
|
684
|
+
|
|
685
|
+
# query parameters
|
|
686
|
+
query_params = opts[:query_params] || {}
|
|
687
|
+
|
|
688
|
+
# header parameters
|
|
689
|
+
header_params = opts[:header_params] || {}
|
|
690
|
+
# HTTP header 'Accept' (if needed)
|
|
691
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
692
|
+
# HTTP header 'Content-Type'
|
|
693
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
694
|
+
|
|
695
|
+
# form parameters
|
|
696
|
+
form_params = opts[:form_params] || {}
|
|
697
|
+
|
|
698
|
+
# http body (model)
|
|
699
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
700
|
+
|
|
701
|
+
# return_type
|
|
702
|
+
return_type = opts[:return_type] || 'Object'
|
|
703
|
+
|
|
704
|
+
# auth_names
|
|
705
|
+
auth_names = opts[:auth_names] || []
|
|
706
|
+
|
|
707
|
+
new_options = opts.merge(
|
|
708
|
+
:header_params => header_params,
|
|
709
|
+
:query_params => query_params,
|
|
710
|
+
:form_params => form_params,
|
|
711
|
+
:body => post_body,
|
|
712
|
+
:auth_names => auth_names,
|
|
713
|
+
:return_type => return_type
|
|
714
|
+
)
|
|
715
|
+
|
|
716
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
717
|
+
if @api_client.config.debugging
|
|
718
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
719
|
+
end
|
|
720
|
+
return data, status_code, headers
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
# Set the PVMInstance volume as the boot volume
|
|
724
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
725
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
726
|
+
# @param volume_id [String] Volume ID
|
|
727
|
+
# @param [Hash] opts the optional parameters
|
|
728
|
+
# @return [Object]
|
|
729
|
+
def pcloud_pvminstances_volumes_setboot_put(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
730
|
+
data, _status_code, _headers = pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts)
|
|
731
|
+
data
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
# Set the PVMInstance volume as the boot volume
|
|
735
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
736
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
|
737
|
+
# @param volume_id [String] Volume ID
|
|
738
|
+
# @param [Hash] opts the optional parameters
|
|
739
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
740
|
+
def pcloud_pvminstances_volumes_setboot_put_with_http_info(cloud_instance_id, pvm_instance_id, volume_id, opts = {})
|
|
741
|
+
if @api_client.config.debugging
|
|
742
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put ...'
|
|
743
|
+
end
|
|
744
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
745
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
746
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put"
|
|
747
|
+
end
|
|
748
|
+
# verify the required parameter 'pvm_instance_id' is set
|
|
749
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
|
750
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put"
|
|
751
|
+
end
|
|
752
|
+
# verify the required parameter 'volume_id' is set
|
|
753
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
754
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling PCloudVolumesApi.pcloud_pvminstances_volumes_setboot_put"
|
|
755
|
+
end
|
|
756
|
+
# resource path
|
|
757
|
+
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))
|
|
758
|
+
|
|
759
|
+
# query parameters
|
|
760
|
+
query_params = opts[:query_params] || {}
|
|
761
|
+
|
|
762
|
+
# header parameters
|
|
763
|
+
header_params = opts[:header_params] || {}
|
|
764
|
+
# HTTP header 'Accept' (if needed)
|
|
765
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
766
|
+
|
|
767
|
+
# form parameters
|
|
768
|
+
form_params = opts[:form_params] || {}
|
|
769
|
+
|
|
770
|
+
# http body (model)
|
|
771
|
+
post_body = opts[:body]
|
|
772
|
+
|
|
773
|
+
# return_type
|
|
774
|
+
return_type = opts[:return_type] || 'Object'
|
|
775
|
+
|
|
776
|
+
# auth_names
|
|
777
|
+
auth_names = opts[:auth_names] || []
|
|
778
|
+
|
|
779
|
+
new_options = opts.merge(
|
|
780
|
+
:header_params => header_params,
|
|
781
|
+
:query_params => query_params,
|
|
782
|
+
:form_params => form_params,
|
|
783
|
+
:body => post_body,
|
|
784
|
+
:auth_names => auth_names,
|
|
785
|
+
:return_type => return_type
|
|
786
|
+
)
|
|
787
|
+
|
|
788
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
789
|
+
if @api_client.config.debugging
|
|
790
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_pvminstances_volumes_setboot_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
791
|
+
end
|
|
792
|
+
return data, status_code, headers
|
|
793
|
+
end
|
|
794
|
+
|
|
795
|
+
# Create a volume clone for specified volumes (version 2)
|
|
796
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
797
|
+
# @param body [VolumesCloneAsyncRequest] Parameters for the cloning of volumes
|
|
798
|
+
# @param [Hash] opts the optional parameters
|
|
799
|
+
# @return [CloneTaskReference]
|
|
800
|
+
def pcloud_v2_volumes_clone_post(cloud_instance_id, body, opts = {})
|
|
801
|
+
data, _status_code, _headers = pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts)
|
|
802
|
+
data
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
# Create a volume clone for specified volumes (version 2)
|
|
806
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
807
|
+
# @param body [VolumesCloneAsyncRequest] Parameters for the cloning of volumes
|
|
808
|
+
# @param [Hash] opts the optional parameters
|
|
809
|
+
# @return [Array<(CloneTaskReference, Integer, Hash)>] CloneTaskReference data, response status code and response headers
|
|
810
|
+
def pcloud_v2_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {})
|
|
811
|
+
if @api_client.config.debugging
|
|
812
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_clone_post ...'
|
|
813
|
+
end
|
|
814
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
815
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
816
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clone_post"
|
|
817
|
+
end
|
|
818
|
+
# verify the required parameter 'body' is set
|
|
819
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
820
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumes_clone_post"
|
|
821
|
+
end
|
|
822
|
+
# resource path
|
|
823
|
+
local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
|
824
|
+
|
|
825
|
+
# query parameters
|
|
826
|
+
query_params = opts[:query_params] || {}
|
|
827
|
+
|
|
828
|
+
# header parameters
|
|
829
|
+
header_params = opts[:header_params] || {}
|
|
830
|
+
# HTTP header 'Accept' (if needed)
|
|
831
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
832
|
+
# HTTP header 'Content-Type'
|
|
833
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
834
|
+
|
|
835
|
+
# form parameters
|
|
836
|
+
form_params = opts[:form_params] || {}
|
|
837
|
+
|
|
838
|
+
# http body (model)
|
|
839
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
840
|
+
|
|
841
|
+
# return_type
|
|
842
|
+
return_type = opts[:return_type] || 'CloneTaskReference'
|
|
843
|
+
|
|
844
|
+
# auth_names
|
|
845
|
+
auth_names = opts[:auth_names] || []
|
|
846
|
+
|
|
847
|
+
new_options = opts.merge(
|
|
848
|
+
:header_params => header_params,
|
|
849
|
+
:query_params => query_params,
|
|
850
|
+
:form_params => form_params,
|
|
851
|
+
:body => post_body,
|
|
852
|
+
:auth_names => auth_names,
|
|
853
|
+
:return_type => return_type
|
|
854
|
+
)
|
|
855
|
+
|
|
856
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
857
|
+
if @api_client.config.debugging
|
|
858
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumes_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
859
|
+
end
|
|
860
|
+
return data, status_code, headers
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
# Get the status of a volume clone request for the specified clone task ID
|
|
864
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
865
|
+
# @param clone_task_id [String] Volumes Clone Task ID
|
|
866
|
+
# @param [Hash] opts the optional parameters
|
|
867
|
+
# @return [CloneTaskStatus]
|
|
868
|
+
def pcloud_v2_volumes_clonetasks_get(cloud_instance_id, clone_task_id, opts = {})
|
|
869
|
+
data, _status_code, _headers = pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts)
|
|
870
|
+
data
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
# Get the status of a volume clone request for the specified clone task ID
|
|
874
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
875
|
+
# @param clone_task_id [String] Volumes Clone Task ID
|
|
876
|
+
# @param [Hash] opts the optional parameters
|
|
877
|
+
# @return [Array<(CloneTaskStatus, Integer, Hash)>] CloneTaskStatus data, response status code and response headers
|
|
878
|
+
def pcloud_v2_volumes_clonetasks_get_with_http_info(cloud_instance_id, clone_task_id, opts = {})
|
|
879
|
+
if @api_client.config.debugging
|
|
880
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get ...'
|
|
881
|
+
end
|
|
882
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
883
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
884
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get"
|
|
885
|
+
end
|
|
886
|
+
# verify the required parameter 'clone_task_id' is set
|
|
887
|
+
if @api_client.config.client_side_validation && clone_task_id.nil?
|
|
888
|
+
fail ArgumentError, "Missing the required parameter 'clone_task_id' when calling PCloudVolumesApi.pcloud_v2_volumes_clonetasks_get"
|
|
889
|
+
end
|
|
890
|
+
# resource path
|
|
891
|
+
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))
|
|
892
|
+
|
|
893
|
+
# query parameters
|
|
894
|
+
query_params = opts[:query_params] || {}
|
|
895
|
+
|
|
896
|
+
# header parameters
|
|
897
|
+
header_params = opts[:header_params] || {}
|
|
898
|
+
# HTTP header 'Accept' (if needed)
|
|
899
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
900
|
+
|
|
901
|
+
# form parameters
|
|
902
|
+
form_params = opts[:form_params] || {}
|
|
903
|
+
|
|
904
|
+
# http body (model)
|
|
905
|
+
post_body = opts[:body]
|
|
906
|
+
|
|
907
|
+
# return_type
|
|
908
|
+
return_type = opts[:return_type] || 'CloneTaskStatus'
|
|
909
|
+
|
|
910
|
+
# auth_names
|
|
911
|
+
auth_names = opts[:auth_names] || []
|
|
912
|
+
|
|
913
|
+
new_options = opts.merge(
|
|
914
|
+
:header_params => header_params,
|
|
915
|
+
:query_params => query_params,
|
|
916
|
+
:form_params => form_params,
|
|
917
|
+
:body => post_body,
|
|
918
|
+
:auth_names => auth_names,
|
|
919
|
+
:return_type => return_type
|
|
920
|
+
)
|
|
921
|
+
|
|
922
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
923
|
+
if @api_client.config.debugging
|
|
924
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumes_clonetasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
925
|
+
end
|
|
926
|
+
return data, status_code, headers
|
|
927
|
+
end
|
|
928
|
+
|
|
929
|
+
# Create multiple data volumes from a single definition
|
|
930
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
931
|
+
# @param body [MultiVolumesCreate] Parameters for creating multiple volumes
|
|
932
|
+
# @param [Hash] opts the optional parameters
|
|
933
|
+
# @return [Volumes]
|
|
934
|
+
def pcloud_v2_volumes_post(cloud_instance_id, body, opts = {})
|
|
935
|
+
data, _status_code, _headers = pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts)
|
|
936
|
+
data
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
# Create multiple data volumes from a single definition
|
|
940
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
941
|
+
# @param body [MultiVolumesCreate] Parameters for creating multiple volumes
|
|
942
|
+
# @param [Hash] opts the optional parameters
|
|
943
|
+
# @return [Array<(Volumes, Integer, Hash)>] Volumes data, response status code and response headers
|
|
944
|
+
def pcloud_v2_volumes_post_with_http_info(cloud_instance_id, body, opts = {})
|
|
945
|
+
if @api_client.config.debugging
|
|
946
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumes_post ...'
|
|
947
|
+
end
|
|
948
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
949
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
950
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumes_post"
|
|
951
|
+
end
|
|
952
|
+
# verify the required parameter 'body' is set
|
|
953
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
954
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumes_post"
|
|
955
|
+
end
|
|
956
|
+
# resource path
|
|
957
|
+
local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
|
958
|
+
|
|
959
|
+
# query parameters
|
|
960
|
+
query_params = opts[:query_params] || {}
|
|
961
|
+
|
|
962
|
+
# header parameters
|
|
963
|
+
header_params = opts[:header_params] || {}
|
|
964
|
+
# HTTP header 'Accept' (if needed)
|
|
965
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
966
|
+
# HTTP header 'Content-Type'
|
|
967
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
968
|
+
|
|
969
|
+
# form parameters
|
|
970
|
+
form_params = opts[:form_params] || {}
|
|
971
|
+
|
|
972
|
+
# http body (model)
|
|
973
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
974
|
+
|
|
975
|
+
# return_type
|
|
976
|
+
return_type = opts[:return_type] || 'Volumes'
|
|
977
|
+
|
|
978
|
+
# auth_names
|
|
979
|
+
auth_names = opts[:auth_names] || []
|
|
980
|
+
|
|
981
|
+
new_options = opts.merge(
|
|
982
|
+
:header_params => header_params,
|
|
983
|
+
:query_params => query_params,
|
|
984
|
+
:form_params => form_params,
|
|
985
|
+
:body => post_body,
|
|
986
|
+
:auth_names => auth_names,
|
|
987
|
+
:return_type => return_type
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
991
|
+
if @api_client.config.debugging
|
|
992
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
993
|
+
end
|
|
994
|
+
return data, status_code, headers
|
|
995
|
+
end
|
|
996
|
+
|
|
997
|
+
# Create a volume clone for specified volumes (version 1 - depricated)
|
|
998
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
999
|
+
# @param body [VolumesCloneRequest] Parameters for the cloning of volumes
|
|
1000
|
+
# @param [Hash] opts the optional parameters
|
|
1001
|
+
# @return [VolumesCloneResponse]
|
|
1002
|
+
def pcloud_volumes_clone_post(cloud_instance_id, body, opts = {})
|
|
1003
|
+
data, _status_code, _headers = pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts)
|
|
1004
|
+
data
|
|
1005
|
+
end
|
|
1006
|
+
|
|
1007
|
+
# Create a volume clone for specified volumes (version 1 - depricated)
|
|
1008
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
|
1009
|
+
# @param body [VolumesCloneRequest] Parameters for the cloning of volumes
|
|
1010
|
+
# @param [Hash] opts the optional parameters
|
|
1011
|
+
# @return [Array<(VolumesCloneResponse, Integer, Hash)>] VolumesCloneResponse data, response status code and response headers
|
|
1012
|
+
def pcloud_volumes_clone_post_with_http_info(cloud_instance_id, body, opts = {})
|
|
1013
|
+
if @api_client.config.debugging
|
|
1014
|
+
@api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_volumes_clone_post ...'
|
|
1015
|
+
end
|
|
1016
|
+
# verify the required parameter 'cloud_instance_id' is set
|
|
1017
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
|
1018
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_volumes_clone_post"
|
|
1019
|
+
end
|
|
1020
|
+
# verify the required parameter 'body' is set
|
|
1021
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1022
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_volumes_clone_post"
|
|
1023
|
+
end
|
|
1024
|
+
# resource path
|
|
1025
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
|
1026
|
+
|
|
1027
|
+
# query parameters
|
|
1028
|
+
query_params = opts[:query_params] || {}
|
|
1029
|
+
|
|
1030
|
+
# header parameters
|
|
1031
|
+
header_params = opts[:header_params] || {}
|
|
1032
|
+
# HTTP header 'Accept' (if needed)
|
|
1033
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1034
|
+
# HTTP header 'Content-Type'
|
|
1035
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1036
|
+
|
|
1037
|
+
# form parameters
|
|
1038
|
+
form_params = opts[:form_params] || {}
|
|
1039
|
+
|
|
1040
|
+
# http body (model)
|
|
1041
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
1042
|
+
|
|
1043
|
+
# return_type
|
|
1044
|
+
return_type = opts[:return_type] || 'VolumesCloneResponse'
|
|
1045
|
+
|
|
1046
|
+
# auth_names
|
|
1047
|
+
auth_names = opts[:auth_names] || []
|
|
1048
|
+
|
|
1049
|
+
new_options = opts.merge(
|
|
1050
|
+
:header_params => header_params,
|
|
1051
|
+
:query_params => query_params,
|
|
1052
|
+
:form_params => form_params,
|
|
1053
|
+
:body => post_body,
|
|
1054
|
+
:auth_names => auth_names,
|
|
1055
|
+
:return_type => return_type
|
|
1056
|
+
)
|
|
1057
|
+
|
|
1058
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1059
|
+
if @api_client.config.debugging
|
|
1060
|
+
@api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_volumes_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1061
|
+
end
|
|
1062
|
+
return data, status_code, headers
|
|
1063
|
+
end
|
|
1064
|
+
end
|
|
1065
|
+
end
|