ibm_cloud_power 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +255 -0
  4. data/Rakefile +10 -0
  5. data/docs/CloneTaskReference.md +19 -0
  6. data/docs/CloneTaskStatus.md +23 -0
  7. data/docs/ClonedVolume.md +19 -0
  8. data/docs/ClonedVolumeDetail.md +19 -0
  9. data/docs/CloudInstance.md +37 -0
  10. data/docs/CloudInstanceCreate.md +29 -0
  11. data/docs/CloudInstanceReference.md +31 -0
  12. data/docs/CloudInstanceUpdate.md +25 -0
  13. data/docs/CloudInstanceUsageLimits.md +37 -0
  14. data/docs/CreateDataVolume.md +29 -0
  15. data/docs/CreateImage.md +37 -0
  16. data/docs/Error.md +19 -0
  17. data/docs/Event.md +33 -0
  18. data/docs/EventUser.md +21 -0
  19. data/docs/Events.md +17 -0
  20. data/docs/ExportImage.md +23 -0
  21. data/docs/IPAddressRange.md +19 -0
  22. data/docs/Image.md +39 -0
  23. data/docs/ImageReference.md +33 -0
  24. data/docs/ImageSpecifications.md +29 -0
  25. data/docs/ImageVolume.md +23 -0
  26. data/docs/Images.md +17 -0
  27. data/docs/MinMaxDefault.md +21 -0
  28. data/docs/MultiVolumesCreate.md +29 -0
  29. data/docs/Network.md +37 -0
  30. data/docs/NetworkCreate.md +29 -0
  31. data/docs/NetworkIpAddressMetrics.md +23 -0
  32. data/docs/NetworkPort.md +29 -0
  33. data/docs/NetworkPortCreate.md +19 -0
  34. data/docs/NetworkPortPvmInstance.md +19 -0
  35. data/docs/NetworkPortUpdate.md +19 -0
  36. data/docs/NetworkPorts.md +17 -0
  37. data/docs/NetworkReference.md +27 -0
  38. data/docs/NetworkUpdate.md +23 -0
  39. data/docs/Networks.md +17 -0
  40. data/docs/Operations.md +21 -0
  41. data/docs/PCloudEventsApi.md +114 -0
  42. data/docs/PCloudImagesApi.md +342 -0
  43. data/docs/PCloudInstancesApi.md +148 -0
  44. data/docs/PCloudNetworksApi.md +504 -0
  45. data/docs/PCloudPVMInstancesApi.md +809 -0
  46. data/docs/PCloudSAPApi.md +150 -0
  47. data/docs/PCloudSnapshotsApi.md +200 -0
  48. data/docs/PCloudSystemPoolsApi.md +54 -0
  49. data/docs/PCloudTasksApi.md +100 -0
  50. data/docs/PCloudTenantsApi.md +102 -0
  51. data/docs/PCloudTenantsSSHKeysApi.md +248 -0
  52. data/docs/PCloudVolumesApi.md +746 -0
  53. data/docs/PVMInstance.md +77 -0
  54. data/docs/PVMInstanceAction.md +17 -0
  55. data/docs/PVMInstanceAddNetwork.md +19 -0
  56. data/docs/PVMInstanceCapture.md +29 -0
  57. data/docs/PVMInstanceClone.md +31 -0
  58. data/docs/PVMInstanceConsole.md +17 -0
  59. data/docs/PVMInstanceCreate.md +53 -0
  60. data/docs/PVMInstanceFault.md +23 -0
  61. data/docs/PVMInstanceHealth.md +21 -0
  62. data/docs/PVMInstanceMultiCreate.md +21 -0
  63. data/docs/PVMInstanceNetwork.md +33 -0
  64. data/docs/PVMInstanceNetworks.md +17 -0
  65. data/docs/PVMInstanceOperation.md +19 -0
  66. data/docs/PVMInstanceReference.md +71 -0
  67. data/docs/PVMInstanceRemoveNetwork.md +17 -0
  68. data/docs/PVMInstanceUpdate.md +33 -0
  69. data/docs/PVMInstanceUpdateResponse.md +27 -0
  70. data/docs/PVMInstanceVolumeUpdate.md +17 -0
  71. data/docs/PVMInstances.md +17 -0
  72. data/docs/PeeringNetwork.md +21 -0
  73. data/docs/PinPolicy.md +16 -0
  74. data/docs/SAPCreate.md +33 -0
  75. data/docs/SAPProfile.md +25 -0
  76. data/docs/SAPProfileReference.md +19 -0
  77. data/docs/SAPProfiles.md +17 -0
  78. data/docs/SRC.md +19 -0
  79. data/docs/SSHKey.md +21 -0
  80. data/docs/SSHKeys.md +17 -0
  81. data/docs/Snapshot.md +35 -0
  82. data/docs/SnapshotCreate.md +21 -0
  83. data/docs/SnapshotCreateResponse.md +17 -0
  84. data/docs/SnapshotRestore.md +17 -0
  85. data/docs/SnapshotUpdate.md +19 -0
  86. data/docs/Snapshots.md +17 -0
  87. data/docs/SoftwareLicenses.md +25 -0
  88. data/docs/StockImage.md +21 -0
  89. data/docs/System.md +21 -0
  90. data/docs/SystemPool.md +31 -0
  91. data/docs/Task.md +33 -0
  92. data/docs/TaskReference.md +19 -0
  93. data/docs/Tenant.md +29 -0
  94. data/docs/TenantUpdate.md +19 -0
  95. data/docs/UpdateVolume.md +23 -0
  96. data/docs/VirtualCores.md +21 -0
  97. data/docs/Volume.md +41 -0
  98. data/docs/VolumeInfo.md +19 -0
  99. data/docs/VolumeReference.md +43 -0
  100. data/docs/Volumes.md +17 -0
  101. data/docs/VolumesClone.md +31 -0
  102. data/docs/VolumesCloneAsyncRequest.md +19 -0
  103. data/docs/VolumesCloneCancel.md +17 -0
  104. data/docs/VolumesCloneCreate.md +19 -0
  105. data/docs/VolumesCloneDetail.md +33 -0
  106. data/docs/VolumesCloneExecute.md +19 -0
  107. data/docs/VolumesCloneRequest.md +19 -0
  108. data/docs/VolumesCloneResponse.md +17 -0
  109. data/docs/VolumesClones.md +17 -0
  110. data/git_push.sh +58 -0
  111. data/ibm_cloud_power.gemspec +38 -0
  112. data/lib/ibm_cloud_power.rb +144 -0
  113. data/lib/ibm_cloud_power/api/p_cloud_events_api.rb +163 -0
  114. data/lib/ibm_cloud_power/api/p_cloud_images_api.rb +473 -0
  115. data/lib/ibm_cloud_power/api/p_cloud_instances_api.rb +210 -0
  116. data/lib/ibm_cloud_power/api/p_cloud_networks_api.rb +719 -0
  117. data/lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb +1166 -0
  118. data/lib/ibm_cloud_power/api/p_cloud_sap_api.rb +216 -0
  119. data/lib/ibm_cloud_power/api/p_cloud_snapshots_api.rb +288 -0
  120. data/lib/ibm_cloud_power/api/p_cloud_system_pools_api.rb +82 -0
  121. data/lib/ibm_cloud_power/api/p_cloud_tasks_api.rb +142 -0
  122. data/lib/ibm_cloud_power/api/p_cloud_tenants_api.rb +150 -0
  123. data/lib/ibm_cloud_power/api/p_cloud_tenants_ssh_keys_api.rb +356 -0
  124. data/lib/ibm_cloud_power/api/p_cloud_volumes_api.rb +1065 -0
  125. data/lib/ibm_cloud_power/api_client.rb +387 -0
  126. data/lib/ibm_cloud_power/api_error.rb +57 -0
  127. data/lib/ibm_cloud_power/configuration.rb +241 -0
  128. data/lib/ibm_cloud_power/models/clone_task_reference.rb +229 -0
  129. data/lib/ibm_cloud_power/models/clone_task_status.rb +285 -0
  130. data/lib/ibm_cloud_power/models/cloned_volume.rb +219 -0
  131. data/lib/ibm_cloud_power/models/cloned_volume_detail.rb +227 -0
  132. data/lib/ibm_cloud_power/models/cloud_instance.rb +361 -0
  133. data/lib/ibm_cloud_power/models/cloud_instance_create.rb +294 -0
  134. data/lib/ibm_cloud_power/models/cloud_instance_reference.rb +315 -0
  135. data/lib/ibm_cloud_power/models/cloud_instance_update.rb +249 -0
  136. data/lib/ibm_cloud_power/models/cloud_instance_usage_limits.rb +334 -0
  137. data/lib/ibm_cloud_power/models/create_data_volume.rb +313 -0
  138. data/lib/ibm_cloud_power/models/create_image.rb +360 -0
  139. data/lib/ibm_cloud_power/models/error.rb +217 -0
  140. data/lib/ibm_cloud_power/models/event.rb +357 -0
  141. data/lib/ibm_cloud_power/models/event_user.rb +234 -0
  142. data/lib/ibm_cloud_power/models/events.rb +216 -0
  143. data/lib/ibm_cloud_power/models/export_image.rb +249 -0
  144. data/lib/ibm_cloud_power/models/image.rb +351 -0
  145. data/lib/ibm_cloud_power/models/image_reference.rb +333 -0
  146. data/lib/ibm_cloud_power/models/image_specifications.rb +269 -0
  147. data/lib/ibm_cloud_power/models/image_volume.rb +259 -0
  148. data/lib/ibm_cloud_power/models/images.rb +216 -0
  149. data/lib/ibm_cloud_power/models/ip_address_range.rb +229 -0
  150. data/lib/ibm_cloud_power/models/min_max_default.rb +244 -0
  151. data/lib/ibm_cloud_power/models/multi_volumes_create.rb +313 -0
  152. data/lib/ibm_cloud_power/models/network.rb +395 -0
  153. data/lib/ibm_cloud_power/models/network_create.rb +314 -0
  154. data/lib/ibm_cloud_power/models/network_ip_address_metrics.rb +260 -0
  155. data/lib/ibm_cloud_power/models/network_port.rb +293 -0
  156. data/lib/ibm_cloud_power/models/network_port_create.rb +219 -0
  157. data/lib/ibm_cloud_power/models/network_port_pvm_instance.rb +220 -0
  158. data/lib/ibm_cloud_power/models/network_port_update.rb +219 -0
  159. data/lib/ibm_cloud_power/models/network_ports.rb +216 -0
  160. data/lib/ibm_cloud_power/models/network_reference.rb +325 -0
  161. data/lib/ibm_cloud_power/models/network_update.rb +243 -0
  162. data/lib/ibm_cloud_power/models/networks.rb +216 -0
  163. data/lib/ibm_cloud_power/models/operations.rb +287 -0
  164. data/lib/ibm_cloud_power/models/peering_network.rb +241 -0
  165. data/lib/ibm_cloud_power/models/pin_policy.rb +37 -0
  166. data/lib/ibm_cloud_power/models/pvm_instance.rb +612 -0
  167. data/lib/ibm_cloud_power/models/pvm_instance_action.rb +248 -0
  168. data/lib/ibm_cloud_power/models/pvm_instance_add_network.rb +224 -0
  169. data/lib/ibm_cloud_power/models/pvm_instance_capture.rb +317 -0
  170. data/lib/ibm_cloud_power/models/pvm_instance_clone.rb +328 -0
  171. data/lib/ibm_cloud_power/models/pvm_instance_console.rb +214 -0
  172. data/lib/ibm_cloud_power/models/pvm_instance_create.rb +483 -0
  173. data/lib/ibm_cloud_power/models/pvm_instance_fault.rb +240 -0
  174. data/lib/ibm_cloud_power/models/pvm_instance_health.rb +230 -0
  175. data/lib/ibm_cloud_power/models/pvm_instance_multi_create.rb +279 -0
  176. data/lib/ibm_cloud_power/models/pvm_instance_network.rb +290 -0
  177. data/lib/ibm_cloud_power/models/pvm_instance_networks.rb +216 -0
  178. data/lib/ibm_cloud_power/models/pvm_instance_operation.rb +262 -0
  179. data/lib/ibm_cloud_power/models/pvm_instance_reference.rb +566 -0
  180. data/lib/ibm_cloud_power/models/pvm_instance_remove_network.rb +209 -0
  181. data/lib/ibm_cloud_power/models/pvm_instance_update.rb +322 -0
  182. data/lib/ibm_cloud_power/models/pvm_instance_update_response.rb +292 -0
  183. data/lib/ibm_cloud_power/models/pvm_instance_volume_update.rb +214 -0
  184. data/lib/ibm_cloud_power/models/pvm_instances.rb +216 -0
  185. data/lib/ibm_cloud_power/models/sap_create.rb +311 -0
  186. data/lib/ibm_cloud_power/models/sap_profile.rb +310 -0
  187. data/lib/ibm_cloud_power/models/sap_profile_reference.rb +229 -0
  188. data/lib/ibm_cloud_power/models/sap_profiles.rb +216 -0
  189. data/lib/ibm_cloud_power/models/snapshot.rb +321 -0
  190. data/lib/ibm_cloud_power/models/snapshot_create.rb +236 -0
  191. data/lib/ibm_cloud_power/models/snapshot_create_response.rb +214 -0
  192. data/lib/ibm_cloud_power/models/snapshot_restore.rb +211 -0
  193. data/lib/ibm_cloud_power/models/snapshot_update.rb +219 -0
  194. data/lib/ibm_cloud_power/models/snapshots.rb +216 -0
  195. data/lib/ibm_cloud_power/models/software_licenses.rb +257 -0
  196. data/lib/ibm_cloud_power/models/src.rb +219 -0
  197. data/lib/ibm_cloud_power/models/ssh_key.rb +239 -0
  198. data/lib/ibm_cloud_power/models/ssh_keys.rb +216 -0
  199. data/lib/ibm_cloud_power/models/stock_image.rb +230 -0
  200. data/lib/ibm_cloud_power/models/system.rb +239 -0
  201. data/lib/ibm_cloud_power/models/system_pool.rb +277 -0
  202. data/lib/ibm_cloud_power/models/task.rb +334 -0
  203. data/lib/ibm_cloud_power/models/task_reference.rb +229 -0
  204. data/lib/ibm_cloud_power/models/tenant.rb +295 -0
  205. data/lib/ibm_cloud_power/models/tenant_update.rb +221 -0
  206. data/lib/ibm_cloud_power/models/update_volume.rb +239 -0
  207. data/lib/ibm_cloud_power/models/virtual_cores.rb +253 -0
  208. data/lib/ibm_cloud_power/models/volume.rb +356 -0
  209. data/lib/ibm_cloud_power/models/volume_info.rb +219 -0
  210. data/lib/ibm_cloud_power/models/volume_reference.rb +396 -0
  211. data/lib/ibm_cloud_power/models/volumes.rb +216 -0
  212. data/lib/ibm_cloud_power/models/volumes_clone.rb +284 -0
  213. data/lib/ibm_cloud_power/models/volumes_clone_async_request.rb +231 -0
  214. data/lib/ibm_cloud_power/models/volumes_clone_cancel.rb +209 -0
  215. data/lib/ibm_cloud_power/models/volumes_clone_create.rb +231 -0
  216. data/lib/ibm_cloud_power/models/volumes_clone_detail.rb +296 -0
  217. data/lib/ibm_cloud_power/models/volumes_clone_execute.rb +224 -0
  218. data/lib/ibm_cloud_power/models/volumes_clone_request.rb +231 -0
  219. data/lib/ibm_cloud_power/models/volumes_clone_response.rb +211 -0
  220. data/lib/ibm_cloud_power/models/volumes_clones.rb +211 -0
  221. data/lib/ibm_cloud_power/version.rb +15 -0
  222. data/spec/api/p_cloud_events_api_spec.rb +62 -0
  223. data/spec/api/p_cloud_images_api_spec.rb +117 -0
  224. data/spec/api/p_cloud_instances_api_spec.rb +69 -0
  225. data/spec/api/p_cloud_networks_api_spec.rb +161 -0
  226. data/spec/api/p_cloud_pvm_instances_api_spec.rb +240 -0
  227. data/spec/api/p_cloud_sap_api_spec.rb +70 -0
  228. data/spec/api/p_cloud_snapshots_api_spec.rb +83 -0
  229. data/spec/api/p_cloud_system_pools_api_spec.rb +46 -0
  230. data/spec/api/p_cloud_tasks_api_spec.rb +57 -0
  231. data/spec/api/p_cloud_tenants_api_spec.rb +58 -0
  232. data/spec/api/p_cloud_tenants_ssh_keys_api_spec.rb +95 -0
  233. data/spec/api/p_cloud_volumes_api_spec.rb +223 -0
  234. data/spec/api_client_spec.rb +226 -0
  235. data/spec/configuration_spec.rb +42 -0
  236. data/spec/models/clone_task_reference_spec.rb +47 -0
  237. data/spec/models/clone_task_status_spec.rb +63 -0
  238. data/spec/models/cloned_volume_detail_spec.rb +47 -0
  239. data/spec/models/cloned_volume_spec.rb +47 -0
  240. data/spec/models/cloud_instance_create_spec.rb +77 -0
  241. data/spec/models/cloud_instance_reference_spec.rb +83 -0
  242. data/spec/models/cloud_instance_spec.rb +101 -0
  243. data/spec/models/cloud_instance_update_spec.rb +65 -0
  244. data/spec/models/cloud_instance_usage_limits_spec.rb +101 -0
  245. data/spec/models/create_data_volume_spec.rb +81 -0
  246. data/spec/models/create_image_spec.rb +109 -0
  247. data/spec/models/error_spec.rb +47 -0
  248. data/spec/models/event_spec.rb +93 -0
  249. data/spec/models/event_user_spec.rb +53 -0
  250. data/spec/models/events_spec.rb +41 -0
  251. data/spec/models/export_image_spec.rb +59 -0
  252. data/spec/models/image_reference_spec.rb +89 -0
  253. data/spec/models/image_spec.rb +107 -0
  254. data/spec/models/image_specifications_spec.rb +77 -0
  255. data/spec/models/image_volume_spec.rb +59 -0
  256. data/spec/models/images_spec.rb +41 -0
  257. data/spec/models/ip_address_range_spec.rb +47 -0
  258. data/spec/models/min_max_default_spec.rb +53 -0
  259. data/spec/models/multi_volumes_create_spec.rb +81 -0
  260. data/spec/models/network_create_spec.rb +81 -0
  261. data/spec/models/network_ip_address_metrics_spec.rb +59 -0
  262. data/spec/models/network_port_create_spec.rb +47 -0
  263. data/spec/models/network_port_pvm_instance_spec.rb +47 -0
  264. data/spec/models/network_port_spec.rb +77 -0
  265. data/spec/models/network_port_update_spec.rb +47 -0
  266. data/spec/models/network_ports_spec.rb +41 -0
  267. data/spec/models/network_reference_spec.rb +75 -0
  268. data/spec/models/network_spec.rb +105 -0
  269. data/spec/models/network_update_spec.rb +59 -0
  270. data/spec/models/networks_spec.rb +41 -0
  271. data/spec/models/operations_spec.rb +65 -0
  272. data/spec/models/peering_network_spec.rb +53 -0
  273. data/spec/models/pin_policy_spec.rb +35 -0
  274. data/spec/models/pvm_instance_action_spec.rb +45 -0
  275. data/spec/models/pvm_instance_add_network_spec.rb +47 -0
  276. data/spec/models/pvm_instance_capture_spec.rb +81 -0
  277. data/spec/models/pvm_instance_clone_spec.rb +87 -0
  278. data/spec/models/pvm_instance_console_spec.rb +41 -0
  279. data/spec/models/pvm_instance_create_spec.rb +161 -0
  280. data/spec/models/pvm_instance_fault_spec.rb +59 -0
  281. data/spec/models/pvm_instance_health_spec.rb +53 -0
  282. data/spec/models/pvm_instance_multi_create_spec.rb +61 -0
  283. data/spec/models/pvm_instance_network_spec.rb +89 -0
  284. data/spec/models/pvm_instance_networks_spec.rb +41 -0
  285. data/spec/models/pvm_instance_operation_spec.rb +51 -0
  286. data/spec/models/pvm_instance_reference_spec.rb +207 -0
  287. data/spec/models/pvm_instance_remove_network_spec.rb +41 -0
  288. data/spec/models/pvm_instance_spec.rb +225 -0
  289. data/spec/models/pvm_instance_update_response_spec.rb +75 -0
  290. data/spec/models/pvm_instance_update_spec.rb +93 -0
  291. data/spec/models/pvm_instance_volume_update_spec.rb +41 -0
  292. data/spec/models/pvm_instances_spec.rb +41 -0
  293. data/spec/models/sap_create_spec.rb +89 -0
  294. data/spec/models/sap_profile_reference_spec.rb +47 -0
  295. data/spec/models/sap_profile_spec.rb +69 -0
  296. data/spec/models/sap_profiles_spec.rb +41 -0
  297. data/spec/models/snapshot_create_response_spec.rb +41 -0
  298. data/spec/models/snapshot_create_spec.rb +53 -0
  299. data/spec/models/snapshot_restore_spec.rb +41 -0
  300. data/spec/models/snapshot_spec.rb +95 -0
  301. data/spec/models/snapshot_update_spec.rb +47 -0
  302. data/spec/models/snapshots_spec.rb +41 -0
  303. data/spec/models/software_licenses_spec.rb +65 -0
  304. data/spec/models/src_spec.rb +47 -0
  305. data/spec/models/ssh_key_spec.rb +53 -0
  306. data/spec/models/ssh_keys_spec.rb +41 -0
  307. data/spec/models/stock_image_spec.rb +53 -0
  308. data/spec/models/system_pool_spec.rb +83 -0
  309. data/spec/models/system_spec.rb +53 -0
  310. data/spec/models/task_reference_spec.rb +47 -0
  311. data/spec/models/task_spec.rb +89 -0
  312. data/spec/models/tenant_spec.rb +77 -0
  313. data/spec/models/tenant_update_spec.rb +47 -0
  314. data/spec/models/update_volume_spec.rb +59 -0
  315. data/spec/models/virtual_cores_spec.rb +53 -0
  316. data/spec/models/volume_info_spec.rb +47 -0
  317. data/spec/models/volume_reference_spec.rb +119 -0
  318. data/spec/models/volume_spec.rb +113 -0
  319. data/spec/models/volumes_clone_async_request_spec.rb +47 -0
  320. data/spec/models/volumes_clone_cancel_spec.rb +41 -0
  321. data/spec/models/volumes_clone_create_spec.rb +47 -0
  322. data/spec/models/volumes_clone_detail_spec.rb +89 -0
  323. data/spec/models/volumes_clone_execute_spec.rb +47 -0
  324. data/spec/models/volumes_clone_request_spec.rb +47 -0
  325. data/spec/models/volumes_clone_response_spec.rb +47 -0
  326. data/spec/models/volumes_clone_spec.rb +83 -0
  327. data/spec/models/volumes_clones_spec.rb +41 -0
  328. data/spec/models/volumes_spec.rb +41 -0
  329. data/spec/spec_helper.rb +111 -0
  330. metadata +519 -0
@@ -0,0 +1,216 @@
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 PCloudSAPApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get the information on an SAP profile
23
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
24
+ # @param sap_profile_id [String] SAP Profile ID
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [SAPProfile]
27
+ def pcloud_sap_get(cloud_instance_id, sap_profile_id, opts = {})
28
+ data, _status_code, _headers = pcloud_sap_get_with_http_info(cloud_instance_id, sap_profile_id, opts)
29
+ data
30
+ end
31
+
32
+ # Get the information on an SAP profile
33
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
34
+ # @param sap_profile_id [String] SAP Profile ID
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(SAPProfile, Integer, Hash)>] SAPProfile data, response status code and response headers
37
+ def pcloud_sap_get_with_http_info(cloud_instance_id, sap_profile_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PCloudSAPApi.pcloud_sap_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 PCloudSAPApi.pcloud_sap_get"
44
+ end
45
+ # verify the required parameter 'sap_profile_id' is set
46
+ if @api_client.config.client_side_validation && sap_profile_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'sap_profile_id' when calling PCloudSAPApi.pcloud_sap_get"
48
+ end
49
+ # resource path
50
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'sap_profile_id' + '}', CGI.escape(sap_profile_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] || 'SAPProfile'
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: PCloudSAPApi#pcloud_sap_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Get list of SAP profiles
89
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [SAPProfiles]
92
+ def pcloud_sap_getall(cloud_instance_id, opts = {})
93
+ data, _status_code, _headers = pcloud_sap_getall_with_http_info(cloud_instance_id, opts)
94
+ data
95
+ end
96
+
97
+ # Get list of SAP profiles
98
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(SAPProfiles, Integer, Hash)>] SAPProfiles data, response status code and response headers
101
+ def pcloud_sap_getall_with_http_info(cloud_instance_id, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: PCloudSAPApi.pcloud_sap_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 PCloudSAPApi.pcloud_sap_getall"
108
+ end
109
+ # resource path
110
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/sap'.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] || 'SAPProfiles'
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: PCloudSAPApi#pcloud_sap_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Create a new SAP PVM Instance
149
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
150
+ # @param body [SAPCreate] Parameters for the creation of a new SAP PVM Instance
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<PVMInstance>]
153
+ def pcloud_sap_post(cloud_instance_id, body, opts = {})
154
+ data, _status_code, _headers = pcloud_sap_post_with_http_info(cloud_instance_id, body, opts)
155
+ data
156
+ end
157
+
158
+ # Create a new SAP PVM Instance
159
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
160
+ # @param body [SAPCreate] Parameters for the creation of a new SAP PVM Instance
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(Array<PVMInstance>, Integer, Hash)>] Array<PVMInstance> data, response status code and response headers
163
+ def pcloud_sap_post_with_http_info(cloud_instance_id, body, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: PCloudSAPApi.pcloud_sap_post ...'
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 PCloudSAPApi.pcloud_sap_post"
170
+ end
171
+ # verify the required parameter 'body' is set
172
+ if @api_client.config.client_side_validation && body.nil?
173
+ fail ArgumentError, "Missing the required parameter 'body' when calling PCloudSAPApi.pcloud_sap_post"
174
+ end
175
+ # resource path
176
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/sap'.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
+ # HTTP header 'Content-Type'
186
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
187
+
188
+ # form parameters
189
+ form_params = opts[:form_params] || {}
190
+
191
+ # http body (model)
192
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
193
+
194
+ # return_type
195
+ return_type = opts[:return_type] || 'Array<PVMInstance>'
196
+
197
+ # auth_names
198
+ auth_names = opts[:auth_names] || []
199
+
200
+ new_options = opts.merge(
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => return_type
207
+ )
208
+
209
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug "API called: PCloudSAPApi#pcloud_sap_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
212
+ end
213
+ return data, status_code, headers
214
+ end
215
+ end
216
+ end
@@ -0,0 +1,288 @@
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 PCloudSnapshotsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a PVM instance snapshot of a cloud instance
23
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
24
+ # @param snapshot_id [String] PVM Instance snapshot id
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Object]
27
+ def pcloud_cloudinstances_snapshots_delete(cloud_instance_id, snapshot_id, opts = {})
28
+ data, _status_code, _headers = pcloud_cloudinstances_snapshots_delete_with_http_info(cloud_instance_id, snapshot_id, opts)
29
+ data
30
+ end
31
+
32
+ # Delete a PVM instance snapshot of a cloud instance
33
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
34
+ # @param snapshot_id [String] PVM Instance snapshot id
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
37
+ def pcloud_cloudinstances_snapshots_delete_with_http_info(cloud_instance_id, snapshot_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_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 PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_delete"
44
+ end
45
+ # verify the required parameter 'snapshot_id' is set
46
+ if @api_client.config.client_side_validation && snapshot_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_delete"
48
+ end
49
+ # resource path
50
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'snapshot_id' + '}', CGI.escape(snapshot_id.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:body]
65
+
66
+ # return_type
67
+ return_type = opts[:return_type] || 'Object'
68
+
69
+ # auth_names
70
+ auth_names = opts[:auth_names] || []
71
+
72
+ new_options = opts.merge(
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: PCloudSnapshotsApi#pcloud_cloudinstances_snapshots_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Get the detail of a snapshot
89
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
90
+ # @param snapshot_id [String] PVM Instance snapshot id
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Snapshot]
93
+ def pcloud_cloudinstances_snapshots_get(cloud_instance_id, snapshot_id, opts = {})
94
+ data, _status_code, _headers = pcloud_cloudinstances_snapshots_get_with_http_info(cloud_instance_id, snapshot_id, opts)
95
+ data
96
+ end
97
+
98
+ # Get the detail of a snapshot
99
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
100
+ # @param snapshot_id [String] PVM Instance snapshot id
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers
103
+ def pcloud_cloudinstances_snapshots_get_with_http_info(cloud_instance_id, snapshot_id, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_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 PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_get"
110
+ end
111
+ # verify the required parameter 'snapshot_id' is set
112
+ if @api_client.config.client_side_validation && snapshot_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_get"
114
+ end
115
+ # resource path
116
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'snapshot_id' + '}', CGI.escape(snapshot_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] || 'Snapshot'
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: PCloudSnapshotsApi#pcloud_cloudinstances_snapshots_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # List all PVM instance snapshots for this cloud instance
155
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [Snapshots]
158
+ def pcloud_cloudinstances_snapshots_getall(cloud_instance_id, opts = {})
159
+ data, _status_code, _headers = pcloud_cloudinstances_snapshots_getall_with_http_info(cloud_instance_id, opts)
160
+ data
161
+ end
162
+
163
+ # List all PVM instance snapshots for this 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<(Snapshots, Integer, Hash)>] Snapshots data, response status code and response headers
167
+ def pcloud_cloudinstances_snapshots_getall_with_http_info(cloud_instance_id, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_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 PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_getall"
174
+ end
175
+ # resource path
176
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots'.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] || 'Snapshots'
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: PCloudSnapshotsApi#pcloud_cloudinstances_snapshots_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
214
+ # Update a PVM instance snapshot
215
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
216
+ # @param snapshot_id [String] PVM Instance snapshot id
217
+ # @param body [SnapshotUpdate] Parameters for the update of a PVM instance snapshot
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Object]
220
+ def pcloud_cloudinstances_snapshots_put(cloud_instance_id, snapshot_id, body, opts = {})
221
+ data, _status_code, _headers = pcloud_cloudinstances_snapshots_put_with_http_info(cloud_instance_id, snapshot_id, body, opts)
222
+ data
223
+ end
224
+
225
+ # Update a PVM instance snapshot
226
+ # @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
227
+ # @param snapshot_id [String] PVM Instance snapshot id
228
+ # @param body [SnapshotUpdate] Parameters for the update of a PVM instance snapshot
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
231
+ def pcloud_cloudinstances_snapshots_put_with_http_info(cloud_instance_id, snapshot_id, body, opts = {})
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug 'Calling API: PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_put ...'
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 PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_put"
238
+ end
239
+ # verify the required parameter 'snapshot_id' is set
240
+ if @api_client.config.client_side_validation && snapshot_id.nil?
241
+ fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_put"
242
+ end
243
+ # verify the required parameter 'body' is set
244
+ if @api_client.config.client_side_validation && body.nil?
245
+ fail ArgumentError, "Missing the required parameter 'body' when calling PCloudSnapshotsApi.pcloud_cloudinstances_snapshots_put"
246
+ end
247
+ # resource path
248
+ local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'snapshot_id' + '}', CGI.escape(snapshot_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
+ # HTTP header 'Content-Type'
258
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
259
+
260
+ # form parameters
261
+ form_params = opts[:form_params] || {}
262
+
263
+ # http body (model)
264
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
265
+
266
+ # return_type
267
+ return_type = opts[:return_type] || 'Object'
268
+
269
+ # auth_names
270
+ auth_names = opts[:auth_names] || []
271
+
272
+ new_options = opts.merge(
273
+ :header_params => header_params,
274
+ :query_params => query_params,
275
+ :form_params => form_params,
276
+ :body => post_body,
277
+ :auth_names => auth_names,
278
+ :return_type => return_type
279
+ )
280
+
281
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
282
+ if @api_client.config.debugging
283
+ @api_client.config.logger.debug "API called: PCloudSnapshotsApi#pcloud_cloudinstances_snapshots_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
284
+ end
285
+ return data, status_code, headers
286
+ end
287
+ end
288
+ end