autosde_openapi_client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -7
  3. data/docs/AbstractCapabilityApi.md +6 -6
  4. data/docs/AccountApi.md +9 -9
  5. data/docs/AddressApi.md +6 -6
  6. data/docs/AuthenticationApi.md +1 -1
  7. data/docs/AutoSDEProjectApi.md +6 -6
  8. data/docs/AutoSDERoleApi.md +6 -6
  9. data/docs/CapabilityTranslationApi.md +6 -6
  10. data/docs/HostApi.md +6 -6
  11. data/docs/HostVolumeConnectionApi.md +6 -6
  12. data/docs/Job.md +29 -0
  13. data/docs/JobApi.md +104 -0
  14. data/docs/JobCreate.md +19 -0
  15. data/docs/NativeCapabilityApi.md +6 -6
  16. data/docs/ProfileApi.md +6 -6
  17. data/docs/ProvisioningStrategyApi.md +6 -6
  18. data/docs/ServiceApi.md +9 -9
  19. data/docs/ServiceResourceAttachmentApi.md +6 -6
  20. data/docs/Snapshot.md +25 -0
  21. data/docs/SnapshotApi.md +204 -0
  22. data/docs/SnapshotCreate.md +23 -0
  23. data/docs/StorageHost.md +29 -0
  24. data/docs/StorageHostApi.md +256 -0
  25. data/docs/StorageHostCreate.md +37 -0
  26. data/docs/StorageHostResponse.md +31 -0
  27. data/docs/StorageHostUpdate.md +21 -0
  28. data/docs/StorageHostVolumeMapping.md +25 -0
  29. data/docs/StorageHostVolumeMappingApi.md +204 -0
  30. data/docs/StorageHostVolumeMappingCreate.md +23 -0
  31. data/docs/StorageResourceApi.md +9 -9
  32. data/docs/StorageSystemApi.md +6 -6
  33. data/docs/SystemTypeApi.md +6 -6
  34. data/docs/Volume.md +2 -0
  35. data/docs/VolumeApi.md +9 -9
  36. data/docs/VolumeCreate.md +2 -0
  37. data/docs/VolumeResponse.md +2 -0
  38. data/docs/VolumeSafeDeleteApi.md +6 -6
  39. data/docs/VolumeUpdate.md +3 -1
  40. data/lib/openapi_client.rb +108 -0
  41. data/lib/{autosde_openapi_client → openapi_client}/api/abstract_capability_api.rb +19 -15
  42. data/lib/{autosde_openapi_client → openapi_client}/api/account_api.rb +25 -20
  43. data/lib/{autosde_openapi_client → openapi_client}/api/address_api.rb +19 -15
  44. data/lib/{autosde_openapi_client → openapi_client}/api/authentication_api.rb +5 -4
  45. data/lib/{autosde_openapi_client → openapi_client}/api/auto_sde_project_api.rb +19 -15
  46. data/lib/{autosde_openapi_client → openapi_client}/api/auto_sde_role_api.rb +19 -15
  47. data/lib/{autosde_openapi_client → openapi_client}/api/capability_translation_api.rb +19 -15
  48. data/lib/{autosde_openapi_client → openapi_client}/api/host_api.rb +19 -15
  49. data/lib/{autosde_openapi_client → openapi_client}/api/host_volume_connection_api.rb +19 -15
  50. data/lib/openapi_client/api/job_api.rb +136 -0
  51. data/lib/{autosde_openapi_client → openapi_client}/api/native_capability_api.rb +19 -15
  52. data/lib/{autosde_openapi_client → openapi_client}/api/profile_api.rb +19 -15
  53. data/lib/{autosde_openapi_client → openapi_client}/api/provisioning_strategy_api.rb +19 -15
  54. data/lib/{autosde_openapi_client → openapi_client}/api/service_api.rb +25 -20
  55. data/lib/{autosde_openapi_client → openapi_client}/api/service_resource_attachment_api.rb +19 -15
  56. data/lib/openapi_client/api/snapshot_api.rb +254 -0
  57. data/lib/openapi_client/api/storage_host_api.rb +321 -0
  58. data/lib/openapi_client/api/storage_host_volume_mapping_api.rb +254 -0
  59. data/lib/{autosde_openapi_client → openapi_client}/api/storage_resource_api.rb +25 -20
  60. data/lib/{autosde_openapi_client → openapi_client}/api/storage_system_api.rb +19 -15
  61. data/lib/{autosde_openapi_client → openapi_client}/api/system_type_api.rb +19 -15
  62. data/lib/{autosde_openapi_client → openapi_client}/api/volume_api.rb +25 -20
  63. data/lib/{autosde_openapi_client → openapi_client}/api/volume_safe_delete_api.rb +19 -15
  64. data/lib/{autosde_openapi_client → openapi_client}/api_client.rb +46 -45
  65. data/lib/{autosde_openapi_client → openapi_client}/api_error.rb +1 -1
  66. data/lib/{autosde_openapi_client → openapi_client}/configuration.rb +34 -7
  67. data/lib/{autosde_openapi_client → openapi_client}/models/abstract_capability.rb +9 -5
  68. data/lib/{autosde_openapi_client → openapi_client}/models/account.rb +9 -5
  69. data/lib/{autosde_openapi_client → openapi_client}/models/account_post_request.rb +9 -5
  70. data/lib/{autosde_openapi_client → openapi_client}/models/account_post_response.rb +9 -5
  71. data/lib/{autosde_openapi_client → openapi_client}/models/address.rb +9 -5
  72. data/lib/{autosde_openapi_client → openapi_client}/models/address_create.rb +9 -5
  73. data/lib/{autosde_openapi_client → openapi_client}/models/auth_response.rb +9 -5
  74. data/lib/{autosde_openapi_client → openapi_client}/models/authentication.rb +9 -5
  75. data/lib/{autosde_openapi_client → openapi_client}/models/auto_sde_project.rb +9 -5
  76. data/lib/{autosde_openapi_client → openapi_client}/models/auto_sde_role.rb +9 -5
  77. data/lib/{autosde_openapi_client → openapi_client}/models/capability_translation.rb +9 -5
  78. data/lib/{autosde_openapi_client → openapi_client}/models/capability_translation_create.rb +9 -5
  79. data/lib/{autosde_openapi_client → openapi_client}/models/host.rb +9 -5
  80. data/lib/{autosde_openapi_client → openapi_client}/models/host_create.rb +9 -5
  81. data/lib/{autosde_openapi_client → openapi_client}/models/host_volume_connection.rb +9 -5
  82. data/lib/{autosde_openapi_client → openapi_client}/models/host_volume_connection_create.rb +9 -5
  83. data/lib/openapi_client/models/job.rb +272 -0
  84. data/lib/openapi_client/models/job_create.rb +222 -0
  85. data/lib/{autosde_openapi_client → openapi_client}/models/native_capability.rb +9 -5
  86. data/lib/{autosde_openapi_client → openapi_client}/models/profile.rb +9 -5
  87. data/lib/{autosde_openapi_client → openapi_client}/models/provisioning_strategy.rb +9 -5
  88. data/lib/{autosde_openapi_client → openapi_client}/models/service.rb +9 -5
  89. data/lib/{autosde_openapi_client → openapi_client}/models/service_abstract_capability_value.rb +9 -5
  90. data/lib/{autosde_openapi_client → openapi_client}/models/service_create.rb +9 -5
  91. data/lib/{autosde_openapi_client → openapi_client}/models/service_resource_attachment.rb +9 -5
  92. data/lib/openapi_client/models/snapshot.rb +290 -0
  93. data/lib/openapi_client/models/snapshot_create.rb +280 -0
  94. data/lib/openapi_client/models/storage_host.rb +309 -0
  95. data/lib/openapi_client/models/storage_host_create.rb +360 -0
  96. data/lib/openapi_client/models/storage_host_response.rb +325 -0
  97. data/lib/openapi_client/models/storage_host_update.rb +293 -0
  98. data/lib/openapi_client/models/storage_host_volume_mapping.rb +291 -0
  99. data/lib/openapi_client/models/storage_host_volume_mapping_create.rb +283 -0
  100. data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource.rb +9 -5
  101. data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource_create.rb +9 -5
  102. data/lib/{autosde_openapi_client → openapi_client}/models/storage_resource_response.rb +9 -5
  103. data/lib/{autosde_openapi_client → openapi_client}/models/storage_system.rb +9 -5
  104. data/lib/{autosde_openapi_client → openapi_client}/models/storage_system_create.rb +9 -5
  105. data/lib/{autosde_openapi_client → openapi_client}/models/system_type.rb +9 -5
  106. data/lib/{autosde_openapi_client → openapi_client}/models/system_type_create.rb +9 -5
  107. data/lib/{autosde_openapi_client → openapi_client}/models/volume.rb +20 -6
  108. data/lib/{autosde_openapi_client → openapi_client}/models/volume_create.rb +20 -6
  109. data/lib/{autosde_openapi_client → openapi_client}/models/volume_response.rb +20 -6
  110. data/lib/{autosde_openapi_client → openapi_client}/models/volume_safe_delete.rb +9 -5
  111. data/lib/{autosde_openapi_client → openapi_client}/models/volume_safe_delete_create.rb +9 -5
  112. data/lib/{autosde_openapi_client → openapi_client}/models/volume_update.rb +22 -6
  113. data/lib/{autosde_openapi_client → openapi_client}/version.rb +2 -2
  114. data/{autosde_openapi_client.gemspec → openapi_client.gemspec} +3 -4
  115. data/spec/api/abstract_capability_api_spec.rb +1 -1
  116. data/spec/api/account_api_spec.rb +1 -1
  117. data/spec/api/address_api_spec.rb +1 -1
  118. data/spec/api/authentication_api_spec.rb +1 -1
  119. data/spec/api/auto_sde_project_api_spec.rb +1 -1
  120. data/spec/api/auto_sde_role_api_spec.rb +1 -1
  121. data/spec/api/capability_translation_api_spec.rb +1 -1
  122. data/spec/api/host_api_spec.rb +1 -1
  123. data/spec/api/host_volume_connection_api_spec.rb +1 -1
  124. data/spec/api/job_api_spec.rb +54 -0
  125. data/spec/api/native_capability_api_spec.rb +1 -1
  126. data/spec/api/profile_api_spec.rb +1 -1
  127. data/spec/api/provisioning_strategy_api_spec.rb +1 -1
  128. data/spec/api/service_api_spec.rb +1 -1
  129. data/spec/api/service_resource_attachment_api_spec.rb +1 -1
  130. data/spec/api/snapshot_api_spec.rb +74 -0
  131. data/spec/api/storage_host_api_spec.rb +74 -0
  132. data/spec/api/storage_host_volume_mapping_api_spec.rb +74 -0
  133. data/spec/api/storage_resource_api_spec.rb +1 -1
  134. data/spec/api/storage_system_api_spec.rb +1 -1
  135. data/spec/api/system_type_api_spec.rb +1 -1
  136. data/spec/api/volume_api_spec.rb +1 -1
  137. data/spec/api/volume_safe_delete_api_spec.rb +1 -1
  138. data/spec/api_client_spec.rb +1 -1
  139. data/spec/configuration_spec.rb +1 -1
  140. data/spec/models/abstract_capability_spec.rb +1 -1
  141. data/spec/models/account_post_request_spec.rb +1 -1
  142. data/spec/models/account_post_response_spec.rb +1 -1
  143. data/spec/models/account_spec.rb +1 -1
  144. data/spec/models/address_create_spec.rb +1 -1
  145. data/spec/models/address_spec.rb +1 -1
  146. data/spec/models/auth_response_spec.rb +1 -1
  147. data/spec/models/authentication_spec.rb +1 -1
  148. data/spec/models/auto_sde_project_spec.rb +1 -1
  149. data/spec/models/auto_sde_role_spec.rb +1 -1
  150. data/spec/models/capability_translation_create_spec.rb +1 -1
  151. data/spec/models/capability_translation_spec.rb +1 -1
  152. data/spec/models/host_create_spec.rb +1 -1
  153. data/spec/models/host_spec.rb +1 -1
  154. data/spec/models/host_volume_connection_create_spec.rb +1 -1
  155. data/spec/models/host_volume_connection_spec.rb +1 -1
  156. data/spec/models/job_create_spec.rb +47 -0
  157. data/spec/models/job_spec.rb +77 -0
  158. data/spec/models/native_capability_spec.rb +1 -1
  159. data/spec/models/profile_spec.rb +1 -1
  160. data/spec/models/provisioning_strategy_spec.rb +1 -1
  161. data/spec/models/service_abstract_capability_value_spec.rb +1 -1
  162. data/spec/models/service_create_spec.rb +1 -1
  163. data/spec/models/service_resource_attachment_spec.rb +1 -1
  164. data/spec/models/service_spec.rb +1 -1
  165. data/spec/models/snapshot_create_spec.rb +63 -0
  166. data/spec/models/snapshot_spec.rb +69 -0
  167. data/spec/models/storage_host_create_spec.rb +109 -0
  168. data/spec/models/storage_host_response_spec.rb +87 -0
  169. data/spec/models/storage_host_spec.rb +81 -0
  170. data/spec/models/storage_host_update_spec.rb +61 -0
  171. data/spec/models/storage_host_volume_mapping_create_spec.rb +63 -0
  172. data/spec/models/storage_host_volume_mapping_spec.rb +69 -0
  173. data/spec/models/storage_resource_create_spec.rb +1 -1
  174. data/spec/models/storage_resource_response_spec.rb +1 -1
  175. data/spec/models/storage_resource_spec.rb +1 -1
  176. data/spec/models/storage_system_create_spec.rb +1 -1
  177. data/spec/models/storage_system_spec.rb +1 -1
  178. data/spec/models/system_type_create_spec.rb +1 -1
  179. data/spec/models/system_type_spec.rb +1 -1
  180. data/spec/models/volume_create_spec.rb +1 -1
  181. data/spec/models/volume_response_spec.rb +1 -1
  182. data/spec/models/volume_safe_delete_create_spec.rb +1 -1
  183. data/spec/models/volume_safe_delete_spec.rb +1 -1
  184. data/spec/models/volume_spec.rb +1 -1
  185. data/spec/models/volume_update_spec.rb +7 -1
  186. data/spec/spec_helper.rb +2 -2
  187. metadata +142 -106
  188. data/lib/autosde_openapi_client.rb +0 -94
  189. data/site_manager_oas.json +0 -3992
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -47,15 +47,16 @@ module OpenapiClient
47
47
  form_params = opts[:form_params] || {}
48
48
 
49
49
  # http body (model)
50
- post_body = opts[:body]
50
+ post_body = opts[:debug_body]
51
51
 
52
52
  # return_type
53
- return_type = opts[:return_type] || 'Array<SystemType>'
53
+ return_type = opts[:debug_return_type] || 'Array<SystemType>'
54
54
 
55
55
  # auth_names
56
- auth_names = opts[:auth_names] || ['bearerAuth']
56
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
57
57
 
58
58
  new_options = opts.merge(
59
+ :operation => :"SystemTypeApi.system_types_get",
59
60
  :header_params => header_params,
60
61
  :query_params => query_params,
61
62
  :form_params => form_params,
@@ -105,15 +106,16 @@ module OpenapiClient
105
106
  form_params = opts[:form_params] || {}
106
107
 
107
108
  # http body (model)
108
- post_body = opts[:body]
109
+ post_body = opts[:debug_body]
109
110
 
110
111
  # return_type
111
- return_type = opts[:return_type] || 'Array<SystemType>'
112
+ return_type = opts[:debug_return_type] || 'Array<SystemType>'
112
113
 
113
114
  # auth_names
114
- auth_names = opts[:auth_names] || ['bearerAuth']
115
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
115
116
 
116
117
  new_options = opts.merge(
118
+ :operation => :"SystemTypeApi.system_types_pk_delete",
117
119
  :header_params => header_params,
118
120
  :query_params => query_params,
119
121
  :form_params => form_params,
@@ -163,15 +165,16 @@ module OpenapiClient
163
165
  form_params = opts[:form_params] || {}
164
166
 
165
167
  # http body (model)
166
- post_body = opts[:body]
168
+ post_body = opts[:debug_body]
167
169
 
168
170
  # return_type
169
- return_type = opts[:return_type] || 'Array<SystemType>'
171
+ return_type = opts[:debug_return_type] || 'Array<SystemType>'
170
172
 
171
173
  # auth_names
172
- auth_names = opts[:auth_names] || ['bearerAuth']
174
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
173
175
 
174
176
  new_options = opts.merge(
177
+ :operation => :"SystemTypeApi.system_types_pk_get",
175
178
  :header_params => header_params,
176
179
  :query_params => query_params,
177
180
  :form_params => form_params,
@@ -189,7 +192,7 @@ module OpenapiClient
189
192
 
190
193
  # @param system_type_create [SystemTypeCreate]
191
194
  # @param [Hash] opts the optional parameters
192
- # @return [Array<SystemType>]
195
+ # @return [SystemType]
193
196
  def system_types_post(system_type_create, opts = {})
194
197
  data, _status_code, _headers = system_types_post_with_http_info(system_type_create, opts)
195
198
  data
@@ -197,7 +200,7 @@ module OpenapiClient
197
200
 
198
201
  # @param system_type_create [SystemTypeCreate]
199
202
  # @param [Hash] opts the optional parameters
200
- # @return [Array<(Array<SystemType>, Integer, Hash)>] Array<SystemType> data, response status code and response headers
203
+ # @return [Array<(SystemType, Integer, Hash)>] SystemType data, response status code and response headers
201
204
  def system_types_post_with_http_info(system_type_create, opts = {})
202
205
  if @api_client.config.debugging
203
206
  @api_client.config.logger.debug 'Calling API: SystemTypeApi.system_types_post ...'
@@ -223,15 +226,16 @@ module OpenapiClient
223
226
  form_params = opts[:form_params] || {}
224
227
 
225
228
  # http body (model)
226
- post_body = opts[:body] || @api_client.object_to_http_body(system_type_create)
229
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(system_type_create)
227
230
 
228
231
  # return_type
229
- return_type = opts[:return_type] || 'Array<SystemType>'
232
+ return_type = opts[:debug_return_type] || 'SystemType'
230
233
 
231
234
  # auth_names
232
- auth_names = opts[:auth_names] || ['bearerAuth']
235
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
233
236
 
234
237
  new_options = opts.merge(
238
+ :operation => :"SystemTypeApi.system_types_post",
235
239
  :header_params => header_params,
236
240
  :query_params => query_params,
237
241
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -47,15 +47,16 @@ module OpenapiClient
47
47
  form_params = opts[:form_params] || {}
48
48
 
49
49
  # http body (model)
50
- post_body = opts[:body]
50
+ post_body = opts[:debug_body]
51
51
 
52
52
  # return_type
53
- return_type = opts[:return_type] || 'Array<VolumeResponse>'
53
+ return_type = opts[:debug_return_type] || 'Array<VolumeResponse>'
54
54
 
55
55
  # auth_names
56
- auth_names = opts[:auth_names] || ['bearerAuth']
56
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
57
57
 
58
58
  new_options = opts.merge(
59
+ :operation => :"VolumeApi.volumes_get",
59
60
  :header_params => header_params,
60
61
  :query_params => query_params,
61
62
  :form_params => form_params,
@@ -105,15 +106,16 @@ module OpenapiClient
105
106
  form_params = opts[:form_params] || {}
106
107
 
107
108
  # http body (model)
108
- post_body = opts[:body]
109
+ post_body = opts[:debug_body]
109
110
 
110
111
  # return_type
111
- return_type = opts[:return_type] || 'Array<Volume>'
112
+ return_type = opts[:debug_return_type] || 'Array<Volume>'
112
113
 
113
114
  # auth_names
114
- auth_names = opts[:auth_names] || ['bearerAuth']
115
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
115
116
 
116
117
  new_options = opts.merge(
118
+ :operation => :"VolumeApi.volumes_pk_delete",
117
119
  :header_params => header_params,
118
120
  :query_params => query_params,
119
121
  :form_params => form_params,
@@ -163,15 +165,16 @@ module OpenapiClient
163
165
  form_params = opts[:form_params] || {}
164
166
 
165
167
  # http body (model)
166
- post_body = opts[:body]
168
+ post_body = opts[:debug_body]
167
169
 
168
170
  # return_type
169
- return_type = opts[:return_type] || 'Array<VolumeResponse>'
171
+ return_type = opts[:debug_return_type] || 'Array<VolumeResponse>'
170
172
 
171
173
  # auth_names
172
- auth_names = opts[:auth_names] || ['bearerAuth']
174
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
173
175
 
174
176
  new_options = opts.merge(
177
+ :operation => :"VolumeApi.volumes_pk_get",
175
178
  :header_params => header_params,
176
179
  :query_params => query_params,
177
180
  :form_params => form_params,
@@ -190,7 +193,7 @@ module OpenapiClient
190
193
  # @param pk [Integer]
191
194
  # @param volume_update [VolumeUpdate]
192
195
  # @param [Hash] opts the optional parameters
193
- # @return [Array<VolumeResponse>]
196
+ # @return [VolumeResponse]
194
197
  def volumes_pk_put(pk, volume_update, opts = {})
195
198
  data, _status_code, _headers = volumes_pk_put_with_http_info(pk, volume_update, opts)
196
199
  data
@@ -199,7 +202,7 @@ module OpenapiClient
199
202
  # @param pk [Integer]
200
203
  # @param volume_update [VolumeUpdate]
201
204
  # @param [Hash] opts the optional parameters
202
- # @return [Array<(Array<VolumeResponse>, Integer, Hash)>] Array<VolumeResponse> data, response status code and response headers
205
+ # @return [Array<(VolumeResponse, Integer, Hash)>] VolumeResponse data, response status code and response headers
203
206
  def volumes_pk_put_with_http_info(pk, volume_update, opts = {})
204
207
  if @api_client.config.debugging
205
208
  @api_client.config.logger.debug 'Calling API: VolumeApi.volumes_pk_put ...'
@@ -229,15 +232,16 @@ module OpenapiClient
229
232
  form_params = opts[:form_params] || {}
230
233
 
231
234
  # http body (model)
232
- post_body = opts[:body] || @api_client.object_to_http_body(volume_update)
235
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(volume_update)
233
236
 
234
237
  # return_type
235
- return_type = opts[:return_type] || 'Array<VolumeResponse>'
238
+ return_type = opts[:debug_return_type] || 'VolumeResponse'
236
239
 
237
240
  # auth_names
238
- auth_names = opts[:auth_names] || ['bearerAuth']
241
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
239
242
 
240
243
  new_options = opts.merge(
244
+ :operation => :"VolumeApi.volumes_pk_put",
241
245
  :header_params => header_params,
242
246
  :query_params => query_params,
243
247
  :form_params => form_params,
@@ -255,7 +259,7 @@ module OpenapiClient
255
259
 
256
260
  # @param volume_create [VolumeCreate]
257
261
  # @param [Hash] opts the optional parameters
258
- # @return [Array<VolumeResponse>]
262
+ # @return [VolumeResponse]
259
263
  def volumes_post(volume_create, opts = {})
260
264
  data, _status_code, _headers = volumes_post_with_http_info(volume_create, opts)
261
265
  data
@@ -263,7 +267,7 @@ module OpenapiClient
263
267
 
264
268
  # @param volume_create [VolumeCreate]
265
269
  # @param [Hash] opts the optional parameters
266
- # @return [Array<(Array<VolumeResponse>, Integer, Hash)>] Array<VolumeResponse> data, response status code and response headers
270
+ # @return [Array<(VolumeResponse, Integer, Hash)>] VolumeResponse data, response status code and response headers
267
271
  def volumes_post_with_http_info(volume_create, opts = {})
268
272
  if @api_client.config.debugging
269
273
  @api_client.config.logger.debug 'Calling API: VolumeApi.volumes_post ...'
@@ -289,15 +293,16 @@ module OpenapiClient
289
293
  form_params = opts[:form_params] || {}
290
294
 
291
295
  # http body (model)
292
- post_body = opts[:body] || @api_client.object_to_http_body(volume_create)
296
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(volume_create)
293
297
 
294
298
  # return_type
295
- return_type = opts[:return_type] || 'Array<VolumeResponse>'
299
+ return_type = opts[:debug_return_type] || 'VolumeResponse'
296
300
 
297
301
  # auth_names
298
- auth_names = opts[:auth_names] || ['bearerAuth']
302
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
299
303
 
300
304
  new_options = opts.merge(
305
+ :operation => :"VolumeApi.volumes_post",
301
306
  :header_params => header_params,
302
307
  :query_params => query_params,
303
308
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -47,15 +47,16 @@ module OpenapiClient
47
47
  form_params = opts[:form_params] || {}
48
48
 
49
49
  # http body (model)
50
- post_body = opts[:body]
50
+ post_body = opts[:debug_body]
51
51
 
52
52
  # return_type
53
- return_type = opts[:return_type] || 'Array<VolumeSafeDelete>'
53
+ return_type = opts[:debug_return_type] || 'Array<VolumeSafeDelete>'
54
54
 
55
55
  # auth_names
56
- auth_names = opts[:auth_names] || ['bearerAuth']
56
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
57
57
 
58
58
  new_options = opts.merge(
59
+ :operation => :"VolumeSafeDeleteApi.safe_deletes_get",
59
60
  :header_params => header_params,
60
61
  :query_params => query_params,
61
62
  :form_params => form_params,
@@ -105,15 +106,16 @@ module OpenapiClient
105
106
  form_params = opts[:form_params] || {}
106
107
 
107
108
  # http body (model)
108
- post_body = opts[:body]
109
+ post_body = opts[:debug_body]
109
110
 
110
111
  # return_type
111
- return_type = opts[:return_type] || 'Array<VolumeSafeDelete>'
112
+ return_type = opts[:debug_return_type] || 'Array<VolumeSafeDelete>'
112
113
 
113
114
  # auth_names
114
- auth_names = opts[:auth_names] || ['bearerAuth']
115
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
115
116
 
116
117
  new_options = opts.merge(
118
+ :operation => :"VolumeSafeDeleteApi.safe_deletes_pk_delete",
117
119
  :header_params => header_params,
118
120
  :query_params => query_params,
119
121
  :form_params => form_params,
@@ -163,15 +165,16 @@ module OpenapiClient
163
165
  form_params = opts[:form_params] || {}
164
166
 
165
167
  # http body (model)
166
- post_body = opts[:body]
168
+ post_body = opts[:debug_body]
167
169
 
168
170
  # return_type
169
- return_type = opts[:return_type] || 'Array<VolumeSafeDelete>'
171
+ return_type = opts[:debug_return_type] || 'Array<VolumeSafeDelete>'
170
172
 
171
173
  # auth_names
172
- auth_names = opts[:auth_names] || ['bearerAuth']
174
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
173
175
 
174
176
  new_options = opts.merge(
177
+ :operation => :"VolumeSafeDeleteApi.safe_deletes_pk_get",
175
178
  :header_params => header_params,
176
179
  :query_params => query_params,
177
180
  :form_params => form_params,
@@ -189,7 +192,7 @@ module OpenapiClient
189
192
 
190
193
  # @param volume_safe_delete_create [VolumeSafeDeleteCreate]
191
194
  # @param [Hash] opts the optional parameters
192
- # @return [Array<VolumeSafeDelete>]
195
+ # @return [VolumeSafeDelete]
193
196
  def safe_deletes_post(volume_safe_delete_create, opts = {})
194
197
  data, _status_code, _headers = safe_deletes_post_with_http_info(volume_safe_delete_create, opts)
195
198
  data
@@ -197,7 +200,7 @@ module OpenapiClient
197
200
 
198
201
  # @param volume_safe_delete_create [VolumeSafeDeleteCreate]
199
202
  # @param [Hash] opts the optional parameters
200
- # @return [Array<(Array<VolumeSafeDelete>, Integer, Hash)>] Array<VolumeSafeDelete> data, response status code and response headers
203
+ # @return [Array<(VolumeSafeDelete, Integer, Hash)>] VolumeSafeDelete data, response status code and response headers
201
204
  def safe_deletes_post_with_http_info(volume_safe_delete_create, opts = {})
202
205
  if @api_client.config.debugging
203
206
  @api_client.config.logger.debug 'Calling API: VolumeSafeDeleteApi.safe_deletes_post ...'
@@ -223,15 +226,16 @@ module OpenapiClient
223
226
  form_params = opts[:form_params] || {}
224
227
 
225
228
  # http body (model)
226
- post_body = opts[:body] || @api_client.object_to_http_body(volume_safe_delete_create)
229
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(volume_safe_delete_create)
227
230
 
228
231
  # return_type
229
- return_type = opts[:return_type] || 'Array<VolumeSafeDelete>'
232
+ return_type = opts[:debug_return_type] || 'VolumeSafeDelete'
230
233
 
231
234
  # auth_names
232
- auth_names = opts[:auth_names] || ['bearerAuth']
235
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
233
236
 
234
237
  new_options = opts.merge(
238
+ :operation => :"VolumeSafeDeleteApi.safe_deletes_post",
235
239
  :header_params => header_params,
236
240
  :query_params => query_params,
237
241
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ OpenAPI Generator version: 5.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -14,6 +14,7 @@ require 'date'
14
14
  require 'json'
15
15
  require 'logger'
16
16
  require 'tempfile'
17
+ require 'time'
17
18
  require 'typhoeus'
18
19
 
19
20
  module OpenapiClient
@@ -86,7 +87,7 @@ module OpenapiClient
86
87
  # @option opts [Object] :body HTTP body (JSON/XML)
87
88
  # @return [Typhoeus::Request] A Typhoeus Request
88
89
  def build_request(http_method, path, opts = {})
89
- url = build_request_url(path)
90
+ url = build_request_url(path, opts)
90
91
  http_method = http_method.to_sym.downcase
91
92
 
92
93
  header_params = @default_headers.merge(opts[:header_params] || {})
@@ -155,6 +156,44 @@ module OpenapiClient
155
156
  data
156
157
  end
157
158
 
159
+ # Save response body into a file in (the defined) temporary folder, using the filename
160
+ # from the "Content-Disposition" header if provided, otherwise a random filename.
161
+ # The response body is written to the file in chunks in order to handle files which
162
+ # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
163
+ # process can use.
164
+ #
165
+ # @see Configuration#temp_folder_path
166
+ def download_file(request)
167
+ tempfile = nil
168
+ encoding = nil
169
+ request.on_headers do |response|
170
+ content_disposition = response.headers['Content-Disposition']
171
+ if content_disposition && content_disposition =~ /filename=/i
172
+ filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
173
+ prefix = sanitize_filename(filename)
174
+ else
175
+ prefix = 'download-'
176
+ end
177
+ prefix = prefix + '-' unless prefix.end_with?('-')
178
+ encoding = response.body.encoding
179
+ tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
180
+ @tempfile = tempfile
181
+ end
182
+ request.on_body do |chunk|
183
+ chunk.force_encoding(encoding)
184
+ tempfile.write(chunk)
185
+ end
186
+ request.on_complete do |response|
187
+ if tempfile
188
+ tempfile.close
189
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
190
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
191
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
192
+ "explicitly with `tempfile.delete`"
193
+ end
194
+ end
195
+ end
196
+
158
197
  # Check if the given MIME is a JSON MIME.
159
198
  # JSON MIME examples:
160
199
  # application/json
@@ -191,7 +230,7 @@ module OpenapiClient
191
230
  begin
192
231
  data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
193
232
  rescue JSON::ParserError => e
194
- if %w(String Date DateTime).include?(return_type)
233
+ if %w(String Date Time).include?(return_type)
195
234
  data = body
196
235
  else
197
236
  raise e
@@ -216,9 +255,9 @@ module OpenapiClient
216
255
  data.to_f
217
256
  when 'Boolean'
218
257
  data == true
219
- when 'DateTime'
258
+ when 'Time'
220
259
  # parse date time (expecting ISO 8601 format)
221
- DateTime.parse data
260
+ Time.parse data
222
261
  when 'Date'
223
262
  # parse date time (expecting ISO 8601 format)
224
263
  Date.parse data
@@ -241,44 +280,6 @@ module OpenapiClient
241
280
  end
242
281
  end
243
282
 
244
- # Save response body into a file in (the defined) temporary folder, using the filename
245
- # from the "Content-Disposition" header if provided, otherwise a random filename.
246
- # The response body is written to the file in chunks in order to handle files which
247
- # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
248
- # process can use.
249
- #
250
- # @see Configuration#temp_folder_path
251
- def download_file(request)
252
- tempfile = nil
253
- encoding = nil
254
- request.on_headers do |response|
255
- content_disposition = response.headers['Content-Disposition']
256
- if content_disposition && content_disposition =~ /filename=/i
257
- filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
258
- prefix = sanitize_filename(filename)
259
- else
260
- prefix = 'download-'
261
- end
262
- prefix = prefix + '-' unless prefix.end_with?('-')
263
- encoding = response.body.encoding
264
- tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
265
- @tempfile = tempfile
266
- end
267
- request.on_body do |chunk|
268
- chunk.force_encoding(encoding)
269
- tempfile.write(chunk)
270
- end
271
- request.on_complete do |response|
272
- if tempfile
273
- tempfile.close
274
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
275
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
276
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
277
- "explicitly with `tempfile.delete`"
278
- end
279
- end
280
- end
281
-
282
283
  # Sanitize filename by removing path.
283
284
  # e.g. ../../sun.gif becomes sun.gif
284
285
  #
@@ -288,10 +289,10 @@ module OpenapiClient
288
289
  filename.gsub(/.*[\/\\]/, '')
289
290
  end
290
291
 
291
- def build_request_url(path)
292
+ def build_request_url(path, opts = {})
292
293
  # Add leading and trailing slashes to path
293
294
  path = "/#{path}".gsub(/\/+/, '/')
294
- @config.base_url + path
295
+ @config.base_url(opts[:operation]) + path
295
296
  end
296
297
 
297
298
  # Update hearder and query params based on authentication settings.