pulp_python_client 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +4 -4
  4. data/docs/ContentPackagesApi.md +4 -0
  5. data/docs/RepositoryAddRemoveContent.md +2 -2
  6. data/lib/pulp_python_client/api/content_packages_api.rb +7 -1
  7. data/lib/pulp_python_client/api/distributions_pypi_api.rb +1 -1
  8. data/lib/pulp_python_client/api/publications_pypi_api.rb +1 -1
  9. data/lib/pulp_python_client/api/pypi_api.rb +1 -1
  10. data/lib/pulp_python_client/api/pypi_legacy_api.rb +1 -1
  11. data/lib/pulp_python_client/api/pypi_metadata_api.rb +1 -1
  12. data/lib/pulp_python_client/api/pypi_simple_api.rb +1 -1
  13. data/lib/pulp_python_client/api/remotes_python_api.rb +1 -1
  14. data/lib/pulp_python_client/api/repositories_python_api.rb +1 -1
  15. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +1 -1
  16. data/lib/pulp_python_client/api_client.rb +12 -8
  17. data/lib/pulp_python_client/api_error.rb +1 -1
  18. data/lib/pulp_python_client/configuration.rb +8 -1
  19. data/lib/pulp_python_client/models/async_operation_response.rb +1 -1
  20. data/lib/pulp_python_client/models/content_summary.rb +1 -1
  21. data/lib/pulp_python_client/models/content_summary_response.rb +1 -1
  22. data/lib/pulp_python_client/models/exclude_platforms_enum.rb +1 -1
  23. data/lib/pulp_python_client/models/package_metadata_response.rb +1 -1
  24. data/lib/pulp_python_client/models/package_types_enum.rb +1 -1
  25. data/lib/pulp_python_client/models/package_upload.rb +1 -1
  26. data/lib/pulp_python_client/models/package_upload_task_response.rb +1 -1
  27. data/lib/pulp_python_client/models/paginated_repository_version_response_list.rb +1 -1
  28. data/lib/pulp_python_client/models/paginatedpython_python_distribution_response_list.rb +1 -1
  29. data/lib/pulp_python_client/models/paginatedpython_python_package_content_response_list.rb +1 -1
  30. data/lib/pulp_python_client/models/paginatedpython_python_publication_response_list.rb +1 -1
  31. data/lib/pulp_python_client/models/paginatedpython_python_remote_response_list.rb +1 -1
  32. data/lib/pulp_python_client/models/paginatedpython_python_repository_response_list.rb +1 -1
  33. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +1 -1
  34. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +1 -1
  35. data/lib/pulp_python_client/models/patchedpython_python_repository.rb +1 -1
  36. data/lib/pulp_python_client/models/policy_enum.rb +1 -1
  37. data/lib/pulp_python_client/models/python_bander_remote.rb +1 -1
  38. data/lib/pulp_python_client/models/python_python_distribution.rb +1 -1
  39. data/lib/pulp_python_client/models/python_python_distribution_response.rb +1 -1
  40. data/lib/pulp_python_client/models/python_python_package_content.rb +1 -1
  41. data/lib/pulp_python_client/models/python_python_package_content_response.rb +1 -1
  42. data/lib/pulp_python_client/models/python_python_publication.rb +1 -1
  43. data/lib/pulp_python_client/models/python_python_publication_response.rb +1 -1
  44. data/lib/pulp_python_client/models/python_python_remote.rb +1 -1
  45. data/lib/pulp_python_client/models/python_python_remote_response.rb +1 -1
  46. data/lib/pulp_python_client/models/python_python_repository.rb +1 -1
  47. data/lib/pulp_python_client/models/python_python_repository_response.rb +1 -1
  48. data/lib/pulp_python_client/models/repository_add_remove_content.rb +3 -3
  49. data/lib/pulp_python_client/models/repository_sync_url.rb +1 -1
  50. data/lib/pulp_python_client/models/repository_version.rb +1 -1
  51. data/lib/pulp_python_client/models/repository_version_response.rb +1 -1
  52. data/lib/pulp_python_client/models/summary_response.rb +1 -1
  53. data/lib/pulp_python_client/version.rb +2 -2
  54. data/lib/pulp_python_client.rb +1 -1
  55. data/pulp_python_client.gemspec +1 -1
  56. data/spec/api/content_packages_api_spec.rb +3 -1
  57. data/spec/api/distributions_pypi_api_spec.rb +1 -1
  58. data/spec/api/publications_pypi_api_spec.rb +1 -1
  59. data/spec/api/pypi_api_spec.rb +1 -1
  60. data/spec/api/pypi_legacy_api_spec.rb +1 -1
  61. data/spec/api/pypi_metadata_api_spec.rb +1 -1
  62. data/spec/api/pypi_simple_api_spec.rb +1 -1
  63. data/spec/api/remotes_python_api_spec.rb +1 -1
  64. data/spec/api/repositories_python_api_spec.rb +1 -1
  65. data/spec/api/repositories_python_versions_api_spec.rb +1 -1
  66. data/spec/api_client_spec.rb +2 -2
  67. data/spec/configuration_spec.rb +1 -1
  68. data/spec/models/async_operation_response_spec.rb +1 -1
  69. data/spec/models/content_summary_response_spec.rb +1 -1
  70. data/spec/models/content_summary_spec.rb +1 -1
  71. data/spec/models/exclude_platforms_enum_spec.rb +1 -1
  72. data/spec/models/package_metadata_response_spec.rb +1 -1
  73. data/spec/models/package_types_enum_spec.rb +1 -1
  74. data/spec/models/package_upload_spec.rb +1 -1
  75. data/spec/models/package_upload_task_response_spec.rb +1 -1
  76. data/spec/models/paginated_repository_version_response_list_spec.rb +1 -1
  77. data/spec/models/paginatedpython_python_distribution_response_list_spec.rb +1 -1
  78. data/spec/models/paginatedpython_python_package_content_response_list_spec.rb +1 -1
  79. data/spec/models/paginatedpython_python_publication_response_list_spec.rb +1 -1
  80. data/spec/models/paginatedpython_python_remote_response_list_spec.rb +1 -1
  81. data/spec/models/paginatedpython_python_repository_response_list_spec.rb +1 -1
  82. data/spec/models/patchedpython_python_distribution_spec.rb +1 -1
  83. data/spec/models/patchedpython_python_remote_spec.rb +1 -1
  84. data/spec/models/patchedpython_python_repository_spec.rb +1 -1
  85. data/spec/models/policy_enum_spec.rb +1 -1
  86. data/spec/models/python_bander_remote_spec.rb +1 -1
  87. data/spec/models/python_python_distribution_response_spec.rb +1 -1
  88. data/spec/models/python_python_distribution_spec.rb +1 -1
  89. data/spec/models/python_python_package_content_response_spec.rb +1 -1
  90. data/spec/models/python_python_package_content_spec.rb +1 -1
  91. data/spec/models/python_python_publication_response_spec.rb +1 -1
  92. data/spec/models/python_python_publication_spec.rb +1 -1
  93. data/spec/models/python_python_remote_response_spec.rb +1 -1
  94. data/spec/models/python_python_remote_spec.rb +1 -1
  95. data/spec/models/python_python_repository_response_spec.rb +1 -1
  96. data/spec/models/python_python_repository_spec.rb +1 -1
  97. data/spec/models/repository_add_remove_content_spec.rb +1 -1
  98. data/spec/models/repository_sync_url_spec.rb +1 -1
  99. data/spec/models/repository_version_response_spec.rb +1 -1
  100. data/spec/models/repository_version_spec.rb +1 -1
  101. data/spec/models/summary_response_spec.rb +1 -1
  102. data/spec/spec_helper.rb +1 -1
  103. metadata +33 -196
  104. data/build/lib/pulpcore/__init__.py +0 -2
  105. data/build/lib/pulpcore/client/__init__.py +0 -2
  106. data/build/lib/pulpcore/client/pulp_python/__init__.py +0 -75
  107. data/build/lib/pulpcore/client/pulp_python/api/__init__.py +0 -15
  108. data/build/lib/pulpcore/client/pulp_python/api/content_packages_api.py +0 -626
  109. data/build/lib/pulpcore/client/pulp_python/api/distributions_pypi_api.py +0 -830
  110. data/build/lib/pulpcore/client/pulp_python/api/publications_pypi_api.py +0 -566
  111. data/build/lib/pulpcore/client/pulp_python/api/pypi_api.py +0 -162
  112. data/build/lib/pulpcore/client/pulp_python/api/pypi_legacy_api.py +0 -185
  113. data/build/lib/pulpcore/client/pulp_python/api/pypi_metadata_api.py +0 -171
  114. data/build/lib/pulpcore/client/pulp_python/api/pypi_simple_api.py +0 -434
  115. data/build/lib/pulpcore/client/pulp_python/api/remotes_python_api.py +0 -972
  116. data/build/lib/pulpcore/client/pulp_python/api/repositories_python_api.py +0 -1063
  117. data/build/lib/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +0 -614
  118. data/build/lib/pulpcore/client/pulp_python/api_client.py +0 -667
  119. data/build/lib/pulpcore/client/pulp_python/configuration.py +0 -427
  120. data/build/lib/pulpcore/client/pulp_python/exceptions.py +0 -121
  121. data/build/lib/pulpcore/client/pulp_python/models/__init__.py +0 -51
  122. data/build/lib/pulpcore/client/pulp_python/models/async_operation_response.py +0 -124
  123. data/build/lib/pulpcore/client/pulp_python/models/content_summary.py +0 -176
  124. data/build/lib/pulpcore/client/pulp_python/models/content_summary_response.py +0 -176
  125. data/build/lib/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +0 -103
  126. data/build/lib/pulpcore/client/pulp_python/models/package_metadata_response.py +0 -209
  127. data/build/lib/pulpcore/client/pulp_python/models/package_types_enum.py +0 -107
  128. data/build/lib/pulpcore/client/pulp_python/models/package_upload.py +0 -187
  129. data/build/lib/pulpcore/client/pulp_python/models/package_upload_task_response.py +0 -176
  130. data/build/lib/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +0 -197
  131. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +0 -197
  132. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +0 -197
  133. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +0 -197
  134. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +0 -197
  135. data/build/lib/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +0 -197
  136. data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +0 -286
  137. data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +0 -823
  138. data/build/lib/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +0 -259
  139. data/build/lib/pulpcore/client/pulp_python/models/policy_enum.py +0 -102
  140. data/build/lib/pulpcore/client/pulp_python/models/python_bander_remote.py +0 -181
  141. data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution.py +0 -288
  142. data/build/lib/pulpcore/client/pulp_python/models/python_python_distribution_response.py +0 -368
  143. data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content.py +0 -824
  144. data/build/lib/pulpcore/client/pulp_python/models/python_python_package_content_response.py +0 -933
  145. data/build/lib/pulpcore/client/pulp_python/models/python_python_publication.py +0 -149
  146. data/build/lib/pulpcore/client/pulp_python/models/python_python_publication_response.py +0 -231
  147. data/build/lib/pulpcore/client/pulp_python/models/python_python_remote.py +0 -825
  148. data/build/lib/pulpcore/client/pulp_python/models/python_python_remote_response.py +0 -772
  149. data/build/lib/pulpcore/client/pulp_python/models/python_python_repository.py +0 -260
  150. data/build/lib/pulpcore/client/pulp_python/models/python_python_repository_response.py +0 -366
  151. data/build/lib/pulpcore/client/pulp_python/models/repository_add_remove_content.py +0 -179
  152. data/build/lib/pulpcore/client/pulp_python/models/repository_sync_url.py +0 -151
  153. data/build/lib/pulpcore/client/pulp_python/models/repository_version.py +0 -123
  154. data/build/lib/pulpcore/client/pulp_python/models/repository_version_response.py +0 -257
  155. data/build/lib/pulpcore/client/pulp_python/models/summary_response.py +0 -182
  156. data/build/lib/pulpcore/client/pulp_python/rest.py +0 -292
  157. data/dist/pulp_python-client-3.4.0.tar.gz +0 -0
  158. data/dist/pulp_python_client-3.4.0-py3-none-any.whl +0 -0
  159. data/pulp_python_client.egg-info/PKG-INFO +0 -15
  160. data/pulp_python_client.egg-info/SOURCES.txt +0 -105
  161. data/pulp_python_client.egg-info/dependency_links.txt +0 -1
  162. data/pulp_python_client.egg-info/requires.txt +0 -4
  163. data/pulp_python_client.egg-info/top_level.txt +0 -1
  164. data/pulpcore/__init__.py +0 -2
  165. data/pulpcore/client/__init__.py +0 -2
  166. data/pulpcore/client/pulp_python/__init__.py +0 -75
  167. data/pulpcore/client/pulp_python/api/__init__.py +0 -15
  168. data/pulpcore/client/pulp_python/api/content_packages_api.py +0 -626
  169. data/pulpcore/client/pulp_python/api/distributions_pypi_api.py +0 -830
  170. data/pulpcore/client/pulp_python/api/publications_pypi_api.py +0 -566
  171. data/pulpcore/client/pulp_python/api/pypi_api.py +0 -162
  172. data/pulpcore/client/pulp_python/api/pypi_legacy_api.py +0 -185
  173. data/pulpcore/client/pulp_python/api/pypi_metadata_api.py +0 -171
  174. data/pulpcore/client/pulp_python/api/pypi_simple_api.py +0 -434
  175. data/pulpcore/client/pulp_python/api/remotes_python_api.py +0 -972
  176. data/pulpcore/client/pulp_python/api/repositories_python_api.py +0 -1063
  177. data/pulpcore/client/pulp_python/api/repositories_python_versions_api.py +0 -614
  178. data/pulpcore/client/pulp_python/api_client.py +0 -667
  179. data/pulpcore/client/pulp_python/configuration.py +0 -427
  180. data/pulpcore/client/pulp_python/exceptions.py +0 -121
  181. data/pulpcore/client/pulp_python/models/__init__.py +0 -51
  182. data/pulpcore/client/pulp_python/models/async_operation_response.py +0 -124
  183. data/pulpcore/client/pulp_python/models/content_summary.py +0 -176
  184. data/pulpcore/client/pulp_python/models/content_summary_response.py +0 -176
  185. data/pulpcore/client/pulp_python/models/exclude_platforms_enum.py +0 -103
  186. data/pulpcore/client/pulp_python/models/package_metadata_response.py +0 -209
  187. data/pulpcore/client/pulp_python/models/package_types_enum.py +0 -107
  188. data/pulpcore/client/pulp_python/models/package_upload.py +0 -187
  189. data/pulpcore/client/pulp_python/models/package_upload_task_response.py +0 -176
  190. data/pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +0 -197
  191. data/pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +0 -197
  192. data/pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +0 -197
  193. data/pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +0 -197
  194. data/pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +0 -197
  195. data/pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +0 -197
  196. data/pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +0 -286
  197. data/pulpcore/client/pulp_python/models/patchedpython_python_remote.py +0 -823
  198. data/pulpcore/client/pulp_python/models/patchedpython_python_repository.py +0 -259
  199. data/pulpcore/client/pulp_python/models/policy_enum.py +0 -102
  200. data/pulpcore/client/pulp_python/models/python_bander_remote.py +0 -181
  201. data/pulpcore/client/pulp_python/models/python_python_distribution.py +0 -288
  202. data/pulpcore/client/pulp_python/models/python_python_distribution_response.py +0 -368
  203. data/pulpcore/client/pulp_python/models/python_python_package_content.py +0 -824
  204. data/pulpcore/client/pulp_python/models/python_python_package_content_response.py +0 -933
  205. data/pulpcore/client/pulp_python/models/python_python_publication.py +0 -149
  206. data/pulpcore/client/pulp_python/models/python_python_publication_response.py +0 -231
  207. data/pulpcore/client/pulp_python/models/python_python_remote.py +0 -825
  208. data/pulpcore/client/pulp_python/models/python_python_remote_response.py +0 -772
  209. data/pulpcore/client/pulp_python/models/python_python_repository.py +0 -260
  210. data/pulpcore/client/pulp_python/models/python_python_repository_response.py +0 -366
  211. data/pulpcore/client/pulp_python/models/repository_add_remove_content.py +0 -179
  212. data/pulpcore/client/pulp_python/models/repository_sync_url.py +0 -151
  213. data/pulpcore/client/pulp_python/models/repository_version.py +0 -123
  214. data/pulpcore/client/pulp_python/models/repository_version_response.py +0 -257
  215. data/pulpcore/client/pulp_python/models/summary_response.py +0 -182
  216. data/pulpcore/client/pulp_python/rest.py +0 -292
  217. data/requirements.txt +0 -6
  218. data/setup.cfg +0 -2
  219. data/setup.py +0 -42
  220. data/test/__init__.py +0 -0
  221. data/test/test_async_operation_response.py +0 -54
  222. data/test/test_content_packages_api.py +0 -55
  223. data/test/test_content_summary.py +0 -70
  224. data/test/test_content_summary_response.py +0 -70
  225. data/test/test_distributions_pypi_api.py +0 -76
  226. data/test/test_exclude_platforms_enum.py +0 -52
  227. data/test/test_package_metadata_response.py +0 -60
  228. data/test/test_package_types_enum.py +0 -52
  229. data/test/test_package_upload.py +0 -57
  230. data/test/test_package_upload_task_response.py +0 -58
  231. data/test/test_paginated_repository_version_response_list.py +0 -64
  232. data/test/test_paginatedpython_python_distribution_response_list.py +0 -68
  233. data/test/test_paginatedpython_python_package_content_response_list.py +0 -88
  234. data/test/test_paginatedpython_python_publication_response_list.py +0 -65
  235. data/test/test_paginatedpython_python_remote_response_list.py +0 -88
  236. data/test/test_paginatedpython_python_repository_response_list.py +0 -68
  237. data/test/test_patchedpython_python_distribution.py +0 -59
  238. data/test/test_patchedpython_python_remote.py +0 -84
  239. data/test/test_patchedpython_python_repository.py +0 -58
  240. data/test/test_policy_enum.py +0 -52
  241. data/test/test_publications_pypi_api.py +0 -62
  242. data/test/test_pypi_api.py +0 -41
  243. data/test/test_pypi_legacy_api.py +0 -41
  244. data/test/test_pypi_metadata_api.py +0 -41
  245. data/test/test_pypi_simple_api.py +0 -55
  246. data/test/test_python_bander_remote.py +0 -57
  247. data/test/test_python_python_distribution.py +0 -61
  248. data/test/test_python_python_distribution_response.py +0 -64
  249. data/test/test_python_python_package_content.py +0 -79
  250. data/test/test_python_python_package_content_response.py +0 -82
  251. data/test/test_python_python_publication.py +0 -54
  252. data/test/test_python_python_publication_response.py +0 -59
  253. data/test/test_python_python_remote.py +0 -86
  254. data/test/test_python_python_remote_response.py +0 -84
  255. data/test/test_python_python_repository.py +0 -59
  256. data/test/test_python_python_repository_response.py +0 -63
  257. data/test/test_remotes_python_api.py +0 -83
  258. data/test/test_repositories_python_api.py +0 -90
  259. data/test/test_repositories_python_versions_api.py +0 -61
  260. data/test/test_repository_add_remove_content.py +0 -59
  261. data/test/test_repository_sync_url.py +0 -54
  262. data/test/test_repository_version.py +0 -53
  263. data/test/test_repository_version_response.py +0 -58
  264. data/test/test_summary_response.py +0 -58
  265. data/test-requirements.txt +0 -3
  266. data/tox.ini +0 -9
@@ -1,434 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
12
-
13
-
14
- from __future__ import absolute_import
15
-
16
- import re # noqa: F401
17
-
18
- # python 2 and python 3 compatibility library
19
- import six
20
-
21
- from pulpcore.client.pulp_python.api_client import ApiClient
22
- from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
23
- ApiTypeError,
24
- ApiValueError
25
- )
26
-
27
-
28
- class PypiSimpleApi(object):
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None):
36
- if api_client is None:
37
- api_client = ApiClient()
38
- self.api_client = api_client
39
-
40
- def create(self, path, content, sha256_digest, **kwargs): # noqa: E501
41
- """Upload a package # noqa: E501
42
-
43
- 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, ...) # noqa: E501
44
- This method makes a synchronous HTTP request by default. To make an
45
- asynchronous HTTP request, please pass async_req=True
46
- >>> thread = api.create(path, content, sha256_digest, async_req=True)
47
- >>> result = thread.get()
48
-
49
- :param async_req bool: execute request asynchronously
50
- :param str path: (required)
51
- :param file content: A Python package release file to upload to the index. (required)
52
- :param str sha256_digest: SHA256 of package to validate upload integrity. (required)
53
- :param str action: Defaults to `file_upload`, don't change it or request will fail!
54
- :param _preload_content: if False, the urllib3.HTTPResponse object will
55
- be returned without reading/decoding response
56
- data. Default is True.
57
- :param _request_timeout: timeout setting for this request. If one
58
- number provided, it will be total request
59
- timeout. It can also be a pair (tuple) of
60
- (connection, read) timeouts.
61
- :return: PackageUploadTaskResponse
62
- If the method is called asynchronously,
63
- returns the request thread.
64
- """
65
- kwargs['_return_http_data_only'] = True
66
- return self.create_with_http_info(path, content, sha256_digest, **kwargs) # noqa: E501
67
-
68
- def create_with_http_info(self, path, content, sha256_digest, **kwargs): # noqa: E501
69
- """Upload a package # noqa: E501
70
-
71
- 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, ...) # noqa: E501
72
- This method makes a synchronous HTTP request by default. To make an
73
- asynchronous HTTP request, please pass async_req=True
74
- >>> thread = api.create_with_http_info(path, content, sha256_digest, async_req=True)
75
- >>> result = thread.get()
76
-
77
- :param async_req bool: execute request asynchronously
78
- :param str path: (required)
79
- :param file content: A Python package release file to upload to the index. (required)
80
- :param str sha256_digest: SHA256 of package to validate upload integrity. (required)
81
- :param str action: Defaults to `file_upload`, don't change it or request will fail!
82
- :param _return_http_data_only: response data without head status code
83
- and headers
84
- :param _preload_content: if False, the urllib3.HTTPResponse object will
85
- be returned without reading/decoding response
86
- data. Default is True.
87
- :param _request_timeout: timeout setting for this request. If one
88
- number provided, it will be total request
89
- timeout. It can also be a pair (tuple) of
90
- (connection, read) timeouts.
91
- :return: tuple(PackageUploadTaskResponse, status_code(int), headers(HTTPHeaderDict))
92
- If the method is called asynchronously,
93
- returns the request thread.
94
- """
95
-
96
- local_var_params = locals()
97
-
98
- all_params = [
99
- 'path',
100
- 'content',
101
- 'sha256_digest',
102
- 'action'
103
- ]
104
- all_params.extend(
105
- [
106
- 'async_req',
107
- '_return_http_data_only',
108
- '_preload_content',
109
- '_request_timeout'
110
- ]
111
- )
112
-
113
- for key, val in six.iteritems(local_var_params['kwargs']):
114
- if key not in all_params:
115
- raise ApiTypeError(
116
- "Got an unexpected keyword argument '%s'"
117
- " to method create" % key
118
- )
119
- local_var_params[key] = val
120
- del local_var_params['kwargs']
121
- # verify the required parameter 'path' is set
122
- if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
123
- local_var_params['path'] is None): # noqa: E501
124
- raise ApiValueError("Missing the required parameter `path` when calling `create`") # noqa: E501
125
- # verify the required parameter 'content' is set
126
- if self.api_client.client_side_validation and ('content' not in local_var_params or # noqa: E501
127
- local_var_params['content'] is None): # noqa: E501
128
- raise ApiValueError("Missing the required parameter `content` when calling `create`") # noqa: E501
129
- # verify the required parameter 'sha256_digest' is set
130
- if self.api_client.client_side_validation and ('sha256_digest' not in local_var_params or # noqa: E501
131
- local_var_params['sha256_digest'] is None): # noqa: E501
132
- raise ApiValueError("Missing the required parameter `sha256_digest` when calling `create`") # noqa: E501
133
-
134
- if self.api_client.client_side_validation and ('sha256_digest' in local_var_params and # noqa: E501
135
- len(local_var_params['sha256_digest']) > 64): # noqa: E501
136
- raise ApiValueError("Invalid value for parameter `sha256_digest` when calling `create`, length must be less than or equal to `64`") # noqa: E501
137
- if self.api_client.client_side_validation and ('sha256_digest' in local_var_params and # noqa: E501
138
- len(local_var_params['sha256_digest']) < 64): # noqa: E501
139
- raise ApiValueError("Invalid value for parameter `sha256_digest` when calling `create`, length must be greater than or equal to `64`") # noqa: E501
140
- collection_formats = {}
141
-
142
- path_params = {}
143
- if 'path' in local_var_params:
144
- path_params['path'] = local_var_params['path'] # noqa: E501
145
-
146
- query_params = []
147
-
148
- header_params = {}
149
-
150
- form_params = []
151
- local_var_files = {}
152
- if 'content' in local_var_params:
153
- local_var_files['content'] = local_var_params['content'] # noqa: E501
154
- if 'action' in local_var_params:
155
- form_params.append(('action', local_var_params['action'])) # noqa: E501
156
- if 'sha256_digest' in local_var_params:
157
- form_params.append(('sha256_digest', local_var_params['sha256_digest'])) # noqa: E501
158
-
159
- body_params = None
160
- # HTTP header `Accept`
161
- header_params['Accept'] = self.api_client.select_header_accept(
162
- ['application/json']) # noqa: E501
163
-
164
- # HTTP header `Content-Type`
165
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
166
- ['multipart/form-data', 'application/x-www-form-urlencoded']) # noqa: E501
167
-
168
- # Authentication setting
169
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
170
-
171
- return self.api_client.call_api(
172
- '/pypi/{path}/simple/', 'POST',
173
- path_params,
174
- query_params,
175
- header_params,
176
- body=body_params,
177
- post_params=form_params,
178
- files=local_var_files,
179
- response_type='PackageUploadTaskResponse', # noqa: E501
180
- auth_settings=auth_settings,
181
- async_req=local_var_params.get('async_req'),
182
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
183
- _preload_content=local_var_params.get('_preload_content', True),
184
- _request_timeout=local_var_params.get('_request_timeout'),
185
- collection_formats=collection_formats)
186
-
187
- def read(self, path, **kwargs): # noqa: E501
188
- """Get index simple page # noqa: E501
189
-
190
- Gets the simple api html page for the index. # noqa: E501
191
- This method makes a synchronous HTTP request by default. To make an
192
- asynchronous HTTP request, please pass async_req=True
193
- >>> thread = api.read(path, async_req=True)
194
- >>> result = thread.get()
195
-
196
- :param async_req bool: execute request asynchronously
197
- :param str path: (required)
198
- :param str fields: A list of fields to include in the response.
199
- :param str exclude_fields: A list of fields to exclude from the response.
200
- :param _preload_content: if False, the urllib3.HTTPResponse object will
201
- be returned without reading/decoding response
202
- data. Default is True.
203
- :param _request_timeout: timeout setting for this request. If one
204
- number provided, it will be total request
205
- timeout. It can also be a pair (tuple) of
206
- (connection, read) timeouts.
207
- :return: None
208
- If the method is called asynchronously,
209
- returns the request thread.
210
- """
211
- kwargs['_return_http_data_only'] = True
212
- return self.read_with_http_info(path, **kwargs) # noqa: E501
213
-
214
- def read_with_http_info(self, path, **kwargs): # noqa: E501
215
- """Get index simple page # noqa: E501
216
-
217
- Gets the simple api html page for the index. # noqa: E501
218
- This method makes a synchronous HTTP request by default. To make an
219
- asynchronous HTTP request, please pass async_req=True
220
- >>> thread = api.read_with_http_info(path, async_req=True)
221
- >>> result = thread.get()
222
-
223
- :param async_req bool: execute request asynchronously
224
- :param str path: (required)
225
- :param str fields: A list of fields to include in the response.
226
- :param str exclude_fields: A list of fields to exclude from the response.
227
- :param _return_http_data_only: response data without head status code
228
- and headers
229
- :param _preload_content: if False, the urllib3.HTTPResponse object will
230
- be returned without reading/decoding response
231
- data. Default is True.
232
- :param _request_timeout: timeout setting for this request. If one
233
- number provided, it will be total request
234
- timeout. It can also be a pair (tuple) of
235
- (connection, read) timeouts.
236
- :return: None
237
- If the method is called asynchronously,
238
- returns the request thread.
239
- """
240
-
241
- local_var_params = locals()
242
-
243
- all_params = [
244
- 'path',
245
- 'fields',
246
- 'exclude_fields'
247
- ]
248
- all_params.extend(
249
- [
250
- 'async_req',
251
- '_return_http_data_only',
252
- '_preload_content',
253
- '_request_timeout'
254
- ]
255
- )
256
-
257
- for key, val in six.iteritems(local_var_params['kwargs']):
258
- if key not in all_params:
259
- raise ApiTypeError(
260
- "Got an unexpected keyword argument '%s'"
261
- " to method read" % key
262
- )
263
- local_var_params[key] = val
264
- del local_var_params['kwargs']
265
- # verify the required parameter 'path' is set
266
- if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
267
- local_var_params['path'] is None): # noqa: E501
268
- raise ApiValueError("Missing the required parameter `path` when calling `read`") # noqa: E501
269
-
270
- collection_formats = {}
271
-
272
- path_params = {}
273
- if 'path' in local_var_params:
274
- path_params['path'] = local_var_params['path'] # noqa: E501
275
-
276
- query_params = []
277
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
278
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
279
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
280
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
281
-
282
- header_params = {}
283
-
284
- form_params = []
285
- local_var_files = {}
286
-
287
- body_params = None
288
- # Authentication setting
289
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
290
-
291
- return self.api_client.call_api(
292
- '/pypi/{path}/simple/', 'GET',
293
- path_params,
294
- query_params,
295
- header_params,
296
- body=body_params,
297
- post_params=form_params,
298
- files=local_var_files,
299
- response_type=None, # noqa: E501
300
- auth_settings=auth_settings,
301
- async_req=local_var_params.get('async_req'),
302
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
303
- _preload_content=local_var_params.get('_preload_content', True),
304
- _request_timeout=local_var_params.get('_request_timeout'),
305
- collection_formats=collection_formats)
306
-
307
- def read_0(self, package, path, **kwargs): # noqa: E501
308
- """Get package simple page # noqa: E501
309
-
310
- Retrieves the simple api html page for a package. # noqa: E501
311
- This method makes a synchronous HTTP request by default. To make an
312
- asynchronous HTTP request, please pass async_req=True
313
- >>> thread = api.read_0(package, path, async_req=True)
314
- >>> result = thread.get()
315
-
316
- :param async_req bool: execute request asynchronously
317
- :param str package: (required)
318
- :param str path: (required)
319
- :param str fields: A list of fields to include in the response.
320
- :param str exclude_fields: A list of fields to exclude from the response.
321
- :param _preload_content: if False, the urllib3.HTTPResponse object will
322
- be returned without reading/decoding response
323
- data. Default is True.
324
- :param _request_timeout: timeout setting for this request. If one
325
- number provided, it will be total request
326
- timeout. It can also be a pair (tuple) of
327
- (connection, read) timeouts.
328
- :return: None
329
- If the method is called asynchronously,
330
- returns the request thread.
331
- """
332
- kwargs['_return_http_data_only'] = True
333
- return self.read_0_with_http_info(package, path, **kwargs) # noqa: E501
334
-
335
- def read_0_with_http_info(self, package, path, **kwargs): # noqa: E501
336
- """Get package simple page # noqa: E501
337
-
338
- Retrieves the simple api html page for a package. # noqa: E501
339
- This method makes a synchronous HTTP request by default. To make an
340
- asynchronous HTTP request, please pass async_req=True
341
- >>> thread = api.read_0_with_http_info(package, path, async_req=True)
342
- >>> result = thread.get()
343
-
344
- :param async_req bool: execute request asynchronously
345
- :param str package: (required)
346
- :param str path: (required)
347
- :param str fields: A list of fields to include in the response.
348
- :param str exclude_fields: A list of fields to exclude from the response.
349
- :param _return_http_data_only: response data without head status code
350
- and headers
351
- :param _preload_content: if False, the urllib3.HTTPResponse object will
352
- be returned without reading/decoding response
353
- data. Default is True.
354
- :param _request_timeout: timeout setting for this request. If one
355
- number provided, it will be total request
356
- timeout. It can also be a pair (tuple) of
357
- (connection, read) timeouts.
358
- :return: None
359
- If the method is called asynchronously,
360
- returns the request thread.
361
- """
362
-
363
- local_var_params = locals()
364
-
365
- all_params = [
366
- 'package',
367
- 'path',
368
- 'fields',
369
- 'exclude_fields'
370
- ]
371
- all_params.extend(
372
- [
373
- 'async_req',
374
- '_return_http_data_only',
375
- '_preload_content',
376
- '_request_timeout'
377
- ]
378
- )
379
-
380
- for key, val in six.iteritems(local_var_params['kwargs']):
381
- if key not in all_params:
382
- raise ApiTypeError(
383
- "Got an unexpected keyword argument '%s'"
384
- " to method read_0" % key
385
- )
386
- local_var_params[key] = val
387
- del local_var_params['kwargs']
388
- # verify the required parameter 'package' is set
389
- if self.api_client.client_side_validation and ('package' not in local_var_params or # noqa: E501
390
- local_var_params['package'] is None): # noqa: E501
391
- raise ApiValueError("Missing the required parameter `package` when calling `read_0`") # noqa: E501
392
- # verify the required parameter 'path' is set
393
- if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
394
- local_var_params['path'] is None): # noqa: E501
395
- raise ApiValueError("Missing the required parameter `path` when calling `read_0`") # noqa: E501
396
-
397
- collection_formats = {}
398
-
399
- path_params = {}
400
- if 'package' in local_var_params:
401
- path_params['package'] = local_var_params['package'] # noqa: E501
402
- if 'path' in local_var_params:
403
- path_params['path'] = local_var_params['path'] # noqa: E501
404
-
405
- query_params = []
406
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
407
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
408
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
409
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
410
-
411
- header_params = {}
412
-
413
- form_params = []
414
- local_var_files = {}
415
-
416
- body_params = None
417
- # Authentication setting
418
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
419
-
420
- return self.api_client.call_api(
421
- '/pypi/{path}/simple/{package}/', 'GET',
422
- path_params,
423
- query_params,
424
- header_params,
425
- body=body_params,
426
- post_params=form_params,
427
- files=local_var_files,
428
- response_type=None, # noqa: E501
429
- auth_settings=auth_settings,
430
- async_req=local_var_params.get('async_req'),
431
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
432
- _preload_content=local_var_params.get('_preload_content', True),
433
- _request_timeout=local_var_params.get('_request_timeout'),
434
- collection_formats=collection_formats)
@@ -1,972 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
12
-
13
-
14
- from __future__ import absolute_import
15
-
16
- import re # noqa: F401
17
-
18
- # python 2 and python 3 compatibility library
19
- import six
20
-
21
- from pulpcore.client.pulp_python.api_client import ApiClient
22
- from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
23
- ApiTypeError,
24
- ApiValueError
25
- )
26
-
27
-
28
- class RemotesPythonApi(object):
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None):
36
- if api_client is None:
37
- api_client = ApiClient()
38
- self.api_client = api_client
39
-
40
- def create(self, python_python_remote, **kwargs): # noqa: E501
41
- """Create a python remote # noqa: E501
42
-
43
- Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
44
- This method makes a synchronous HTTP request by default. To make an
45
- asynchronous HTTP request, please pass async_req=True
46
- >>> thread = api.create(python_python_remote, async_req=True)
47
- >>> result = thread.get()
48
-
49
- :param async_req bool: execute request asynchronously
50
- :param PythonPythonRemote python_python_remote: (required)
51
- :param _preload_content: if False, the urllib3.HTTPResponse object will
52
- be returned without reading/decoding response
53
- data. Default is True.
54
- :param _request_timeout: timeout setting for this request. If one
55
- number provided, it will be total request
56
- timeout. It can also be a pair (tuple) of
57
- (connection, read) timeouts.
58
- :return: PythonPythonRemoteResponse
59
- If the method is called asynchronously,
60
- returns the request thread.
61
- """
62
- kwargs['_return_http_data_only'] = True
63
- return self.create_with_http_info(python_python_remote, **kwargs) # noqa: E501
64
-
65
- def create_with_http_info(self, python_python_remote, **kwargs): # noqa: E501
66
- """Create a python remote # noqa: E501
67
-
68
- Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
69
- This method makes a synchronous HTTP request by default. To make an
70
- asynchronous HTTP request, please pass async_req=True
71
- >>> thread = api.create_with_http_info(python_python_remote, async_req=True)
72
- >>> result = thread.get()
73
-
74
- :param async_req bool: execute request asynchronously
75
- :param PythonPythonRemote python_python_remote: (required)
76
- :param _return_http_data_only: response data without head status code
77
- and headers
78
- :param _preload_content: if False, the urllib3.HTTPResponse object will
79
- be returned without reading/decoding response
80
- data. Default is True.
81
- :param _request_timeout: timeout setting for this request. If one
82
- number provided, it will be total request
83
- timeout. It can also be a pair (tuple) of
84
- (connection, read) timeouts.
85
- :return: tuple(PythonPythonRemoteResponse, status_code(int), headers(HTTPHeaderDict))
86
- If the method is called asynchronously,
87
- returns the request thread.
88
- """
89
-
90
- local_var_params = locals()
91
-
92
- all_params = [
93
- 'python_python_remote'
94
- ]
95
- all_params.extend(
96
- [
97
- 'async_req',
98
- '_return_http_data_only',
99
- '_preload_content',
100
- '_request_timeout'
101
- ]
102
- )
103
-
104
- for key, val in six.iteritems(local_var_params['kwargs']):
105
- if key not in all_params:
106
- raise ApiTypeError(
107
- "Got an unexpected keyword argument '%s'"
108
- " to method create" % key
109
- )
110
- local_var_params[key] = val
111
- del local_var_params['kwargs']
112
- # verify the required parameter 'python_python_remote' is set
113
- if self.api_client.client_side_validation and ('python_python_remote' not in local_var_params or # noqa: E501
114
- local_var_params['python_python_remote'] is None): # noqa: E501
115
- raise ApiValueError("Missing the required parameter `python_python_remote` when calling `create`") # noqa: E501
116
-
117
- collection_formats = {}
118
-
119
- path_params = {}
120
-
121
- query_params = []
122
-
123
- header_params = {}
124
-
125
- form_params = []
126
- local_var_files = {}
127
-
128
- body_params = None
129
- if 'python_python_remote' in local_var_params:
130
- body_params = local_var_params['python_python_remote']
131
- # HTTP header `Accept`
132
- header_params['Accept'] = self.api_client.select_header_accept(
133
- ['application/json']) # noqa: E501
134
-
135
- # HTTP header `Content-Type`
136
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
137
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
138
-
139
- # Authentication setting
140
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
141
-
142
- return self.api_client.call_api(
143
- '/pulp/api/v3/remotes/python/python/', 'POST',
144
- path_params,
145
- query_params,
146
- header_params,
147
- body=body_params,
148
- post_params=form_params,
149
- files=local_var_files,
150
- response_type='PythonPythonRemoteResponse', # noqa: E501
151
- auth_settings=auth_settings,
152
- async_req=local_var_params.get('async_req'),
153
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
154
- _preload_content=local_var_params.get('_preload_content', True),
155
- _request_timeout=local_var_params.get('_request_timeout'),
156
- collection_formats=collection_formats)
157
-
158
- def delete(self, python_python_remote_href, **kwargs): # noqa: E501
159
- """Delete a python remote # noqa: E501
160
-
161
- Trigger an asynchronous delete task # noqa: E501
162
- This method makes a synchronous HTTP request by default. To make an
163
- asynchronous HTTP request, please pass async_req=True
164
- >>> thread = api.delete(python_python_remote_href, async_req=True)
165
- >>> result = thread.get()
166
-
167
- :param async_req bool: execute request asynchronously
168
- :param str python_python_remote_href: (required)
169
- :param _preload_content: if False, the urllib3.HTTPResponse object will
170
- be returned without reading/decoding response
171
- data. Default is True.
172
- :param _request_timeout: timeout setting for this request. If one
173
- number provided, it will be total request
174
- timeout. It can also be a pair (tuple) of
175
- (connection, read) timeouts.
176
- :return: AsyncOperationResponse
177
- If the method is called asynchronously,
178
- returns the request thread.
179
- """
180
- kwargs['_return_http_data_only'] = True
181
- return self.delete_with_http_info(python_python_remote_href, **kwargs) # noqa: E501
182
-
183
- def delete_with_http_info(self, python_python_remote_href, **kwargs): # noqa: E501
184
- """Delete a python remote # noqa: E501
185
-
186
- Trigger an asynchronous delete task # noqa: E501
187
- This method makes a synchronous HTTP request by default. To make an
188
- asynchronous HTTP request, please pass async_req=True
189
- >>> thread = api.delete_with_http_info(python_python_remote_href, async_req=True)
190
- >>> result = thread.get()
191
-
192
- :param async_req bool: execute request asynchronously
193
- :param str python_python_remote_href: (required)
194
- :param _return_http_data_only: response data without head status code
195
- and headers
196
- :param _preload_content: if False, the urllib3.HTTPResponse object will
197
- be returned without reading/decoding response
198
- data. Default is True.
199
- :param _request_timeout: timeout setting for this request. If one
200
- number provided, it will be total request
201
- timeout. It can also be a pair (tuple) of
202
- (connection, read) timeouts.
203
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
204
- If the method is called asynchronously,
205
- returns the request thread.
206
- """
207
-
208
- local_var_params = locals()
209
-
210
- all_params = [
211
- 'python_python_remote_href'
212
- ]
213
- all_params.extend(
214
- [
215
- 'async_req',
216
- '_return_http_data_only',
217
- '_preload_content',
218
- '_request_timeout'
219
- ]
220
- )
221
-
222
- for key, val in six.iteritems(local_var_params['kwargs']):
223
- if key not in all_params:
224
- raise ApiTypeError(
225
- "Got an unexpected keyword argument '%s'"
226
- " to method delete" % key
227
- )
228
- local_var_params[key] = val
229
- del local_var_params['kwargs']
230
- # verify the required parameter 'python_python_remote_href' is set
231
- if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
232
- local_var_params['python_python_remote_href'] is None): # noqa: E501
233
- raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `delete`") # noqa: E501
234
-
235
- collection_formats = {}
236
-
237
- path_params = {}
238
- if 'python_python_remote_href' in local_var_params:
239
- path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
240
-
241
- query_params = []
242
-
243
- header_params = {}
244
-
245
- form_params = []
246
- local_var_files = {}
247
-
248
- body_params = None
249
- # HTTP header `Accept`
250
- header_params['Accept'] = self.api_client.select_header_accept(
251
- ['application/json']) # noqa: E501
252
-
253
- # Authentication setting
254
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
255
-
256
- return self.api_client.call_api(
257
- '{python_python_remote_href}', 'DELETE',
258
- path_params,
259
- query_params,
260
- header_params,
261
- body=body_params,
262
- post_params=form_params,
263
- files=local_var_files,
264
- response_type='AsyncOperationResponse', # noqa: E501
265
- auth_settings=auth_settings,
266
- async_req=local_var_params.get('async_req'),
267
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
268
- _preload_content=local_var_params.get('_preload_content', True),
269
- _request_timeout=local_var_params.get('_request_timeout'),
270
- collection_formats=collection_formats)
271
-
272
- def from_bandersnatch(self, config, name, **kwargs): # noqa: E501
273
- """Create from Bandersnatch # noqa: E501
274
-
275
- Takes the fields specified in the Bandersnatch config and creates a Python Remote from it. # noqa: E501
276
- This method makes a synchronous HTTP request by default. To make an
277
- asynchronous HTTP request, please pass async_req=True
278
- >>> thread = api.from_bandersnatch(config, name, async_req=True)
279
- >>> result = thread.get()
280
-
281
- :param async_req bool: execute request asynchronously
282
- :param file config: A Bandersnatch config that may be used to construct a Python Remote. (required)
283
- :param str name: A unique name for this remote (required)
284
- :param PolicyEnum policy: The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' is the default.
285
- :param _preload_content: if False, the urllib3.HTTPResponse object will
286
- be returned without reading/decoding response
287
- data. Default is True.
288
- :param _request_timeout: timeout setting for this request. If one
289
- number provided, it will be total request
290
- timeout. It can also be a pair (tuple) of
291
- (connection, read) timeouts.
292
- :return: PythonPythonRemoteResponse
293
- If the method is called asynchronously,
294
- returns the request thread.
295
- """
296
- kwargs['_return_http_data_only'] = True
297
- return self.from_bandersnatch_with_http_info(config, name, **kwargs) # noqa: E501
298
-
299
- def from_bandersnatch_with_http_info(self, config, name, **kwargs): # noqa: E501
300
- """Create from Bandersnatch # noqa: E501
301
-
302
- Takes the fields specified in the Bandersnatch config and creates a Python Remote from it. # noqa: E501
303
- This method makes a synchronous HTTP request by default. To make an
304
- asynchronous HTTP request, please pass async_req=True
305
- >>> thread = api.from_bandersnatch_with_http_info(config, name, async_req=True)
306
- >>> result = thread.get()
307
-
308
- :param async_req bool: execute request asynchronously
309
- :param file config: A Bandersnatch config that may be used to construct a Python Remote. (required)
310
- :param str name: A unique name for this remote (required)
311
- :param PolicyEnum policy: The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' is the default.
312
- :param _return_http_data_only: response data without head status code
313
- and headers
314
- :param _preload_content: if False, the urllib3.HTTPResponse object will
315
- be returned without reading/decoding response
316
- data. Default is True.
317
- :param _request_timeout: timeout setting for this request. If one
318
- number provided, it will be total request
319
- timeout. It can also be a pair (tuple) of
320
- (connection, read) timeouts.
321
- :return: tuple(PythonPythonRemoteResponse, status_code(int), headers(HTTPHeaderDict))
322
- If the method is called asynchronously,
323
- returns the request thread.
324
- """
325
-
326
- local_var_params = locals()
327
-
328
- all_params = [
329
- 'config',
330
- 'name',
331
- 'policy'
332
- ]
333
- all_params.extend(
334
- [
335
- 'async_req',
336
- '_return_http_data_only',
337
- '_preload_content',
338
- '_request_timeout'
339
- ]
340
- )
341
-
342
- for key, val in six.iteritems(local_var_params['kwargs']):
343
- if key not in all_params:
344
- raise ApiTypeError(
345
- "Got an unexpected keyword argument '%s'"
346
- " to method from_bandersnatch" % key
347
- )
348
- local_var_params[key] = val
349
- del local_var_params['kwargs']
350
- # verify the required parameter 'config' is set
351
- if self.api_client.client_side_validation and ('config' not in local_var_params or # noqa: E501
352
- local_var_params['config'] is None): # noqa: E501
353
- raise ApiValueError("Missing the required parameter `config` when calling `from_bandersnatch`") # noqa: E501
354
- # verify the required parameter 'name' is set
355
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
356
- local_var_params['name'] is None): # noqa: E501
357
- raise ApiValueError("Missing the required parameter `name` when calling `from_bandersnatch`") # noqa: E501
358
-
359
- collection_formats = {}
360
-
361
- path_params = {}
362
-
363
- query_params = []
364
-
365
- header_params = {}
366
-
367
- form_params = []
368
- local_var_files = {}
369
- if 'config' in local_var_params:
370
- local_var_files['config'] = local_var_params['config'] # noqa: E501
371
- if 'name' in local_var_params:
372
- form_params.append(('name', local_var_params['name'])) # noqa: E501
373
- if 'policy' in local_var_params:
374
- form_params.append(('policy', local_var_params['policy'])) # noqa: E501
375
-
376
- body_params = None
377
- # HTTP header `Accept`
378
- header_params['Accept'] = self.api_client.select_header_accept(
379
- ['application/json']) # noqa: E501
380
-
381
- # HTTP header `Content-Type`
382
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
383
- ['multipart/form-data', 'application/x-www-form-urlencoded']) # noqa: E501
384
-
385
- # Authentication setting
386
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
387
-
388
- return self.api_client.call_api(
389
- '/pulp/api/v3/remotes/python/python/from_bandersnatch/', 'POST',
390
- path_params,
391
- query_params,
392
- header_params,
393
- body=body_params,
394
- post_params=form_params,
395
- files=local_var_files,
396
- response_type='PythonPythonRemoteResponse', # noqa: E501
397
- auth_settings=auth_settings,
398
- async_req=local_var_params.get('async_req'),
399
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
400
- _preload_content=local_var_params.get('_preload_content', True),
401
- _request_timeout=local_var_params.get('_request_timeout'),
402
- collection_formats=collection_formats)
403
-
404
- def list(self, **kwargs): # noqa: E501
405
- """List python remotes # noqa: E501
406
-
407
- Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
408
- This method makes a synchronous HTTP request by default. To make an
409
- asynchronous HTTP request, please pass async_req=True
410
- >>> thread = api.list(async_req=True)
411
- >>> result = thread.get()
412
-
413
- :param async_req bool: execute request asynchronously
414
- :param int limit: Number of results to return per page.
415
- :param str name:
416
- :param str name__contains: Filter results where name contains value
417
- :param str name__icontains: Filter results where name contains value
418
- :param list[str] name__in: Filter results where name is in a comma-separated list of values
419
- :param str name__startswith: Filter results where name starts with value
420
- :param int offset: The initial index from which to return the results.
421
- :param str ordering: Which field to use when ordering the results.
422
- :param str pulp_label_select: Filter labels by search string
423
- :param datetime pulp_last_updated: ISO 8601 formatted dates are supported
424
- :param datetime pulp_last_updated__gt: Filter results where pulp_last_updated is greater than value
425
- :param datetime pulp_last_updated__gte: Filter results where pulp_last_updated is greater than or equal to value
426
- :param datetime pulp_last_updated__lt: Filter results where pulp_last_updated is less than value
427
- :param datetime pulp_last_updated__lte: Filter results where pulp_last_updated is less than or equal to value
428
- :param list[datetime] pulp_last_updated__range: Filter results where pulp_last_updated is between two comma separated values
429
- :param str fields: A list of fields to include in the response.
430
- :param str exclude_fields: A list of fields to exclude from the response.
431
- :param _preload_content: if False, the urllib3.HTTPResponse object will
432
- be returned without reading/decoding response
433
- data. Default is True.
434
- :param _request_timeout: timeout setting for this request. If one
435
- number provided, it will be total request
436
- timeout. It can also be a pair (tuple) of
437
- (connection, read) timeouts.
438
- :return: PaginatedpythonPythonRemoteResponseList
439
- If the method is called asynchronously,
440
- returns the request thread.
441
- """
442
- kwargs['_return_http_data_only'] = True
443
- return self.list_with_http_info(**kwargs) # noqa: E501
444
-
445
- def list_with_http_info(self, **kwargs): # noqa: E501
446
- """List python remotes # noqa: E501
447
-
448
- Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
449
- This method makes a synchronous HTTP request by default. To make an
450
- asynchronous HTTP request, please pass async_req=True
451
- >>> thread = api.list_with_http_info(async_req=True)
452
- >>> result = thread.get()
453
-
454
- :param async_req bool: execute request asynchronously
455
- :param int limit: Number of results to return per page.
456
- :param str name:
457
- :param str name__contains: Filter results where name contains value
458
- :param str name__icontains: Filter results where name contains value
459
- :param list[str] name__in: Filter results where name is in a comma-separated list of values
460
- :param str name__startswith: Filter results where name starts with value
461
- :param int offset: The initial index from which to return the results.
462
- :param str ordering: Which field to use when ordering the results.
463
- :param str pulp_label_select: Filter labels by search string
464
- :param datetime pulp_last_updated: ISO 8601 formatted dates are supported
465
- :param datetime pulp_last_updated__gt: Filter results where pulp_last_updated is greater than value
466
- :param datetime pulp_last_updated__gte: Filter results where pulp_last_updated is greater than or equal to value
467
- :param datetime pulp_last_updated__lt: Filter results where pulp_last_updated is less than value
468
- :param datetime pulp_last_updated__lte: Filter results where pulp_last_updated is less than or equal to value
469
- :param list[datetime] pulp_last_updated__range: Filter results where pulp_last_updated is between two comma separated values
470
- :param str fields: A list of fields to include in the response.
471
- :param str exclude_fields: A list of fields to exclude from the response.
472
- :param _return_http_data_only: response data without head status code
473
- and headers
474
- :param _preload_content: if False, the urllib3.HTTPResponse object will
475
- be returned without reading/decoding response
476
- data. Default is True.
477
- :param _request_timeout: timeout setting for this request. If one
478
- number provided, it will be total request
479
- timeout. It can also be a pair (tuple) of
480
- (connection, read) timeouts.
481
- :return: tuple(PaginatedpythonPythonRemoteResponseList, status_code(int), headers(HTTPHeaderDict))
482
- If the method is called asynchronously,
483
- returns the request thread.
484
- """
485
-
486
- local_var_params = locals()
487
-
488
- all_params = [
489
- 'limit',
490
- 'name',
491
- 'name__contains',
492
- 'name__icontains',
493
- 'name__in',
494
- 'name__startswith',
495
- 'offset',
496
- 'ordering',
497
- 'pulp_label_select',
498
- 'pulp_last_updated',
499
- 'pulp_last_updated__gt',
500
- 'pulp_last_updated__gte',
501
- 'pulp_last_updated__lt',
502
- 'pulp_last_updated__lte',
503
- 'pulp_last_updated__range',
504
- 'fields',
505
- 'exclude_fields'
506
- ]
507
- all_params.extend(
508
- [
509
- 'async_req',
510
- '_return_http_data_only',
511
- '_preload_content',
512
- '_request_timeout'
513
- ]
514
- )
515
-
516
- for key, val in six.iteritems(local_var_params['kwargs']):
517
- if key not in all_params:
518
- raise ApiTypeError(
519
- "Got an unexpected keyword argument '%s'"
520
- " to method list" % key
521
- )
522
- local_var_params[key] = val
523
- del local_var_params['kwargs']
524
-
525
- collection_formats = {}
526
-
527
- path_params = {}
528
-
529
- query_params = []
530
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
531
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
532
- if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501
533
- query_params.append(('name', local_var_params['name'])) # noqa: E501
534
- if 'name__contains' in local_var_params and local_var_params['name__contains'] is not None: # noqa: E501
535
- query_params.append(('name__contains', local_var_params['name__contains'])) # noqa: E501
536
- if 'name__icontains' in local_var_params and local_var_params['name__icontains'] is not None: # noqa: E501
537
- query_params.append(('name__icontains', local_var_params['name__icontains'])) # noqa: E501
538
- if 'name__in' in local_var_params and local_var_params['name__in'] is not None: # noqa: E501
539
- query_params.append(('name__in', local_var_params['name__in'])) # noqa: E501
540
- collection_formats['name__in'] = 'csv' # noqa: E501
541
- if 'name__startswith' in local_var_params and local_var_params['name__startswith'] is not None: # noqa: E501
542
- query_params.append(('name__startswith', local_var_params['name__startswith'])) # noqa: E501
543
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
544
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
545
- if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
546
- query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
547
- if 'pulp_label_select' in local_var_params and local_var_params['pulp_label_select'] is not None: # noqa: E501
548
- query_params.append(('pulp_label_select', local_var_params['pulp_label_select'])) # noqa: E501
549
- if 'pulp_last_updated' in local_var_params and local_var_params['pulp_last_updated'] is not None: # noqa: E501
550
- query_params.append(('pulp_last_updated', local_var_params['pulp_last_updated'])) # noqa: E501
551
- if 'pulp_last_updated__gt' in local_var_params and local_var_params['pulp_last_updated__gt'] is not None: # noqa: E501
552
- query_params.append(('pulp_last_updated__gt', local_var_params['pulp_last_updated__gt'])) # noqa: E501
553
- if 'pulp_last_updated__gte' in local_var_params and local_var_params['pulp_last_updated__gte'] is not None: # noqa: E501
554
- query_params.append(('pulp_last_updated__gte', local_var_params['pulp_last_updated__gte'])) # noqa: E501
555
- if 'pulp_last_updated__lt' in local_var_params and local_var_params['pulp_last_updated__lt'] is not None: # noqa: E501
556
- query_params.append(('pulp_last_updated__lt', local_var_params['pulp_last_updated__lt'])) # noqa: E501
557
- if 'pulp_last_updated__lte' in local_var_params and local_var_params['pulp_last_updated__lte'] is not None: # noqa: E501
558
- query_params.append(('pulp_last_updated__lte', local_var_params['pulp_last_updated__lte'])) # noqa: E501
559
- if 'pulp_last_updated__range' in local_var_params and local_var_params['pulp_last_updated__range'] is not None: # noqa: E501
560
- query_params.append(('pulp_last_updated__range', local_var_params['pulp_last_updated__range'])) # noqa: E501
561
- collection_formats['pulp_last_updated__range'] = 'csv' # noqa: E501
562
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
563
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
564
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
565
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
566
-
567
- header_params = {}
568
-
569
- form_params = []
570
- local_var_files = {}
571
-
572
- body_params = None
573
- # HTTP header `Accept`
574
- header_params['Accept'] = self.api_client.select_header_accept(
575
- ['application/json']) # noqa: E501
576
-
577
- # Authentication setting
578
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
579
-
580
- return self.api_client.call_api(
581
- '/pulp/api/v3/remotes/python/python/', 'GET',
582
- path_params,
583
- query_params,
584
- header_params,
585
- body=body_params,
586
- post_params=form_params,
587
- files=local_var_files,
588
- response_type='PaginatedpythonPythonRemoteResponseList', # noqa: E501
589
- auth_settings=auth_settings,
590
- async_req=local_var_params.get('async_req'),
591
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
592
- _preload_content=local_var_params.get('_preload_content', True),
593
- _request_timeout=local_var_params.get('_request_timeout'),
594
- collection_formats=collection_formats)
595
-
596
- def partial_update(self, python_python_remote_href, patchedpython_python_remote, **kwargs): # noqa: E501
597
- """Update a python remote # noqa: E501
598
-
599
- Trigger an asynchronous partial update task # noqa: E501
600
- This method makes a synchronous HTTP request by default. To make an
601
- asynchronous HTTP request, please pass async_req=True
602
- >>> thread = api.partial_update(python_python_remote_href, patchedpython_python_remote, async_req=True)
603
- >>> result = thread.get()
604
-
605
- :param async_req bool: execute request asynchronously
606
- :param str python_python_remote_href: (required)
607
- :param PatchedpythonPythonRemote patchedpython_python_remote: (required)
608
- :param _preload_content: if False, the urllib3.HTTPResponse object will
609
- be returned without reading/decoding response
610
- data. Default is True.
611
- :param _request_timeout: timeout setting for this request. If one
612
- number provided, it will be total request
613
- timeout. It can also be a pair (tuple) of
614
- (connection, read) timeouts.
615
- :return: AsyncOperationResponse
616
- If the method is called asynchronously,
617
- returns the request thread.
618
- """
619
- kwargs['_return_http_data_only'] = True
620
- return self.partial_update_with_http_info(python_python_remote_href, patchedpython_python_remote, **kwargs) # noqa: E501
621
-
622
- def partial_update_with_http_info(self, python_python_remote_href, patchedpython_python_remote, **kwargs): # noqa: E501
623
- """Update a python remote # noqa: E501
624
-
625
- Trigger an asynchronous partial update task # noqa: E501
626
- This method makes a synchronous HTTP request by default. To make an
627
- asynchronous HTTP request, please pass async_req=True
628
- >>> thread = api.partial_update_with_http_info(python_python_remote_href, patchedpython_python_remote, async_req=True)
629
- >>> result = thread.get()
630
-
631
- :param async_req bool: execute request asynchronously
632
- :param str python_python_remote_href: (required)
633
- :param PatchedpythonPythonRemote patchedpython_python_remote: (required)
634
- :param _return_http_data_only: response data without head status code
635
- and headers
636
- :param _preload_content: if False, the urllib3.HTTPResponse object will
637
- be returned without reading/decoding response
638
- data. Default is True.
639
- :param _request_timeout: timeout setting for this request. If one
640
- number provided, it will be total request
641
- timeout. It can also be a pair (tuple) of
642
- (connection, read) timeouts.
643
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
644
- If the method is called asynchronously,
645
- returns the request thread.
646
- """
647
-
648
- local_var_params = locals()
649
-
650
- all_params = [
651
- 'python_python_remote_href',
652
- 'patchedpython_python_remote'
653
- ]
654
- all_params.extend(
655
- [
656
- 'async_req',
657
- '_return_http_data_only',
658
- '_preload_content',
659
- '_request_timeout'
660
- ]
661
- )
662
-
663
- for key, val in six.iteritems(local_var_params['kwargs']):
664
- if key not in all_params:
665
- raise ApiTypeError(
666
- "Got an unexpected keyword argument '%s'"
667
- " to method partial_update" % key
668
- )
669
- local_var_params[key] = val
670
- del local_var_params['kwargs']
671
- # verify the required parameter 'python_python_remote_href' is set
672
- if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
673
- local_var_params['python_python_remote_href'] is None): # noqa: E501
674
- raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `partial_update`") # noqa: E501
675
- # verify the required parameter 'patchedpython_python_remote' is set
676
- if self.api_client.client_side_validation and ('patchedpython_python_remote' not in local_var_params or # noqa: E501
677
- local_var_params['patchedpython_python_remote'] is None): # noqa: E501
678
- raise ApiValueError("Missing the required parameter `patchedpython_python_remote` when calling `partial_update`") # noqa: E501
679
-
680
- collection_formats = {}
681
-
682
- path_params = {}
683
- if 'python_python_remote_href' in local_var_params:
684
- path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
685
-
686
- query_params = []
687
-
688
- header_params = {}
689
-
690
- form_params = []
691
- local_var_files = {}
692
-
693
- body_params = None
694
- if 'patchedpython_python_remote' in local_var_params:
695
- body_params = local_var_params['patchedpython_python_remote']
696
- # HTTP header `Accept`
697
- header_params['Accept'] = self.api_client.select_header_accept(
698
- ['application/json']) # noqa: E501
699
-
700
- # HTTP header `Content-Type`
701
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
702
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
703
-
704
- # Authentication setting
705
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
706
-
707
- return self.api_client.call_api(
708
- '{python_python_remote_href}', 'PATCH',
709
- path_params,
710
- query_params,
711
- header_params,
712
- body=body_params,
713
- post_params=form_params,
714
- files=local_var_files,
715
- response_type='AsyncOperationResponse', # noqa: E501
716
- auth_settings=auth_settings,
717
- async_req=local_var_params.get('async_req'),
718
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
719
- _preload_content=local_var_params.get('_preload_content', True),
720
- _request_timeout=local_var_params.get('_request_timeout'),
721
- collection_formats=collection_formats)
722
-
723
- def read(self, python_python_remote_href, **kwargs): # noqa: E501
724
- """Inspect a python remote # noqa: E501
725
-
726
- Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
727
- This method makes a synchronous HTTP request by default. To make an
728
- asynchronous HTTP request, please pass async_req=True
729
- >>> thread = api.read(python_python_remote_href, async_req=True)
730
- >>> result = thread.get()
731
-
732
- :param async_req bool: execute request asynchronously
733
- :param str python_python_remote_href: (required)
734
- :param str fields: A list of fields to include in the response.
735
- :param str exclude_fields: A list of fields to exclude from the response.
736
- :param _preload_content: if False, the urllib3.HTTPResponse object will
737
- be returned without reading/decoding response
738
- data. Default is True.
739
- :param _request_timeout: timeout setting for this request. If one
740
- number provided, it will be total request
741
- timeout. It can also be a pair (tuple) of
742
- (connection, read) timeouts.
743
- :return: PythonPythonRemoteResponse
744
- If the method is called asynchronously,
745
- returns the request thread.
746
- """
747
- kwargs['_return_http_data_only'] = True
748
- return self.read_with_http_info(python_python_remote_href, **kwargs) # noqa: E501
749
-
750
- def read_with_http_info(self, python_python_remote_href, **kwargs): # noqa: E501
751
- """Inspect a python remote # noqa: E501
752
-
753
- Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings. # noqa: E501
754
- This method makes a synchronous HTTP request by default. To make an
755
- asynchronous HTTP request, please pass async_req=True
756
- >>> thread = api.read_with_http_info(python_python_remote_href, async_req=True)
757
- >>> result = thread.get()
758
-
759
- :param async_req bool: execute request asynchronously
760
- :param str python_python_remote_href: (required)
761
- :param str fields: A list of fields to include in the response.
762
- :param str exclude_fields: A list of fields to exclude from the response.
763
- :param _return_http_data_only: response data without head status code
764
- and headers
765
- :param _preload_content: if False, the urllib3.HTTPResponse object will
766
- be returned without reading/decoding response
767
- data. Default is True.
768
- :param _request_timeout: timeout setting for this request. If one
769
- number provided, it will be total request
770
- timeout. It can also be a pair (tuple) of
771
- (connection, read) timeouts.
772
- :return: tuple(PythonPythonRemoteResponse, status_code(int), headers(HTTPHeaderDict))
773
- If the method is called asynchronously,
774
- returns the request thread.
775
- """
776
-
777
- local_var_params = locals()
778
-
779
- all_params = [
780
- 'python_python_remote_href',
781
- 'fields',
782
- 'exclude_fields'
783
- ]
784
- all_params.extend(
785
- [
786
- 'async_req',
787
- '_return_http_data_only',
788
- '_preload_content',
789
- '_request_timeout'
790
- ]
791
- )
792
-
793
- for key, val in six.iteritems(local_var_params['kwargs']):
794
- if key not in all_params:
795
- raise ApiTypeError(
796
- "Got an unexpected keyword argument '%s'"
797
- " to method read" % key
798
- )
799
- local_var_params[key] = val
800
- del local_var_params['kwargs']
801
- # verify the required parameter 'python_python_remote_href' is set
802
- if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
803
- local_var_params['python_python_remote_href'] is None): # noqa: E501
804
- raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `read`") # noqa: E501
805
-
806
- collection_formats = {}
807
-
808
- path_params = {}
809
- if 'python_python_remote_href' in local_var_params:
810
- path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
811
-
812
- query_params = []
813
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
814
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
815
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
816
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
817
-
818
- header_params = {}
819
-
820
- form_params = []
821
- local_var_files = {}
822
-
823
- body_params = None
824
- # HTTP header `Accept`
825
- header_params['Accept'] = self.api_client.select_header_accept(
826
- ['application/json']) # noqa: E501
827
-
828
- # Authentication setting
829
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
830
-
831
- return self.api_client.call_api(
832
- '{python_python_remote_href}', 'GET',
833
- path_params,
834
- query_params,
835
- header_params,
836
- body=body_params,
837
- post_params=form_params,
838
- files=local_var_files,
839
- response_type='PythonPythonRemoteResponse', # noqa: E501
840
- auth_settings=auth_settings,
841
- async_req=local_var_params.get('async_req'),
842
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
843
- _preload_content=local_var_params.get('_preload_content', True),
844
- _request_timeout=local_var_params.get('_request_timeout'),
845
- collection_formats=collection_formats)
846
-
847
- def update(self, python_python_remote_href, python_python_remote, **kwargs): # noqa: E501
848
- """Update a python remote # noqa: E501
849
-
850
- Trigger an asynchronous update task # noqa: E501
851
- This method makes a synchronous HTTP request by default. To make an
852
- asynchronous HTTP request, please pass async_req=True
853
- >>> thread = api.update(python_python_remote_href, python_python_remote, async_req=True)
854
- >>> result = thread.get()
855
-
856
- :param async_req bool: execute request asynchronously
857
- :param str python_python_remote_href: (required)
858
- :param PythonPythonRemote python_python_remote: (required)
859
- :param _preload_content: if False, the urllib3.HTTPResponse object will
860
- be returned without reading/decoding response
861
- data. Default is True.
862
- :param _request_timeout: timeout setting for this request. If one
863
- number provided, it will be total request
864
- timeout. It can also be a pair (tuple) of
865
- (connection, read) timeouts.
866
- :return: AsyncOperationResponse
867
- If the method is called asynchronously,
868
- returns the request thread.
869
- """
870
- kwargs['_return_http_data_only'] = True
871
- return self.update_with_http_info(python_python_remote_href, python_python_remote, **kwargs) # noqa: E501
872
-
873
- def update_with_http_info(self, python_python_remote_href, python_python_remote, **kwargs): # noqa: E501
874
- """Update a python remote # noqa: E501
875
-
876
- Trigger an asynchronous update task # noqa: E501
877
- This method makes a synchronous HTTP request by default. To make an
878
- asynchronous HTTP request, please pass async_req=True
879
- >>> thread = api.update_with_http_info(python_python_remote_href, python_python_remote, async_req=True)
880
- >>> result = thread.get()
881
-
882
- :param async_req bool: execute request asynchronously
883
- :param str python_python_remote_href: (required)
884
- :param PythonPythonRemote python_python_remote: (required)
885
- :param _return_http_data_only: response data without head status code
886
- and headers
887
- :param _preload_content: if False, the urllib3.HTTPResponse object will
888
- be returned without reading/decoding response
889
- data. Default is True.
890
- :param _request_timeout: timeout setting for this request. If one
891
- number provided, it will be total request
892
- timeout. It can also be a pair (tuple) of
893
- (connection, read) timeouts.
894
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
895
- If the method is called asynchronously,
896
- returns the request thread.
897
- """
898
-
899
- local_var_params = locals()
900
-
901
- all_params = [
902
- 'python_python_remote_href',
903
- 'python_python_remote'
904
- ]
905
- all_params.extend(
906
- [
907
- 'async_req',
908
- '_return_http_data_only',
909
- '_preload_content',
910
- '_request_timeout'
911
- ]
912
- )
913
-
914
- for key, val in six.iteritems(local_var_params['kwargs']):
915
- if key not in all_params:
916
- raise ApiTypeError(
917
- "Got an unexpected keyword argument '%s'"
918
- " to method update" % key
919
- )
920
- local_var_params[key] = val
921
- del local_var_params['kwargs']
922
- # verify the required parameter 'python_python_remote_href' is set
923
- if self.api_client.client_side_validation and ('python_python_remote_href' not in local_var_params or # noqa: E501
924
- local_var_params['python_python_remote_href'] is None): # noqa: E501
925
- raise ApiValueError("Missing the required parameter `python_python_remote_href` when calling `update`") # noqa: E501
926
- # verify the required parameter 'python_python_remote' is set
927
- if self.api_client.client_side_validation and ('python_python_remote' not in local_var_params or # noqa: E501
928
- local_var_params['python_python_remote'] is None): # noqa: E501
929
- raise ApiValueError("Missing the required parameter `python_python_remote` when calling `update`") # noqa: E501
930
-
931
- collection_formats = {}
932
-
933
- path_params = {}
934
- if 'python_python_remote_href' in local_var_params:
935
- path_params['python_python_remote_href'] = local_var_params['python_python_remote_href'] # noqa: E501
936
-
937
- query_params = []
938
-
939
- header_params = {}
940
-
941
- form_params = []
942
- local_var_files = {}
943
-
944
- body_params = None
945
- if 'python_python_remote' in local_var_params:
946
- body_params = local_var_params['python_python_remote']
947
- # HTTP header `Accept`
948
- header_params['Accept'] = self.api_client.select_header_accept(
949
- ['application/json']) # noqa: E501
950
-
951
- # HTTP header `Content-Type`
952
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
953
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
954
-
955
- # Authentication setting
956
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
957
-
958
- return self.api_client.call_api(
959
- '{python_python_remote_href}', 'PUT',
960
- path_params,
961
- query_params,
962
- header_params,
963
- body=body_params,
964
- post_params=form_params,
965
- files=local_var_files,
966
- response_type='AsyncOperationResponse', # noqa: E501
967
- auth_settings=auth_settings,
968
- async_req=local_var_params.get('async_req'),
969
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
970
- _preload_content=local_var_params.get('_preload_content', True),
971
- _request_timeout=local_var_params.get('_request_timeout'),
972
- collection_formats=collection_formats)