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.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +68 -0
  3. data/LICENSE.txt +202 -0
  4. data/README.md +56 -10
  5. data/docs/CloudConnection.md +41 -0
  6. data/docs/CloudConnectionCreate.md +23 -0
  7. data/docs/CloudConnectionEndpointClassic.md +19 -0
  8. data/docs/CloudConnectionEndpointGRE.md +19 -0
  9. data/docs/CloudConnectionEndpointVPC.md +19 -0
  10. data/docs/CloudConnectionGRETunnel.md +21 -0
  11. data/docs/CloudConnectionSpeed.md +16 -0
  12. data/docs/CloudConnectionUpdate.md +27 -0
  13. data/docs/CloudConnectionVPC.md +19 -0
  14. data/docs/CloudConnectionVirtualPrivateClouds.md +17 -0
  15. data/docs/CloudConnectionVirtualPrivateCloudsVirtualPrivateClouds.md +23 -0
  16. data/docs/CloudConnections.md +17 -0
  17. data/docs/CreateDataVolume.md +6 -6
  18. data/docs/CreateImage.md +3 -3
  19. data/docs/Image.md +2 -0
  20. data/docs/ImageReference.md +2 -0
  21. data/docs/MaximumStorageAllocation.md +21 -0
  22. data/docs/MultiVolumesCreate.md +6 -4
  23. data/docs/Network.md +1 -1
  24. data/docs/NetworkPort.md +2 -0
  25. data/docs/NetworkReference.md +1 -1
  26. data/docs/PCloudCloudConnectionsApi.md +394 -0
  27. data/docs/PCloudEventsApi.md +2 -2
  28. data/docs/PCloudImagesApi.md +104 -6
  29. data/docs/PCloudPVMInstancesApi.md +60 -5
  30. data/docs/PCloudPlacementGroupsApi.md +298 -0
  31. data/docs/PCloudStorageCapacityApi.md +196 -0
  32. data/docs/PCloudVolumesApi.md +344 -0
  33. data/docs/PVMInstance.md +3 -1
  34. data/docs/PVMInstanceCreate.md +5 -3
  35. data/docs/PlacementGroup.md +23 -0
  36. data/docs/PlacementGroupCreate.md +19 -0
  37. data/docs/PlacementGroupServer.md +17 -0
  38. data/docs/PlacementGroups.md +17 -0
  39. data/docs/SAPCreate.md +1 -1
  40. data/docs/StoragePoolCapacity.md +23 -0
  41. data/docs/StoragePoolsCapacity.md +19 -0
  42. data/docs/StorageTypeCapacity.md +21 -0
  43. data/docs/StorageTypesCapacity.md +19 -0
  44. data/docs/Volume.md +2 -0
  45. data/docs/VolumeReference.md +2 -0
  46. data/docs/VolumesCloneAsyncRequest.md +1 -1
  47. data/docs/VolumesCloneCancel.md +1 -1
  48. data/docs/VolumesCloneDetail.md +1 -1
  49. data/docs/VolumesCloneExecute.md +1 -1
  50. data/lib/ibm_cloud_power.rb +24 -0
  51. data/lib/ibm_cloud_power/api/p_cloud_cloud_connections_api.rb +560 -0
  52. data/lib/ibm_cloud_power/api/p_cloud_events_api.rb +2 -2
  53. data/lib/ibm_cloud_power/api/p_cloud_images_api.rb +133 -4
  54. data/lib/ibm_cloud_power/api/p_cloud_placement_groups_api.rb +430 -0
  55. data/lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb +82 -5
  56. data/lib/ibm_cloud_power/api/p_cloud_storage_capacity_api.rb +274 -0
  57. data/lib/ibm_cloud_power/api/p_cloud_volumes_api.rb +477 -0
  58. data/lib/ibm_cloud_power/models/cloud_connection.rb +379 -0
  59. data/lib/ibm_cloud_power/models/cloud_connection_create.rb +249 -0
  60. data/lib/ibm_cloud_power/models/cloud_connection_endpoint_classic.rb +218 -0
  61. data/lib/ibm_cloud_power/models/cloud_connection_endpoint_gre.rb +221 -0
  62. data/lib/ibm_cloud_power/models/cloud_connection_endpoint_vpc.rb +221 -0
  63. data/lib/ibm_cloud_power/models/cloud_connection_gre_tunnel.rb +239 -0
  64. data/lib/ibm_cloud_power/models/cloud_connection_speed.rb +42 -0
  65. data/lib/ibm_cloud_power/models/cloud_connection_update.rb +257 -0
  66. data/lib/ibm_cloud_power/models/cloud_connection_virtual_private_clouds.rb +216 -0
  67. data/lib/ibm_cloud_power/models/cloud_connection_virtual_private_clouds_virtual_private_clouds.rb +259 -0
  68. data/lib/ibm_cloud_power/models/cloud_connection_vpc.rb +224 -0
  69. data/lib/ibm_cloud_power/models/cloud_connections.rb +216 -0
  70. data/lib/ibm_cloud_power/models/create_data_volume.rb +17 -17
  71. data/lib/ibm_cloud_power/models/create_image.rb +3 -3
  72. data/lib/ibm_cloud_power/models/image.rb +16 -1
  73. data/lib/ibm_cloud_power/models/image_reference.rb +16 -1
  74. data/lib/ibm_cloud_power/models/maximum_storage_allocation.rb +245 -0
  75. data/lib/ibm_cloud_power/models/multi_volumes_create.rb +17 -7
  76. data/lib/ibm_cloud_power/models/network.rb +1 -1
  77. data/lib/ibm_cloud_power/models/network_port.rb +11 -1
  78. data/lib/ibm_cloud_power/models/network_reference.rb +1 -1
  79. data/lib/ibm_cloud_power/models/placement_group.rb +295 -0
  80. data/lib/ibm_cloud_power/models/placement_group_create.rb +263 -0
  81. data/lib/ibm_cloud_power/models/placement_group_server.rb +214 -0
  82. data/lib/ibm_cloud_power/models/placement_groups.rb +216 -0
  83. data/lib/ibm_cloud_power/models/pvm_instance.rb +17 -5
  84. data/lib/ibm_cloud_power/models/pvm_instance_create.rb +16 -6
  85. data/lib/ibm_cloud_power/models/pvm_instance_reference.rb +2 -2
  86. data/lib/ibm_cloud_power/models/sap_create.rb +1 -1
  87. data/lib/ibm_cloud_power/models/storage_pool_capacity.rb +245 -0
  88. data/lib/ibm_cloud_power/models/storage_pools_capacity.rb +220 -0
  89. data/lib/ibm_cloud_power/models/storage_type_capacity.rb +231 -0
  90. data/lib/ibm_cloud_power/models/storage_types_capacity.rb +220 -0
  91. data/lib/ibm_cloud_power/models/volume.rb +11 -1
  92. data/lib/ibm_cloud_power/models/volume_reference.rb +11 -1
  93. data/lib/ibm_cloud_power/models/volumes_clone_async_request.rb +1 -1
  94. data/lib/ibm_cloud_power/models/volumes_clone_cancel.rb +1 -1
  95. data/lib/ibm_cloud_power/models/volumes_clone_detail.rb +1 -1
  96. data/lib/ibm_cloud_power/models/volumes_clone_execute.rb +1 -1
  97. data/lib/ibm_cloud_power/version.rb +1 -1
  98. data/spec/api/p_cloud_cloud_connections_api_spec.rb +132 -0
  99. data/spec/api/p_cloud_placement_groups_api_spec.rb +108 -0
  100. data/spec/api/p_cloud_storage_capacity_api_spec.rb +81 -0
  101. data/spec/models/cloud_connection_create_spec.rb +59 -0
  102. data/spec/models/cloud_connection_endpoint_classic_spec.rb +47 -0
  103. data/spec/models/cloud_connection_endpoint_gre_spec.rb +47 -0
  104. data/spec/models/cloud_connection_endpoint_vpc_spec.rb +47 -0
  105. data/spec/models/cloud_connection_gre_tunnel_spec.rb +53 -0
  106. data/spec/models/cloud_connection_spec.rb +113 -0
  107. data/spec/models/cloud_connection_speed_spec.rb +35 -0
  108. data/spec/models/cloud_connection_update_spec.rb +71 -0
  109. data/spec/models/cloud_connection_virtual_private_clouds_spec.rb +41 -0
  110. data/spec/models/cloud_connection_virtual_private_clouds_virtual_private_clouds_spec.rb +59 -0
  111. data/spec/models/cloud_connection_vpc_spec.rb +47 -0
  112. data/spec/models/cloud_connections_spec.rb +41 -0
  113. data/spec/models/maximum_storage_allocation_spec.rb +53 -0
  114. data/spec/models/placement_group_create_spec.rb +51 -0
  115. data/spec/models/placement_group_server_spec.rb +41 -0
  116. data/spec/models/placement_group_spec.rb +63 -0
  117. data/spec/models/placement_groups_spec.rb +41 -0
  118. data/spec/models/storage_pool_capacity_spec.rb +59 -0
  119. data/spec/models/storage_pools_capacity_spec.rb +47 -0
  120. data/spec/models/storage_type_capacity_spec.rb +53 -0
  121. data/spec/models/storage_types_capacity_spec.rb +47 -0
  122. metadata +130 -32
@@ -167,6 +167,80 @@ module IbmCloudPower
167
167
  return data, status_code, headers
168
168
  end
169
169
 
170
+ # Clone a PVMInstance
171
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
172
+ # @param pvm_instance_id [String] PCloud PVM Instance ID
173
+ # @param body [PVMInstanceClone] Clone PVM Instance parameters
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [PVMInstance]
176
+ def pcloud_pvminstances_clone_post(cloud_instance_id, pvm_instance_id, body, opts = {})
177
+ data, _status_code, _headers = pcloud_pvminstances_clone_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts)
178
+ data
179
+ end
180
+
181
+ # Clone a PVMInstance
182
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
183
+ # @param pvm_instance_id [String] PCloud PVM Instance ID
184
+ # @param body [PVMInstanceClone] Clone PVM Instance parameters
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [Array<(PVMInstance, Integer, Hash)>] PVMInstance data, response status code and response headers
187
+ def pcloud_pvminstances_clone_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_clone_post ...'
190
+ end
191
+ # verify the required parameter 'cloud_instance_id' is set
192
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
193
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_clone_post"
194
+ end
195
+ # verify the required parameter 'pvm_instance_id' is set
196
+ if @api_client.config.client_side_validation && pvm_instance_id.nil?
197
+ fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_clone_post"
198
+ end
199
+ # verify the required parameter 'body' is set
200
+ if @api_client.config.client_side_validation && body.nil?
201
+ fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_clone_post"
202
+ end
203
+ # resource path
204
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s))
205
+
206
+ # query parameters
207
+ query_params = opts[:query_params] || {}
208
+
209
+ # header parameters
210
+ header_params = opts[:header_params] || {}
211
+ # HTTP header 'Accept' (if needed)
212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
213
+ # HTTP header 'Content-Type'
214
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
215
+
216
+ # form parameters
217
+ form_params = opts[:form_params] || {}
218
+
219
+ # http body (model)
220
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
221
+
222
+ # return_type
223
+ return_type = opts[:return_type] || 'PVMInstance'
224
+
225
+ # auth_names
226
+ auth_names = opts[:auth_names] || []
227
+
228
+ new_options = opts.merge(
229
+ :header_params => header_params,
230
+ :query_params => query_params,
231
+ :form_params => form_params,
232
+ :body => post_body,
233
+ :auth_names => auth_names,
234
+ :return_type => return_type
235
+ )
236
+
237
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: PCloudPVMInstancesApi#pcloud_pvminstances_clone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
+ end
241
+ return data, status_code, headers
242
+ end
243
+
170
244
  # Generate the noVNC console URL
171
245
  # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
172
246
  # @param pvm_instance_id [String] PCloud PVM Instance ID
@@ -237,6 +311,7 @@ module IbmCloudPower
237
311
  # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
238
312
  # @param pvm_instance_id [String] PCloud PVM Instance ID
239
313
  # @param [Hash] opts the optional parameters
314
+ # @option opts [Boolean] :delete_data_volumes Indicates whether all data volumes attached to the PVMInstance must be deleted when deleting the PVMInstance. Shared data volumes will be deleted if no other PVMInstances are attached.
240
315
  # @return [Object]
241
316
  def pcloud_pvminstances_delete(cloud_instance_id, pvm_instance_id, opts = {})
242
317
  data, _status_code, _headers = pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts)
@@ -247,6 +322,7 @@ module IbmCloudPower
247
322
  # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
248
323
  # @param pvm_instance_id [String] PCloud PVM Instance ID
249
324
  # @param [Hash] opts the optional parameters
325
+ # @option opts [Boolean] :delete_data_volumes Indicates whether all data volumes attached to the PVMInstance must be deleted when deleting the PVMInstance. Shared data volumes will be deleted if no other PVMInstances are attached.
250
326
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
251
327
  def pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts = {})
252
328
  if @api_client.config.debugging
@@ -265,6 +341,7 @@ module IbmCloudPower
265
341
 
266
342
  # query parameters
267
343
  query_params = opts[:query_params] || {}
344
+ query_params[:'delete_data_volumes'] = opts[:'delete_data_volumes'] if !opts[:'delete_data_volumes'].nil?
268
345
 
269
346
  # header parameters
270
347
  header_params = opts[:header_params] || {}
@@ -1082,10 +1159,10 @@ module IbmCloudPower
1082
1159
  # @param body [SnapshotRestore] PVM Instance snapshot restore parameters
1083
1160
  # @param [Hash] opts the optional parameters
1084
1161
  # @option opts [String] :restore_fail_action Action to take on a failed snapshot restore
1085
- # @return [nil]
1162
+ # @return [Snapshot]
1086
1163
  def pcloud_pvminstances_snapshots_restore_post(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {})
1087
- pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts)
1088
- nil
1164
+ data, _status_code, _headers = pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts)
1165
+ data
1089
1166
  end
1090
1167
 
1091
1168
  # Restore a PVM Instance snapshot
@@ -1096,7 +1173,7 @@ module IbmCloudPower
1096
1173
  # @param body [SnapshotRestore] PVM Instance snapshot restore parameters
1097
1174
  # @param [Hash] opts the optional parameters
1098
1175
  # @option opts [String] :restore_fail_action Action to take on a failed snapshot restore
1099
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1176
+ # @return [Array<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers
1100
1177
  def pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {})
1101
1178
  if @api_client.config.debugging
1102
1179
  @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post ...'
@@ -1142,7 +1219,7 @@ module IbmCloudPower
1142
1219
  post_body = opts[:body] || @api_client.object_to_http_body(body)
1143
1220
 
1144
1221
  # return_type
1145
- return_type = opts[:return_type]
1222
+ return_type = opts[:return_type] || 'Snapshot'
1146
1223
 
1147
1224
  # auth_names
1148
1225
  auth_names = opts[:auth_names] || []
@@ -0,0 +1,274 @@
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 PCloudStorageCapacityApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Storage capacity for a storage pool in a region
23
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
24
+ # @param storage_pool_name [String] Storage pool name
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [StoragePoolCapacity]
27
+ def pcloud_storagecapacity_pools_get(cloud_instance_id, storage_pool_name, opts = {})
28
+ data, _status_code, _headers = pcloud_storagecapacity_pools_get_with_http_info(cloud_instance_id, storage_pool_name, opts)
29
+ data
30
+ end
31
+
32
+ # Storage capacity for a storage pool in a region
33
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
34
+ # @param storage_pool_name [String] Storage pool name
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(StoragePoolCapacity, Integer, Hash)>] StoragePoolCapacity data, response status code and response headers
37
+ def pcloud_storagecapacity_pools_get_with_http_info(cloud_instance_id, storage_pool_name, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_pools_get ...'
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 PCloudStorageCapacityApi.pcloud_storagecapacity_pools_get"
44
+ end
45
+ # verify the required parameter 'storage_pool_name' is set
46
+ if @api_client.config.client_side_validation && storage_pool_name.nil?
47
+ fail ArgumentError, "Missing the required parameter 'storage_pool_name' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_pools_get"
48
+ end
49
+ # resource path
50
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'storage_pool_name' + '}', CGI.escape(storage_pool_name.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] || 'StoragePoolCapacity'
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(:GET, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: PCloudStorageCapacityApi#pcloud_storagecapacity_pools_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Storage capacity for all available storage pools in a region
89
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [StoragePoolsCapacity]
92
+ def pcloud_storagecapacity_pools_getall(cloud_instance_id, opts = {})
93
+ data, _status_code, _headers = pcloud_storagecapacity_pools_getall_with_http_info(cloud_instance_id, opts)
94
+ data
95
+ end
96
+
97
+ # Storage capacity for all available storage pools in a region
98
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(StoragePoolsCapacity, Integer, Hash)>] StoragePoolsCapacity data, response status code and response headers
101
+ def pcloud_storagecapacity_pools_getall_with_http_info(cloud_instance_id, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_pools_getall ...'
104
+ end
105
+ # verify the required parameter 'cloud_instance_id' is set
106
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
107
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_pools_getall"
108
+ end
109
+ # resource path
110
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'StoragePoolsCapacity'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || []
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: PCloudStorageCapacityApi#pcloud_storagecapacity_pools_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Storage capacity for a storage type in a region
149
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
150
+ # @param storage_type_name [String] Storage type name
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [StorageTypeCapacity]
153
+ def pcloud_storagecapacity_types_get(cloud_instance_id, storage_type_name, opts = {})
154
+ data, _status_code, _headers = pcloud_storagecapacity_types_get_with_http_info(cloud_instance_id, storage_type_name, opts)
155
+ data
156
+ end
157
+
158
+ # Storage capacity for a storage type in a region
159
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
160
+ # @param storage_type_name [String] Storage type name
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(StorageTypeCapacity, Integer, Hash)>] StorageTypeCapacity data, response status code and response headers
163
+ def pcloud_storagecapacity_types_get_with_http_info(cloud_instance_id, storage_type_name, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_types_get ...'
166
+ end
167
+ # verify the required parameter 'cloud_instance_id' is set
168
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
169
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_types_get"
170
+ end
171
+ # verify the required parameter 'storage_type_name' is set
172
+ if @api_client.config.client_side_validation && storage_type_name.nil?
173
+ fail ArgumentError, "Missing the required parameter 'storage_type_name' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_types_get"
174
+ end
175
+ # resource path
176
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'storage_type_name' + '}', CGI.escape(storage_type_name.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] || 'StorageTypeCapacity'
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: PCloudStorageCapacityApi#pcloud_storagecapacity_types_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
214
+ # Storage capacity for all available storage types in a region
215
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [StorageTypesCapacity]
218
+ def pcloud_storagecapacity_types_getall(cloud_instance_id, opts = {})
219
+ data, _status_code, _headers = pcloud_storagecapacity_types_getall_with_http_info(cloud_instance_id, opts)
220
+ data
221
+ end
222
+
223
+ # Storage capacity for all available storage types in a region
224
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(StorageTypesCapacity, Integer, Hash)>] StorageTypesCapacity data, response status code and response headers
227
+ def pcloud_storagecapacity_types_getall_with_http_info(cloud_instance_id, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: PCloudStorageCapacityApi.pcloud_storagecapacity_types_getall ...'
230
+ end
231
+ # verify the required parameter 'cloud_instance_id' is set
232
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
233
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudStorageCapacityApi.pcloud_storagecapacity_types_getall"
234
+ end
235
+ # resource path
236
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
237
+
238
+ # query parameters
239
+ query_params = opts[:query_params] || {}
240
+
241
+ # header parameters
242
+ header_params = opts[:header_params] || {}
243
+ # HTTP header 'Accept' (if needed)
244
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
245
+
246
+ # form parameters
247
+ form_params = opts[:form_params] || {}
248
+
249
+ # http body (model)
250
+ post_body = opts[:body]
251
+
252
+ # return_type
253
+ return_type = opts[:return_type] || 'StorageTypesCapacity'
254
+
255
+ # auth_names
256
+ auth_names = opts[:auth_names] || []
257
+
258
+ new_options = opts.merge(
259
+ :header_params => header_params,
260
+ :query_params => query_params,
261
+ :form_params => form_params,
262
+ :body => post_body,
263
+ :auth_names => auth_names,
264
+ :return_type => return_type
265
+ )
266
+
267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: PCloudStorageCapacityApi#pcloud_storagecapacity_types_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+ end
274
+ end
@@ -994,6 +994,483 @@ module IbmCloudPower
994
994
  return data, status_code, headers
995
995
  end
996
996
 
997
+ # Cancel a volume-clone request, initiates the Cleanup action. The Cleanup action performs the cleanup of the preparatory clones and snapshot volumes.
998
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
999
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1000
+ # @param [Hash] opts the optional parameters
1001
+ # @option opts [VolumesCloneCancel] :body Parameters for cancelling a volumes-clone request
1002
+ # @return [VolumesClone]
1003
+ def pcloud_v2_volumesclone_cancel_post(cloud_instance_id, volumes_clone_id, opts = {})
1004
+ data, _status_code, _headers = pcloud_v2_volumesclone_cancel_post_with_http_info(cloud_instance_id, volumes_clone_id, opts)
1005
+ data
1006
+ end
1007
+
1008
+ # Cancel a volume-clone request, initiates the Cleanup action. The Cleanup action performs the cleanup of the preparatory clones and snapshot volumes.
1009
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1010
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1011
+ # @param [Hash] opts the optional parameters
1012
+ # @option opts [VolumesCloneCancel] :body Parameters for cancelling a volumes-clone request
1013
+ # @return [Array<(VolumesClone, Integer, Hash)>] VolumesClone data, response status code and response headers
1014
+ def pcloud_v2_volumesclone_cancel_post_with_http_info(cloud_instance_id, volumes_clone_id, opts = {})
1015
+ if @api_client.config.debugging
1016
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_cancel_post ...'
1017
+ end
1018
+ # verify the required parameter 'cloud_instance_id' is set
1019
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1020
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_cancel_post"
1021
+ end
1022
+ # verify the required parameter 'volumes_clone_id' is set
1023
+ if @api_client.config.client_side_validation && volumes_clone_id.nil?
1024
+ fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_cancel_post"
1025
+ end
1026
+ # resource path
1027
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_id.to_s))
1028
+
1029
+ # query parameters
1030
+ query_params = opts[:query_params] || {}
1031
+
1032
+ # header parameters
1033
+ header_params = opts[:header_params] || {}
1034
+ # HTTP header 'Accept' (if needed)
1035
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1036
+ # HTTP header 'Content-Type'
1037
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1038
+
1039
+ # form parameters
1040
+ form_params = opts[:form_params] || {}
1041
+
1042
+ # http body (model)
1043
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
1044
+
1045
+ # return_type
1046
+ return_type = opts[:return_type] || 'VolumesClone'
1047
+
1048
+ # auth_names
1049
+ auth_names = opts[:auth_names] || []
1050
+
1051
+ new_options = opts.merge(
1052
+ :header_params => header_params,
1053
+ :query_params => query_params,
1054
+ :form_params => form_params,
1055
+ :body => post_body,
1056
+ :auth_names => auth_names,
1057
+ :return_type => return_type
1058
+ )
1059
+
1060
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1061
+ if @api_client.config.debugging
1062
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_cancel_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1063
+ end
1064
+ return data, status_code, headers
1065
+ end
1066
+
1067
+ # Delete a volumes-clone request
1068
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1069
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1070
+ # @param [Hash] opts the optional parameters
1071
+ # @return [Object]
1072
+ def pcloud_v2_volumesclone_delete(cloud_instance_id, volumes_clone_id, opts = {})
1073
+ data, _status_code, _headers = pcloud_v2_volumesclone_delete_with_http_info(cloud_instance_id, volumes_clone_id, opts)
1074
+ data
1075
+ end
1076
+
1077
+ # Delete a volumes-clone request
1078
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1079
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1080
+ # @param [Hash] opts the optional parameters
1081
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1082
+ def pcloud_v2_volumesclone_delete_with_http_info(cloud_instance_id, volumes_clone_id, opts = {})
1083
+ if @api_client.config.debugging
1084
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_delete ...'
1085
+ end
1086
+ # verify the required parameter 'cloud_instance_id' is set
1087
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1088
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_delete"
1089
+ end
1090
+ # verify the required parameter 'volumes_clone_id' is set
1091
+ if @api_client.config.client_side_validation && volumes_clone_id.nil?
1092
+ fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_delete"
1093
+ end
1094
+ # resource path
1095
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_id.to_s))
1096
+
1097
+ # query parameters
1098
+ query_params = opts[:query_params] || {}
1099
+
1100
+ # header parameters
1101
+ header_params = opts[:header_params] || {}
1102
+ # HTTP header 'Accept' (if needed)
1103
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1104
+
1105
+ # form parameters
1106
+ form_params = opts[:form_params] || {}
1107
+
1108
+ # http body (model)
1109
+ post_body = opts[:body]
1110
+
1111
+ # return_type
1112
+ return_type = opts[:return_type] || 'Object'
1113
+
1114
+ # auth_names
1115
+ auth_names = opts[:auth_names] || []
1116
+
1117
+ new_options = opts.merge(
1118
+ :header_params => header_params,
1119
+ :query_params => query_params,
1120
+ :form_params => form_params,
1121
+ :body => post_body,
1122
+ :auth_names => auth_names,
1123
+ :return_type => return_type
1124
+ )
1125
+
1126
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1127
+ if @api_client.config.debugging
1128
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1129
+ end
1130
+ return data, status_code, headers
1131
+ end
1132
+
1133
+ # Initiate the Execute action for a volumes-clone request. The Execute action creates the cloned volumes using the volume snapshots.
1134
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1135
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1136
+ # @param body [VolumesCloneExecute] Parameters for the cloning of volumes
1137
+ # @param [Hash] opts the optional parameters
1138
+ # @return [VolumesClone]
1139
+ def pcloud_v2_volumesclone_execute_post(cloud_instance_id, volumes_clone_id, body, opts = {})
1140
+ data, _status_code, _headers = pcloud_v2_volumesclone_execute_post_with_http_info(cloud_instance_id, volumes_clone_id, body, opts)
1141
+ data
1142
+ end
1143
+
1144
+ # Initiate the Execute action for a volumes-clone request. The Execute action creates the cloned volumes using the volume snapshots.
1145
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1146
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1147
+ # @param body [VolumesCloneExecute] Parameters for the cloning of volumes
1148
+ # @param [Hash] opts the optional parameters
1149
+ # @return [Array<(VolumesClone, Integer, Hash)>] VolumesClone data, response status code and response headers
1150
+ def pcloud_v2_volumesclone_execute_post_with_http_info(cloud_instance_id, volumes_clone_id, body, opts = {})
1151
+ if @api_client.config.debugging
1152
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_execute_post ...'
1153
+ end
1154
+ # verify the required parameter 'cloud_instance_id' is set
1155
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1156
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_execute_post"
1157
+ end
1158
+ # verify the required parameter 'volumes_clone_id' is set
1159
+ if @api_client.config.client_side_validation && volumes_clone_id.nil?
1160
+ fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_execute_post"
1161
+ end
1162
+ # verify the required parameter 'body' is set
1163
+ if @api_client.config.client_side_validation && body.nil?
1164
+ fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumesclone_execute_post"
1165
+ end
1166
+ # resource path
1167
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_id.to_s))
1168
+
1169
+ # query parameters
1170
+ query_params = opts[:query_params] || {}
1171
+
1172
+ # header parameters
1173
+ header_params = opts[:header_params] || {}
1174
+ # HTTP header 'Accept' (if needed)
1175
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1176
+ # HTTP header 'Content-Type'
1177
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1178
+
1179
+ # form parameters
1180
+ form_params = opts[:form_params] || {}
1181
+
1182
+ # http body (model)
1183
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
1184
+
1185
+ # return_type
1186
+ return_type = opts[:return_type] || 'VolumesClone'
1187
+
1188
+ # auth_names
1189
+ auth_names = opts[:auth_names] || []
1190
+
1191
+ new_options = opts.merge(
1192
+ :header_params => header_params,
1193
+ :query_params => query_params,
1194
+ :form_params => form_params,
1195
+ :body => post_body,
1196
+ :auth_names => auth_names,
1197
+ :return_type => return_type
1198
+ )
1199
+
1200
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1201
+ if @api_client.config.debugging
1202
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_execute_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1203
+ end
1204
+ return data, status_code, headers
1205
+ end
1206
+
1207
+ # Get the details for a volumes-clone request
1208
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1209
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1210
+ # @param [Hash] opts the optional parameters
1211
+ # @return [VolumesCloneDetail]
1212
+ def pcloud_v2_volumesclone_get(cloud_instance_id, volumes_clone_id, opts = {})
1213
+ data, _status_code, _headers = pcloud_v2_volumesclone_get_with_http_info(cloud_instance_id, volumes_clone_id, opts)
1214
+ data
1215
+ end
1216
+
1217
+ # Get the details for a volumes-clone request
1218
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1219
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1220
+ # @param [Hash] opts the optional parameters
1221
+ # @return [Array<(VolumesCloneDetail, Integer, Hash)>] VolumesCloneDetail data, response status code and response headers
1222
+ def pcloud_v2_volumesclone_get_with_http_info(cloud_instance_id, volumes_clone_id, opts = {})
1223
+ if @api_client.config.debugging
1224
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_get ...'
1225
+ end
1226
+ # verify the required parameter 'cloud_instance_id' is set
1227
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1228
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_get"
1229
+ end
1230
+ # verify the required parameter 'volumes_clone_id' is set
1231
+ if @api_client.config.client_side_validation && volumes_clone_id.nil?
1232
+ fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_get"
1233
+ end
1234
+ # resource path
1235
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_id.to_s))
1236
+
1237
+ # query parameters
1238
+ query_params = opts[:query_params] || {}
1239
+
1240
+ # header parameters
1241
+ header_params = opts[:header_params] || {}
1242
+ # HTTP header 'Accept' (if needed)
1243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1244
+
1245
+ # form parameters
1246
+ form_params = opts[:form_params] || {}
1247
+
1248
+ # http body (model)
1249
+ post_body = opts[:body]
1250
+
1251
+ # return_type
1252
+ return_type = opts[:return_type] || 'VolumesCloneDetail'
1253
+
1254
+ # auth_names
1255
+ auth_names = opts[:auth_names] || []
1256
+
1257
+ new_options = opts.merge(
1258
+ :header_params => header_params,
1259
+ :query_params => query_params,
1260
+ :form_params => form_params,
1261
+ :body => post_body,
1262
+ :auth_names => auth_names,
1263
+ :return_type => return_type
1264
+ )
1265
+
1266
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1267
+ if @api_client.config.debugging
1268
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1269
+ end
1270
+ return data, status_code, headers
1271
+ end
1272
+
1273
+ # Get the list of volumes-clone request for a cloud instance
1274
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1275
+ # @param [Hash] opts the optional parameters
1276
+ # @option opts [String] :filter volumes-clone filter to limit list items: prepare - includes status values (preparing, prepared) start - includes status values (starting, available) execute - includes status values (executing, available-rollback) cancel - includes status values (cancelling) completed - includes status values (completed) failed - includes status values (failed) cancelled - includes status values (cancelled) finalized - included status values (completed, failed, cancelled)
1277
+ # @return [VolumesClones]
1278
+ def pcloud_v2_volumesclone_getall(cloud_instance_id, opts = {})
1279
+ data, _status_code, _headers = pcloud_v2_volumesclone_getall_with_http_info(cloud_instance_id, opts)
1280
+ data
1281
+ end
1282
+
1283
+ # Get the list of volumes-clone request for a cloud instance
1284
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1285
+ # @param [Hash] opts the optional parameters
1286
+ # @option opts [String] :filter volumes-clone filter to limit list items: prepare - includes status values (preparing, prepared) start - includes status values (starting, available) execute - includes status values (executing, available-rollback) cancel - includes status values (cancelling) completed - includes status values (completed) failed - includes status values (failed) cancelled - includes status values (cancelled) finalized - included status values (completed, failed, cancelled)
1287
+ # @return [Array<(VolumesClones, Integer, Hash)>] VolumesClones data, response status code and response headers
1288
+ def pcloud_v2_volumesclone_getall_with_http_info(cloud_instance_id, opts = {})
1289
+ if @api_client.config.debugging
1290
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_getall ...'
1291
+ end
1292
+ # verify the required parameter 'cloud_instance_id' is set
1293
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1294
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_getall"
1295
+ end
1296
+ allowable_values = ["prepare", "start", "execute", "cancel", "completed", "failed", "cancelled", "finalized"]
1297
+ if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter'])
1298
+ fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}"
1299
+ end
1300
+ # resource path
1301
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
1302
+
1303
+ # query parameters
1304
+ query_params = opts[:query_params] || {}
1305
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1306
+
1307
+ # header parameters
1308
+ header_params = opts[:header_params] || {}
1309
+ # HTTP header 'Accept' (if needed)
1310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1311
+
1312
+ # form parameters
1313
+ form_params = opts[:form_params] || {}
1314
+
1315
+ # http body (model)
1316
+ post_body = opts[:body]
1317
+
1318
+ # return_type
1319
+ return_type = opts[:return_type] || 'VolumesClones'
1320
+
1321
+ # auth_names
1322
+ auth_names = opts[:auth_names] || []
1323
+
1324
+ new_options = opts.merge(
1325
+ :header_params => header_params,
1326
+ :query_params => query_params,
1327
+ :form_params => form_params,
1328
+ :body => post_body,
1329
+ :auth_names => auth_names,
1330
+ :return_type => return_type
1331
+ )
1332
+
1333
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1334
+ if @api_client.config.debugging
1335
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1336
+ end
1337
+ return data, status_code, headers
1338
+ end
1339
+
1340
+ # Create a new volumes clone request and initiate the Prepare action
1341
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1342
+ # @param body [VolumesCloneCreate] Parameters for preparing a set of volumes to be cloned (This API requires a minimum of two volumes, a minimum of one volume to be in the &#39;in-use&#39; state, and a unique volume clone name. The Prepare action does the preparatory work for creating the snapshot volumes.)
1343
+ # @param [Hash] opts the optional parameters
1344
+ # @return [VolumesClone]
1345
+ def pcloud_v2_volumesclone_post(cloud_instance_id, body, opts = {})
1346
+ data, _status_code, _headers = pcloud_v2_volumesclone_post_with_http_info(cloud_instance_id, body, opts)
1347
+ data
1348
+ end
1349
+
1350
+ # Create a new volumes clone request and initiate the Prepare action
1351
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1352
+ # @param body [VolumesCloneCreate] Parameters for preparing a set of volumes to be cloned (This API requires a minimum of two volumes, a minimum of one volume to be in the &#39;in-use&#39; state, and a unique volume clone name. The Prepare action does the preparatory work for creating the snapshot volumes.)
1353
+ # @param [Hash] opts the optional parameters
1354
+ # @return [Array<(VolumesClone, Integer, Hash)>] VolumesClone data, response status code and response headers
1355
+ def pcloud_v2_volumesclone_post_with_http_info(cloud_instance_id, body, opts = {})
1356
+ if @api_client.config.debugging
1357
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_post ...'
1358
+ end
1359
+ # verify the required parameter 'cloud_instance_id' is set
1360
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1361
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_post"
1362
+ end
1363
+ # verify the required parameter 'body' is set
1364
+ if @api_client.config.client_side_validation && body.nil?
1365
+ fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVolumesApi.pcloud_v2_volumesclone_post"
1366
+ end
1367
+ # resource path
1368
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))
1369
+
1370
+ # query parameters
1371
+ query_params = opts[:query_params] || {}
1372
+
1373
+ # header parameters
1374
+ header_params = opts[:header_params] || {}
1375
+ # HTTP header 'Accept' (if needed)
1376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1377
+ # HTTP header 'Content-Type'
1378
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1379
+
1380
+ # form parameters
1381
+ form_params = opts[:form_params] || {}
1382
+
1383
+ # http body (model)
1384
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
1385
+
1386
+ # return_type
1387
+ return_type = opts[:return_type] || 'VolumesClone'
1388
+
1389
+ # auth_names
1390
+ auth_names = opts[:auth_names] || []
1391
+
1392
+ new_options = opts.merge(
1393
+ :header_params => header_params,
1394
+ :query_params => query_params,
1395
+ :form_params => form_params,
1396
+ :body => post_body,
1397
+ :auth_names => auth_names,
1398
+ :return_type => return_type
1399
+ )
1400
+
1401
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1402
+ if @api_client.config.debugging
1403
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1404
+ end
1405
+ return data, status_code, headers
1406
+ end
1407
+
1408
+ # Initiate the Start action for a volume-clone request. The Start action starts the consistency group to initiate the flash copy.
1409
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1410
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1411
+ # @param [Hash] opts the optional parameters
1412
+ # @return [VolumesClone]
1413
+ def pcloud_v2_volumesclone_start_post(cloud_instance_id, volumes_clone_id, opts = {})
1414
+ data, _status_code, _headers = pcloud_v2_volumesclone_start_post_with_http_info(cloud_instance_id, volumes_clone_id, opts)
1415
+ data
1416
+ end
1417
+
1418
+ # Initiate the Start action for a volume-clone request. The Start action starts the consistency group to initiate the flash copy.
1419
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
1420
+ # @param volumes_clone_id [String] Volumes Clone ID, can be identified by the volumes-clone id or the volumes-clone name
1421
+ # @param [Hash] opts the optional parameters
1422
+ # @return [Array<(VolumesClone, Integer, Hash)>] VolumesClone data, response status code and response headers
1423
+ def pcloud_v2_volumesclone_start_post_with_http_info(cloud_instance_id, volumes_clone_id, opts = {})
1424
+ if @api_client.config.debugging
1425
+ @api_client.config.logger.debug 'Calling API: PCloudVolumesApi.pcloud_v2_volumesclone_start_post ...'
1426
+ end
1427
+ # verify the required parameter 'cloud_instance_id' is set
1428
+ if @api_client.config.client_side_validation && cloud_instance_id.nil?
1429
+ fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_start_post"
1430
+ end
1431
+ # verify the required parameter 'volumes_clone_id' is set
1432
+ if @api_client.config.client_side_validation && volumes_clone_id.nil?
1433
+ fail ArgumentError, "Missing the required parameter 'volumes_clone_id' when calling PCloudVolumesApi.pcloud_v2_volumesclone_start_post"
1434
+ end
1435
+ # resource path
1436
+ local_var_path = '/pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'volumes_clone_id' + '}', CGI.escape(volumes_clone_id.to_s))
1437
+
1438
+ # query parameters
1439
+ query_params = opts[:query_params] || {}
1440
+
1441
+ # header parameters
1442
+ header_params = opts[:header_params] || {}
1443
+ # HTTP header 'Accept' (if needed)
1444
+ header_params['Accept'] = @api_client.select_header_accept(['*/*', 'application/json'])
1445
+
1446
+ # form parameters
1447
+ form_params = opts[:form_params] || {}
1448
+
1449
+ # http body (model)
1450
+ post_body = opts[:body]
1451
+
1452
+ # return_type
1453
+ return_type = opts[:return_type] || 'VolumesClone'
1454
+
1455
+ # auth_names
1456
+ auth_names = opts[:auth_names] || []
1457
+
1458
+ new_options = opts.merge(
1459
+ :header_params => header_params,
1460
+ :query_params => query_params,
1461
+ :form_params => form_params,
1462
+ :body => post_body,
1463
+ :auth_names => auth_names,
1464
+ :return_type => return_type
1465
+ )
1466
+
1467
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1468
+ if @api_client.config.debugging
1469
+ @api_client.config.logger.debug "API called: PCloudVolumesApi#pcloud_v2_volumesclone_start_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1470
+ end
1471
+ return data, status_code, headers
1472
+ end
1473
+
997
1474
  # Create a volume clone for specified volumes (version 1 - depricated)
998
1475
  # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
999
1476
  # @param body [VolumesCloneRequest] Parameters for the cloning of volumes