pulp_python_client 3.3.0 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -4
  3. data/build/lib/pulpcore/__init__.py +2 -0
  4. data/build/lib/pulpcore/client/__init__.py +2 -0
  5. data/build/lib/pulpcore/client/pulp_python/__init__.py +75 -0
  6. data/build/lib/pulpcore/client/pulp_python/api/__init__.py +15 -0
  7. data/build/lib/pulpcore/client/pulp_python/api/content_packages_api.py +626 -0
  8. data/build/lib/pulpcore/client/pulp_python/api/distributions_pypi_api.py +830 -0
  9. data/build/lib/pulpcore/client/pulp_python/api/publications_pypi_api.py +566 -0
  10. data/build/lib/pulpcore/client/pulp_python/api/pypi_api.py +162 -0
  11. data/build/lib/pulpcore/client/pulp_python/api/pypi_legacy_api.py +185 -0
  12. data/build/lib/pulpcore/client/pulp_python/api/pypi_metadata_api.py +171 -0
  13. data/build/lib/pulpcore/client/pulp_python/api/pypi_simple_api.py +434 -0
  14. data/build/lib/pulpcore/client/pulp_python/api/remotes_python_api.py +972 -0
  15. data/build/lib/pulpcore/client/pulp_python/api/repositories_python_api.py +1063 -0
  16. data/build/lib/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +614 -0
  17. data/build/lib/pulpcore/client/pulp_python/api_client.py +667 -0
  18. data/build/lib/pulpcore/client/pulp_python/configuration.py +427 -0
  19. data/build/lib/pulpcore/client/pulp_python/exceptions.py +121 -0
  20. data/build/lib/pulpcore/client/pulp_python/models/__init__.py +51 -0
  21. data/build/lib/pulpcore/client/pulp_python/models/async_operation_response.py +124 -0
  22. data/build/lib/pulpcore/client/pulp_python/models/content_summary.py +176 -0
  23. data/build/lib/pulpcore/client/pulp_python/models/content_summary_response.py +176 -0
  24. data/build/lib/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +103 -0
  25. data/build/lib/pulpcore/client/pulp_python/models/package_metadata_response.py +209 -0
  26. data/build/lib/pulpcore/client/pulp_python/models/package_types_enum.py +107 -0
  27. data/build/lib/pulpcore/client/pulp_python/models/package_upload.py +187 -0
  28. data/build/lib/pulpcore/client/pulp_python/models/package_upload_task_response.py +176 -0
  29. data/build/lib/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +197 -0
  30. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +197 -0
  31. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +197 -0
  32. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +197 -0
  33. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +197 -0
  34. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +197 -0
  35. data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +286 -0
  36. data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +823 -0
  37. data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +259 -0
  38. data/build/lib/pulpcore/client/pulp_python/models/policy_enum.py +102 -0
  39. data/build/lib/pulpcore/client/pulp_python/models/python_bander_remote.py +181 -0
  40. data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution.py +288 -0
  41. data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution_response.py +368 -0
  42. data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content.py +824 -0
  43. data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content_response.py +933 -0
  44. data/build/lib/pulpcore/client/pulp_python/models/python_python_publication.py +149 -0
  45. data/build/lib/pulpcore/client/pulp_python/models/python_python_publication_response.py +231 -0
  46. data/build/lib/pulpcore/client/pulp_python/models/python_python_remote.py +825 -0
  47. data/build/lib/pulpcore/client/pulp_python/models/python_python_remote_response.py +772 -0
  48. data/build/lib/pulpcore/client/pulp_python/models/python_python_repository.py +260 -0
  49. data/build/lib/pulpcore/client/pulp_python/models/python_python_repository_response.py +366 -0
  50. data/build/lib/pulpcore/client/pulp_python/models/repository_add_remove_content.py +179 -0
  51. data/build/lib/pulpcore/client/pulp_python/models/repository_sync_url.py +151 -0
  52. data/build/lib/pulpcore/client/pulp_python/models/repository_version.py +123 -0
  53. data/build/lib/pulpcore/client/pulp_python/models/repository_version_response.py +257 -0
  54. data/build/lib/pulpcore/client/pulp_python/models/summary_response.py +182 -0
  55. data/build/lib/pulpcore/client/pulp_python/rest.py +292 -0
  56. data/dist/pulp_python-client-3.4.0.tar.gz +0 -0
  57. data/dist/pulp_python_client-3.4.0-py3-none-any.whl +0 -0
  58. data/docs/ContentPackagesApi.md +6 -0
  59. data/docs/DistributionsPypiApi.md +2 -2
  60. data/docs/PackageMetadataResponse.md +23 -0
  61. data/docs/PackageUpload.md +21 -0
  62. data/docs/PackageUploadTaskResponse.md +21 -0
  63. data/docs/PatchedpythonPythonDistribution.md +3 -1
  64. data/docs/PatchedpythonPythonRemote.md +1 -1
  65. data/docs/PublicationsPypiApi.md +1 -1
  66. data/docs/PypiApi.md +62 -0
  67. data/docs/PypiLegacyApi.md +70 -0
  68. data/docs/PypiMetadataApi.md +64 -0
  69. data/docs/PypiSimpleApi.md +190 -0
  70. data/docs/PythonBanderRemote.md +1 -1
  71. data/docs/PythonPythonDistribution.md +3 -1
  72. data/docs/PythonPythonDistributionResponse.md +4 -2
  73. data/docs/PythonPythonPackageContent.md +6 -0
  74. data/docs/PythonPythonPackageContentResponse.md +5 -1
  75. data/docs/PythonPythonRemote.md +1 -1
  76. data/docs/PythonPythonRemoteResponse.md +1 -1
  77. data/docs/RemotesPythonApi.md +3 -3
  78. data/docs/RepositoriesPythonApi.md +4 -4
  79. data/docs/SummaryResponse.md +21 -0
  80. data/lib/pulp_python_client/api/content_packages_api.rb +9 -0
  81. data/lib/pulp_python_client/api/distributions_pypi_api.rb +4 -4
  82. data/lib/pulp_python_client/api/publications_pypi_api.rb +2 -2
  83. data/lib/pulp_python_client/api/pypi_api.rb +90 -0
  84. data/lib/pulp_python_client/api/pypi_legacy_api.rb +111 -0
  85. data/lib/pulp_python_client/api/pypi_metadata_api.rb +96 -0
  86. data/lib/pulp_python_client/api/pypi_simple_api.rb +249 -0
  87. data/lib/pulp_python_client/api/remotes_python_api.rb +4 -4
  88. data/lib/pulp_python_client/api/repositories_python_api.rb +8 -8
  89. data/lib/pulp_python_client/models/package_metadata_response.rb +257 -0
  90. data/lib/pulp_python_client/models/package_upload.rb +268 -0
  91. data/lib/pulp_python_client/models/package_upload_task_response.rb +240 -0
  92. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +17 -5
  93. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +1 -1
  94. data/lib/pulp_python_client/models/python_bander_remote.rb +1 -1
  95. data/lib/pulp_python_client/models/python_python_distribution.rb +17 -5
  96. data/lib/pulp_python_client/models/python_python_distribution_response.rb +17 -6
  97. data/lib/pulp_python_client/models/python_python_package_content.rb +33 -1
  98. data/lib/pulp_python_client/models/python_python_package_content_response.rb +23 -1
  99. data/lib/pulp_python_client/models/python_python_remote.rb +1 -1
  100. data/lib/pulp_python_client/models/python_python_remote_response.rb +1 -1
  101. data/lib/pulp_python_client/models/summary_response.rb +243 -0
  102. data/lib/pulp_python_client/version.rb +1 -1
  103. data/lib/pulp_python_client.rb +8 -0
  104. data/pulp_python_client.egg-info/PKG-INFO +15 -0
  105. data/pulp_python_client.egg-info/SOURCES.txt +105 -0
  106. data/pulp_python_client.egg-info/dependency_links.txt +1 -0
  107. data/pulp_python_client.egg-info/requires.txt +4 -0
  108. data/pulp_python_client.egg-info/top_level.txt +1 -0
  109. data/pulpcore/__init__.py +2 -0
  110. data/pulpcore/client/__init__.py +2 -0
  111. data/pulpcore/client/pulp_python/__init__.py +75 -0
  112. data/pulpcore/client/pulp_python/api/__init__.py +15 -0
  113. data/pulpcore/client/pulp_python/api/content_packages_api.py +626 -0
  114. data/pulpcore/client/pulp_python/api/distributions_pypi_api.py +830 -0
  115. data/pulpcore/client/pulp_python/api/publications_pypi_api.py +566 -0
  116. data/pulpcore/client/pulp_python/api/pypi_api.py +162 -0
  117. data/pulpcore/client/pulp_python/api/pypi_legacy_api.py +185 -0
  118. data/pulpcore/client/pulp_python/api/pypi_metadata_api.py +171 -0
  119. data/pulpcore/client/pulp_python/api/pypi_simple_api.py +434 -0
  120. data/pulpcore/client/pulp_python/api/remotes_python_api.py +972 -0
  121. data/pulpcore/client/pulp_python/api/repositories_python_api.py +1063 -0
  122. data/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +614 -0
  123. data/pulpcore/client/pulp_python/api_client.py +667 -0
  124. data/pulpcore/client/pulp_python/configuration.py +427 -0
  125. data/pulpcore/client/pulp_python/exceptions.py +121 -0
  126. data/pulpcore/client/pulp_python/models/__init__.py +51 -0
  127. data/pulpcore/client/pulp_python/models/async_operation_response.py +124 -0
  128. data/pulpcore/client/pulp_python/models/content_summary.py +176 -0
  129. data/pulpcore/client/pulp_python/models/content_summary_response.py +176 -0
  130. data/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +103 -0
  131. data/pulpcore/client/pulp_python/models/package_metadata_response.py +209 -0
  132. data/pulpcore/client/pulp_python/models/package_types_enum.py +107 -0
  133. data/pulpcore/client/pulp_python/models/package_upload.py +187 -0
  134. data/pulpcore/client/pulp_python/models/package_upload_task_response.py +176 -0
  135. data/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +197 -0
  136. data/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +197 -0
  137. data/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +197 -0
  138. data/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +197 -0
  139. data/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +197 -0
  140. data/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +197 -0
  141. data/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +286 -0
  142. data/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +823 -0
  143. data/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +259 -0
  144. data/pulpcore/client/pulp_python/models/policy_enum.py +102 -0
  145. data/pulpcore/client/pulp_python/models/python_bander_remote.py +181 -0
  146. data/pulpcore/client/pulp_python/models/python_python_distribution.py +288 -0
  147. data/pulpcore/client/pulp_python/models/python_python_distribution_response.py +368 -0
  148. data/pulpcore/client/pulp_python/models/python_python_package_content.py +824 -0
  149. data/pulpcore/client/pulp_python/models/python_python_package_content_response.py +933 -0
  150. data/pulpcore/client/pulp_python/models/python_python_publication.py +149 -0
  151. data/pulpcore/client/pulp_python/models/python_python_publication_response.py +231 -0
  152. data/pulpcore/client/pulp_python/models/python_python_remote.py +825 -0
  153. data/pulpcore/client/pulp_python/models/python_python_remote_response.py +772 -0
  154. data/pulpcore/client/pulp_python/models/python_python_repository.py +260 -0
  155. data/pulpcore/client/pulp_python/models/python_python_repository_response.py +366 -0
  156. data/pulpcore/client/pulp_python/models/repository_add_remove_content.py +179 -0
  157. data/pulpcore/client/pulp_python/models/repository_sync_url.py +151 -0
  158. data/pulpcore/client/pulp_python/models/repository_version.py +123 -0
  159. data/pulpcore/client/pulp_python/models/repository_version_response.py +257 -0
  160. data/pulpcore/client/pulp_python/models/summary_response.py +182 -0
  161. data/pulpcore/client/pulp_python/rest.py +292 -0
  162. data/requirements.txt +6 -0
  163. data/setup.cfg +2 -0
  164. data/setup.py +42 -0
  165. data/spec/api/content_packages_api_spec.rb +3 -0
  166. data/spec/api/distributions_pypi_api_spec.rb +2 -2
  167. data/spec/api/publications_pypi_api_spec.rb +1 -1
  168. data/spec/api/pypi_api_spec.rb +49 -0
  169. data/spec/api/pypi_legacy_api_spec.rb +50 -0
  170. data/spec/api/pypi_metadata_api_spec.rb +50 -0
  171. data/spec/api/pypi_simple_api_spec.rb +79 -0
  172. data/spec/api/remotes_python_api_spec.rb +2 -2
  173. data/spec/api/repositories_python_api_spec.rb +4 -4
  174. data/spec/models/package_metadata_response_spec.rb +59 -0
  175. data/spec/models/package_upload_spec.rb +53 -0
  176. data/spec/models/package_upload_task_response_spec.rb +53 -0
  177. data/spec/models/patchedpython_python_distribution_spec.rb +6 -0
  178. data/spec/models/python_python_distribution_response_spec.rb +6 -0
  179. data/spec/models/python_python_distribution_spec.rb +6 -0
  180. data/spec/models/python_python_package_content_response_spec.rb +12 -0
  181. data/spec/models/python_python_package_content_spec.rb +18 -0
  182. data/spec/models/summary_response_spec.rb +53 -0
  183. data/test/__init__.py +0 -0
  184. data/test/test_async_operation_response.py +54 -0
  185. data/test/test_content_packages_api.py +55 -0
  186. data/test/test_content_summary.py +70 -0
  187. data/test/test_content_summary_response.py +70 -0
  188. data/test/test_distributions_pypi_api.py +76 -0
  189. data/test/test_exclude_platforms_enum.py +52 -0
  190. data/test/test_package_metadata_response.py +60 -0
  191. data/test/test_package_types_enum.py +52 -0
  192. data/test/test_package_upload.py +57 -0
  193. data/test/test_package_upload_task_response.py +58 -0
  194. data/test/test_paginated_repository_version_response_list.py +64 -0
  195. data/test/test_paginatedpython_python_distribution_response_list.py +68 -0
  196. data/test/test_paginatedpython_python_package_content_response_list.py +88 -0
  197. data/test/test_paginatedpython_python_publication_response_list.py +65 -0
  198. data/test/test_paginatedpython_python_remote_response_list.py +88 -0
  199. data/test/test_paginatedpython_python_repository_response_list.py +68 -0
  200. data/test/test_patchedpython_python_distribution.py +59 -0
  201. data/test/test_patchedpython_python_remote.py +84 -0
  202. data/test/test_patchedpython_python_repository.py +58 -0
  203. data/test/test_policy_enum.py +52 -0
  204. data/test/test_publications_pypi_api.py +62 -0
  205. data/test/test_pypi_api.py +41 -0
  206. data/test/test_pypi_legacy_api.py +41 -0
  207. data/test/test_pypi_metadata_api.py +41 -0
  208. data/test/test_pypi_simple_api.py +55 -0
  209. data/test/test_python_bander_remote.py +57 -0
  210. data/test/test_python_python_distribution.py +61 -0
  211. data/test/test_python_python_distribution_response.py +64 -0
  212. data/test/test_python_python_package_content.py +79 -0
  213. data/test/test_python_python_package_content_response.py +82 -0
  214. data/test/test_python_python_publication.py +54 -0
  215. data/test/test_python_python_publication_response.py +59 -0
  216. data/test/test_python_python_remote.py +86 -0
  217. data/test/test_python_python_remote_response.py +84 -0
  218. data/test/test_python_python_repository.py +59 -0
  219. data/test/test_python_python_repository_response.py +63 -0
  220. data/test/test_remotes_python_api.py +83 -0
  221. data/test/test_repositories_python_api.py +90 -0
  222. data/test/test_repositories_python_versions_api.py +61 -0
  223. data/test/test_repository_add_remove_content.py +59 -0
  224. data/test/test_repository_sync_url.py +54 -0
  225. data/test/test_repository_version.py +53 -0
  226. data/test/test_repository_version_response.py +58 -0
  227. data/test/test_summary_response.py +58 -0
  228. data/test-requirements.txt +3 -0
  229. data/tox.ini +9 -0
  230. metadata +221 -26
@@ -0,0 +1,111 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpPythonClient
16
+ class PypiLegacyApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Upload a package
23
+ # Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands.
24
+ # @param path [String]
25
+ # @param content [File] A Python package release file to upload to the index.
26
+ # @param sha256_digest [String] SHA256 of package to validate upload integrity.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail! (default to 'file_upload')
29
+ # @return [PackageUploadTaskResponse]
30
+ def create(path, content, sha256_digest, opts = {})
31
+ data, _status_code, _headers = create_with_http_info(path, content, sha256_digest, opts)
32
+ data
33
+ end
34
+
35
+ # Upload a package
36
+ # Upload package to the index. This is the endpoint that tools like Twine and Poetry use for their upload commands.
37
+ # @param path [String]
38
+ # @param content [File] A Python package release file to upload to the index.
39
+ # @param sha256_digest [String] SHA256 of package to validate upload integrity.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :action Defaults to `file_upload`, don't change it or request will fail!
42
+ # @return [Array<(PackageUploadTaskResponse, Integer, Hash)>] PackageUploadTaskResponse data, response status code and response headers
43
+ def create_with_http_info(path, content, sha256_digest, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: PypiLegacyApi.create ...'
46
+ end
47
+ # verify the required parameter 'path' is set
48
+ if @api_client.config.client_side_validation && path.nil?
49
+ fail ArgumentError, "Missing the required parameter 'path' when calling PypiLegacyApi.create"
50
+ end
51
+ # verify the required parameter 'content' is set
52
+ if @api_client.config.client_side_validation && content.nil?
53
+ fail ArgumentError, "Missing the required parameter 'content' when calling PypiLegacyApi.create"
54
+ end
55
+ # verify the required parameter 'sha256_digest' is set
56
+ if @api_client.config.client_side_validation && sha256_digest.nil?
57
+ fail ArgumentError, "Missing the required parameter 'sha256_digest' when calling PypiLegacyApi.create"
58
+ end
59
+ if @api_client.config.client_side_validation && sha256_digest.to_s.length > 64
60
+ fail ArgumentError, 'invalid value for "sha256_digest" when calling PypiLegacyApi.create, the character length must be smaller than or equal to 64.'
61
+ end
62
+
63
+ if @api_client.config.client_side_validation && sha256_digest.to_s.length < 64
64
+ fail ArgumentError, 'invalid value for "sha256_digest" when calling PypiLegacyApi.create, the character length must be great than or equal to 64.'
65
+ end
66
+
67
+ # resource path
68
+ local_var_path = '/pypi/{path}/legacy/'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
69
+
70
+ # query parameters
71
+ query_params = opts[:query_params] || {}
72
+
73
+ # header parameters
74
+ header_params = opts[:header_params] || {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
77
+ # HTTP header 'Content-Type'
78
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
79
+
80
+ # form parameters
81
+ form_params = opts[:form_params] || {}
82
+ form_params['content'] = content
83
+ form_params['sha256_digest'] = sha256_digest
84
+ form_params['action'] = opts[:'action'] if !opts[:'action'].nil?
85
+
86
+ # http body (model)
87
+ post_body = opts[:body]
88
+
89
+ # return_type
90
+ return_type = opts[:return_type] || 'PackageUploadTaskResponse'
91
+
92
+ # auth_names
93
+ auth_names = opts[:auth_names] || ['basicAuth']
94
+
95
+ new_options = opts.merge(
96
+ :header_params => header_params,
97
+ :query_params => query_params,
98
+ :form_params => form_params,
99
+ :body => post_body,
100
+ :auth_names => auth_names,
101
+ :return_type => return_type
102
+ )
103
+
104
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug "API called: PypiLegacyApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
107
+ end
108
+ return data, status_code, headers
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,96 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpPythonClient
16
+ class PypiMetadataApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get package metadata
23
+ # Retrieves the package's core-metadata specified by https://packaging.python.org/specifications/core-metadata/. `meta` must be a path in form of `{package}/json/` or `{package}/{version}/json/`
24
+ # @param meta [String]
25
+ # @param path [String]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :fields A list of fields to include in the response.
28
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
29
+ # @return [PackageMetadataResponse]
30
+ def read(meta, path, opts = {})
31
+ data, _status_code, _headers = read_with_http_info(meta, path, opts)
32
+ data
33
+ end
34
+
35
+ # Get package metadata
36
+ # Retrieves the package&#39;s core-metadata specified by https://packaging.python.org/specifications/core-metadata/. &#x60;meta&#x60; must be a path in form of &#x60;{package}/json/&#x60; or &#x60;{package}/{version}/json/&#x60;
37
+ # @param meta [String]
38
+ # @param path [String]
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :fields A list of fields to include in the response.
41
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
42
+ # @return [Array<(PackageMetadataResponse, Integer, Hash)>] PackageMetadataResponse data, response status code and response headers
43
+ def read_with_http_info(meta, path, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: PypiMetadataApi.read ...'
46
+ end
47
+ # verify the required parameter 'meta' is set
48
+ if @api_client.config.client_side_validation && meta.nil?
49
+ fail ArgumentError, "Missing the required parameter 'meta' when calling PypiMetadataApi.read"
50
+ end
51
+ # verify the required parameter 'path' is set
52
+ if @api_client.config.client_side_validation && path.nil?
53
+ fail ArgumentError, "Missing the required parameter 'path' when calling PypiMetadataApi.read"
54
+ end
55
+ # resource path
56
+ local_var_path = '/pypi/{path}/pypi/{meta}/'.sub('{' + 'meta' + '}', CGI.escape(meta.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
61
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:body]
73
+
74
+ # return_type
75
+ return_type = opts[:return_type] || 'PackageMetadataResponse'
76
+
77
+ # auth_names
78
+ auth_names = opts[:auth_names] || []
79
+
80
+ new_options = opts.merge(
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: PypiMetadataApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,249 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpPythonClient
16
+ class PypiSimpleApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Upload a package
23
+ # Upload package to the index. This endpoint has the same functionality as the upload endpoint at the `/legacy` url of the index. This is provided for convenience for users who want a single index url for all their Python tools. (pip, twine, poetry, pipenv, ...)
24
+ # @param path [String]
25
+ # @param content [File] A Python package release file to upload to the index.
26
+ # @param sha256_digest [String] SHA256 of package to validate upload integrity.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :action Defaults to &#x60;file_upload&#x60;, don&#39;t change it or request will fail! (default to 'file_upload')
29
+ # @return [PackageUploadTaskResponse]
30
+ def create(path, content, sha256_digest, opts = {})
31
+ data, _status_code, _headers = create_with_http_info(path, content, sha256_digest, opts)
32
+ data
33
+ end
34
+
35
+ # Upload a package
36
+ # Upload package to the index. This endpoint has the same functionality as the upload endpoint at the &#x60;/legacy&#x60; url of the index. This is provided for convenience for users who want a single index url for all their Python tools. (pip, twine, poetry, pipenv, ...)
37
+ # @param path [String]
38
+ # @param content [File] A Python package release file to upload to the index.
39
+ # @param sha256_digest [String] SHA256 of package to validate upload integrity.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :action Defaults to &#x60;file_upload&#x60;, don&#39;t change it or request will fail!
42
+ # @return [Array<(PackageUploadTaskResponse, Integer, Hash)>] PackageUploadTaskResponse data, response status code and response headers
43
+ def create_with_http_info(path, content, sha256_digest, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: PypiSimpleApi.create ...'
46
+ end
47
+ # verify the required parameter 'path' is set
48
+ if @api_client.config.client_side_validation && path.nil?
49
+ fail ArgumentError, "Missing the required parameter 'path' when calling PypiSimpleApi.create"
50
+ end
51
+ # verify the required parameter 'content' is set
52
+ if @api_client.config.client_side_validation && content.nil?
53
+ fail ArgumentError, "Missing the required parameter 'content' when calling PypiSimpleApi.create"
54
+ end
55
+ # verify the required parameter 'sha256_digest' is set
56
+ if @api_client.config.client_side_validation && sha256_digest.nil?
57
+ fail ArgumentError, "Missing the required parameter 'sha256_digest' when calling PypiSimpleApi.create"
58
+ end
59
+ if @api_client.config.client_side_validation && sha256_digest.to_s.length > 64
60
+ fail ArgumentError, 'invalid value for "sha256_digest" when calling PypiSimpleApi.create, the character length must be smaller than or equal to 64.'
61
+ end
62
+
63
+ if @api_client.config.client_side_validation && sha256_digest.to_s.length < 64
64
+ fail ArgumentError, 'invalid value for "sha256_digest" when calling PypiSimpleApi.create, the character length must be great than or equal to 64.'
65
+ end
66
+
67
+ # resource path
68
+ local_var_path = '/pypi/{path}/simple/'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
69
+
70
+ # query parameters
71
+ query_params = opts[:query_params] || {}
72
+
73
+ # header parameters
74
+ header_params = opts[:header_params] || {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
77
+ # HTTP header 'Content-Type'
78
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
79
+
80
+ # form parameters
81
+ form_params = opts[:form_params] || {}
82
+ form_params['content'] = content
83
+ form_params['sha256_digest'] = sha256_digest
84
+ form_params['action'] = opts[:'action'] if !opts[:'action'].nil?
85
+
86
+ # http body (model)
87
+ post_body = opts[:body]
88
+
89
+ # return_type
90
+ return_type = opts[:return_type] || 'PackageUploadTaskResponse'
91
+
92
+ # auth_names
93
+ auth_names = opts[:auth_names] || ['basicAuth']
94
+
95
+ new_options = opts.merge(
96
+ :header_params => header_params,
97
+ :query_params => query_params,
98
+ :form_params => form_params,
99
+ :body => post_body,
100
+ :auth_names => auth_names,
101
+ :return_type => return_type
102
+ )
103
+
104
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug "API called: PypiSimpleApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
107
+ end
108
+ return data, status_code, headers
109
+ end
110
+
111
+ # Get index simple page
112
+ # Gets the simple api html page for the index.
113
+ # @param path [String]
114
+ # @param [Hash] opts the optional parameters
115
+ # @option opts [String] :fields A list of fields to include in the response.
116
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
117
+ # @return [nil]
118
+ def read(path, opts = {})
119
+ read_with_http_info(path, opts)
120
+ nil
121
+ end
122
+
123
+ # Get index simple page
124
+ # Gets the simple api html page for the index.
125
+ # @param path [String]
126
+ # @param [Hash] opts the optional parameters
127
+ # @option opts [String] :fields A list of fields to include in the response.
128
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
129
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
130
+ def read_with_http_info(path, opts = {})
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug 'Calling API: PypiSimpleApi.read ...'
133
+ end
134
+ # verify the required parameter 'path' is set
135
+ if @api_client.config.client_side_validation && path.nil?
136
+ fail ArgumentError, "Missing the required parameter 'path' when calling PypiSimpleApi.read"
137
+ end
138
+ # resource path
139
+ local_var_path = '/pypi/{path}/simple/'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
140
+
141
+ # query parameters
142
+ query_params = opts[:query_params] || {}
143
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
144
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
145
+
146
+ # header parameters
147
+ header_params = opts[:header_params] || {}
148
+
149
+ # form parameters
150
+ form_params = opts[:form_params] || {}
151
+
152
+ # http body (model)
153
+ post_body = opts[:body]
154
+
155
+ # return_type
156
+ return_type = opts[:return_type]
157
+
158
+ # auth_names
159
+ auth_names = opts[:auth_names] || ['basicAuth']
160
+
161
+ new_options = opts.merge(
162
+ :header_params => header_params,
163
+ :query_params => query_params,
164
+ :form_params => form_params,
165
+ :body => post_body,
166
+ :auth_names => auth_names,
167
+ :return_type => return_type
168
+ )
169
+
170
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug "API called: PypiSimpleApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
173
+ end
174
+ return data, status_code, headers
175
+ end
176
+
177
+ # Get package simple page
178
+ # Retrieves the simple api html page for a package.
179
+ # @param package [String]
180
+ # @param path [String]
181
+ # @param [Hash] opts the optional parameters
182
+ # @option opts [String] :fields A list of fields to include in the response.
183
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
184
+ # @return [nil]
185
+ def read_0(package, path, opts = {})
186
+ read_0_with_http_info(package, path, opts)
187
+ nil
188
+ end
189
+
190
+ # Get package simple page
191
+ # Retrieves the simple api html page for a package.
192
+ # @param package [String]
193
+ # @param path [String]
194
+ # @param [Hash] opts the optional parameters
195
+ # @option opts [String] :fields A list of fields to include in the response.
196
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
197
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
198
+ def read_0_with_http_info(package, path, opts = {})
199
+ if @api_client.config.debugging
200
+ @api_client.config.logger.debug 'Calling API: PypiSimpleApi.read_0 ...'
201
+ end
202
+ # verify the required parameter 'package' is set
203
+ if @api_client.config.client_side_validation && package.nil?
204
+ fail ArgumentError, "Missing the required parameter 'package' when calling PypiSimpleApi.read_0"
205
+ end
206
+ # verify the required parameter 'path' is set
207
+ if @api_client.config.client_side_validation && path.nil?
208
+ fail ArgumentError, "Missing the required parameter 'path' when calling PypiSimpleApi.read_0"
209
+ end
210
+ # resource path
211
+ local_var_path = '/pypi/{path}/simple/{package}/'.sub('{' + 'package' + '}', CGI.escape(package.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
212
+
213
+ # query parameters
214
+ query_params = opts[:query_params] || {}
215
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
216
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
217
+
218
+ # header parameters
219
+ header_params = opts[:header_params] || {}
220
+
221
+ # form parameters
222
+ form_params = opts[:form_params] || {}
223
+
224
+ # http body (model)
225
+ post_body = opts[:body]
226
+
227
+ # return_type
228
+ return_type = opts[:return_type]
229
+
230
+ # auth_names
231
+ auth_names = opts[:auth_names] || ['basicAuth']
232
+
233
+ new_options = opts.merge(
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => return_type
240
+ )
241
+
242
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug "API called: PypiSimpleApi#read_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ end
246
+ return data, status_code, headers
247
+ end
248
+ end
249
+ end
@@ -146,11 +146,11 @@ module PulpPythonClient
146
146
  end
147
147
 
148
148
  # Create from Bandersnatch
149
- # Create a remote from a Bandersnatch config
149
+ # Takes the fields specified in the Bandersnatch config and creates a Python Remote from it.
150
150
  # @param config [File] A Bandersnatch config that may be used to construct a Python Remote.
151
151
  # @param name [String] A unique name for this remote
152
152
  # @param [Hash] opts the optional parameters
153
- # @option opts [PolicyEnum] :policy The policy to use when downloading content. The possible values include: &#39;immediate&#39;, &#39;on_demand&#39;, and &#39;cache_only&#39;. &#39;immediate&#39; is the default.
153
+ # @option opts [PolicyEnum] :policy The policy to use when downloading content. The possible values include: &#39;immediate&#39;, &#39;on_demand&#39;, and &#39;streamed&#39;. &#39;on_demand&#39; is the default.
154
154
  # @return [PythonPythonRemoteResponse]
155
155
  def from_bandersnatch(config, name, opts = {})
156
156
  data, _status_code, _headers = from_bandersnatch_with_http_info(config, name, opts)
@@ -158,11 +158,11 @@ module PulpPythonClient
158
158
  end
159
159
 
160
160
  # Create from Bandersnatch
161
- # Create a remote from a Bandersnatch config
161
+ # Takes the fields specified in the Bandersnatch config and creates a Python Remote from it.
162
162
  # @param config [File] A Bandersnatch config that may be used to construct a Python Remote.
163
163
  # @param name [String] A unique name for this remote
164
164
  # @param [Hash] opts the optional parameters
165
- # @option opts [PolicyEnum] :policy The policy to use when downloading content. The possible values include: &#39;immediate&#39;, &#39;on_demand&#39;, and &#39;cache_only&#39;. &#39;immediate&#39; is the default.
165
+ # @option opts [PolicyEnum] :policy The policy to use when downloading content. The possible values include: &#39;immediate&#39;, &#39;on_demand&#39;, and &#39;streamed&#39;. &#39;on_demand&#39; is the default.
166
166
  # @return [Array<(PythonPythonRemoteResponse, Integer, Hash)>] PythonPythonRemoteResponse data, response status code and response headers
167
167
  def from_bandersnatch_with_http_info(config, name, opts = {})
168
168
  if @api_client.config.debugging
@@ -20,7 +20,7 @@ module PulpPythonClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create a python repository
23
- # A ViewSet for PythonRepository.
23
+ # PythonRepository represents a single Python repository, to which content can be synced, added, or removed.
24
24
  # @param python_python_repository [PythonPythonRepository]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [PythonPythonRepositoryResponse]
@@ -30,7 +30,7 @@ module PulpPythonClient
30
30
  end
31
31
 
32
32
  # Create a python repository
33
- # A ViewSet for PythonRepository.
33
+ # PythonRepository represents a single Python repository, to which content can be synced, added, or removed.
34
34
  # @param python_python_repository [PythonPythonRepository]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(PythonPythonRepositoryResponse, Integer, Hash)>] PythonPythonRepositoryResponse data, response status code and response headers
@@ -146,7 +146,7 @@ module PulpPythonClient
146
146
  end
147
147
 
148
148
  # List python repositorys
149
- # A ViewSet for PythonRepository.
149
+ # PythonRepository represents a single Python repository, to which content can be synced, added, or removed.
150
150
  # @param [Hash] opts the optional parameters
151
151
  # @option opts [Integer] :limit Number of results to return per page.
152
152
  # @option opts [String] :name
@@ -166,7 +166,7 @@ module PulpPythonClient
166
166
  end
167
167
 
168
168
  # List python repositorys
169
- # A ViewSet for PythonRepository.
169
+ # PythonRepository represents a single Python repository, to which content can be synced, added, or removed.
170
170
  # @param [Hash] opts the optional parameters
171
171
  # @option opts [Integer] :limit Number of results to return per page.
172
172
  # @option opts [String] :name
@@ -375,7 +375,7 @@ module PulpPythonClient
375
375
  end
376
376
 
377
377
  # Inspect a python repository
378
- # A ViewSet for PythonRepository.
378
+ # PythonRepository represents a single Python repository, to which content can be synced, added, or removed.
379
379
  # @param python_python_repository_href [String]
380
380
  # @param [Hash] opts the optional parameters
381
381
  # @option opts [String] :fields A list of fields to include in the response.
@@ -387,7 +387,7 @@ module PulpPythonClient
387
387
  end
388
388
 
389
389
  # Inspect a python repository
390
- # A ViewSet for PythonRepository.
390
+ # PythonRepository represents a single Python repository, to which content can be synced, added, or removed.
391
391
  # @param python_python_repository_href [String]
392
392
  # @param [Hash] opts the optional parameters
393
393
  # @option opts [String] :fields A list of fields to include in the response.
@@ -443,7 +443,7 @@ module PulpPythonClient
443
443
  end
444
444
 
445
445
  # Sync from remote
446
- # Trigger an asynchronous task to sync Python content.
446
+ # Trigger an asynchronous task to sync python content. The sync task will retrieve Python content from the specified `Remote` and update the specified `Respository`, creating a new `RepositoryVersion`.
447
447
  # @param python_python_repository_href [String]
448
448
  # @param repository_sync_url [RepositorySyncURL]
449
449
  # @param [Hash] opts the optional parameters
@@ -454,7 +454,7 @@ module PulpPythonClient
454
454
  end
455
455
 
456
456
  # Sync from remote
457
- # Trigger an asynchronous task to sync Python content.
457
+ # Trigger an asynchronous task to sync python content. The sync task will retrieve Python content from the specified &#x60;Remote&#x60; and update the specified &#x60;Respository&#x60;, creating a new &#x60;RepositoryVersion&#x60;.
458
458
  # @param python_python_repository_href [String]
459
459
  # @param repository_sync_url [RepositorySyncURL]
460
460
  # @param [Hash] opts the optional parameters