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,1166 @@
|
|
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 PCloudPVMInstancesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Perform an action (start stop reboot immediate-shutdown reset) on a PVMInstance
|
23
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
24
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
25
|
+
# @param body [PVMInstanceAction] Parameters for the desired action
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [Object]
|
28
|
+
def pcloud_pvminstances_action_post(cloud_instance_id, pvm_instance_id, body, opts = {})
|
29
|
+
data, _status_code, _headers = pcloud_pvminstances_action_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Perform an action (start stop reboot immediate-shutdown reset) on a PVMInstance
|
34
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
35
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
36
|
+
# @param body [PVMInstanceAction] Parameters for the desired action
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
39
|
+
def pcloud_pvminstances_action_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_action_post ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'cloud_instance_id' is set
|
44
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_action_post"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'pvm_instance_id' is set
|
48
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_action_post"
|
50
|
+
end
|
51
|
+
# verify the required parameter 'body' is set
|
52
|
+
if @api_client.config.client_side_validation && body.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_action_post"
|
54
|
+
end
|
55
|
+
# resource path
|
56
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = opts[:query_params] || {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
# HTTP header 'Content-Type'
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
67
|
+
|
68
|
+
# form parameters
|
69
|
+
form_params = opts[:form_params] || {}
|
70
|
+
|
71
|
+
# http body (model)
|
72
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
73
|
+
|
74
|
+
# return_type
|
75
|
+
return_type = opts[:return_type] || 'Object'
|
76
|
+
|
77
|
+
# auth_names
|
78
|
+
auth_names = opts[:auth_names] || []
|
79
|
+
|
80
|
+
new_options = opts.merge(
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
88
|
+
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_action_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
|
96
|
+
# Capture a PVM instance and create a deployable image
|
97
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
98
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
99
|
+
# @param body [PVMInstanceCapture] Parameters for the capture PVMInstance
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [Object]
|
102
|
+
def pcloud_pvminstances_capture_post(cloud_instance_id, pvm_instance_id, body, opts = {})
|
103
|
+
data, _status_code, _headers = pcloud_pvminstances_capture_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
|
104
|
+
data
|
105
|
+
end
|
106
|
+
|
107
|
+
# Capture a PVM instance and create a deployable image
|
108
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
109
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
110
|
+
# @param body [PVMInstanceCapture] Parameters for the capture PVMInstance
|
111
|
+
# @param [Hash] opts the optional parameters
|
112
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
113
|
+
def pcloud_pvminstances_capture_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
|
114
|
+
if @api_client.config.debugging
|
115
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_capture_post ...'
|
116
|
+
end
|
117
|
+
# verify the required parameter 'cloud_instance_id' is set
|
118
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
119
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_capture_post"
|
120
|
+
end
|
121
|
+
# verify the required parameter 'pvm_instance_id' is set
|
122
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_capture_post"
|
124
|
+
end
|
125
|
+
# verify the required parameter 'body' is set
|
126
|
+
if @api_client.config.client_side_validation && body.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_capture_post"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = opts[:query_params] || {}
|
134
|
+
|
135
|
+
# header parameters
|
136
|
+
header_params = opts[:header_params] || {}
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
139
|
+
# HTTP header 'Content-Type'
|
140
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
141
|
+
|
142
|
+
# form parameters
|
143
|
+
form_params = opts[:form_params] || {}
|
144
|
+
|
145
|
+
# http body (model)
|
146
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
147
|
+
|
148
|
+
# return_type
|
149
|
+
return_type = opts[:return_type] || 'Object'
|
150
|
+
|
151
|
+
# auth_names
|
152
|
+
auth_names = opts[:auth_names] || []
|
153
|
+
|
154
|
+
new_options = opts.merge(
|
155
|
+
:header_params => header_params,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body,
|
159
|
+
:auth_names => auth_names,
|
160
|
+
:return_type => return_type
|
161
|
+
)
|
162
|
+
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_capture_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
|
+
end
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
|
170
|
+
# Generate the noVNC console URL
|
171
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
172
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @return [PVMInstanceConsole]
|
175
|
+
def pcloud_pvminstances_console_post(cloud_instance_id, pvm_instance_id, opts = {})
|
176
|
+
data, _status_code, _headers = pcloud_pvminstances_console_post_with_http_info(cloud_instance_id, pvm_instance_id, opts)
|
177
|
+
data
|
178
|
+
end
|
179
|
+
|
180
|
+
# Generate the noVNC console URL
|
181
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
182
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
183
|
+
# @param [Hash] opts the optional parameters
|
184
|
+
# @return [Array<(PVMInstanceConsole, Integer, Hash)>] PVMInstanceConsole data, response status code and response headers
|
185
|
+
def pcloud_pvminstances_console_post_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_console_post ...'
|
188
|
+
end
|
189
|
+
# verify the required parameter 'cloud_instance_id' is set
|
190
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
191
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_console_post"
|
192
|
+
end
|
193
|
+
# verify the required parameter 'pvm_instance_id' is set
|
194
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
195
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_console_post"
|
196
|
+
end
|
197
|
+
# resource path
|
198
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
199
|
+
|
200
|
+
# query parameters
|
201
|
+
query_params = opts[:query_params] || {}
|
202
|
+
|
203
|
+
# header parameters
|
204
|
+
header_params = opts[:header_params] || {}
|
205
|
+
# HTTP header 'Accept' (if needed)
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
|
+
|
208
|
+
# form parameters
|
209
|
+
form_params = opts[:form_params] || {}
|
210
|
+
|
211
|
+
# http body (model)
|
212
|
+
post_body = opts[:body]
|
213
|
+
|
214
|
+
# return_type
|
215
|
+
return_type = opts[:return_type] || 'PVMInstanceConsole'
|
216
|
+
|
217
|
+
# auth_names
|
218
|
+
auth_names = opts[:auth_names] || []
|
219
|
+
|
220
|
+
new_options = opts.merge(
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => return_type
|
227
|
+
)
|
228
|
+
|
229
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_console_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
|
236
|
+
# Delete a PCloud PVM instance
|
237
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
238
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @return [Object]
|
241
|
+
def pcloud_pvminstances_delete(cloud_instance_id, pvm_instance_id, opts = {})
|
242
|
+
data, _status_code, _headers = pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts)
|
243
|
+
data
|
244
|
+
end
|
245
|
+
|
246
|
+
# Delete a PCloud PVM instance
|
247
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
248
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
251
|
+
def pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_delete ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'cloud_instance_id' is set
|
256
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_delete"
|
258
|
+
end
|
259
|
+
# verify the required parameter 'pvm_instance_id' is set
|
260
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_delete"
|
262
|
+
end
|
263
|
+
# resource path
|
264
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
265
|
+
|
266
|
+
# query parameters
|
267
|
+
query_params = opts[:query_params] || {}
|
268
|
+
|
269
|
+
# header parameters
|
270
|
+
header_params = opts[:header_params] || {}
|
271
|
+
# HTTP header 'Accept' (if needed)
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
273
|
+
|
274
|
+
# form parameters
|
275
|
+
form_params = opts[:form_params] || {}
|
276
|
+
|
277
|
+
# http body (model)
|
278
|
+
post_body = opts[:body]
|
279
|
+
|
280
|
+
# return_type
|
281
|
+
return_type = opts[:return_type] || 'Object'
|
282
|
+
|
283
|
+
# auth_names
|
284
|
+
auth_names = opts[:auth_names] || []
|
285
|
+
|
286
|
+
new_options = opts.merge(
|
287
|
+
:header_params => header_params,
|
288
|
+
:query_params => query_params,
|
289
|
+
:form_params => form_params,
|
290
|
+
:body => post_body,
|
291
|
+
:auth_names => auth_names,
|
292
|
+
:return_type => return_type
|
293
|
+
)
|
294
|
+
|
295
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
298
|
+
end
|
299
|
+
return data, status_code, headers
|
300
|
+
end
|
301
|
+
|
302
|
+
# Get a PVM instance's current state or information
|
303
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
304
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @return [PVMInstance]
|
307
|
+
def pcloud_pvminstances_get(cloud_instance_id, pvm_instance_id, opts = {})
|
308
|
+
data, _status_code, _headers = pcloud_pvminstances_get_with_http_info(cloud_instance_id, pvm_instance_id, opts)
|
309
|
+
data
|
310
|
+
end
|
311
|
+
|
312
|
+
# Get a PVM instance's current state or information
|
313
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
314
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
315
|
+
# @param [Hash] opts the optional parameters
|
316
|
+
# @return [Array<(PVMInstance, Integer, Hash)>] PVMInstance data, response status code and response headers
|
317
|
+
def pcloud_pvminstances_get_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_get ...'
|
320
|
+
end
|
321
|
+
# verify the required parameter 'cloud_instance_id' is set
|
322
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
323
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_get"
|
324
|
+
end
|
325
|
+
# verify the required parameter 'pvm_instance_id' is set
|
326
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
327
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_get"
|
328
|
+
end
|
329
|
+
# resource path
|
330
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
331
|
+
|
332
|
+
# query parameters
|
333
|
+
query_params = opts[:query_params] || {}
|
334
|
+
|
335
|
+
# header parameters
|
336
|
+
header_params = opts[:header_params] || {}
|
337
|
+
# HTTP header 'Accept' (if needed)
|
338
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
339
|
+
|
340
|
+
# form parameters
|
341
|
+
form_params = opts[:form_params] || {}
|
342
|
+
|
343
|
+
# http body (model)
|
344
|
+
post_body = opts[:body]
|
345
|
+
|
346
|
+
# return_type
|
347
|
+
return_type = opts[:return_type] || 'PVMInstance'
|
348
|
+
|
349
|
+
# auth_names
|
350
|
+
auth_names = opts[:auth_names] || []
|
351
|
+
|
352
|
+
new_options = opts.merge(
|
353
|
+
:header_params => header_params,
|
354
|
+
:query_params => query_params,
|
355
|
+
:form_params => form_params,
|
356
|
+
:body => post_body,
|
357
|
+
:auth_names => auth_names,
|
358
|
+
:return_type => return_type
|
359
|
+
)
|
360
|
+
|
361
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
362
|
+
if @api_client.config.debugging
|
363
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
364
|
+
end
|
365
|
+
return data, status_code, headers
|
366
|
+
end
|
367
|
+
|
368
|
+
# Get all the PVM instances for this cloud instance
|
369
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
370
|
+
# @param [Hash] opts the optional parameters
|
371
|
+
# @return [PVMInstances]
|
372
|
+
def pcloud_pvminstances_getall(cloud_instance_id, opts = {})
|
373
|
+
data, _status_code, _headers = pcloud_pvminstances_getall_with_http_info(cloud_instance_id, opts)
|
374
|
+
data
|
375
|
+
end
|
376
|
+
|
377
|
+
# Get all the PVM instances for this cloud instance
|
378
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @return [Array<(PVMInstances, Integer, Hash)>] PVMInstances data, response status code and response headers
|
381
|
+
def pcloud_pvminstances_getall_with_http_info(cloud_instance_id, opts = {})
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_getall ...'
|
384
|
+
end
|
385
|
+
# verify the required parameter 'cloud_instance_id' is set
|
386
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
387
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_getall"
|
388
|
+
end
|
389
|
+
# resource path
|
390
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
391
|
+
|
392
|
+
# query parameters
|
393
|
+
query_params = opts[:query_params] || {}
|
394
|
+
|
395
|
+
# header parameters
|
396
|
+
header_params = opts[:header_params] || {}
|
397
|
+
# HTTP header 'Accept' (if needed)
|
398
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
399
|
+
|
400
|
+
# form parameters
|
401
|
+
form_params = opts[:form_params] || {}
|
402
|
+
|
403
|
+
# http body (model)
|
404
|
+
post_body = opts[:body]
|
405
|
+
|
406
|
+
# return_type
|
407
|
+
return_type = opts[:return_type] || 'PVMInstances'
|
408
|
+
|
409
|
+
# auth_names
|
410
|
+
auth_names = opts[:auth_names] || []
|
411
|
+
|
412
|
+
new_options = opts.merge(
|
413
|
+
:header_params => header_params,
|
414
|
+
:query_params => query_params,
|
415
|
+
:form_params => form_params,
|
416
|
+
:body => post_body,
|
417
|
+
:auth_names => auth_names,
|
418
|
+
:return_type => return_type
|
419
|
+
)
|
420
|
+
|
421
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
422
|
+
if @api_client.config.debugging
|
423
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
424
|
+
end
|
425
|
+
return data, status_code, headers
|
426
|
+
end
|
427
|
+
|
428
|
+
# Remove all addresses of network from a PVM instance
|
429
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
430
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
431
|
+
# @param network_id [String] Network ID
|
432
|
+
# @param [Hash] opts the optional parameters
|
433
|
+
# @option opts [PVMInstanceRemoveNetwork] :body Remove a network from PVM Instance parameters
|
434
|
+
# @return [Object]
|
435
|
+
def pcloud_pvminstances_networks_delete(cloud_instance_id, pvm_instance_id, network_id, opts = {})
|
436
|
+
data, _status_code, _headers = pcloud_pvminstances_networks_delete_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts)
|
437
|
+
data
|
438
|
+
end
|
439
|
+
|
440
|
+
# Remove all addresses of network from a PVM instance
|
441
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
442
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
443
|
+
# @param network_id [String] Network ID
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @option opts [PVMInstanceRemoveNetwork] :body Remove a network from PVM Instance parameters
|
446
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
447
|
+
def pcloud_pvminstances_networks_delete_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {})
|
448
|
+
if @api_client.config.debugging
|
449
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete ...'
|
450
|
+
end
|
451
|
+
# verify the required parameter 'cloud_instance_id' is set
|
452
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
453
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete"
|
454
|
+
end
|
455
|
+
# verify the required parameter 'pvm_instance_id' is set
|
456
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
457
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete"
|
458
|
+
end
|
459
|
+
# verify the required parameter 'network_id' is set
|
460
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
461
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete"
|
462
|
+
end
|
463
|
+
# resource path
|
464
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
465
|
+
|
466
|
+
# query parameters
|
467
|
+
query_params = opts[:query_params] || {}
|
468
|
+
|
469
|
+
# header parameters
|
470
|
+
header_params = opts[:header_params] || {}
|
471
|
+
# HTTP header 'Accept' (if needed)
|
472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
473
|
+
# HTTP header 'Content-Type'
|
474
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
475
|
+
|
476
|
+
# form parameters
|
477
|
+
form_params = opts[:form_params] || {}
|
478
|
+
|
479
|
+
# http body (model)
|
480
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
481
|
+
|
482
|
+
# return_type
|
483
|
+
return_type = opts[:return_type] || 'Object'
|
484
|
+
|
485
|
+
# auth_names
|
486
|
+
auth_names = opts[:auth_names] || []
|
487
|
+
|
488
|
+
new_options = opts.merge(
|
489
|
+
:header_params => header_params,
|
490
|
+
:query_params => query_params,
|
491
|
+
:form_params => form_params,
|
492
|
+
:body => post_body,
|
493
|
+
:auth_names => auth_names,
|
494
|
+
:return_type => return_type
|
495
|
+
)
|
496
|
+
|
497
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
498
|
+
if @api_client.config.debugging
|
499
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_networks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
500
|
+
end
|
501
|
+
return data, status_code, headers
|
502
|
+
end
|
503
|
+
|
504
|
+
# Get a PVM instance's network information
|
505
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
506
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
507
|
+
# @param network_id [String] Network ID
|
508
|
+
# @param [Hash] opts the optional parameters
|
509
|
+
# @return [PVMInstanceNetworks]
|
510
|
+
def pcloud_pvminstances_networks_get(cloud_instance_id, pvm_instance_id, network_id, opts = {})
|
511
|
+
data, _status_code, _headers = pcloud_pvminstances_networks_get_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts)
|
512
|
+
data
|
513
|
+
end
|
514
|
+
|
515
|
+
# Get a PVM instance's network information
|
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 network_id [String] Network ID
|
519
|
+
# @param [Hash] opts the optional parameters
|
520
|
+
# @return [Array<(PVMInstanceNetworks, Integer, Hash)>] PVMInstanceNetworks data, response status code and response headers
|
521
|
+
def pcloud_pvminstances_networks_get_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {})
|
522
|
+
if @api_client.config.debugging
|
523
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_get ...'
|
524
|
+
end
|
525
|
+
# verify the required parameter 'cloud_instance_id' is set
|
526
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
527
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_get"
|
528
|
+
end
|
529
|
+
# verify the required parameter 'pvm_instance_id' is set
|
530
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
531
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_get"
|
532
|
+
end
|
533
|
+
# verify the required parameter 'network_id' is set
|
534
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
535
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_get"
|
536
|
+
end
|
537
|
+
# resource path
|
538
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
539
|
+
|
540
|
+
# query parameters
|
541
|
+
query_params = opts[:query_params] || {}
|
542
|
+
|
543
|
+
# header parameters
|
544
|
+
header_params = opts[:header_params] || {}
|
545
|
+
# HTTP header 'Accept' (if needed)
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
547
|
+
|
548
|
+
# form parameters
|
549
|
+
form_params = opts[:form_params] || {}
|
550
|
+
|
551
|
+
# http body (model)
|
552
|
+
post_body = opts[:body]
|
553
|
+
|
554
|
+
# return_type
|
555
|
+
return_type = opts[:return_type] || 'PVMInstanceNetworks'
|
556
|
+
|
557
|
+
# auth_names
|
558
|
+
auth_names = opts[:auth_names] || []
|
559
|
+
|
560
|
+
new_options = opts.merge(
|
561
|
+
:header_params => header_params,
|
562
|
+
:query_params => query_params,
|
563
|
+
:form_params => form_params,
|
564
|
+
:body => post_body,
|
565
|
+
:auth_names => auth_names,
|
566
|
+
:return_type => return_type
|
567
|
+
)
|
568
|
+
|
569
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
570
|
+
if @api_client.config.debugging
|
571
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_networks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
572
|
+
end
|
573
|
+
return data, status_code, headers
|
574
|
+
end
|
575
|
+
|
576
|
+
# Get all networks for this PVM instance
|
577
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
578
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
579
|
+
# @param [Hash] opts the optional parameters
|
580
|
+
# @return [PVMInstanceNetworks]
|
581
|
+
def pcloud_pvminstances_networks_getall(cloud_instance_id, pvm_instance_id, opts = {})
|
582
|
+
data, _status_code, _headers = pcloud_pvminstances_networks_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts)
|
583
|
+
data
|
584
|
+
end
|
585
|
+
|
586
|
+
# Get all networks for this PVM instance
|
587
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
588
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
589
|
+
# @param [Hash] opts the optional parameters
|
590
|
+
# @return [Array<(PVMInstanceNetworks, Integer, Hash)>] PVMInstanceNetworks data, response status code and response headers
|
591
|
+
def pcloud_pvminstances_networks_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
|
592
|
+
if @api_client.config.debugging
|
593
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_getall ...'
|
594
|
+
end
|
595
|
+
# verify the required parameter 'cloud_instance_id' is set
|
596
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
597
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_getall"
|
598
|
+
end
|
599
|
+
# verify the required parameter 'pvm_instance_id' is set
|
600
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
601
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_getall"
|
602
|
+
end
|
603
|
+
# resource path
|
604
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
605
|
+
|
606
|
+
# query parameters
|
607
|
+
query_params = opts[:query_params] || {}
|
608
|
+
|
609
|
+
# header parameters
|
610
|
+
header_params = opts[:header_params] || {}
|
611
|
+
# HTTP header 'Accept' (if needed)
|
612
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
613
|
+
|
614
|
+
# form parameters
|
615
|
+
form_params = opts[:form_params] || {}
|
616
|
+
|
617
|
+
# http body (model)
|
618
|
+
post_body = opts[:body]
|
619
|
+
|
620
|
+
# return_type
|
621
|
+
return_type = opts[:return_type] || 'PVMInstanceNetworks'
|
622
|
+
|
623
|
+
# auth_names
|
624
|
+
auth_names = opts[:auth_names] || []
|
625
|
+
|
626
|
+
new_options = opts.merge(
|
627
|
+
:header_params => header_params,
|
628
|
+
:query_params => query_params,
|
629
|
+
:form_params => form_params,
|
630
|
+
:body => post_body,
|
631
|
+
:auth_names => auth_names,
|
632
|
+
:return_type => return_type
|
633
|
+
)
|
634
|
+
|
635
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
636
|
+
if @api_client.config.debugging
|
637
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_networks_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
638
|
+
end
|
639
|
+
return data, status_code, headers
|
640
|
+
end
|
641
|
+
|
642
|
+
# Perform network addition, deletion, and listing
|
643
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
644
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
645
|
+
# @param body [PVMInstanceAddNetwork] Add network to PVM Instance parameters
|
646
|
+
# @param [Hash] opts the optional parameters
|
647
|
+
# @return [PVMInstanceNetwork]
|
648
|
+
def pcloud_pvminstances_networks_post(cloud_instance_id, pvm_instance_id, body, opts = {})
|
649
|
+
data, _status_code, _headers = pcloud_pvminstances_networks_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
|
650
|
+
data
|
651
|
+
end
|
652
|
+
|
653
|
+
# Perform network addition, deletion, and listing
|
654
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
655
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
656
|
+
# @param body [PVMInstanceAddNetwork] Add network to PVM Instance parameters
|
657
|
+
# @param [Hash] opts the optional parameters
|
658
|
+
# @return [Array<(PVMInstanceNetwork, Integer, Hash)>] PVMInstanceNetwork data, response status code and response headers
|
659
|
+
def pcloud_pvminstances_networks_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
|
660
|
+
if @api_client.config.debugging
|
661
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_post ...'
|
662
|
+
end
|
663
|
+
# verify the required parameter 'cloud_instance_id' is set
|
664
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
665
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_post"
|
666
|
+
end
|
667
|
+
# verify the required parameter 'pvm_instance_id' is set
|
668
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
669
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_post"
|
670
|
+
end
|
671
|
+
# verify the required parameter 'body' is set
|
672
|
+
if @api_client.config.client_side_validation && body.nil?
|
673
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_post"
|
674
|
+
end
|
675
|
+
# resource path
|
676
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
677
|
+
|
678
|
+
# query parameters
|
679
|
+
query_params = opts[:query_params] || {}
|
680
|
+
|
681
|
+
# header parameters
|
682
|
+
header_params = opts[:header_params] || {}
|
683
|
+
# HTTP header 'Accept' (if needed)
|
684
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
685
|
+
# HTTP header 'Content-Type'
|
686
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
687
|
+
|
688
|
+
# form parameters
|
689
|
+
form_params = opts[:form_params] || {}
|
690
|
+
|
691
|
+
# http body (model)
|
692
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
693
|
+
|
694
|
+
# return_type
|
695
|
+
return_type = opts[:return_type] || 'PVMInstanceNetwork'
|
696
|
+
|
697
|
+
# auth_names
|
698
|
+
auth_names = opts[:auth_names] || []
|
699
|
+
|
700
|
+
new_options = opts.merge(
|
701
|
+
:header_params => header_params,
|
702
|
+
:query_params => query_params,
|
703
|
+
:form_params => form_params,
|
704
|
+
:body => post_body,
|
705
|
+
:auth_names => auth_names,
|
706
|
+
:return_type => return_type
|
707
|
+
)
|
708
|
+
|
709
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
710
|
+
if @api_client.config.debugging
|
711
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
712
|
+
end
|
713
|
+
return data, status_code, headers
|
714
|
+
end
|
715
|
+
|
716
|
+
# Perform an operation on a PVMInstance
|
717
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
718
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
719
|
+
# @param body [PVMInstanceOperation] Parameters for the desired operations
|
720
|
+
# @param [Hash] opts the optional parameters
|
721
|
+
# @return [Object]
|
722
|
+
def pcloud_pvminstances_operations_post(cloud_instance_id, pvm_instance_id, body, opts = {})
|
723
|
+
data, _status_code, _headers = pcloud_pvminstances_operations_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
|
724
|
+
data
|
725
|
+
end
|
726
|
+
|
727
|
+
# Perform an operation on a PVMInstance
|
728
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
729
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
730
|
+
# @param body [PVMInstanceOperation] Parameters for the desired operations
|
731
|
+
# @param [Hash] opts the optional parameters
|
732
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
733
|
+
def pcloud_pvminstances_operations_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
|
734
|
+
if @api_client.config.debugging
|
735
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_operations_post ...'
|
736
|
+
end
|
737
|
+
# verify the required parameter 'cloud_instance_id' is set
|
738
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
739
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_operations_post"
|
740
|
+
end
|
741
|
+
# verify the required parameter 'pvm_instance_id' is set
|
742
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
743
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_operations_post"
|
744
|
+
end
|
745
|
+
# verify the required parameter 'body' is set
|
746
|
+
if @api_client.config.client_side_validation && body.nil?
|
747
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_operations_post"
|
748
|
+
end
|
749
|
+
# resource path
|
750
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
751
|
+
|
752
|
+
# query parameters
|
753
|
+
query_params = opts[:query_params] || {}
|
754
|
+
|
755
|
+
# header parameters
|
756
|
+
header_params = opts[:header_params] || {}
|
757
|
+
# HTTP header 'Accept' (if needed)
|
758
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
759
|
+
# HTTP header 'Content-Type'
|
760
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
761
|
+
|
762
|
+
# form parameters
|
763
|
+
form_params = opts[:form_params] || {}
|
764
|
+
|
765
|
+
# http body (model)
|
766
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
767
|
+
|
768
|
+
# return_type
|
769
|
+
return_type = opts[:return_type] || 'Object'
|
770
|
+
|
771
|
+
# auth_names
|
772
|
+
auth_names = opts[:auth_names] || []
|
773
|
+
|
774
|
+
new_options = opts.merge(
|
775
|
+
:header_params => header_params,
|
776
|
+
:query_params => query_params,
|
777
|
+
:form_params => form_params,
|
778
|
+
:body => post_body,
|
779
|
+
:auth_names => auth_names,
|
780
|
+
:return_type => return_type
|
781
|
+
)
|
782
|
+
|
783
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
784
|
+
if @api_client.config.debugging
|
785
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_operations_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
786
|
+
end
|
787
|
+
return data, status_code, headers
|
788
|
+
end
|
789
|
+
|
790
|
+
# Create a new PVM instance
|
791
|
+
# The order of network IDs passed in will be the order of interfaces defined to the VM.
|
792
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
793
|
+
# @param body [PVMInstanceCreate] Parameters for the creation of a new tenant
|
794
|
+
# @param [Hash] opts the optional parameters
|
795
|
+
# @option opts [Boolean] :skip_host_validation Option to skip host validation on PVMInstance Create API
|
796
|
+
# @return [Array<PVMInstance>]
|
797
|
+
def pcloud_pvminstances_post(cloud_instance_id, body, opts = {})
|
798
|
+
data, _status_code, _headers = pcloud_pvminstances_post_with_http_info(cloud_instance_id, body, opts)
|
799
|
+
data
|
800
|
+
end
|
801
|
+
|
802
|
+
# Create a new PVM instance
|
803
|
+
# The order of network IDs passed in will be the order of interfaces defined to the VM.
|
804
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
805
|
+
# @param body [PVMInstanceCreate] Parameters for the creation of a new tenant
|
806
|
+
# @param [Hash] opts the optional parameters
|
807
|
+
# @option opts [Boolean] :skip_host_validation Option to skip host validation on PVMInstance Create API
|
808
|
+
# @return [Array<(Array<PVMInstance>, Integer, Hash)>] Array<PVMInstance> data, response status code and response headers
|
809
|
+
def pcloud_pvminstances_post_with_http_info(cloud_instance_id, body, opts = {})
|
810
|
+
if @api_client.config.debugging
|
811
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_post ...'
|
812
|
+
end
|
813
|
+
# verify the required parameter 'cloud_instance_id' is set
|
814
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
815
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_post"
|
816
|
+
end
|
817
|
+
# verify the required parameter 'body' is set
|
818
|
+
if @api_client.config.client_side_validation && body.nil?
|
819
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_post"
|
820
|
+
end
|
821
|
+
# resource path
|
822
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
823
|
+
|
824
|
+
# query parameters
|
825
|
+
query_params = opts[:query_params] || {}
|
826
|
+
query_params[:'skipHostValidation'] = opts[:'skip_host_validation'] if !opts[:'skip_host_validation'].nil?
|
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] || 'Array<PVMInstance>'
|
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: PCloudPVMInstancesApi#pcloud_pvminstances_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
859
|
+
end
|
860
|
+
return data, status_code, headers
|
861
|
+
end
|
862
|
+
|
863
|
+
# Update a PCloud PVM instance
|
864
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
865
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
866
|
+
# @param body [PVMInstanceUpdate] Parameters to update a PCloud PVM instance
|
867
|
+
# @param [Hash] opts the optional parameters
|
868
|
+
# @return [PVMInstanceUpdateResponse]
|
869
|
+
def pcloud_pvminstances_put(cloud_instance_id, pvm_instance_id, body, opts = {})
|
870
|
+
data, _status_code, _headers = pcloud_pvminstances_put_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
|
871
|
+
data
|
872
|
+
end
|
873
|
+
|
874
|
+
# Update a PCloud PVM instance
|
875
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
876
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
877
|
+
# @param body [PVMInstanceUpdate] Parameters to update a PCloud PVM instance
|
878
|
+
# @param [Hash] opts the optional parameters
|
879
|
+
# @return [Array<(PVMInstanceUpdateResponse, Integer, Hash)>] PVMInstanceUpdateResponse data, response status code and response headers
|
880
|
+
def pcloud_pvminstances_put_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
|
881
|
+
if @api_client.config.debugging
|
882
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_put ...'
|
883
|
+
end
|
884
|
+
# verify the required parameter 'cloud_instance_id' is set
|
885
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
886
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_put"
|
887
|
+
end
|
888
|
+
# verify the required parameter 'pvm_instance_id' is set
|
889
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
890
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_put"
|
891
|
+
end
|
892
|
+
# verify the required parameter 'body' is set
|
893
|
+
if @api_client.config.client_side_validation && body.nil?
|
894
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_put"
|
895
|
+
end
|
896
|
+
# resource path
|
897
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
898
|
+
|
899
|
+
# query parameters
|
900
|
+
query_params = opts[:query_params] || {}
|
901
|
+
|
902
|
+
# header parameters
|
903
|
+
header_params = opts[:header_params] || {}
|
904
|
+
# HTTP header 'Accept' (if needed)
|
905
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
906
|
+
# HTTP header 'Content-Type'
|
907
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
908
|
+
|
909
|
+
# form parameters
|
910
|
+
form_params = opts[:form_params] || {}
|
911
|
+
|
912
|
+
# http body (model)
|
913
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
914
|
+
|
915
|
+
# return_type
|
916
|
+
return_type = opts[:return_type] || 'PVMInstanceUpdateResponse'
|
917
|
+
|
918
|
+
# auth_names
|
919
|
+
auth_names = opts[:auth_names] || []
|
920
|
+
|
921
|
+
new_options = opts.merge(
|
922
|
+
:header_params => header_params,
|
923
|
+
:query_params => query_params,
|
924
|
+
:form_params => form_params,
|
925
|
+
:body => post_body,
|
926
|
+
:auth_names => auth_names,
|
927
|
+
:return_type => return_type
|
928
|
+
)
|
929
|
+
|
930
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
931
|
+
if @api_client.config.debugging
|
932
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
933
|
+
end
|
934
|
+
return data, status_code, headers
|
935
|
+
end
|
936
|
+
|
937
|
+
# Get all snapshots for this PVM instance
|
938
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
939
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
940
|
+
# @param [Hash] opts the optional parameters
|
941
|
+
# @return [Snapshots]
|
942
|
+
def pcloud_pvminstances_snapshots_getall(cloud_instance_id, pvm_instance_id, opts = {})
|
943
|
+
data, _status_code, _headers = pcloud_pvminstances_snapshots_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts)
|
944
|
+
data
|
945
|
+
end
|
946
|
+
|
947
|
+
# Get all snapshots for this PVM instance
|
948
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
949
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
950
|
+
# @param [Hash] opts the optional parameters
|
951
|
+
# @return [Array<(Snapshots, Integer, Hash)>] Snapshots data, response status code and response headers
|
952
|
+
def pcloud_pvminstances_snapshots_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
|
953
|
+
if @api_client.config.debugging
|
954
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_getall ...'
|
955
|
+
end
|
956
|
+
# verify the required parameter 'cloud_instance_id' is set
|
957
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
958
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_getall"
|
959
|
+
end
|
960
|
+
# verify the required parameter 'pvm_instance_id' is set
|
961
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
962
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_getall"
|
963
|
+
end
|
964
|
+
# resource path
|
965
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
966
|
+
|
967
|
+
# query parameters
|
968
|
+
query_params = opts[:query_params] || {}
|
969
|
+
|
970
|
+
# header parameters
|
971
|
+
header_params = opts[:header_params] || {}
|
972
|
+
# HTTP header 'Accept' (if needed)
|
973
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
974
|
+
|
975
|
+
# form parameters
|
976
|
+
form_params = opts[:form_params] || {}
|
977
|
+
|
978
|
+
# http body (model)
|
979
|
+
post_body = opts[:body]
|
980
|
+
|
981
|
+
# return_type
|
982
|
+
return_type = opts[:return_type] || 'Snapshots'
|
983
|
+
|
984
|
+
# auth_names
|
985
|
+
auth_names = opts[:auth_names] || []
|
986
|
+
|
987
|
+
new_options = opts.merge(
|
988
|
+
:header_params => header_params,
|
989
|
+
:query_params => query_params,
|
990
|
+
:form_params => form_params,
|
991
|
+
:body => post_body,
|
992
|
+
:auth_names => auth_names,
|
993
|
+
:return_type => return_type
|
994
|
+
)
|
995
|
+
|
996
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
997
|
+
if @api_client.config.debugging
|
998
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_snapshots_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
999
|
+
end
|
1000
|
+
return data, status_code, headers
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
# Create a PVM instance snapshot
|
1004
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
1005
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
1006
|
+
# @param body [SnapshotCreate] PVM Instance snapshot create parameters
|
1007
|
+
# @param [Hash] opts the optional parameters
|
1008
|
+
# @return [SnapshotCreateResponse]
|
1009
|
+
def pcloud_pvminstances_snapshots_post(cloud_instance_id, pvm_instance_id, body, opts = {})
|
1010
|
+
data, _status_code, _headers = pcloud_pvminstances_snapshots_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
|
1011
|
+
data
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# Create a PVM instance snapshot
|
1015
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
1016
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
1017
|
+
# @param body [SnapshotCreate] PVM Instance snapshot create parameters
|
1018
|
+
# @param [Hash] opts the optional parameters
|
1019
|
+
# @return [Array<(SnapshotCreateResponse, Integer, Hash)>] SnapshotCreateResponse data, response status code and response headers
|
1020
|
+
def pcloud_pvminstances_snapshots_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
|
1021
|
+
if @api_client.config.debugging
|
1022
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post ...'
|
1023
|
+
end
|
1024
|
+
# verify the required parameter 'cloud_instance_id' is set
|
1025
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
1026
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post"
|
1027
|
+
end
|
1028
|
+
# verify the required parameter 'pvm_instance_id' is set
|
1029
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
1030
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post"
|
1031
|
+
end
|
1032
|
+
# verify the required parameter 'body' is set
|
1033
|
+
if @api_client.config.client_side_validation && body.nil?
|
1034
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post"
|
1035
|
+
end
|
1036
|
+
# resource path
|
1037
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
|
1038
|
+
|
1039
|
+
# query parameters
|
1040
|
+
query_params = opts[:query_params] || {}
|
1041
|
+
|
1042
|
+
# header parameters
|
1043
|
+
header_params = opts[:header_params] || {}
|
1044
|
+
# HTTP header 'Accept' (if needed)
|
1045
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1046
|
+
# HTTP header 'Content-Type'
|
1047
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1048
|
+
|
1049
|
+
# form parameters
|
1050
|
+
form_params = opts[:form_params] || {}
|
1051
|
+
|
1052
|
+
# http body (model)
|
1053
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1054
|
+
|
1055
|
+
# return_type
|
1056
|
+
return_type = opts[:return_type] || 'SnapshotCreateResponse'
|
1057
|
+
|
1058
|
+
# auth_names
|
1059
|
+
auth_names = opts[:auth_names] || []
|
1060
|
+
|
1061
|
+
new_options = opts.merge(
|
1062
|
+
:header_params => header_params,
|
1063
|
+
:query_params => query_params,
|
1064
|
+
:form_params => form_params,
|
1065
|
+
:body => post_body,
|
1066
|
+
:auth_names => auth_names,
|
1067
|
+
:return_type => return_type
|
1068
|
+
)
|
1069
|
+
|
1070
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1071
|
+
if @api_client.config.debugging
|
1072
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_snapshots_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1073
|
+
end
|
1074
|
+
return data, status_code, headers
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
# Restore a PVM Instance snapshot
|
1078
|
+
# To roll back the clone operation, append '?restore_fail_action=rollback' to the cURL URL. If you'd like to try the clone operation again, append '?restore_fail_action=retry' to the cURL URL.
|
1079
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
1080
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
1081
|
+
# @param snapshot_id [String] PVM Instance snapshot id
|
1082
|
+
# @param body [SnapshotRestore] PVM Instance snapshot restore parameters
|
1083
|
+
# @param [Hash] opts the optional parameters
|
1084
|
+
# @option opts [String] :restore_fail_action Action to take on a failed snapshot restore
|
1085
|
+
# @return [nil]
|
1086
|
+
def pcloud_pvminstances_snapshots_restore_post(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {})
|
1087
|
+
pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts)
|
1088
|
+
nil
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
# Restore a PVM Instance snapshot
|
1092
|
+
# To roll back the clone operation, append '?restore_fail_action=rollback' to the cURL URL. If you'd like to try the clone operation again, append '?restore_fail_action=retry' to the cURL URL.
|
1093
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
1094
|
+
# @param pvm_instance_id [String] PCloud PVM Instance ID
|
1095
|
+
# @param snapshot_id [String] PVM Instance snapshot id
|
1096
|
+
# @param body [SnapshotRestore] PVM Instance snapshot restore parameters
|
1097
|
+
# @param [Hash] opts the optional parameters
|
1098
|
+
# @option opts [String] :restore_fail_action Action to take on a failed snapshot restore
|
1099
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1100
|
+
def pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {})
|
1101
|
+
if @api_client.config.debugging
|
1102
|
+
@api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post ...'
|
1103
|
+
end
|
1104
|
+
# verify the required parameter 'cloud_instance_id' is set
|
1105
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
1106
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post"
|
1107
|
+
end
|
1108
|
+
# verify the required parameter 'pvm_instance_id' is set
|
1109
|
+
if @api_client.config.client_side_validation && pvm_instance_id.nil?
|
1110
|
+
fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post"
|
1111
|
+
end
|
1112
|
+
# verify the required parameter 'snapshot_id' is set
|
1113
|
+
if @api_client.config.client_side_validation && snapshot_id.nil?
|
1114
|
+
fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post"
|
1115
|
+
end
|
1116
|
+
# verify the required parameter 'body' is set
|
1117
|
+
if @api_client.config.client_side_validation && body.nil?
|
1118
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post"
|
1119
|
+
end
|
1120
|
+
allowable_values = ["retry", "rollback"]
|
1121
|
+
if @api_client.config.client_side_validation && opts[:'restore_fail_action'] && !allowable_values.include?(opts[:'restore_fail_action'])
|
1122
|
+
fail ArgumentError, "invalid value for \"restore_fail_action\", must be one of #{allowable_values}"
|
1123
|
+
end
|
1124
|
+
# resource path
|
1125
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'snapshot_id' + '}', CGI.escape(snapshot_id.to_s))
|
1126
|
+
|
1127
|
+
# query parameters
|
1128
|
+
query_params = opts[:query_params] || {}
|
1129
|
+
query_params[:'restore_fail_action'] = opts[:'restore_fail_action'] if !opts[:'restore_fail_action'].nil?
|
1130
|
+
|
1131
|
+
# header parameters
|
1132
|
+
header_params = opts[:header_params] || {}
|
1133
|
+
# HTTP header 'Accept' (if needed)
|
1134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1135
|
+
# HTTP header 'Content-Type'
|
1136
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1137
|
+
|
1138
|
+
# form parameters
|
1139
|
+
form_params = opts[:form_params] || {}
|
1140
|
+
|
1141
|
+
# http body (model)
|
1142
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1143
|
+
|
1144
|
+
# return_type
|
1145
|
+
return_type = opts[:return_type]
|
1146
|
+
|
1147
|
+
# auth_names
|
1148
|
+
auth_names = opts[:auth_names] || []
|
1149
|
+
|
1150
|
+
new_options = opts.merge(
|
1151
|
+
:header_params => header_params,
|
1152
|
+
:query_params => query_params,
|
1153
|
+
:form_params => form_params,
|
1154
|
+
:body => post_body,
|
1155
|
+
:auth_names => auth_names,
|
1156
|
+
:return_type => return_type
|
1157
|
+
)
|
1158
|
+
|
1159
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1160
|
+
if @api_client.config.debugging
|
1161
|
+
@api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_snapshots_restore_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1162
|
+
end
|
1163
|
+
return data, status_code, headers
|
1164
|
+
end
|
1165
|
+
end
|
1166
|
+
end
|