ibm_cloud_power 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +68 -0
- data/LICENSE.txt +202 -0
- data/README.md +56 -10
- data/docs/CloudConnection.md +41 -0
- data/docs/CloudConnectionCreate.md +23 -0
- data/docs/CloudConnectionEndpointClassic.md +19 -0
- data/docs/CloudConnectionEndpointGRE.md +19 -0
- data/docs/CloudConnectionEndpointVPC.md +19 -0
- data/docs/CloudConnectionGRETunnel.md +21 -0
- data/docs/CloudConnectionSpeed.md +16 -0
- data/docs/CloudConnectionUpdate.md +27 -0
- data/docs/CloudConnectionVPC.md +19 -0
- data/docs/CloudConnectionVirtualPrivateClouds.md +17 -0
- data/docs/CloudConnectionVirtualPrivateCloudsVirtualPrivateClouds.md +23 -0
- data/docs/CloudConnections.md +17 -0
- data/docs/CreateDataVolume.md +6 -6
- data/docs/CreateImage.md +3 -3
- data/docs/Image.md +2 -0
- data/docs/ImageReference.md +2 -0
- data/docs/MaximumStorageAllocation.md +21 -0
- data/docs/MultiVolumesCreate.md +6 -4
- data/docs/Network.md +1 -1
- data/docs/NetworkPort.md +2 -0
- data/docs/NetworkReference.md +1 -1
- data/docs/PCloudCloudConnectionsApi.md +394 -0
- data/docs/PCloudEventsApi.md +2 -2
- data/docs/PCloudImagesApi.md +104 -6
- data/docs/PCloudPVMInstancesApi.md +60 -5
- data/docs/PCloudPlacementGroupsApi.md +298 -0
- data/docs/PCloudStorageCapacityApi.md +196 -0
- data/docs/PCloudVolumesApi.md +344 -0
- data/docs/PVMInstance.md +3 -1
- data/docs/PVMInstanceCreate.md +5 -3
- data/docs/PlacementGroup.md +23 -0
- data/docs/PlacementGroupCreate.md +19 -0
- data/docs/PlacementGroupServer.md +17 -0
- data/docs/PlacementGroups.md +17 -0
- data/docs/SAPCreate.md +1 -1
- data/docs/StoragePoolCapacity.md +23 -0
- data/docs/StoragePoolsCapacity.md +19 -0
- data/docs/StorageTypeCapacity.md +21 -0
- data/docs/StorageTypesCapacity.md +19 -0
- data/docs/Volume.md +2 -0
- data/docs/VolumeReference.md +2 -0
- data/docs/VolumesCloneAsyncRequest.md +1 -1
- data/docs/VolumesCloneCancel.md +1 -1
- data/docs/VolumesCloneDetail.md +1 -1
- data/docs/VolumesCloneExecute.md +1 -1
- data/lib/ibm_cloud_power.rb +24 -0
- data/lib/ibm_cloud_power/api/p_cloud_cloud_connections_api.rb +560 -0
- data/lib/ibm_cloud_power/api/p_cloud_events_api.rb +2 -2
- data/lib/ibm_cloud_power/api/p_cloud_images_api.rb +133 -4
- data/lib/ibm_cloud_power/api/p_cloud_placement_groups_api.rb +430 -0
- data/lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb +82 -5
- data/lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb +274 -0
- data/lib/ibm_cloud_power/api/p_cloud_volumes_api.rb +477 -0
- data/lib/ibm_cloud_power/models/cloud_connection.rb +379 -0
- data/lib/ibm_cloud_power/models/cloud_connection_create.rb +249 -0
- data/lib/ibm_cloud_power/models/cloud_connection_endpoint_classic.rb +218 -0
- data/lib/ibm_cloud_power/models/cloud_connection_endpoint_gre.rb +221 -0
- data/lib/ibm_cloud_power/models/cloud_connection_endpoint_vpc.rb +221 -0
- data/lib/ibm_cloud_power/models/cloud_connection_gre_tunnel.rb +239 -0
- data/lib/ibm_cloud_power/models/cloud_connection_speed.rb +42 -0
- data/lib/ibm_cloud_power/models/cloud_connection_update.rb +257 -0
- data/lib/ibm_cloud_power/models/cloud_connection_virtual_private_clouds.rb +216 -0
- data/lib/ibm_cloud_power/models/cloud_connection_virtual_private_clouds_virtual_private_clouds.rb +259 -0
- data/lib/ibm_cloud_power/models/cloud_connection_vpc.rb +224 -0
- data/lib/ibm_cloud_power/models/cloud_connections.rb +216 -0
- data/lib/ibm_cloud_power/models/create_data_volume.rb +17 -17
- data/lib/ibm_cloud_power/models/create_image.rb +3 -3
- data/lib/ibm_cloud_power/models/image.rb +16 -1
- data/lib/ibm_cloud_power/models/image_reference.rb +16 -1
- data/lib/ibm_cloud_power/models/maximum_storage_allocation.rb +245 -0
- data/lib/ibm_cloud_power/models/multi_volumes_create.rb +17 -7
- data/lib/ibm_cloud_power/models/network.rb +1 -1
- data/lib/ibm_cloud_power/models/network_port.rb +11 -1
- data/lib/ibm_cloud_power/models/network_reference.rb +1 -1
- data/lib/ibm_cloud_power/models/placement_group.rb +295 -0
- data/lib/ibm_cloud_power/models/placement_group_create.rb +263 -0
- data/lib/ibm_cloud_power/models/placement_group_server.rb +214 -0
- data/lib/ibm_cloud_power/models/placement_groups.rb +216 -0
- data/lib/ibm_cloud_power/models/pvm_instance.rb +17 -5
- data/lib/ibm_cloud_power/models/pvm_instance_create.rb +16 -6
- data/lib/ibm_cloud_power/models/pvm_instance_reference.rb +2 -2
- data/lib/ibm_cloud_power/models/sap_create.rb +1 -1
- data/lib/ibm_cloud_power/models/storage_pool_capacity.rb +245 -0
- data/lib/ibm_cloud_power/models/storage_pools_capacity.rb +220 -0
- data/lib/ibm_cloud_power/models/storage_type_capacity.rb +231 -0
- data/lib/ibm_cloud_power/models/storage_types_capacity.rb +220 -0
- data/lib/ibm_cloud_power/models/volume.rb +11 -1
- data/lib/ibm_cloud_power/models/volume_reference.rb +11 -1
- data/lib/ibm_cloud_power/models/volumes_clone_async_request.rb +1 -1
- data/lib/ibm_cloud_power/models/volumes_clone_cancel.rb +1 -1
- data/lib/ibm_cloud_power/models/volumes_clone_detail.rb +1 -1
- data/lib/ibm_cloud_power/models/volumes_clone_execute.rb +1 -1
- data/lib/ibm_cloud_power/version.rb +1 -1
- data/spec/api/p_cloud_cloud_connections_api_spec.rb +132 -0
- data/spec/api/p_cloud_placement_groups_api_spec.rb +108 -0
- data/spec/api/p_cloud_storage_capacity_api_spec.rb +81 -0
- data/spec/models/cloud_connection_create_spec.rb +59 -0
- data/spec/models/cloud_connection_endpoint_classic_spec.rb +47 -0
- data/spec/models/cloud_connection_endpoint_gre_spec.rb +47 -0
- data/spec/models/cloud_connection_endpoint_vpc_spec.rb +47 -0
- data/spec/models/cloud_connection_gre_tunnel_spec.rb +53 -0
- data/spec/models/cloud_connection_spec.rb +113 -0
- data/spec/models/cloud_connection_speed_spec.rb +35 -0
- data/spec/models/cloud_connection_update_spec.rb +71 -0
- data/spec/models/cloud_connection_virtual_private_clouds_spec.rb +41 -0
- data/spec/models/cloud_connection_virtual_private_clouds_virtual_private_clouds_spec.rb +59 -0
- data/spec/models/cloud_connection_vpc_spec.rb +47 -0
- data/spec/models/cloud_connections_spec.rb +41 -0
- data/spec/models/maximum_storage_allocation_spec.rb +53 -0
- data/spec/models/placement_group_create_spec.rb +51 -0
- data/spec/models/placement_group_server_spec.rb +41 -0
- data/spec/models/placement_group_spec.rb +63 -0
- data/spec/models/placement_groups_spec.rb +41 -0
- data/spec/models/storage_pool_capacity_spec.rb +59 -0
- data/spec/models/storage_pools_capacity_spec.rb +47 -0
- data/spec/models/storage_type_capacity_spec.rb +53 -0
- data/spec/models/storage_types_capacity_spec.rb +47 -0
- metadata +130 -32
data/docs/PVMInstance.md
CHANGED
@@ -35,6 +35,7 @@ Name | Type | Description | Notes
|
|
35
35
|
**operating_system** | **String** | OS system information (usually version and build) | [optional]
|
36
36
|
**sap_profile** | [**SAPProfileReference**](SAPProfileReference.md) | | [optional]
|
37
37
|
**virtual_cores** | [**VirtualCores**](VirtualCores.md) | | [optional]
|
38
|
+
**placement_group** | **String** | The placement group of the server | [optional] [default to 'none']
|
38
39
|
|
39
40
|
## Code Sample
|
40
41
|
|
@@ -71,7 +72,8 @@ instance = IbmCloudPower::PVMInstance.new(pvm_instance_id: null,
|
|
71
72
|
os_type: null,
|
72
73
|
operating_system: null,
|
73
74
|
sap_profile: null,
|
74
|
-
virtual_cores: null
|
75
|
+
virtual_cores: null,
|
76
|
+
placement_group: null)
|
75
77
|
```
|
76
78
|
|
77
79
|
|
data/docs/PVMInstanceCreate.md
CHANGED
@@ -18,11 +18,12 @@ Name | Type | Description | Notes
|
|
18
18
|
**key_pair_name** | **String** | The name of the SSH key pair provided to the server for authenticating users (looked up in the tenant's list of keys) | [optional]
|
19
19
|
**sys_type** | **String** | System type used to host the instance | [optional]
|
20
20
|
**migratable** | **Boolean** | Indicates if the server is allowed to migrate between hosts | [optional] [default to true]
|
21
|
-
**user_data** | **String** | Cloud
|
22
|
-
**storage_type** | **String** | Storage type for server deployment | [optional]
|
21
|
+
**user_data** | **String** | Cloud-init user-defined data. The user-defined data is made available to the VM instance as a config drive. | [optional]
|
22
|
+
**storage_type** | **String** | Storage type for server deployment. Only valid when you deploy one of the IBM supplied **stock** images. Storage type for a custom image (an imported image or an image that is created from a VM capture) defaults to the storage type the image was created in | [optional]
|
23
23
|
**software_licenses** | [**SoftwareLicenses**](SoftwareLicenses.md) | | [optional]
|
24
24
|
**pin_policy** | [**PinPolicy**](PinPolicy.md) | | [optional]
|
25
25
|
**virtual_cores** | [**VirtualCores**](VirtualCores.md) | | [optional]
|
26
|
+
**placement_group** | **String** | The placement group for the server | [optional]
|
26
27
|
|
27
28
|
## Code Sample
|
28
29
|
|
@@ -47,7 +48,8 @@ instance = IbmCloudPower::PVMInstanceCreate.new(server_name: null,
|
|
47
48
|
storage_type: null,
|
48
49
|
software_licenses: null,
|
49
50
|
pin_policy: null,
|
50
|
-
virtual_cores: null
|
51
|
+
virtual_cores: null,
|
52
|
+
placement_group: null)
|
51
53
|
```
|
52
54
|
|
53
55
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# IbmCloudPower::PlacementGroup
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | The id of the Placement Group |
|
8
|
+
**name** | **String** | The name of the Placement Group |
|
9
|
+
**policy** | **String** | The Placement Group Policy |
|
10
|
+
**members** | **Array<String>** | The List of PVM Instance IDs associated with the Placement Group |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'IbmCloudPower'
|
16
|
+
|
17
|
+
instance = IbmCloudPower::PlacementGroup.new(id: null,
|
18
|
+
name: null,
|
19
|
+
policy: null,
|
20
|
+
members: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# IbmCloudPower::PlacementGroupCreate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | The name of the Placement Group |
|
8
|
+
**policy** | **String** | The Placement Group Policy |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'IbmCloudPower'
|
14
|
+
|
15
|
+
instance = IbmCloudPower::PlacementGroupCreate.new(name: null,
|
16
|
+
policy: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# IbmCloudPower::PlacementGroupServer
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | The ID of the Server |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'IbmCloudPower'
|
13
|
+
|
14
|
+
instance = IbmCloudPower::PlacementGroupServer.new(id: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# IbmCloudPower::PlacementGroups
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**placement_groups** | [**Array<PlacementGroup>**](PlacementGroup.md) | List of Server Placement Groups |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'IbmCloudPower'
|
13
|
+
|
14
|
+
instance = IbmCloudPower::PlacementGroups.new(placement_groups: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/SAPCreate.md
CHANGED
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
|
11
11
|
**volume_i_ds** | **Array<String>** | List of Volume IDs to attach to the pvm-instance on creation | [optional]
|
12
12
|
**instances** | [**PVMInstanceMultiCreate**](PVMInstanceMultiCreate.md) | | [optional]
|
13
13
|
**ssh_key_name** | **String** | The name of the SSH Key to provide to the server for authenticating | [optional]
|
14
|
-
**user_data** | **String** | Cloud
|
14
|
+
**user_data** | **String** | Cloud-init user-defined data. The user-defined data is made available to the VM instance as a config drive. | [optional]
|
15
15
|
**pin_policy** | [**PinPolicy**](PinPolicy.md) | | [optional]
|
16
16
|
|
17
17
|
## Code Sample
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# IbmCloudPower::StoragePoolCapacity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pool_name** | **String** | Pool name | [optional]
|
8
|
+
**storage_type** | **String** | Storage type of the storage pool | [optional]
|
9
|
+
**max_allocation_size** | **Integer** | Maximum allocation storage size (GB) |
|
10
|
+
**total_capacity** | **Integer** | Total pool capacity (GB) | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'IbmCloudPower'
|
16
|
+
|
17
|
+
instance = IbmCloudPower::StoragePoolCapacity.new(pool_name: null,
|
18
|
+
storage_type: null,
|
19
|
+
max_allocation_size: null,
|
20
|
+
total_capacity: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# IbmCloudPower::StoragePoolsCapacity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**maximum_storage_allocation** | [**MaximumStorageAllocation**](MaximumStorageAllocation.md) | | [optional]
|
8
|
+
**storage_pools_capacity** | [**Array<StoragePoolCapacity>**](StoragePoolCapacity.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'IbmCloudPower'
|
14
|
+
|
15
|
+
instance = IbmCloudPower::StoragePoolsCapacity.new(maximum_storage_allocation: null,
|
16
|
+
storage_pools_capacity: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# IbmCloudPower::StorageTypeCapacity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**storage_type** | **String** | Storage type | [optional]
|
8
|
+
**maximum_storage_allocation** | [**MaximumStorageAllocation**](MaximumStorageAllocation.md) | | [optional]
|
9
|
+
**storage_pools_capacity** | [**Array<StoragePoolCapacity>**](StoragePoolCapacity.md) | List of storage pool capacity for storage type | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'IbmCloudPower'
|
15
|
+
|
16
|
+
instance = IbmCloudPower::StorageTypeCapacity.new(storage_type: null,
|
17
|
+
maximum_storage_allocation: null,
|
18
|
+
storage_pools_capacity: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# IbmCloudPower::StorageTypesCapacity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**maximum_storage_allocation** | [**MaximumStorageAllocation**](MaximumStorageAllocation.md) | | [optional]
|
8
|
+
**storage_types_capacity** | [**Array<StorageTypeCapacity>**](StorageTypeCapacity.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'IbmCloudPower'
|
14
|
+
|
15
|
+
instance = IbmCloudPower::StorageTypesCapacity.new(maximum_storage_allocation: null,
|
16
|
+
storage_types_capacity: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/Volume.md
CHANGED
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**boot_volume** | **Boolean** | Indicates if the volume is the server's boot volume | [optional]
|
14
14
|
**delete_on_termination** | **Boolean** | Indicates if the volume should be deleted when the server terminates | [optional]
|
15
15
|
**disk_type** | **String** | Type of Disk | [optional]
|
16
|
+
**volume_type** | **String** | Volume type, name of storage template used to create the volume | [optional]
|
16
17
|
**wwn** | **String** | Volume world wide name | [optional]
|
17
18
|
**creation_date** | **DateTime** | Creation Date |
|
18
19
|
**last_update_date** | **DateTime** | Last Update Date |
|
@@ -32,6 +33,7 @@ instance = IbmCloudPower::Volume.new(volume_id: null,
|
|
32
33
|
boot_volume: null,
|
33
34
|
delete_on_termination: null,
|
34
35
|
disk_type: null,
|
36
|
+
volume_type: null,
|
35
37
|
wwn: null,
|
36
38
|
creation_date: null,
|
37
39
|
last_update_date: null,
|
data/docs/VolumeReference.md
CHANGED
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**boot_volume** | **Boolean** | Indicates if the volume is the server's boot volume | [optional]
|
14
14
|
**delete_on_termination** | **Boolean** | Indicates if the volume should be deleted when the server terminates | [optional]
|
15
15
|
**disk_type** | **String** | Type of Disk |
|
16
|
+
**volume_type** | **String** | Volume type, name of storage template used to create the volume | [optional]
|
16
17
|
**wwn** | **String** | Volume world wide name |
|
17
18
|
**creation_date** | **DateTime** | Creation Date |
|
18
19
|
**last_update_date** | **DateTime** | Last Update Date |
|
@@ -33,6 +34,7 @@ instance = IbmCloudPower::VolumeReference.new(volume_id: null,
|
|
33
34
|
boot_volume: null,
|
34
35
|
delete_on_termination: null,
|
35
36
|
disk_type: null,
|
37
|
+
volume_type: null,
|
36
38
|
wwn: null,
|
37
39
|
creation_date: null,
|
38
40
|
last_update_date: null,
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**name** | **String** | Base name of the new cloned volume(s). Cloned Volume names prefixed with'clone-'
|
7
|
+
**name** | **String** | Base name of the new cloned volume(s). Cloned Volume names will be prefixed with 'clone-' and suffixed with ‘-#####’ (where ##### is a 5 digit random number) If multiple volumes cloned they will be further suffixed with an incremental number starting with 1. Example volume names using name=\"volume-abcdef\" single volume clone will be named \"clone-volume-abcdef-83081\" multi volume clone will be named \"clone-volume-abcdef-73721-1\", \"clone-volume-abcdef-73721-2\", ... |
|
8
8
|
**volume_i_ds** | **Array<String>** | List of volumes to be cloned |
|
9
9
|
|
10
10
|
## Code Sample
|
data/docs/VolumesCloneCancel.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**force** | **Boolean** | default False, Cancel will only be allowed if the status is
|
7
|
+
**force** | **Boolean** | default False, Cancel will only be allowed if the status is 'prepared', or 'available' True, Cancel will be allowed when the status is NOT completed, cancelling, cancelled, or failed | [optional]
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
data/docs/VolumesCloneDetail.md
CHANGED
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
12
12
|
**failure_message** | **String** | Failure reason for a failed volumes-clone request | [optional]
|
13
13
|
**creation_date** | **DateTime** | Creation Date | [optional]
|
14
14
|
**last_update_date** | **DateTime** | Last Update Date | [optional]
|
15
|
-
**cloned_volumes** | [**Array<ClonedVolumeDetail>**](ClonedVolumeDetail.md) | List of cloned volumes created from the volumes-clone request | [optional]
|
15
|
+
**cloned_volumes** | [**Array<ClonedVolumeDetail>**](ClonedVolumeDetail.md) | List of cloned volumes created from the volumes-clone request. The clone volumes information is included only after the Execute step has completed successfully. The source and clone volume names might not be provided as this information is retrieved in a separate API call and might not complete in a timely manner. | [optional]
|
16
16
|
|
17
17
|
## Code Sample
|
18
18
|
|
data/docs/VolumesCloneExecute.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**name** | **String** | Base name of the new cloned volume(s). Cloned Volume names will be prefixed with 'clone-' and suffixed with ‘-#####’ (where ##### is a 5 digit random number) If multiple volumes cloned they will be further suffixed with an incremental number starting with 1. Example volume names using name
|
7
|
+
**name** | **String** | Base name of the new cloned volume(s). Cloned Volume names will be prefixed with 'clone-' and suffixed with ‘-#####’ (where ##### is a 5 digit random number) If multiple volumes cloned they will be further suffixed with an incremental number starting with 1. Example volume names using name \"volume-abcdef\" single volume clone will be named \"clone-volume-abcdef-83081\" multi volume clone will be named \"clone-volume-abcdef-73721-1\", \"clone-volume-abcdef-73721-2\", ... |
|
8
8
|
**rollback_prepare** | **Boolean** | default False, Execute failure rolls back clone activity but leaves prepared snapshot True, Execute failure rolls back clone activity and removes the prepared snapshot | [optional]
|
9
9
|
|
10
10
|
## Code Sample
|
data/lib/ibm_cloud_power.rb
CHANGED
@@ -21,6 +21,18 @@ require 'ibm_cloud_power/models/clone_task_reference'
|
|
21
21
|
require 'ibm_cloud_power/models/clone_task_status'
|
22
22
|
require 'ibm_cloud_power/models/cloned_volume'
|
23
23
|
require 'ibm_cloud_power/models/cloned_volume_detail'
|
24
|
+
require 'ibm_cloud_power/models/cloud_connection'
|
25
|
+
require 'ibm_cloud_power/models/cloud_connection_create'
|
26
|
+
require 'ibm_cloud_power/models/cloud_connection_endpoint_classic'
|
27
|
+
require 'ibm_cloud_power/models/cloud_connection_endpoint_gre'
|
28
|
+
require 'ibm_cloud_power/models/cloud_connection_endpoint_vpc'
|
29
|
+
require 'ibm_cloud_power/models/cloud_connection_gre_tunnel'
|
30
|
+
require 'ibm_cloud_power/models/cloud_connection_speed'
|
31
|
+
require 'ibm_cloud_power/models/cloud_connection_update'
|
32
|
+
require 'ibm_cloud_power/models/cloud_connection_vpc'
|
33
|
+
require 'ibm_cloud_power/models/cloud_connection_virtual_private_clouds'
|
34
|
+
require 'ibm_cloud_power/models/cloud_connection_virtual_private_clouds_virtual_private_clouds'
|
35
|
+
require 'ibm_cloud_power/models/cloud_connections'
|
24
36
|
require 'ibm_cloud_power/models/cloud_instance'
|
25
37
|
require 'ibm_cloud_power/models/cloud_instance_create'
|
26
38
|
require 'ibm_cloud_power/models/cloud_instance_reference'
|
@@ -39,6 +51,7 @@ require 'ibm_cloud_power/models/image_reference'
|
|
39
51
|
require 'ibm_cloud_power/models/image_specifications'
|
40
52
|
require 'ibm_cloud_power/models/image_volume'
|
41
53
|
require 'ibm_cloud_power/models/images'
|
54
|
+
require 'ibm_cloud_power/models/maximum_storage_allocation'
|
42
55
|
require 'ibm_cloud_power/models/min_max_default'
|
43
56
|
require 'ibm_cloud_power/models/multi_volumes_create'
|
44
57
|
require 'ibm_cloud_power/models/network'
|
@@ -74,6 +87,10 @@ require 'ibm_cloud_power/models/pvm_instance_volume_update'
|
|
74
87
|
require 'ibm_cloud_power/models/pvm_instances'
|
75
88
|
require 'ibm_cloud_power/models/peering_network'
|
76
89
|
require 'ibm_cloud_power/models/pin_policy'
|
90
|
+
require 'ibm_cloud_power/models/placement_group'
|
91
|
+
require 'ibm_cloud_power/models/placement_group_create'
|
92
|
+
require 'ibm_cloud_power/models/placement_group_server'
|
93
|
+
require 'ibm_cloud_power/models/placement_groups'
|
77
94
|
require 'ibm_cloud_power/models/sap_create'
|
78
95
|
require 'ibm_cloud_power/models/sap_profile'
|
79
96
|
require 'ibm_cloud_power/models/sap_profile_reference'
|
@@ -89,6 +106,10 @@ require 'ibm_cloud_power/models/snapshot_update'
|
|
89
106
|
require 'ibm_cloud_power/models/snapshots'
|
90
107
|
require 'ibm_cloud_power/models/software_licenses'
|
91
108
|
require 'ibm_cloud_power/models/stock_image'
|
109
|
+
require 'ibm_cloud_power/models/storage_pool_capacity'
|
110
|
+
require 'ibm_cloud_power/models/storage_pools_capacity'
|
111
|
+
require 'ibm_cloud_power/models/storage_type_capacity'
|
112
|
+
require 'ibm_cloud_power/models/storage_types_capacity'
|
92
113
|
require 'ibm_cloud_power/models/system'
|
93
114
|
require 'ibm_cloud_power/models/system_pool'
|
94
115
|
require 'ibm_cloud_power/models/task'
|
@@ -112,13 +133,16 @@ require 'ibm_cloud_power/models/volumes_clone_response'
|
|
112
133
|
require 'ibm_cloud_power/models/volumes_clones'
|
113
134
|
|
114
135
|
# APIs
|
136
|
+
require 'ibm_cloud_power/api/p_cloud_cloud_connections_api'
|
115
137
|
require 'ibm_cloud_power/api/p_cloud_events_api'
|
116
138
|
require 'ibm_cloud_power/api/p_cloud_images_api'
|
117
139
|
require 'ibm_cloud_power/api/p_cloud_instances_api'
|
118
140
|
require 'ibm_cloud_power/api/p_cloud_networks_api'
|
119
141
|
require 'ibm_cloud_power/api/p_cloud_pvm_instances_api'
|
142
|
+
require 'ibm_cloud_power/api/p_cloud_placement_groups_api'
|
120
143
|
require 'ibm_cloud_power/api/p_cloud_sap_api'
|
121
144
|
require 'ibm_cloud_power/api/p_cloud_snapshots_api'
|
145
|
+
require 'ibm_cloud_power/api/p_cloud_storage_capacity_api'
|
122
146
|
require 'ibm_cloud_power/api/p_cloud_system_pools_api'
|
123
147
|
require 'ibm_cloud_power/api/p_cloud_tasks_api'
|
124
148
|
require 'ibm_cloud_power/api/p_cloud_tenants_api'
|
@@ -0,0 +1,560 @@
|
|
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 PCloudCloudConnectionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a Cloud connection
|
23
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
24
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Object]
|
27
|
+
def pcloud_cloudconnections_delete(cloud_instance_id, cloud_connection_id, opts = {})
|
28
|
+
data, _status_code, _headers = pcloud_cloudconnections_delete_with_http_info(cloud_instance_id, cloud_connection_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a Cloud connection
|
33
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
34
|
+
# @param cloud_connection_id [String] Cloud connection 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_cloudconnections_delete_with_http_info(cloud_instance_id, cloud_connection_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_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 PCloudCloudConnectionsApi.pcloud_cloudconnections_delete"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'cloud_connection_id' is set
|
46
|
+
if @api_client.config.client_side_validation && cloud_connection_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'cloud_connection_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_delete"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'cloud_connection_id' + '}', CGI.escape(cloud_connection_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(['*/*', 'application/json', ])
|
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: PCloudCloudConnectionsApi#pcloud_cloudconnections_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# Get a Cloud connection's state or information
|
89
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
90
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [CloudConnection]
|
93
|
+
def pcloud_cloudconnections_get(cloud_instance_id, cloud_connection_id, opts = {})
|
94
|
+
data, _status_code, _headers = pcloud_cloudconnections_get_with_http_info(cloud_instance_id, cloud_connection_id, opts)
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
# Get a Cloud connection's state or information
|
99
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
100
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(CloudConnection, Integer, Hash)>] CloudConnection data, response status code and response headers
|
103
|
+
def pcloud_cloudconnections_get_with_http_info(cloud_instance_id, cloud_connection_id, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_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 PCloudCloudConnectionsApi.pcloud_cloudconnections_get"
|
110
|
+
end
|
111
|
+
# verify the required parameter 'cloud_connection_id' is set
|
112
|
+
if @api_client.config.client_side_validation && cloud_connection_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'cloud_connection_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_get"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'cloud_connection_id' + '}', CGI.escape(cloud_connection_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] || 'CloudConnection'
|
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: PCloudCloudConnectionsApi#pcloud_cloudconnections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
150
|
+
end
|
151
|
+
return data, status_code, headers
|
152
|
+
end
|
153
|
+
|
154
|
+
# Get all Cloud connections in a specific cloud instance
|
155
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [CloudConnections]
|
158
|
+
def pcloud_cloudconnections_getall(cloud_instance_id, opts = {})
|
159
|
+
data, _status_code, _headers = pcloud_cloudconnections_getall_with_http_info(cloud_instance_id, opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Get all Cloud connections in a specific cloud instance
|
164
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @return [Array<(CloudConnections, Integer, Hash)>] CloudConnections data, response status code and response headers
|
167
|
+
def pcloud_cloudconnections_getall_with_http_info(cloud_instance_id, opts = {})
|
168
|
+
if @api_client.config.debugging
|
169
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_getall ...'
|
170
|
+
end
|
171
|
+
# verify the required parameter 'cloud_instance_id' is set
|
172
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
173
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_getall"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = opts[:header_params] || {}
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = opts[:form_params] || {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = opts[:body]
|
191
|
+
|
192
|
+
# return_type
|
193
|
+
return_type = opts[:return_type] || 'CloudConnections'
|
194
|
+
|
195
|
+
# auth_names
|
196
|
+
auth_names = opts[:auth_names] || []
|
197
|
+
|
198
|
+
new_options = opts.merge(
|
199
|
+
:header_params => header_params,
|
200
|
+
:query_params => query_params,
|
201
|
+
:form_params => form_params,
|
202
|
+
:body => post_body,
|
203
|
+
:auth_names => auth_names,
|
204
|
+
:return_type => return_type
|
205
|
+
)
|
206
|
+
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
210
|
+
end
|
211
|
+
return data, status_code, headers
|
212
|
+
end
|
213
|
+
|
214
|
+
# Delete a network from a Cloud connection
|
215
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
216
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
217
|
+
# @param network_id [String] Network ID
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @return [CloudConnection]
|
220
|
+
def pcloud_cloudconnections_networks_delete(cloud_instance_id, cloud_connection_id, network_id, opts = {})
|
221
|
+
data, _status_code, _headers = pcloud_cloudconnections_networks_delete_with_http_info(cloud_instance_id, cloud_connection_id, network_id, opts)
|
222
|
+
data
|
223
|
+
end
|
224
|
+
|
225
|
+
# Delete a network from a Cloud connection
|
226
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
227
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
228
|
+
# @param network_id [String] Network ID
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @return [Array<(CloudConnection, Integer, Hash)>] CloudConnection data, response status code and response headers
|
231
|
+
def pcloud_cloudconnections_networks_delete_with_http_info(cloud_instance_id, cloud_connection_id, network_id, opts = {})
|
232
|
+
if @api_client.config.debugging
|
233
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_delete ...'
|
234
|
+
end
|
235
|
+
# verify the required parameter 'cloud_instance_id' is set
|
236
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
237
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_delete"
|
238
|
+
end
|
239
|
+
# verify the required parameter 'cloud_connection_id' is set
|
240
|
+
if @api_client.config.client_side_validation && cloud_connection_id.nil?
|
241
|
+
fail ArgumentError, "Missing the required parameter 'cloud_connection_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_delete"
|
242
|
+
end
|
243
|
+
# verify the required parameter 'network_id' is set
|
244
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
245
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_delete"
|
246
|
+
end
|
247
|
+
# resource path
|
248
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'cloud_connection_id' + '}', CGI.escape(cloud_connection_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
249
|
+
|
250
|
+
# query parameters
|
251
|
+
query_params = opts[:query_params] || {}
|
252
|
+
|
253
|
+
# header parameters
|
254
|
+
header_params = opts[:header_params] || {}
|
255
|
+
# HTTP header 'Accept' (if needed)
|
256
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json', ])
|
257
|
+
|
258
|
+
# form parameters
|
259
|
+
form_params = opts[:form_params] || {}
|
260
|
+
|
261
|
+
# http body (model)
|
262
|
+
post_body = opts[:body]
|
263
|
+
|
264
|
+
# return_type
|
265
|
+
return_type = opts[:return_type] || 'CloudConnection'
|
266
|
+
|
267
|
+
# auth_names
|
268
|
+
auth_names = opts[:auth_names] || []
|
269
|
+
|
270
|
+
new_options = opts.merge(
|
271
|
+
:header_params => header_params,
|
272
|
+
:query_params => query_params,
|
273
|
+
:form_params => form_params,
|
274
|
+
:body => post_body,
|
275
|
+
:auth_names => auth_names,
|
276
|
+
:return_type => return_type
|
277
|
+
)
|
278
|
+
|
279
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
280
|
+
if @api_client.config.debugging
|
281
|
+
@api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_networks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
282
|
+
end
|
283
|
+
return data, status_code, headers
|
284
|
+
end
|
285
|
+
|
286
|
+
# Add a network to the Cloud connection
|
287
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
288
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
289
|
+
# @param network_id [String] Network ID
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @return [CloudConnection]
|
292
|
+
def pcloud_cloudconnections_networks_put(cloud_instance_id, cloud_connection_id, network_id, opts = {})
|
293
|
+
data, _status_code, _headers = pcloud_cloudconnections_networks_put_with_http_info(cloud_instance_id, cloud_connection_id, network_id, opts)
|
294
|
+
data
|
295
|
+
end
|
296
|
+
|
297
|
+
# Add a network to the Cloud connection
|
298
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
299
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
300
|
+
# @param network_id [String] Network ID
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @return [Array<(CloudConnection, Integer, Hash)>] CloudConnection data, response status code and response headers
|
303
|
+
def pcloud_cloudconnections_networks_put_with_http_info(cloud_instance_id, cloud_connection_id, network_id, opts = {})
|
304
|
+
if @api_client.config.debugging
|
305
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put ...'
|
306
|
+
end
|
307
|
+
# verify the required parameter 'cloud_instance_id' is set
|
308
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
309
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put"
|
310
|
+
end
|
311
|
+
# verify the required parameter 'cloud_connection_id' is set
|
312
|
+
if @api_client.config.client_side_validation && cloud_connection_id.nil?
|
313
|
+
fail ArgumentError, "Missing the required parameter 'cloud_connection_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put"
|
314
|
+
end
|
315
|
+
# verify the required parameter 'network_id' is set
|
316
|
+
if @api_client.config.client_side_validation && network_id.nil?
|
317
|
+
fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_networks_put"
|
318
|
+
end
|
319
|
+
# resource path
|
320
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'cloud_connection_id' + '}', CGI.escape(cloud_connection_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(network_id.to_s))
|
321
|
+
|
322
|
+
# query parameters
|
323
|
+
query_params = opts[:query_params] || {}
|
324
|
+
|
325
|
+
# header parameters
|
326
|
+
header_params = opts[:header_params] || {}
|
327
|
+
# HTTP header 'Accept' (if needed)
|
328
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
329
|
+
|
330
|
+
# form parameters
|
331
|
+
form_params = opts[:form_params] || {}
|
332
|
+
|
333
|
+
# http body (model)
|
334
|
+
post_body = opts[:body]
|
335
|
+
|
336
|
+
# return_type
|
337
|
+
return_type = opts[:return_type] || 'CloudConnection'
|
338
|
+
|
339
|
+
# auth_names
|
340
|
+
auth_names = opts[:auth_names] || []
|
341
|
+
|
342
|
+
new_options = opts.merge(
|
343
|
+
:header_params => header_params,
|
344
|
+
:query_params => query_params,
|
345
|
+
:form_params => form_params,
|
346
|
+
:body => post_body,
|
347
|
+
:auth_names => auth_names,
|
348
|
+
:return_type => return_type
|
349
|
+
)
|
350
|
+
|
351
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
352
|
+
if @api_client.config.debugging
|
353
|
+
@api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_networks_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
354
|
+
end
|
355
|
+
return data, status_code, headers
|
356
|
+
end
|
357
|
+
|
358
|
+
# Create a new Cloud connection
|
359
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
360
|
+
# @param body [CloudConnectionCreate] Parameters for the creation of a new Cloud connection
|
361
|
+
# @param [Hash] opts the optional parameters
|
362
|
+
# @return [CloudConnection]
|
363
|
+
def pcloud_cloudconnections_post(cloud_instance_id, body, opts = {})
|
364
|
+
data, _status_code, _headers = pcloud_cloudconnections_post_with_http_info(cloud_instance_id, body, opts)
|
365
|
+
data
|
366
|
+
end
|
367
|
+
|
368
|
+
# Create a new Cloud connection
|
369
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
370
|
+
# @param body [CloudConnectionCreate] Parameters for the creation of a new Cloud connection
|
371
|
+
# @param [Hash] opts the optional parameters
|
372
|
+
# @return [Array<(CloudConnection, Integer, Hash)>] CloudConnection data, response status code and response headers
|
373
|
+
def pcloud_cloudconnections_post_with_http_info(cloud_instance_id, body, opts = {})
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_post ...'
|
376
|
+
end
|
377
|
+
# verify the required parameter 'cloud_instance_id' is set
|
378
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
379
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_post"
|
380
|
+
end
|
381
|
+
# verify the required parameter 'body' is set
|
382
|
+
if @api_client.config.client_side_validation && body.nil?
|
383
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_post"
|
384
|
+
end
|
385
|
+
# resource path
|
386
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
387
|
+
|
388
|
+
# query parameters
|
389
|
+
query_params = opts[:query_params] || {}
|
390
|
+
|
391
|
+
# header parameters
|
392
|
+
header_params = opts[:header_params] || {}
|
393
|
+
# HTTP header 'Accept' (if needed)
|
394
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
395
|
+
# HTTP header 'Content-Type'
|
396
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
397
|
+
|
398
|
+
# form parameters
|
399
|
+
form_params = opts[:form_params] || {}
|
400
|
+
|
401
|
+
# http body (model)
|
402
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
403
|
+
|
404
|
+
# return_type
|
405
|
+
return_type = opts[:return_type] || 'CloudConnection'
|
406
|
+
|
407
|
+
# auth_names
|
408
|
+
auth_names = opts[:auth_names] || []
|
409
|
+
|
410
|
+
new_options = opts.merge(
|
411
|
+
:header_params => header_params,
|
412
|
+
:query_params => query_params,
|
413
|
+
:form_params => form_params,
|
414
|
+
:body => post_body,
|
415
|
+
:auth_names => auth_names,
|
416
|
+
:return_type => return_type
|
417
|
+
)
|
418
|
+
|
419
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
420
|
+
if @api_client.config.debugging
|
421
|
+
@api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
422
|
+
end
|
423
|
+
return data, status_code, headers
|
424
|
+
end
|
425
|
+
|
426
|
+
# Update a Cloud connection
|
427
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
428
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
429
|
+
# @param body [CloudConnectionUpdate] Parameters to update a Cloud connection
|
430
|
+
# @param [Hash] opts the optional parameters
|
431
|
+
# @return [CloudConnection]
|
432
|
+
def pcloud_cloudconnections_put(cloud_instance_id, cloud_connection_id, body, opts = {})
|
433
|
+
data, _status_code, _headers = pcloud_cloudconnections_put_with_http_info(cloud_instance_id, cloud_connection_id, body, opts)
|
434
|
+
data
|
435
|
+
end
|
436
|
+
|
437
|
+
# Update a Cloud connection
|
438
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
439
|
+
# @param cloud_connection_id [String] Cloud connection ID
|
440
|
+
# @param body [CloudConnectionUpdate] Parameters to update a Cloud connection
|
441
|
+
# @param [Hash] opts the optional parameters
|
442
|
+
# @return [Array<(CloudConnection, Integer, Hash)>] CloudConnection data, response status code and response headers
|
443
|
+
def pcloud_cloudconnections_put_with_http_info(cloud_instance_id, cloud_connection_id, body, opts = {})
|
444
|
+
if @api_client.config.debugging
|
445
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_put ...'
|
446
|
+
end
|
447
|
+
# verify the required parameter 'cloud_instance_id' is set
|
448
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
449
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_put"
|
450
|
+
end
|
451
|
+
# verify the required parameter 'cloud_connection_id' is set
|
452
|
+
if @api_client.config.client_side_validation && cloud_connection_id.nil?
|
453
|
+
fail ArgumentError, "Missing the required parameter 'cloud_connection_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_put"
|
454
|
+
end
|
455
|
+
# verify the required parameter 'body' is set
|
456
|
+
if @api_client.config.client_side_validation && body.nil?
|
457
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_put"
|
458
|
+
end
|
459
|
+
# resource path
|
460
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'cloud_connection_id' + '}', CGI.escape(cloud_connection_id.to_s))
|
461
|
+
|
462
|
+
# query parameters
|
463
|
+
query_params = opts[:query_params] || {}
|
464
|
+
|
465
|
+
# header parameters
|
466
|
+
header_params = opts[:header_params] || {}
|
467
|
+
# HTTP header 'Accept' (if needed)
|
468
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
469
|
+
# HTTP header 'Content-Type'
|
470
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
471
|
+
|
472
|
+
# form parameters
|
473
|
+
form_params = opts[:form_params] || {}
|
474
|
+
|
475
|
+
# http body (model)
|
476
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
477
|
+
|
478
|
+
# return_type
|
479
|
+
return_type = opts[:return_type] || 'CloudConnection'
|
480
|
+
|
481
|
+
# auth_names
|
482
|
+
auth_names = opts[:auth_names] || []
|
483
|
+
|
484
|
+
new_options = opts.merge(
|
485
|
+
:header_params => header_params,
|
486
|
+
:query_params => query_params,
|
487
|
+
:form_params => form_params,
|
488
|
+
:body => post_body,
|
489
|
+
:auth_names => auth_names,
|
490
|
+
:return_type => return_type
|
491
|
+
)
|
492
|
+
|
493
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
494
|
+
if @api_client.config.debugging
|
495
|
+
@api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
496
|
+
end
|
497
|
+
return data, status_code, headers
|
498
|
+
end
|
499
|
+
|
500
|
+
# Get all virtual private clouds in a specific cloud instance
|
501
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @return [CloudConnectionVirtualPrivateClouds]
|
504
|
+
def pcloud_cloudconnections_virtualprivateclouds_getall(cloud_instance_id, opts = {})
|
505
|
+
data, _status_code, _headers = pcloud_cloudconnections_virtualprivateclouds_getall_with_http_info(cloud_instance_id, opts)
|
506
|
+
data
|
507
|
+
end
|
508
|
+
|
509
|
+
# Get all virtual private clouds in a specific cloud instance
|
510
|
+
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
511
|
+
# @param [Hash] opts the optional parameters
|
512
|
+
# @return [Array<(CloudConnectionVirtualPrivateClouds, Integer, Hash)>] CloudConnectionVirtualPrivateClouds data, response status code and response headers
|
513
|
+
def pcloud_cloudconnections_virtualprivateclouds_getall_with_http_info(cloud_instance_id, opts = {})
|
514
|
+
if @api_client.config.debugging
|
515
|
+
@api_client.config.logger.debug 'Calling API: PCloudCloudConnectionsApi.pcloud_cloudconnections_virtualprivateclouds_getall ...'
|
516
|
+
end
|
517
|
+
# verify the required parameter 'cloud_instance_id' is set
|
518
|
+
if @api_client.config.client_side_validation && cloud_instance_id.nil?
|
519
|
+
fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudCloudConnectionsApi.pcloud_cloudconnections_virtualprivateclouds_getall"
|
520
|
+
end
|
521
|
+
# resource path
|
522
|
+
local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
|
523
|
+
|
524
|
+
# query parameters
|
525
|
+
query_params = opts[:query_params] || {}
|
526
|
+
|
527
|
+
# header parameters
|
528
|
+
header_params = opts[:header_params] || {}
|
529
|
+
# HTTP header 'Accept' (if needed)
|
530
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
531
|
+
|
532
|
+
# form parameters
|
533
|
+
form_params = opts[:form_params] || {}
|
534
|
+
|
535
|
+
# http body (model)
|
536
|
+
post_body = opts[:body]
|
537
|
+
|
538
|
+
# return_type
|
539
|
+
return_type = opts[:return_type] || 'CloudConnectionVirtualPrivateClouds'
|
540
|
+
|
541
|
+
# auth_names
|
542
|
+
auth_names = opts[:auth_names] || []
|
543
|
+
|
544
|
+
new_options = opts.merge(
|
545
|
+
:header_params => header_params,
|
546
|
+
:query_params => query_params,
|
547
|
+
:form_params => form_params,
|
548
|
+
:body => post_body,
|
549
|
+
:auth_names => auth_names,
|
550
|
+
:return_type => return_type
|
551
|
+
)
|
552
|
+
|
553
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
554
|
+
if @api_client.config.debugging
|
555
|
+
@api_client.config.logger.debug "API called: PCloudCloudConnectionsApi#pcloud_cloudconnections_virtualprivateclouds_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
556
|
+
end
|
557
|
+
return data, status_code, headers
|
558
|
+
end
|
559
|
+
end
|
560
|
+
end
|