ibm_cloud_power 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,210 @@
|
|
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 PCloudInstancesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a Power Cloud instance
|
23
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Object]
|
26
|
+
def pcloud_cloudinstances_delete(cloud_instance_id, opts = {})
|
27
|
+
data, _status_code, _headers = pcloud_cloudinstances_delete_with_http_info(cloud_instance_id, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Delete a Power Cloud instance
|
32
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
35
|
+
def pcloud_cloudinstances_delete_with_http_info(cloud_instance_id, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: PCloudInstancesApi.pcloud_cloudinstances_delete ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'cloud_instance_id' is set
|
40
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudInstancesApi.pcloud_cloudinstances_delete"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:return_type] || 'Object'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:auth_names] || []
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => return_type
|
73
|
+
)
|
74
|
+
|
75
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: PCloudInstancesApi#pcloud_cloudinstances_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
81
|
+
|
82
|
+
# Get a cloud instance's current state or information
|
83
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
84
|
+
# @param [Hash] opts the optional parameters
|
85
|
+
# @return [CloudInstance]
|
86
|
+
def pcloud_cloudinstances_get(cloud_instance_id, opts = {})
|
87
|
+
data, _status_code, _headers = pcloud_cloudinstances_get_with_http_info(cloud_instance_id, opts)
|
88
|
+
data
|
89
|
+
end
|
90
|
+
|
91
|
+
# Get a cloud instance's current state or information
|
92
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [Array<(CloudInstance, Integer, Hash)>] CloudInstance data, response status code and response headers
|
95
|
+
def pcloud_cloudinstances_get_with_http_info(cloud_instance_id, opts = {})
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug 'Calling API: PCloudInstancesApi.pcloud_cloudinstances_get ...'
|
98
|
+
end
|
99
|
+
# verify the required parameter 'cloud_instance_id' is set
|
100
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
101
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudInstancesApi.pcloud_cloudinstances_get"
|
102
|
+
end
|
103
|
+
# resource path
|
104
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
105
|
+
|
106
|
+
# query parameters
|
107
|
+
query_params = opts[:query_params] || {}
|
108
|
+
|
109
|
+
# header parameters
|
110
|
+
header_params = opts[:header_params] || {}
|
111
|
+
# HTTP header 'Accept' (if needed)
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = opts[:form_params] || {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = opts[:body]
|
119
|
+
|
120
|
+
# return_type
|
121
|
+
return_type = opts[:return_type] || 'CloudInstance'
|
122
|
+
|
123
|
+
# auth_names
|
124
|
+
auth_names = opts[:auth_names] || []
|
125
|
+
|
126
|
+
new_options = opts.merge(
|
127
|
+
:header_params => header_params,
|
128
|
+
:query_params => query_params,
|
129
|
+
:form_params => form_params,
|
130
|
+
:body => post_body,
|
131
|
+
:auth_names => auth_names,
|
132
|
+
:return_type => return_type
|
133
|
+
)
|
134
|
+
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
136
|
+
if @api_client.config.debugging
|
137
|
+
@api_client.config.logger.debug "API called: PCloudInstancesApi#pcloud_cloudinstances_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
138
|
+
end
|
139
|
+
return data, status_code, headers
|
140
|
+
end
|
141
|
+
|
142
|
+
# Update or upgrade a cloud instance
|
143
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
144
|
+
# @param body [CloudInstanceUpdate] Parameters for updating a Power Cloud instance
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @return [CloudInstance]
|
147
|
+
def pcloud_cloudinstances_put(cloud_instance_id, body, opts = {})
|
148
|
+
data, _status_code, _headers = pcloud_cloudinstances_put_with_http_info(cloud_instance_id, body, opts)
|
149
|
+
data
|
150
|
+
end
|
151
|
+
|
152
|
+
# Update or upgrade a cloud instance
|
153
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
154
|
+
# @param body [CloudInstanceUpdate] Parameters for updating a Power Cloud instance
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @return [Array<(CloudInstance, Integer, Hash)>] CloudInstance data, response status code and response headers
|
157
|
+
def pcloud_cloudinstances_put_with_http_info(cloud_instance_id, body, opts = {})
|
158
|
+
if @api_client.config.debugging
|
159
|
+
@api_client.config.logger.debug 'Calling API: PCloudInstancesApi.pcloud_cloudinstances_put ...'
|
160
|
+
end
|
161
|
+
# verify the required parameter 'cloud_instance_id' is set
|
162
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
163
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudInstancesApi.pcloud_cloudinstances_put"
|
164
|
+
end
|
165
|
+
# verify the required parameter 'body' is set
|
166
|
+
if @api_client.config.client_side_validation && body.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudInstancesApi.pcloud_cloudinstances_put"
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = opts[:query_params] || {}
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = opts[:header_params] || {}
|
177
|
+
# HTTP header 'Accept' (if needed)
|
178
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
179
|
+
# HTTP header 'Content-Type'
|
180
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
181
|
+
|
182
|
+
# form parameters
|
183
|
+
form_params = opts[:form_params] || {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
187
|
+
|
188
|
+
# return_type
|
189
|
+
return_type = opts[:return_type] || 'CloudInstance'
|
190
|
+
|
191
|
+
# auth_names
|
192
|
+
auth_names = opts[:auth_names] || []
|
193
|
+
|
194
|
+
new_options = opts.merge(
|
195
|
+
:header_params => header_params,
|
196
|
+
:query_params => query_params,
|
197
|
+
:form_params => form_params,
|
198
|
+
:body => post_body,
|
199
|
+
:auth_names => auth_names,
|
200
|
+
:return_type => return_type
|
201
|
+
)
|
202
|
+
|
203
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug "API called: PCloudInstancesApi#pcloud_cloudinstances_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
206
|
+
end
|
207
|
+
return data, status_code, headers
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
@@ -0,0 +1,719 @@
|
|
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 PCloudNetworksApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a network
|
23
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
24
|
+
# @param network_id [String] Network ID
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Object]
|
27
|
+
def pcloud_networks_delete(cloud_instance_id, network_id, opts = {})
|
28
|
+
data, _status_code, _headers = pcloud_networks_delete_with_http_info(cloud_instance_id, network_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a network
|
33
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
34
|
+
# @param network_id [String] Network 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_networks_delete_with_http_info(cloud_instance_id, network_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_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 PCloudNetworksApi.pcloud_networks_delete"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'network_id' is set
|
46
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_delete"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_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: PCloudNetworksApi#pcloud_networks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# Get a network's current state or information
|
89
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
90
|
+
# @param network_id [String] Network ID
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Network]
|
93
|
+
def pcloud_networks_get(cloud_instance_id, network_id, opts = {})
|
94
|
+
data, _status_code, _headers = pcloud_networks_get_with_http_info(cloud_instance_id, network_id, opts)
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
# Get a network's current state or information
|
99
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
100
|
+
# @param network_id [String] Network ID
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(Network, Integer, Hash)>] Network data, response status code and response headers
|
103
|
+
def pcloud_networks_get_with_http_info(cloud_instance_id, network_id, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_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 PCloudNetworksApi.pcloud_networks_get"
|
110
|
+
end
|
111
|
+
# verify the required parameter 'network_id' is set
|
112
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_get"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_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] || 'Network'
|
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: PCloudNetworksApi#pcloud_networks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
150
|
+
end
|
151
|
+
return data, status_code, headers
|
152
|
+
end
|
153
|
+
|
154
|
+
# Get all networks in 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] :filter A filter expression that filters resources listed in the response
|
158
|
+
# @return [Networks]
|
159
|
+
def pcloud_networks_getall(cloud_instance_id, opts = {})
|
160
|
+
data, _status_code, _headers = pcloud_networks_getall_with_http_info(cloud_instance_id, opts)
|
161
|
+
data
|
162
|
+
end
|
163
|
+
|
164
|
+
# Get all networks in 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] :filter A filter expression that filters resources listed in the response
|
168
|
+
# @return [Array<(Networks, Integer, Hash)>] Networks data, response status code and response headers
|
169
|
+
def pcloud_networks_getall_with_http_info(cloud_instance_id, opts = {})
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_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 PCloudNetworksApi.pcloud_networks_getall"
|
176
|
+
end
|
177
|
+
# resource path
|
178
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
179
|
+
|
180
|
+
# query parameters
|
181
|
+
query_params = opts[:query_params] || {}
|
182
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].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] || 'Networks'
|
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: PCloudNetworksApi#pcloud_networks_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Delete a network port
|
218
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
219
|
+
# @param network_id [String] Network ID
|
220
|
+
# @param port_id [String] Port ID
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @return [Object]
|
223
|
+
def pcloud_networks_ports_delete(cloud_instance_id, network_id, port_id, opts = {})
|
224
|
+
data, _status_code, _headers = pcloud_networks_ports_delete_with_http_info(cloud_instance_id, network_id, port_id, opts)
|
225
|
+
data
|
226
|
+
end
|
227
|
+
|
228
|
+
# Delete a network port
|
229
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
230
|
+
# @param network_id [String] Network ID
|
231
|
+
# @param port_id [String] Port ID
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
234
|
+
def pcloud_networks_ports_delete_with_http_info(cloud_instance_id, network_id, port_id, opts = {})
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_ports_delete ...'
|
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 PCloudNetworksApi.pcloud_networks_ports_delete"
|
241
|
+
end
|
242
|
+
# verify the required parameter 'network_id' is set
|
243
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
244
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_ports_delete"
|
245
|
+
end
|
246
|
+
# verify the required parameter 'port_id' is set
|
247
|
+
if @api_client.config.client_side_validation && port_id.nil?
|
248
|
+
fail ArgumentError, "Missing the required parameter 'port_id' when calling PCloudNetworksApi.pcloud_networks_ports_delete"
|
249
|
+
end
|
250
|
+
# resource path
|
251
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'port_id' + '}', CGI.escape(port_id.to_s))
|
252
|
+
|
253
|
+
# query parameters
|
254
|
+
query_params = opts[:query_params] || {}
|
255
|
+
|
256
|
+
# header parameters
|
257
|
+
header_params = opts[:header_params] || {}
|
258
|
+
# HTTP header 'Accept' (if needed)
|
259
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
260
|
+
|
261
|
+
# form parameters
|
262
|
+
form_params = opts[:form_params] || {}
|
263
|
+
|
264
|
+
# http body (model)
|
265
|
+
post_body = opts[:body]
|
266
|
+
|
267
|
+
# return_type
|
268
|
+
return_type = opts[:return_type] || 'Object'
|
269
|
+
|
270
|
+
# auth_names
|
271
|
+
auth_names = opts[:auth_names] || []
|
272
|
+
|
273
|
+
new_options = opts.merge(
|
274
|
+
:header_params => header_params,
|
275
|
+
:query_params => query_params,
|
276
|
+
:form_params => form_params,
|
277
|
+
:body => post_body,
|
278
|
+
:auth_names => auth_names,
|
279
|
+
:return_type => return_type
|
280
|
+
)
|
281
|
+
|
282
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
283
|
+
if @api_client.config.debugging
|
284
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_ports_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
285
|
+
end
|
286
|
+
return data, status_code, headers
|
287
|
+
end
|
288
|
+
|
289
|
+
# Get a port's information
|
290
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
291
|
+
# @param network_id [String] Network ID
|
292
|
+
# @param port_id [String] Port ID
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @return [NetworkPort]
|
295
|
+
def pcloud_networks_ports_get(cloud_instance_id, network_id, port_id, opts = {})
|
296
|
+
data, _status_code, _headers = pcloud_networks_ports_get_with_http_info(cloud_instance_id, network_id, port_id, opts)
|
297
|
+
data
|
298
|
+
end
|
299
|
+
|
300
|
+
# Get a port's information
|
301
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
302
|
+
# @param network_id [String] Network ID
|
303
|
+
# @param port_id [String] Port ID
|
304
|
+
# @param [Hash] opts the optional parameters
|
305
|
+
# @return [Array<(NetworkPort, Integer, Hash)>] NetworkPort data, response status code and response headers
|
306
|
+
def pcloud_networks_ports_get_with_http_info(cloud_instance_id, network_id, port_id, opts = {})
|
307
|
+
if @api_client.config.debugging
|
308
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_ports_get ...'
|
309
|
+
end
|
310
|
+
# verify the required parameter 'cloud_instance_id' is set
|
311
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
312
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudNetworksApi.pcloud_networks_ports_get"
|
313
|
+
end
|
314
|
+
# verify the required parameter 'network_id' is set
|
315
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
316
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_ports_get"
|
317
|
+
end
|
318
|
+
# verify the required parameter 'port_id' is set
|
319
|
+
if @api_client.config.client_side_validation && port_id.nil?
|
320
|
+
fail ArgumentError, "Missing the required parameter 'port_id' when calling PCloudNetworksApi.pcloud_networks_ports_get"
|
321
|
+
end
|
322
|
+
# resource path
|
323
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'port_id' + '}', CGI.escape(port_id.to_s))
|
324
|
+
|
325
|
+
# query parameters
|
326
|
+
query_params = opts[:query_params] || {}
|
327
|
+
|
328
|
+
# header parameters
|
329
|
+
header_params = opts[:header_params] || {}
|
330
|
+
# HTTP header 'Accept' (if needed)
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'applicaton/json'])
|
332
|
+
|
333
|
+
# form parameters
|
334
|
+
form_params = opts[:form_params] || {}
|
335
|
+
|
336
|
+
# http body (model)
|
337
|
+
post_body = opts[:body]
|
338
|
+
|
339
|
+
# return_type
|
340
|
+
return_type = opts[:return_type] || 'NetworkPort'
|
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(:GET, local_var_path, new_options)
|
355
|
+
if @api_client.config.debugging
|
356
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_ports_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
357
|
+
end
|
358
|
+
return data, status_code, headers
|
359
|
+
end
|
360
|
+
|
361
|
+
# Get all ports for this network
|
362
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
363
|
+
# @param network_id [String] Network ID
|
364
|
+
# @param [Hash] opts the optional parameters
|
365
|
+
# @return [NetworkPorts]
|
366
|
+
def pcloud_networks_ports_getall(cloud_instance_id, network_id, opts = {})
|
367
|
+
data, _status_code, _headers = pcloud_networks_ports_getall_with_http_info(cloud_instance_id, network_id, opts)
|
368
|
+
data
|
369
|
+
end
|
370
|
+
|
371
|
+
# Get all ports for this network
|
372
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
373
|
+
# @param network_id [String] Network ID
|
374
|
+
# @param [Hash] opts the optional parameters
|
375
|
+
# @return [Array<(NetworkPorts, Integer, Hash)>] NetworkPorts data, response status code and response headers
|
376
|
+
def pcloud_networks_ports_getall_with_http_info(cloud_instance_id, network_id, opts = {})
|
377
|
+
if @api_client.config.debugging
|
378
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_ports_getall ...'
|
379
|
+
end
|
380
|
+
# verify the required parameter 'cloud_instance_id' is set
|
381
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
382
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudNetworksApi.pcloud_networks_ports_getall"
|
383
|
+
end
|
384
|
+
# verify the required parameter 'network_id' is set
|
385
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
386
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_ports_getall"
|
387
|
+
end
|
388
|
+
# resource path
|
389
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
390
|
+
|
391
|
+
# query parameters
|
392
|
+
query_params = opts[:query_params] || {}
|
393
|
+
|
394
|
+
# header parameters
|
395
|
+
header_params = opts[:header_params] || {}
|
396
|
+
# HTTP header 'Accept' (if needed)
|
397
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
398
|
+
|
399
|
+
# form parameters
|
400
|
+
form_params = opts[:form_params] || {}
|
401
|
+
|
402
|
+
# http body (model)
|
403
|
+
post_body = opts[:body]
|
404
|
+
|
405
|
+
# return_type
|
406
|
+
return_type = opts[:return_type] || 'NetworkPorts'
|
407
|
+
|
408
|
+
# auth_names
|
409
|
+
auth_names = opts[:auth_names] || []
|
410
|
+
|
411
|
+
new_options = opts.merge(
|
412
|
+
:header_params => header_params,
|
413
|
+
:query_params => query_params,
|
414
|
+
:form_params => form_params,
|
415
|
+
:body => post_body,
|
416
|
+
:auth_names => auth_names,
|
417
|
+
:return_type => return_type
|
418
|
+
)
|
419
|
+
|
420
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
421
|
+
if @api_client.config.debugging
|
422
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_ports_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
423
|
+
end
|
424
|
+
return data, status_code, headers
|
425
|
+
end
|
426
|
+
|
427
|
+
# Perform port addition, deletion, and listing
|
428
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
429
|
+
# @param network_id [String] Network ID
|
430
|
+
# @param [Hash] opts the optional parameters
|
431
|
+
# @option opts [NetworkPortCreate] :body Create a Network Port
|
432
|
+
# @return [NetworkPort]
|
433
|
+
def pcloud_networks_ports_post(cloud_instance_id, network_id, opts = {})
|
434
|
+
data, _status_code, _headers = pcloud_networks_ports_post_with_http_info(cloud_instance_id, network_id, opts)
|
435
|
+
data
|
436
|
+
end
|
437
|
+
|
438
|
+
# Perform port addition, deletion, and listing
|
439
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
440
|
+
# @param network_id [String] Network ID
|
441
|
+
# @param [Hash] opts the optional parameters
|
442
|
+
# @option opts [NetworkPortCreate] :body Create a Network Port
|
443
|
+
# @return [Array<(NetworkPort, Integer, Hash)>] NetworkPort data, response status code and response headers
|
444
|
+
def pcloud_networks_ports_post_with_http_info(cloud_instance_id, network_id, opts = {})
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_ports_post ...'
|
447
|
+
end
|
448
|
+
# verify the required parameter 'cloud_instance_id' is set
|
449
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
450
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudNetworksApi.pcloud_networks_ports_post"
|
451
|
+
end
|
452
|
+
# verify the required parameter 'network_id' is set
|
453
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
454
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_ports_post"
|
455
|
+
end
|
456
|
+
# resource path
|
457
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
458
|
+
|
459
|
+
# query parameters
|
460
|
+
query_params = opts[:query_params] || {}
|
461
|
+
|
462
|
+
# header parameters
|
463
|
+
header_params = opts[:header_params] || {}
|
464
|
+
# HTTP header 'Accept' (if needed)
|
465
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
466
|
+
# HTTP header 'Content-Type'
|
467
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
468
|
+
|
469
|
+
# form parameters
|
470
|
+
form_params = opts[:form_params] || {}
|
471
|
+
|
472
|
+
# http body (model)
|
473
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
474
|
+
|
475
|
+
# return_type
|
476
|
+
return_type = opts[:return_type] || 'NetworkPort'
|
477
|
+
|
478
|
+
# auth_names
|
479
|
+
auth_names = opts[:auth_names] || []
|
480
|
+
|
481
|
+
new_options = opts.merge(
|
482
|
+
:header_params => header_params,
|
483
|
+
:query_params => query_params,
|
484
|
+
:form_params => form_params,
|
485
|
+
:body => post_body,
|
486
|
+
:auth_names => auth_names,
|
487
|
+
:return_type => return_type
|
488
|
+
)
|
489
|
+
|
490
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
491
|
+
if @api_client.config.debugging
|
492
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_ports_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
493
|
+
end
|
494
|
+
return data, status_code, headers
|
495
|
+
end
|
496
|
+
|
497
|
+
# Update a port's information
|
498
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
499
|
+
# @param network_id [String] Network ID
|
500
|
+
# @param port_id [String] Port ID
|
501
|
+
# @param body [NetworkPortUpdate] Parameters for updating a Port
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @return [NetworkPort]
|
504
|
+
def pcloud_networks_ports_put(cloud_instance_id, network_id, port_id, body, opts = {})
|
505
|
+
data, _status_code, _headers = pcloud_networks_ports_put_with_http_info(cloud_instance_id, network_id, port_id, body, opts)
|
506
|
+
data
|
507
|
+
end
|
508
|
+
|
509
|
+
# Update a port's information
|
510
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
511
|
+
# @param network_id [String] Network ID
|
512
|
+
# @param port_id [String] Port ID
|
513
|
+
# @param body [NetworkPortUpdate] Parameters for updating a Port
|
514
|
+
# @param [Hash] opts the optional parameters
|
515
|
+
# @return [Array<(NetworkPort, Integer, Hash)>] NetworkPort data, response status code and response headers
|
516
|
+
def pcloud_networks_ports_put_with_http_info(cloud_instance_id, network_id, port_id, body, opts = {})
|
517
|
+
if @api_client.config.debugging
|
518
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_ports_put ...'
|
519
|
+
end
|
520
|
+
# verify the required parameter 'cloud_instance_id' is set
|
521
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
522
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudNetworksApi.pcloud_networks_ports_put"
|
523
|
+
end
|
524
|
+
# verify the required parameter 'network_id' is set
|
525
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
526
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_ports_put"
|
527
|
+
end
|
528
|
+
# verify the required parameter 'port_id' is set
|
529
|
+
if @api_client.config.client_side_validation && port_id.nil?
|
530
|
+
fail ArgumentError, "Missing the required parameter 'port_id' when calling PCloudNetworksApi.pcloud_networks_ports_put"
|
531
|
+
end
|
532
|
+
# verify the required parameter 'body' is set
|
533
|
+
if @api_client.config.client_side_validation && body.nil?
|
534
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudNetworksApi.pcloud_networks_ports_put"
|
535
|
+
end
|
536
|
+
# resource path
|
537
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s)).sub('{' + 'port_id' + '}', CGI.escape(port_id.to_s))
|
538
|
+
|
539
|
+
# query parameters
|
540
|
+
query_params = opts[:query_params] || {}
|
541
|
+
|
542
|
+
# header parameters
|
543
|
+
header_params = opts[:header_params] || {}
|
544
|
+
# HTTP header 'Accept' (if needed)
|
545
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
546
|
+
# HTTP header 'Content-Type'
|
547
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
548
|
+
|
549
|
+
# form parameters
|
550
|
+
form_params = opts[:form_params] || {}
|
551
|
+
|
552
|
+
# http body (model)
|
553
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
554
|
+
|
555
|
+
# return_type
|
556
|
+
return_type = opts[:return_type] || 'NetworkPort'
|
557
|
+
|
558
|
+
# auth_names
|
559
|
+
auth_names = opts[:auth_names] || []
|
560
|
+
|
561
|
+
new_options = opts.merge(
|
562
|
+
:header_params => header_params,
|
563
|
+
:query_params => query_params,
|
564
|
+
:form_params => form_params,
|
565
|
+
:body => post_body,
|
566
|
+
:auth_names => auth_names,
|
567
|
+
:return_type => return_type
|
568
|
+
)
|
569
|
+
|
570
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
571
|
+
if @api_client.config.debugging
|
572
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_ports_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
573
|
+
end
|
574
|
+
return data, status_code, headers
|
575
|
+
end
|
576
|
+
|
577
|
+
# Create a new network
|
578
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
579
|
+
# @param body [NetworkCreate] Parameters for the creation of a new network
|
580
|
+
# @param [Hash] opts the optional parameters
|
581
|
+
# @return [Network]
|
582
|
+
def pcloud_networks_post(cloud_instance_id, body, opts = {})
|
583
|
+
data, _status_code, _headers = pcloud_networks_post_with_http_info(cloud_instance_id, body, opts)
|
584
|
+
data
|
585
|
+
end
|
586
|
+
|
587
|
+
# Create a new network
|
588
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
589
|
+
# @param body [NetworkCreate] Parameters for the creation of a new network
|
590
|
+
# @param [Hash] opts the optional parameters
|
591
|
+
# @return [Array<(Network, Integer, Hash)>] Network data, response status code and response headers
|
592
|
+
def pcloud_networks_post_with_http_info(cloud_instance_id, body, opts = {})
|
593
|
+
if @api_client.config.debugging
|
594
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_post ...'
|
595
|
+
end
|
596
|
+
# verify the required parameter 'cloud_instance_id' is set
|
597
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
598
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudNetworksApi.pcloud_networks_post"
|
599
|
+
end
|
600
|
+
# verify the required parameter 'body' is set
|
601
|
+
if @api_client.config.client_side_validation && body.nil?
|
602
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudNetworksApi.pcloud_networks_post"
|
603
|
+
end
|
604
|
+
# resource path
|
605
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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
|
+
# HTTP header 'Content-Type'
|
615
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
616
|
+
|
617
|
+
# form parameters
|
618
|
+
form_params = opts[:form_params] || {}
|
619
|
+
|
620
|
+
# http body (model)
|
621
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
622
|
+
|
623
|
+
# return_type
|
624
|
+
return_type = opts[:return_type] || 'Network'
|
625
|
+
|
626
|
+
# auth_names
|
627
|
+
auth_names = opts[:auth_names] || []
|
628
|
+
|
629
|
+
new_options = opts.merge(
|
630
|
+
:header_params => header_params,
|
631
|
+
:query_params => query_params,
|
632
|
+
:form_params => form_params,
|
633
|
+
:body => post_body,
|
634
|
+
:auth_names => auth_names,
|
635
|
+
:return_type => return_type
|
636
|
+
)
|
637
|
+
|
638
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
639
|
+
if @api_client.config.debugging
|
640
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
641
|
+
end
|
642
|
+
return data, status_code, headers
|
643
|
+
end
|
644
|
+
|
645
|
+
# Update a network
|
646
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
647
|
+
# @param network_id [String] Network ID
|
648
|
+
# @param body [NetworkUpdate] Parameters to update a Network
|
649
|
+
# @param [Hash] opts the optional parameters
|
650
|
+
# @return [Network]
|
651
|
+
def pcloud_networks_put(cloud_instance_id, network_id, body, opts = {})
|
652
|
+
data, _status_code, _headers = pcloud_networks_put_with_http_info(cloud_instance_id, network_id, body, opts)
|
653
|
+
data
|
654
|
+
end
|
655
|
+
|
656
|
+
# Update a network
|
657
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
658
|
+
# @param network_id [String] Network ID
|
659
|
+
# @param body [NetworkUpdate] Parameters to update a Network
|
660
|
+
# @param [Hash] opts the optional parameters
|
661
|
+
# @return [Array<(Network, Integer, Hash)>] Network data, response status code and response headers
|
662
|
+
def pcloud_networks_put_with_http_info(cloud_instance_id, network_id, body, opts = {})
|
663
|
+
if @api_client.config.debugging
|
664
|
+
@api_client.config.logger.debug 'Calling API: PCloudNetworksApi.pcloud_networks_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 PCloudNetworksApi.pcloud_networks_put"
|
669
|
+
end
|
670
|
+
# verify the required parameter 'network_id' is set
|
671
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
672
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudNetworksApi.pcloud_networks_put"
|
673
|
+
end
|
674
|
+
# verify the required parameter 'body' is set
|
675
|
+
if @api_client.config.client_side_validation && body.nil?
|
676
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudNetworksApi.pcloud_networks_put"
|
677
|
+
end
|
678
|
+
# resource path
|
679
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
680
|
+
|
681
|
+
# query parameters
|
682
|
+
query_params = opts[:query_params] || {}
|
683
|
+
|
684
|
+
# header parameters
|
685
|
+
header_params = opts[:header_params] || {}
|
686
|
+
# HTTP header 'Accept' (if needed)
|
687
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
688
|
+
# HTTP header 'Content-Type'
|
689
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
690
|
+
|
691
|
+
# form parameters
|
692
|
+
form_params = opts[:form_params] || {}
|
693
|
+
|
694
|
+
# http body (model)
|
695
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
696
|
+
|
697
|
+
# return_type
|
698
|
+
return_type = opts[:return_type] || 'Network'
|
699
|
+
|
700
|
+
# auth_names
|
701
|
+
auth_names = opts[:auth_names] || []
|
702
|
+
|
703
|
+
new_options = opts.merge(
|
704
|
+
:header_params => header_params,
|
705
|
+
:query_params => query_params,
|
706
|
+
:form_params => form_params,
|
707
|
+
:body => post_body,
|
708
|
+
:auth_names => auth_names,
|
709
|
+
:return_type => return_type
|
710
|
+
)
|
711
|
+
|
712
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
713
|
+
if @api_client.config.debugging
|
714
|
+
@api_client.config.logger.debug "API called: PCloudNetworksApi#pcloud_networks_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
715
|
+
end
|
716
|
+
return data, status_code, headers
|
717
|
+
end
|
718
|
+
end
|
719
|
+
end
|