pulp_container_client 2.22.1 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -14
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContainerBlobResponse.md +18 -17
  5. data/docs/ContainerContainerDistribution.md +24 -23
  6. data/docs/ContainerContainerDistributionResponse.md +40 -39
  7. data/docs/ContainerContainerNamespace.md +8 -7
  8. data/docs/ContainerContainerNamespaceResponse.md +16 -15
  9. data/docs/ContainerContainerPullThroughDistribution.md +26 -25
  10. data/docs/ContainerContainerPullThroughDistributionResponse.md +38 -37
  11. data/docs/ContainerContainerPullThroughRemote.md +52 -51
  12. data/docs/ContainerContainerPullThroughRemoteResponse.md +52 -51
  13. data/docs/ContainerContainerPullThroughRemoteResponseHiddenFieldsInner.md +20 -0
  14. data/docs/ContainerContainerPushRepository.md +16 -15
  15. data/docs/ContainerContainerPushRepositoryResponse.md +28 -27
  16. data/docs/ContainerContainerRemote.md +56 -55
  17. data/docs/ContainerContainerRemoteResponse.md +56 -55
  18. data/docs/ContainerContainerRepository.md +18 -17
  19. data/docs/ContainerContainerRepositoryResponse.md +30 -29
  20. data/docs/ContainerManifestResponse.md +42 -41
  21. data/docs/ContainerManifestSignatureResponse.md +28 -27
  22. data/docs/ContainerRepositorySyncURL.md +12 -11
  23. data/docs/ContainerTagResponse.md +18 -17
  24. data/docs/ContentBlobsApi.md +82 -49
  25. data/docs/ContentManifestsApi.md +86 -53
  26. data/docs/ContentSignaturesApi.md +97 -64
  27. data/docs/ContentSummaryResponse.md +12 -11
  28. data/docs/ContentTagsApi.md +86 -53
  29. data/docs/DistributionsContainerApi.md +386 -183
  30. data/docs/DistributionsPullThroughApi.md +385 -182
  31. data/docs/ManifestCopy.md +14 -13
  32. data/docs/MediaTypesEnum.md +4 -5
  33. data/docs/MyPermissionsResponse.md +8 -7
  34. data/docs/NestedRole.md +12 -11
  35. data/docs/NestedRoleResponse.md +12 -11
  36. data/docs/ObjectRolesResponse.md +8 -7
  37. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  38. data/docs/PaginatedcontainerBlobResponseList.md +14 -13
  39. data/docs/PaginatedcontainerContainerDistributionResponseList.md +14 -13
  40. data/docs/PaginatedcontainerContainerNamespaceResponseList.md +14 -13
  41. data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +14 -13
  42. data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +14 -13
  43. data/docs/PaginatedcontainerContainerPushRepositoryResponseList.md +14 -13
  44. data/docs/PaginatedcontainerContainerRemoteResponseList.md +14 -13
  45. data/docs/PaginatedcontainerContainerRepositoryResponseList.md +14 -13
  46. data/docs/PaginatedcontainerManifestResponseList.md +14 -13
  47. data/docs/PaginatedcontainerManifestSignatureResponseList.md +14 -13
  48. data/docs/PaginatedcontainerTagResponseList.md +14 -13
  49. data/docs/PatchedcontainerContainerDistribution.md +24 -23
  50. data/docs/PatchedcontainerContainerPullThroughDistribution.md +26 -25
  51. data/docs/PatchedcontainerContainerPullThroughRemote.md +52 -51
  52. data/docs/PatchedcontainerContainerPushRepository.md +16 -15
  53. data/docs/PatchedcontainerContainerRemote.md +56 -55
  54. data/docs/PatchedcontainerContainerRepository.md +18 -17
  55. data/docs/Policy692Enum.md +4 -5
  56. data/docs/Policy7e0Enum.md +4 -5
  57. data/docs/PulpContainerNamespacesApi.md +259 -124
  58. data/docs/RecursiveManage.md +8 -7
  59. data/docs/RemotesContainerApi.md +389 -184
  60. data/docs/RemotesPullThroughApi.md +389 -184
  61. data/docs/RemoveImage.md +8 -7
  62. data/docs/RemoveSignatures.md +8 -7
  63. data/docs/RemoveSignaturesResponse.md +8 -7
  64. data/docs/Repair.md +8 -7
  65. data/docs/RepositoriesContainerApi.md +647 -291
  66. data/docs/RepositoriesContainerPushApi.md +419 -198
  67. data/docs/RepositoriesContainerPushVersionsApi.md +152 -82
  68. data/docs/RepositoriesContainerVersionsApi.md +152 -82
  69. data/docs/RepositorySign.md +12 -11
  70. data/docs/RepositoryVersionResponse.md +22 -21
  71. data/docs/SetLabel.md +10 -9
  72. data/docs/SetLabelResponse.md +10 -9
  73. data/docs/TagCopy.md +12 -11
  74. data/docs/TagImage.md +10 -9
  75. data/docs/TokenApi.md +25 -7
  76. data/docs/UnTagImage.md +8 -7
  77. data/docs/UnsetLabel.md +8 -7
  78. data/docs/UnsetLabelResponse.md +10 -9
  79. data/lib/pulp_container_client/api/content_blobs_api.rb +11 -9
  80. data/lib/pulp_container_client/api/content_manifests_api.rb +11 -9
  81. data/lib/pulp_container_client/api/content_signatures_api.rb +11 -9
  82. data/lib/pulp_container_client/api/content_tags_api.rb +11 -9
  83. data/lib/pulp_container_client/api/distributions_container_api.rb +89 -56
  84. data/lib/pulp_container_client/api/distributions_pull_through_api.rb +89 -56
  85. data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +53 -36
  86. data/lib/pulp_container_client/api/remotes_container_api.rb +104 -68
  87. data/lib/pulp_container_client/api/remotes_pull_through_api.rb +104 -68
  88. data/lib/pulp_container_client/api/repositories_container_api.rb +171 -102
  89. data/lib/pulp_container_client/api/repositories_container_push_api.rb +102 -62
  90. data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +40 -30
  91. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +40 -30
  92. data/lib/pulp_container_client/api/token_api.rb +5 -4
  93. data/lib/pulp_container_client/api_client.rb +137 -102
  94. data/lib/pulp_container_client/api_error.rb +2 -1
  95. data/lib/pulp_container_client/configuration.rb +162 -21
  96. data/lib/pulp_container_client/models/async_operation_response.rb +32 -22
  97. data/lib/pulp_container_client/models/container_blob_response.rb +37 -29
  98. data/lib/pulp_container_client/models/container_container_distribution.rb +86 -74
  99. data/lib/pulp_container_client/models/container_container_distribution_response.rb +95 -83
  100. data/lib/pulp_container_client/models/container_container_namespace.rb +32 -22
  101. data/lib/pulp_container_client/models/container_container_namespace_response.rb +34 -24
  102. data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +88 -74
  103. data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +97 -83
  104. data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +56 -22
  105. data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +59 -25
  106. data/lib/pulp_container_client/models/{container_container_pull_through_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields_inner.rb} +37 -25
  107. data/lib/pulp_container_client/models/container_container_push_repository.rb +83 -73
  108. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +91 -81
  109. data/lib/pulp_container_client/models/container_container_remote.rb +63 -23
  110. data/lib/pulp_container_client/models/container_container_remote_response.rb +61 -25
  111. data/lib/pulp_container_client/models/container_container_repository.rb +32 -22
  112. data/lib/pulp_container_client/models/container_container_repository_response.rb +34 -24
  113. data/lib/pulp_container_client/models/container_manifest_response.rb +42 -24
  114. data/lib/pulp_container_client/models/container_manifest_signature_response.rb +46 -24
  115. data/lib/pulp_container_client/models/container_repository_sync_url.rb +30 -22
  116. data/lib/pulp_container_client/models/container_tag_response.rb +36 -24
  117. data/lib/pulp_container_client/models/content_summary_response.rb +36 -22
  118. data/lib/pulp_container_client/models/manifest_copy.rb +31 -23
  119. data/lib/pulp_container_client/models/media_types_enum.rb +8 -4
  120. data/lib/pulp_container_client/models/my_permissions_response.rb +32 -22
  121. data/lib/pulp_container_client/models/nested_role.rb +32 -22
  122. data/lib/pulp_container_client/models/nested_role_response.rb +32 -22
  123. data/lib/pulp_container_client/models/object_roles_response.rb +32 -22
  124. data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +34 -22
  125. data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +34 -22
  126. data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +34 -22
  127. data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +34 -22
  128. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +34 -22
  129. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +34 -22
  130. data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +34 -22
  131. data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +34 -22
  132. data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +34 -22
  133. data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +34 -22
  134. data/lib/pulp_container_client/models/paginatedcontainer_manifest_signature_response_list.rb +34 -22
  135. data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +34 -22
  136. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +81 -65
  137. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +81 -65
  138. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +62 -24
  139. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +77 -65
  140. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +72 -26
  141. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +35 -23
  142. data/lib/pulp_container_client/models/policy692_enum.rb +8 -4
  143. data/lib/pulp_container_client/models/policy7e0_enum.rb +8 -4
  144. data/lib/pulp_container_client/models/recursive_manage.rb +31 -23
  145. data/lib/pulp_container_client/models/remove_image.rb +32 -22
  146. data/lib/pulp_container_client/models/remove_signatures.rb +32 -22
  147. data/lib/pulp_container_client/models/remove_signatures_response.rb +32 -22
  148. data/lib/pulp_container_client/models/repair.rb +30 -22
  149. data/lib/pulp_container_client/models/repository_sign.rb +36 -24
  150. data/lib/pulp_container_client/models/repository_version_response.rb +32 -24
  151. data/lib/pulp_container_client/models/set_label.rb +34 -22
  152. data/lib/pulp_container_client/models/set_label_response.rb +34 -22
  153. data/lib/pulp_container_client/models/tag_copy.rb +31 -23
  154. data/lib/pulp_container_client/models/tag_image.rb +34 -22
  155. data/lib/pulp_container_client/models/un_tag_image.rb +32 -22
  156. data/lib/pulp_container_client/models/unset_label.rb +32 -22
  157. data/lib/pulp_container_client/models/unset_label_response.rb +32 -22
  158. data/lib/pulp_container_client/version.rb +2 -2
  159. data/lib/pulp_container_client.rb +2 -3
  160. data/pulp_container_client.gemspec +9 -6
  161. data/spec/api/content_blobs_api_spec.rb +3 -3
  162. data/spec/api/content_manifests_api_spec.rb +3 -3
  163. data/spec/api/content_signatures_api_spec.rb +3 -3
  164. data/spec/api/content_tags_api_spec.rb +3 -3
  165. data/spec/api/distributions_container_api_spec.rb +13 -13
  166. data/spec/api/distributions_pull_through_api_spec.rb +13 -13
  167. data/spec/api/pulp_container_namespaces_api_spec.rb +9 -9
  168. data/spec/api/remotes_container_api_spec.rb +20 -19
  169. data/spec/api/remotes_pull_through_api_spec.rb +20 -19
  170. data/spec/api/repositories_container_api_spec.rb +22 -22
  171. data/spec/api/repositories_container_push_api_spec.rb +14 -14
  172. data/spec/api/repositories_container_push_versions_api_spec.rb +12 -11
  173. data/spec/api/repositories_container_versions_api_spec.rb +12 -11
  174. data/spec/api/token_api_spec.rb +2 -2
  175. data/spec/models/async_operation_response_spec.rb +7 -12
  176. data/spec/models/container_blob_response_spec.rb +12 -17
  177. data/spec/models/container_container_distribution_response_spec.rb +34 -39
  178. data/spec/models/container_container_distribution_spec.rb +20 -25
  179. data/spec/models/container_container_namespace_response_spec.rb +11 -16
  180. data/spec/models/container_container_namespace_spec.rb +7 -12
  181. data/spec/models/container_container_pull_through_distribution_response_spec.rb +33 -38
  182. data/spec/models/container_container_pull_through_distribution_spec.rb +21 -26
  183. data/spec/models/{container_container_pull_through_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_inner_spec.rb} +11 -16
  184. data/spec/models/container_container_pull_through_remote_response_spec.rb +29 -34
  185. data/spec/models/container_container_pull_through_remote_spec.rb +29 -34
  186. data/spec/models/container_container_push_repository_response_spec.rb +28 -33
  187. data/spec/models/container_container_push_repository_spec.rb +15 -20
  188. data/spec/models/container_container_remote_response_spec.rb +31 -36
  189. data/spec/models/container_container_remote_spec.rb +31 -36
  190. data/spec/models/container_container_repository_response_spec.rb +18 -23
  191. data/spec/models/container_container_repository_spec.rb +12 -17
  192. data/spec/models/container_manifest_response_spec.rb +24 -29
  193. data/spec/models/container_manifest_signature_response_spec.rb +17 -22
  194. data/spec/models/container_repository_sync_url_spec.rb +9 -14
  195. data/spec/models/container_tag_response_spec.rb +12 -17
  196. data/spec/models/content_summary_response_spec.rb +9 -14
  197. data/spec/models/manifest_copy_spec.rb +10 -15
  198. data/spec/models/media_types_enum_spec.rb +6 -11
  199. data/spec/models/my_permissions_response_spec.rb +7 -12
  200. data/spec/models/nested_role_response_spec.rb +9 -14
  201. data/spec/models/nested_role_spec.rb +9 -14
  202. data/spec/models/object_roles_response_spec.rb +7 -12
  203. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  204. data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
  205. data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
  206. data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
  207. data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
  208. data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
  209. data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
  210. data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
  211. data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
  212. data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
  213. data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
  214. data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
  215. data/spec/models/patchedcontainer_container_distribution_spec.rb +20 -25
  216. data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +21 -26
  217. data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
  218. data/spec/models/patchedcontainer_container_push_repository_spec.rb +15 -20
  219. data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
  220. data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
  221. data/spec/models/policy692_enum_spec.rb +6 -11
  222. data/spec/models/policy7e0_enum_spec.rb +6 -11
  223. data/spec/models/recursive_manage_spec.rb +7 -12
  224. data/spec/models/remove_image_spec.rb +7 -12
  225. data/spec/models/remove_signatures_response_spec.rb +7 -12
  226. data/spec/models/remove_signatures_spec.rb +7 -12
  227. data/spec/models/repair_spec.rb +7 -12
  228. data/spec/models/repository_sign_spec.rb +9 -14
  229. data/spec/models/repository_version_response_spec.rb +14 -19
  230. data/spec/models/set_label_response_spec.rb +8 -13
  231. data/spec/models/set_label_spec.rb +8 -13
  232. data/spec/models/tag_copy_spec.rb +9 -14
  233. data/spec/models/tag_image_spec.rb +8 -13
  234. data/spec/models/un_tag_image_spec.rb +7 -12
  235. data/spec/models/unset_label_response_spec.rb +8 -13
  236. data/spec/models/unset_label_spec.rb +7 -12
  237. data/spec/spec_helper.rb +1 -1
  238. metadata +105 -85
  239. data/docs/ContainerContainerPullThroughRemoteResponseHiddenFields.md +0 -19
  240. data/docs/OCIBuildImage.md +0 -23
  241. data/lib/pulp_container_client/models/oci_build_image.rb +0 -256
  242. data/spec/api_client_spec.rb +0 -188
  243. data/spec/configuration_spec.rb +0 -42
  244. data/spec/models/oci_build_image_spec.rb +0 -59
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -51,21 +51,22 @@ module PulpContainerClient
51
51
  # header parameters
52
52
  header_params = opts[:header_params] || {}
53
53
  # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
55
 
56
56
  # form parameters
57
57
  form_params = opts[:form_params] || {}
58
58
 
59
59
  # http body (model)
60
- post_body = opts[:body]
60
+ post_body = opts[:debug_body]
61
61
 
62
62
  # return_type
63
- return_type = opts[:return_type] || 'AsyncOperationResponse'
63
+ return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
64
64
 
65
65
  # auth_names
66
- auth_names = opts[:auth_names] || ['basicAuth']
66
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
67
67
 
68
68
  new_options = opts.merge(
69
+ :operation => :"RepositoriesContainerVersionsApi.delete",
69
70
  :header_params => header_params,
70
71
  :query_params => query_params,
71
72
  :form_params => form_params,
@@ -97,12 +98,13 @@ module PulpContainerClient
97
98
  # @option opts [Integer] :offset The initial index from which to return the results.
98
99
  # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
99
100
  # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
100
- # @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
101
- # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
102
- # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
103
- # @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
104
- # @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
105
- # @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
101
+ # @option opts [Time] :pulp_created Filter results where pulp_created matches value
102
+ # @option opts [Time] :pulp_created__gt Filter results where pulp_created is greater than value
103
+ # @option opts [Time] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
104
+ # @option opts [Boolean] :pulp_created__isnull Filter results where pulp_created has a null value
105
+ # @option opts [Time] :pulp_created__lt Filter results where pulp_created is less than value
106
+ # @option opts [Time] :pulp_created__lte Filter results where pulp_created is less than or equal to value
107
+ # @option opts [Array<Time>] :pulp_created__range Filter results where pulp_created is between two comma separated values
106
108
  # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
107
109
  # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
108
110
  # @option opts [Array<String>] :fields A list of fields to include in the response.
@@ -129,12 +131,13 @@ module PulpContainerClient
129
131
  # @option opts [Integer] :offset The initial index from which to return the results.
130
132
  # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
131
133
  # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
132
- # @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
133
- # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
134
- # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
135
- # @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
136
- # @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
137
- # @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
134
+ # @option opts [Time] :pulp_created Filter results where pulp_created matches value
135
+ # @option opts [Time] :pulp_created__gt Filter results where pulp_created is greater than value
136
+ # @option opts [Time] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
137
+ # @option opts [Boolean] :pulp_created__isnull Filter results where pulp_created has a null value
138
+ # @option opts [Time] :pulp_created__lt Filter results where pulp_created is less than value
139
+ # @option opts [Time] :pulp_created__lte Filter results where pulp_created is less than or equal to value
140
+ # @option opts [Array<Time>] :pulp_created__range Filter results where pulp_created is between two comma separated values
138
141
  # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
139
142
  # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
140
143
  # @option opts [Array<String>] :fields A list of fields to include in the response.
@@ -172,6 +175,7 @@ module PulpContainerClient
172
175
  query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
173
176
  query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
174
177
  query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
178
+ query_params[:'pulp_created__isnull'] = opts[:'pulp_created__isnull'] if !opts[:'pulp_created__isnull'].nil?
175
179
  query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
176
180
  query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
177
181
  query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
@@ -183,21 +187,22 @@ module PulpContainerClient
183
187
  # header parameters
184
188
  header_params = opts[:header_params] || {}
185
189
  # HTTP header 'Accept' (if needed)
186
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
187
191
 
188
192
  # form parameters
189
193
  form_params = opts[:form_params] || {}
190
194
 
191
195
  # http body (model)
192
- post_body = opts[:body]
196
+ post_body = opts[:debug_body]
193
197
 
194
198
  # return_type
195
- return_type = opts[:return_type] || 'PaginatedRepositoryVersionResponseList'
199
+ return_type = opts[:debug_return_type] || 'PaginatedRepositoryVersionResponseList'
196
200
 
197
201
  # auth_names
198
- auth_names = opts[:auth_names] || ['basicAuth']
202
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
199
203
 
200
204
  new_options = opts.merge(
205
+ :operation => :"RepositoriesContainerVersionsApi.list",
201
206
  :header_params => header_params,
202
207
  :query_params => query_params,
203
208
  :form_params => form_params,
@@ -251,21 +256,22 @@ module PulpContainerClient
251
256
  # header parameters
252
257
  header_params = opts[:header_params] || {}
253
258
  # HTTP header 'Accept' (if needed)
254
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
255
260
 
256
261
  # form parameters
257
262
  form_params = opts[:form_params] || {}
258
263
 
259
264
  # http body (model)
260
- post_body = opts[:body]
265
+ post_body = opts[:debug_body]
261
266
 
262
267
  # return_type
263
- return_type = opts[:return_type] || 'RepositoryVersionResponse'
268
+ return_type = opts[:debug_return_type] || 'RepositoryVersionResponse'
264
269
 
265
270
  # auth_names
266
- auth_names = opts[:auth_names] || ['basicAuth']
271
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
267
272
 
268
273
  new_options = opts.merge(
274
+ :operation => :"RepositoriesContainerVersionsApi.read",
269
275
  :header_params => header_params,
270
276
  :query_params => query_params,
271
277
  :form_params => form_params,
@@ -317,23 +323,27 @@ module PulpContainerClient
317
323
  # header parameters
318
324
  header_params = opts[:header_params] || {}
319
325
  # HTTP header 'Accept' (if needed)
320
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
321
327
  # HTTP header 'Content-Type'
322
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
328
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
329
+ if !content_type.nil?
330
+ header_params['Content-Type'] = content_type
331
+ end
323
332
 
324
333
  # form parameters
325
334
  form_params = opts[:form_params] || {}
326
335
 
327
336
  # http body (model)
328
- post_body = opts[:body] || @api_client.object_to_http_body(repair)
337
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(repair)
329
338
 
330
339
  # return_type
331
- return_type = opts[:return_type] || 'AsyncOperationResponse'
340
+ return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
332
341
 
333
342
  # auth_names
334
- auth_names = opts[:auth_names] || ['basicAuth']
343
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
335
344
 
336
345
  new_options = opts.merge(
346
+ :operation => :"RepositoriesContainerVersionsApi.repair",
337
347
  :header_params => header_params,
338
348
  :query_params => query_params,
339
349
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -47,15 +47,16 @@ module PulpContainerClient
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]
53
+ return_type = opts[:debug_return_type]
54
54
 
55
55
  # auth_names
56
- auth_names = opts[:auth_names] || ['basicAuth']
56
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
57
57
 
58
58
  new_options = opts.merge(
59
+ :operation => :"TokenApi.get",
59
60
  :header_params => header_params,
60
61
  :query_params => query_params,
61
62
  :form_params => form_params,
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,12 @@ require 'date'
14
14
  require 'json'
15
15
  require 'logger'
16
16
  require 'tempfile'
17
+ require 'time'
17
18
  require 'faraday'
19
+ require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
20
+ require 'marcel'
21
+ require 'pathname'
22
+
18
23
 
19
24
  module PulpContainerClient
20
25
  class ApiClient
@@ -46,51 +51,38 @@ module PulpContainerClient
46
51
  # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
47
52
  # the data deserialized from response body (could be nil), response status code and response headers.
48
53
  def call_api(http_method, path, opts = {})
49
- ssl_options = {
50
- :ca_file => @config.ssl_ca_file,
51
- :verify => @config.ssl_verify,
52
- :verify_mode => @config.ssl_verify_mode,
53
- :client_cert => @config.ssl_client_cert,
54
- :client_key => @config.ssl_client_key
55
- }
56
- request_options = {
57
- :params_encoder => @config.params_encoder
58
- }
59
- connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
60
- conn.basic_auth(config.username, config.password)
61
- if opts[:header_params]["Content-Type"] == "multipart/form-data"
62
- conn.request :multipart
63
- conn.request :url_encoded
64
- end
65
- conn.adapter(Faraday.default_adapter)
66
- end
67
-
54
+ stream = nil
68
55
  begin
69
- response = connection.public_send(http_method.to_sym.downcase) do |req|
70
- build_request(http_method, path, req, opts)
56
+ response = connection(opts).public_send(http_method.to_sym.downcase) do |req|
57
+ request = build_request(http_method, path, req, opts)
58
+ stream = download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
71
59
  end
72
60
 
73
- if @config.debugging
74
- @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
61
+ if config.debugging
62
+ config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
75
63
  end
76
64
 
77
65
  unless response.success?
78
- if response.status == 0
66
+ if response.status == 0 && response.respond_to?(:return_message)
79
67
  # Errors from libcurl will be made visible here
80
- fail ApiError.new(:code => 0,
81
- :message => response.return_message)
68
+ fail ApiError.new(code: 0,
69
+ message: response.return_message)
82
70
  else
83
- fail ApiError.new(:code => response.status,
84
- :response_headers => response.headers,
85
- :response_body => response.body),
71
+ fail ApiError.new(code: response.status,
72
+ response_headers: response.headers,
73
+ response_body: response.body),
86
74
  response.reason_phrase
87
75
  end
88
76
  end
89
77
  rescue Faraday::TimeoutError
90
78
  fail ApiError.new('Connection timed out')
79
+ rescue Faraday::ConnectionFailed
80
+ fail ApiError.new('Connection failed')
91
81
  end
92
82
 
93
- if opts[:return_type]
83
+ if opts[:return_type] == 'File' || opts[:return_type] == 'Binary'
84
+ data = deserialize_file(response, stream)
85
+ elsif opts[:return_type]
94
86
  data = deserialize(response, opts[:return_type])
95
87
  else
96
88
  data = nil
@@ -106,9 +98,9 @@ module PulpContainerClient
106
98
  # @option opts [Hash] :query_params Query parameters
107
99
  # @option opts [Hash] :form_params Query parameters
108
100
  # @option opts [Object] :body HTTP body (JSON/XML)
109
- # @return [Typhoeus::Request] A Typhoeus Request
101
+ # @return [Faraday::Request] A Faraday Request
110
102
  def build_request(http_method, path, request, opts = {})
111
- url = build_request_url(path)
103
+ url = build_request_url(path, opts)
112
104
  http_method = http_method.to_sym.downcase
113
105
 
114
106
  header_params = @default_headers.merge(opts[:header_params] || {})
@@ -117,24 +109,21 @@ module PulpContainerClient
117
109
 
118
110
  update_params_for_auth! header_params, query_params, opts[:auth_names]
119
111
 
120
- req_opts = {
121
- :params_encoding => @config.params_encoding,
122
- :timeout => @config.timeout,
123
- :verbose => @config.debugging
124
- }
125
-
126
112
  if [:post, :patch, :put, :delete].include?(http_method)
127
113
  req_body = build_request_body(header_params, form_params, opts[:body])
128
- if @config.debugging
129
- @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
114
+ if config.debugging
115
+ config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
130
116
  end
131
117
  end
132
118
  request.headers = header_params
133
119
  request.body = req_body
134
- request.options = OpenStruct.new(req_opts)
120
+
121
+ # Overload default options only if provided
122
+ request.options.params_encoder = config.params_encoder if config.params_encoder
123
+ request.options.timeout = config.timeout if config.timeout
124
+
135
125
  request.url url
136
126
  request.params = query_params
137
- download_file(request) if opts[:return_type] == 'File'
138
127
  request
139
128
  end
140
129
 
@@ -153,8 +142,7 @@ module PulpContainerClient
153
142
  form_params.each do |key, value|
154
143
  case value
155
144
  when ::File, ::Tempfile
156
- # TODO hardcode to application/octet-stream, need better way to detect content type
157
- data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path)
145
+ data[key] = Faraday::FilePart.new(value.path, Marcel::MimeType.for(Pathname.new(value.path)))
158
146
  when ::Array, nil
159
147
  # let Faraday handle Array and nil parameters
160
148
  data[key] = value
@@ -170,6 +158,95 @@ module PulpContainerClient
170
158
  data
171
159
  end
172
160
 
161
+ def download_file(request)
162
+ stream = []
163
+
164
+ # handle streaming Responses
165
+ request.options.on_data = Proc.new do |chunk, overall_received_bytes|
166
+ stream << chunk
167
+ end
168
+
169
+ stream
170
+ end
171
+
172
+ def deserialize_file(response, stream)
173
+ body = response.body
174
+ encoding = body.encoding
175
+
176
+ # reconstruct content
177
+ content = stream.join
178
+ content = content.unpack('m').join if response.headers['Content-Transfer-Encoding'] == 'binary'
179
+ content = content.force_encoding(encoding)
180
+
181
+ # return byte stream
182
+ return content if @config.return_binary_data == true
183
+
184
+ # return file instead of binary data
185
+ content_disposition = response.headers['Content-Disposition']
186
+ if content_disposition && content_disposition =~ /filename=/i
187
+ filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
188
+ prefix = sanitize_filename(filename)
189
+ else
190
+ prefix = 'download-'
191
+ end
192
+ prefix = prefix + '-' unless prefix.end_with?('-')
193
+
194
+ tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
195
+ tempfile.write(content)
196
+ tempfile.close
197
+
198
+ config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
199
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
200
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
201
+ "explicitly with `tempfile.delete`"
202
+ tempfile
203
+ end
204
+
205
+ def connection(opts)
206
+ opts[:header_params]['Content-Type'] == 'multipart/form-data' ? connection_multipart : connection_regular
207
+ end
208
+
209
+ def connection_multipart
210
+ @connection_multipart ||= build_connection do |conn|
211
+ conn.request :multipart
212
+ conn.request :url_encoded
213
+ end
214
+ end
215
+
216
+ def connection_regular
217
+ @connection_regular ||= build_connection
218
+ end
219
+
220
+ def build_connection
221
+ Faraday.new(url: config.base_url, ssl: ssl_options, proxy: config.proxy) do |conn|
222
+ basic_auth(conn)
223
+ config.configure_middleware(conn)
224
+ yield(conn) if block_given?
225
+ conn.adapter(Faraday.default_adapter)
226
+ config.configure_connection(conn)
227
+ end
228
+ end
229
+
230
+ def ssl_options
231
+ {
232
+ ca_file: config.ssl_ca_file,
233
+ verify: config.ssl_verify,
234
+ verify_mode: config.ssl_verify_mode,
235
+ client_cert: config.ssl_client_cert,
236
+ client_key: config.ssl_client_key
237
+ }
238
+ end
239
+
240
+ def basic_auth(conn)
241
+ if config.username && config.password
242
+ if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0')
243
+ conn.request(:authorization, :basic, config.username, config.password)
244
+ else
245
+ conn.request(:basic_auth, config.username, config.password)
246
+ end
247
+ end
248
+ end
249
+
173
250
  # Check if the given MIME is a JSON MIME.
174
251
  # JSON MIME examples:
175
252
  # application/json
@@ -179,7 +256,7 @@ module PulpContainerClient
179
256
  # @param [String] mime MIME
180
257
  # @return [Boolean] True if the MIME is application/json
181
258
  def json_mime?(mime)
182
- (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
259
+ (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil?
183
260
  end
184
261
 
185
262
  # Deserialize the response to the given return type.
@@ -188,15 +265,10 @@ module PulpContainerClient
188
265
  # @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
189
266
  def deserialize(response, return_type)
190
267
  body = response.body
191
-
192
- # handle file downloading - return the File instance processed in request callbacks
193
- # note that response body is empty when the file is written in chunks in request on_body callback
194
- return @tempfile if return_type == 'File'
195
-
196
268
  return nil if body.nil? || body.empty?
197
269
 
198
270
  # return response body directly for String return type
199
- return body if return_type == 'String'
271
+ return body.to_s if return_type == 'String'
200
272
 
201
273
  # ensuring a default content type
202
274
  content_type = response.headers['Content-Type'] || 'application/json'
@@ -206,7 +278,7 @@ module PulpContainerClient
206
278
  begin
207
279
  data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
208
280
  rescue JSON::ParserError => e
209
- if %w(String Date DateTime).include?(return_type)
281
+ if %w(String Date Time).include?(return_type)
210
282
  data = body
211
283
  else
212
284
  raise e
@@ -231,9 +303,9 @@ module PulpContainerClient
231
303
  data.to_f
232
304
  when 'Boolean'
233
305
  data == true
234
- when 'DateTime'
306
+ when 'Time'
235
307
  # parse date time (expecting ISO 8601 format)
236
- DateTime.parse data
308
+ Time.parse data
237
309
  when 'Date'
238
310
  # parse date time (expecting ISO 8601 format)
239
311
  Date.parse data
@@ -251,46 +323,9 @@ module PulpContainerClient
251
323
  data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
252
324
  end
253
325
  else
254
- # models, e.g. Pet
255
- PulpContainerClient.const_get(return_type).build_from_hash(data)
256
- end
257
- end
258
-
259
- # Save response body into a file in (the defined) temporary folder, using the filename
260
- # from the "Content-Disposition" header if provided, otherwise a random filename.
261
- # The response body is written to the file in chunks in order to handle files which
262
- # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
263
- # process can use.
264
- #
265
- # @see Configuration#temp_folder_path
266
- def download_file(request)
267
- tempfile = nil
268
- encoding = nil
269
- request.on_headers do |response|
270
- content_disposition = response.headers['Content-Disposition']
271
- if content_disposition && content_disposition =~ /filename=/i
272
- filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
273
- prefix = sanitize_filename(filename)
274
- else
275
- prefix = 'download-'
276
- end
277
- prefix = prefix + '-' unless prefix.end_with?('-')
278
- encoding = response.body.encoding
279
- tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
280
- @tempfile = tempfile
281
- end
282
- request.on_body do |chunk|
283
- chunk.force_encoding(encoding)
284
- tempfile.write(chunk)
285
- end
286
- request.on_complete do |response|
287
- if tempfile
288
- tempfile.close
289
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
290
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
291
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
292
- "explicitly with `tempfile.delete`"
293
- end
326
+ # models (e.g. Pet) or oneOf
327
+ klass = PulpContainerClient.const_get(return_type)
328
+ klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
294
329
  end
295
330
  end
296
331
 
@@ -300,16 +335,16 @@ module PulpContainerClient
300
335
  # @param [String] filename the filename to be sanitized
301
336
  # @return [String] the sanitized filename
302
337
  def sanitize_filename(filename)
303
- filename.gsub(/.*[\/\\]/, '')
338
+ filename.split(/[\/\\]/).last
304
339
  end
305
340
 
306
- def build_request_url(path)
341
+ def build_request_url(path, opts = {})
307
342
  # Add leading and trailing slashes to path
308
343
  path = "/#{path}".gsub(/\/+/, '/')
309
- @config.base_url + path
344
+ @config.base_url(opts[:operation]) + path
310
345
  end
311
346
 
312
- # Update hearder and query params based on authentication settings.
347
+ # Update header and query params based on authentication settings.
313
348
  #
314
349
  # @param [Hash] header_params Header parameters
315
350
  # @param [Hash] query_params Query parameters
@@ -321,7 +356,7 @@ module PulpContainerClient
321
356
  case auth_setting[:in]
322
357
  when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
323
358
  when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
324
- else fail ArgumentError, 'Authentication token must be in `query` of `header`'
359
+ else fail ArgumentError, 'Authentication token must be in `query` or `header`'
325
360
  end
326
361
  end
327
362
  end
@@ -348,8 +383,8 @@ module PulpContainerClient
348
383
  # @param [Array] content_types array for Content-Type
349
384
  # @return [String] the Content-Type header (e.g. application/json)
350
385
  def select_header_content_type(content_types)
351
- # use application/json by default
352
- return 'application/json' if content_types.nil? || content_types.empty?
386
+ # return nil by default
387
+ return if content_types.nil? || content_types.empty?
353
388
  # use JSON when present, otherwise use the first one
354
389
  json_content_type = content_types.find { |s| json_mime?(s) }
355
390
  json_content_type || content_types.first
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,7 @@ module PulpContainerClient
32
32
  end
33
33
  else
34
34
  super arg
35
+ @message = arg
35
36
  end
36
37
  end
37
38