crc-pulpcore-client 20250819.1__py3-none-any.whl → 20250820.1__py3-none-any.whl

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.

Potentially problematic release.


This version of crc-pulpcore-client might be problematic. Click here for more details.

Files changed (239) hide show
  1. crc-pulpcore-client/api_client.py +1 -1
  2. crc-pulpcore-client/configuration.py +3 -3
  3. crc-pulpcore-client/models/artifact_distribution_response.py +17 -17
  4. {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250820.1.dist-info}/METADATA +1 -1
  5. crc_pulpcore_client-20250820.1.dist-info/RECORD +234 -0
  6. crc_pulpcore_client-20250820.1.dist-info/top_level.txt +1 -0
  7. crc_pulpcore_client-20250819.1.dist-info/RECORD +0 -464
  8. crc_pulpcore_client-20250819.1.dist-info/top_level.txt +0 -2
  9. services-pulpcore-client/__init__.py +0 -2
  10. services-pulpcore-client/api/__init__.py +0 -53
  11. services-pulpcore-client/api/access_policies_api.py +0 -1864
  12. services-pulpcore-client/api/artifacts_api.py +0 -1615
  13. services-pulpcore-client/api/content_api.py +0 -598
  14. services-pulpcore-client/api/content_openpgp_publickey_api.py +0 -1887
  15. services-pulpcore-client/api/content_openpgp_publicsubkey_api.py +0 -1518
  16. services-pulpcore-client/api/content_openpgp_signature_api.py +0 -1518
  17. services-pulpcore-client/api/content_openpgp_userattribute_api.py +0 -1518
  18. services-pulpcore-client/api/content_openpgp_userid_api.py +0 -1655
  19. services-pulpcore-client/api/contentguards_api.py +0 -667
  20. services-pulpcore-client/api/contentguards_composite_api.py +0 -3401
  21. services-pulpcore-client/api/contentguards_content_redirect_api.py +0 -3401
  22. services-pulpcore-client/api/contentguards_header_api.py +0 -3401
  23. services-pulpcore-client/api/contentguards_rbac_api.py +0 -3401
  24. services-pulpcore-client/api/distributions_api.py +0 -822
  25. services-pulpcore-client/api/distributions_artifacts_api.py +0 -1103
  26. services-pulpcore-client/api/distributions_openpgp_api.py +0 -2676
  27. services-pulpcore-client/api/domains_api.py +0 -3106
  28. services-pulpcore-client/api/exporters_filesystem_api.py +0 -2157
  29. services-pulpcore-client/api/exporters_filesystem_exports_api.py +0 -1288
  30. services-pulpcore-client/api/exporters_pulp_api.py +0 -2157
  31. services-pulpcore-client/api/exporters_pulp_exports_api.py +0 -1288
  32. services-pulpcore-client/api/groups_api.py +0 -3368
  33. services-pulpcore-client/api/groups_roles_api.py +0 -1496
  34. services-pulpcore-client/api/groups_users_api.py +0 -972
  35. services-pulpcore-client/api/importers_pulp_api.py +0 -2149
  36. services-pulpcore-client/api/importers_pulp_import_check_api.py +0 -350
  37. services-pulpcore-client/api/importers_pulp_imports_api.py +0 -1288
  38. services-pulpcore-client/api/livez_api.py +0 -329
  39. services-pulpcore-client/api/login_api.py +0 -897
  40. services-pulpcore-client/api/orphans_api.py +0 -319
  41. services-pulpcore-client/api/orphans_cleanup_api.py +0 -350
  42. services-pulpcore-client/api/publications_api.py +0 -765
  43. services-pulpcore-client/api/remotes_api.py +0 -850
  44. services-pulpcore-client/api/repair_api.py +0 -350
  45. services-pulpcore-client/api/repositories_api.py +0 -872
  46. services-pulpcore-client/api/repositories_openpgp_keyring_api.py +0 -4546
  47. services-pulpcore-client/api/repositories_reclaim_space_api.py +0 -350
  48. services-pulpcore-client/api/repository_versions_api.py +0 -764
  49. services-pulpcore-client/api/roles_api.py +0 -2269
  50. services-pulpcore-client/api/signing_services_api.py +0 -811
  51. services-pulpcore-client/api/status_api.py +0 -337
  52. services-pulpcore-client/api/task_groups_api.py +0 -1012
  53. services-pulpcore-client/api/task_schedules_api.py +0 -2114
  54. services-pulpcore-client/api/tasks_api.py +0 -4299
  55. services-pulpcore-client/api/uploads_api.py +0 -3346
  56. services-pulpcore-client/api/upstream_pulps_api.py +0 -4001
  57. services-pulpcore-client/api/users_api.py +0 -2373
  58. services-pulpcore-client/api/users_roles_api.py +0 -1496
  59. services-pulpcore-client/api/workers_api.py +0 -1148
  60. services-pulpcore-client/api_client.py +0 -798
  61. services-pulpcore-client/api_response.py +0 -21
  62. services-pulpcore-client/configuration.py +0 -628
  63. services-pulpcore-client/exceptions.py +0 -200
  64. services-pulpcore-client/models/__init__.py +0 -189
  65. services-pulpcore-client/models/access_policy.py +0 -94
  66. services-pulpcore-client/models/access_policy_response.py +0 -119
  67. services-pulpcore-client/models/api_app_status_response.py +0 -99
  68. services-pulpcore-client/models/artifact_distribution_response.py +0 -126
  69. services-pulpcore-client/models/artifact_response.py +0 -149
  70. services-pulpcore-client/models/async_operation_response.py +0 -88
  71. services-pulpcore-client/models/composite_content_guard.py +0 -98
  72. services-pulpcore-client/models/composite_content_guard_response.py +0 -114
  73. services-pulpcore-client/models/content_app_status_response.py +0 -99
  74. services-pulpcore-client/models/content_guard_response.py +0 -112
  75. services-pulpcore-client/models/content_redirect_content_guard.py +0 -96
  76. services-pulpcore-client/models/content_redirect_content_guard_response.py +0 -112
  77. services-pulpcore-client/models/content_settings_response.py +0 -95
  78. services-pulpcore-client/models/content_summary_response.py +0 -92
  79. services-pulpcore-client/models/database_connection_response.py +0 -88
  80. services-pulpcore-client/models/distribution_response.py +0 -133
  81. services-pulpcore-client/models/domain.py +0 -114
  82. services-pulpcore-client/models/domain_backend_migrator.py +0 -91
  83. services-pulpcore-client/models/domain_response.py +0 -131
  84. services-pulpcore-client/models/evaluation_response.py +0 -92
  85. services-pulpcore-client/models/filesystem_export.py +0 -99
  86. services-pulpcore-client/models/filesystem_export_response.py +0 -118
  87. services-pulpcore-client/models/filesystem_exporter.py +0 -94
  88. services-pulpcore-client/models/filesystem_exporter_response.py +0 -110
  89. services-pulpcore-client/models/generic_remote_response.py +0 -199
  90. services-pulpcore-client/models/generic_remote_response_hidden_fields_inner.py +0 -90
  91. services-pulpcore-client/models/generic_remote_response_policy_enum.py +0 -39
  92. services-pulpcore-client/models/group.py +0 -89
  93. services-pulpcore-client/models/group_progress_report_response.py +0 -111
  94. services-pulpcore-client/models/group_response.py +0 -101
  95. services-pulpcore-client/models/group_role.py +0 -110
  96. services-pulpcore-client/models/group_role_response.py +0 -134
  97. services-pulpcore-client/models/group_user.py +0 -89
  98. services-pulpcore-client/models/group_user_response.py +0 -97
  99. services-pulpcore-client/models/header_content_guard.py +0 -107
  100. services-pulpcore-client/models/header_content_guard_response.py +0 -123
  101. services-pulpcore-client/models/import_response.py +0 -107
  102. services-pulpcore-client/models/login_response.py +0 -98
  103. services-pulpcore-client/models/method_enum.py +0 -39
  104. services-pulpcore-client/models/minimal_task_response.py +0 -125
  105. services-pulpcore-client/models/multiple_artifact_content_response.py +0 -107
  106. services-pulpcore-client/models/my_permissions_response.py +0 -88
  107. services-pulpcore-client/models/nested_open_pgp_public_subkey.py +0 -92
  108. services-pulpcore-client/models/nested_open_pgp_public_subkey_response.py +0 -104
  109. services-pulpcore-client/models/nested_open_pgp_signature.py +0 -120
  110. services-pulpcore-client/models/nested_open_pgp_signature_response.py +0 -124
  111. services-pulpcore-client/models/nested_open_pgp_user_attribute.py +0 -89
  112. services-pulpcore-client/models/nested_open_pgp_user_attribute_response.py +0 -101
  113. services-pulpcore-client/models/nested_open_pgp_user_id.py +0 -89
  114. services-pulpcore-client/models/nested_open_pgp_user_id_response.py +0 -100
  115. services-pulpcore-client/models/nested_role.py +0 -93
  116. services-pulpcore-client/models/nested_role_response.py +0 -92
  117. services-pulpcore-client/models/object_roles_response.py +0 -96
  118. services-pulpcore-client/models/open_pgp_distribution.py +0 -116
  119. services-pulpcore-client/models/open_pgp_distribution_response.py +0 -140
  120. services-pulpcore-client/models/open_pgp_keyring.py +0 -112
  121. services-pulpcore-client/models/open_pgp_keyring_response.py +0 -137
  122. services-pulpcore-client/models/open_pgp_public_key_response.py +0 -150
  123. services-pulpcore-client/models/open_pgp_public_subkey_response.py +0 -126
  124. services-pulpcore-client/models/open_pgp_signature_response.py +0 -146
  125. services-pulpcore-client/models/open_pgp_user_attribute_response.py +0 -124
  126. services-pulpcore-client/models/open_pgp_user_id_response.py +0 -123
  127. services-pulpcore-client/models/orphans_cleanup.py +0 -96
  128. services-pulpcore-client/models/paginated_access_policy_response_list.py +0 -112
  129. services-pulpcore-client/models/paginated_artifact_distribution_response_list.py +0 -112
  130. services-pulpcore-client/models/paginated_artifact_response_list.py +0 -112
  131. services-pulpcore-client/models/paginated_composite_content_guard_response_list.py +0 -112
  132. services-pulpcore-client/models/paginated_content_guard_response_list.py +0 -112
  133. services-pulpcore-client/models/paginated_content_redirect_content_guard_response_list.py +0 -112
  134. services-pulpcore-client/models/paginated_distribution_response_list.py +0 -112
  135. services-pulpcore-client/models/paginated_domain_response_list.py +0 -112
  136. services-pulpcore-client/models/paginated_filesystem_export_response_list.py +0 -112
  137. services-pulpcore-client/models/paginated_filesystem_exporter_response_list.py +0 -112
  138. services-pulpcore-client/models/paginated_generic_remote_response_list.py +0 -112
  139. services-pulpcore-client/models/paginated_group_response_list.py +0 -112
  140. services-pulpcore-client/models/paginated_group_role_response_list.py +0 -112
  141. services-pulpcore-client/models/paginated_group_user_response_list.py +0 -112
  142. services-pulpcore-client/models/paginated_header_content_guard_response_list.py +0 -112
  143. services-pulpcore-client/models/paginated_import_response_list.py +0 -112
  144. services-pulpcore-client/models/paginated_multiple_artifact_content_response_list.py +0 -112
  145. services-pulpcore-client/models/paginated_open_pgp_distribution_response_list.py +0 -112
  146. services-pulpcore-client/models/paginated_open_pgp_keyring_response_list.py +0 -112
  147. services-pulpcore-client/models/paginated_open_pgp_public_key_response_list.py +0 -112
  148. services-pulpcore-client/models/paginated_open_pgp_public_subkey_response_list.py +0 -112
  149. services-pulpcore-client/models/paginated_open_pgp_signature_response_list.py +0 -112
  150. services-pulpcore-client/models/paginated_open_pgp_user_attribute_response_list.py +0 -112
  151. services-pulpcore-client/models/paginated_open_pgp_user_id_response_list.py +0 -112
  152. services-pulpcore-client/models/paginated_publication_response_list.py +0 -112
  153. services-pulpcore-client/models/paginated_pulp_export_response_list.py +0 -112
  154. services-pulpcore-client/models/paginated_pulp_exporter_response_list.py +0 -112
  155. services-pulpcore-client/models/paginated_pulp_importer_response_list.py +0 -112
  156. services-pulpcore-client/models/paginated_rbac_content_guard_response_list.py +0 -112
  157. services-pulpcore-client/models/paginated_repository_response_list.py +0 -112
  158. services-pulpcore-client/models/paginated_repository_version_response_list.py +0 -112
  159. services-pulpcore-client/models/paginated_role_response_list.py +0 -112
  160. services-pulpcore-client/models/paginated_signing_service_response_list.py +0 -112
  161. services-pulpcore-client/models/paginated_task_group_response_list.py +0 -112
  162. services-pulpcore-client/models/paginated_task_response_list.py +0 -112
  163. services-pulpcore-client/models/paginated_task_schedule_response_list.py +0 -112
  164. services-pulpcore-client/models/paginated_upload_response_list.py +0 -112
  165. services-pulpcore-client/models/paginated_upstream_pulp_response_list.py +0 -112
  166. services-pulpcore-client/models/paginated_user_response_list.py +0 -112
  167. services-pulpcore-client/models/paginated_user_role_response_list.py +0 -112
  168. services-pulpcore-client/models/paginated_worker_response_list.py +0 -112
  169. services-pulpcore-client/models/patched_access_policy.py +0 -94
  170. services-pulpcore-client/models/patched_composite_content_guard.py +0 -98
  171. services-pulpcore-client/models/patched_content_redirect_content_guard.py +0 -96
  172. services-pulpcore-client/models/patched_domain.py +0 -117
  173. services-pulpcore-client/models/patched_filesystem_exporter.py +0 -94
  174. services-pulpcore-client/models/patched_group.py +0 -89
  175. services-pulpcore-client/models/patched_header_content_guard.py +0 -107
  176. services-pulpcore-client/models/patched_open_pgp_distribution.py +0 -116
  177. services-pulpcore-client/models/patched_open_pgp_keyring.py +0 -112
  178. services-pulpcore-client/models/patched_pulp_exporter.py +0 -100
  179. services-pulpcore-client/models/patched_pulp_importer.py +0 -91
  180. services-pulpcore-client/models/patched_rbac_content_guard.py +0 -96
  181. services-pulpcore-client/models/patched_role.py +0 -98
  182. services-pulpcore-client/models/patched_task_cancel.py +0 -89
  183. services-pulpcore-client/models/patched_upstream_pulp.py +0 -147
  184. services-pulpcore-client/models/patched_user.py +0 -106
  185. services-pulpcore-client/models/policy357_enum.py +0 -39
  186. services-pulpcore-client/models/profile_artifact_response.py +0 -88
  187. services-pulpcore-client/models/progress_report_response.py +0 -115
  188. services-pulpcore-client/models/publication_response.py +0 -107
  189. services-pulpcore-client/models/pulp_export.py +0 -104
  190. services-pulpcore-client/models/pulp_export_response.py +0 -126
  191. services-pulpcore-client/models/pulp_exporter.py +0 -100
  192. services-pulpcore-client/models/pulp_exporter_response.py +0 -116
  193. services-pulpcore-client/models/pulp_import.py +0 -93
  194. services-pulpcore-client/models/pulp_import_check.py +0 -93
  195. services-pulpcore-client/models/pulp_import_check_response.py +0 -102
  196. services-pulpcore-client/models/pulp_importer.py +0 -91
  197. services-pulpcore-client/models/pulp_importer_response.py +0 -107
  198. services-pulpcore-client/models/purge.py +0 -92
  199. services-pulpcore-client/models/rbac_content_guard.py +0 -96
  200. services-pulpcore-client/models/rbac_content_guard_response.py +0 -136
  201. services-pulpcore-client/models/reclaim_space.py +0 -90
  202. services-pulpcore-client/models/redis_connection_response.py +0 -88
  203. services-pulpcore-client/models/repair.py +0 -88
  204. services-pulpcore-client/models/repository_add_remove_content.py +0 -93
  205. services-pulpcore-client/models/repository_response.py +0 -137
  206. services-pulpcore-client/models/repository_version_response.py +0 -121
  207. services-pulpcore-client/models/role.py +0 -98
  208. services-pulpcore-client/models/role_response.py +0 -118
  209. services-pulpcore-client/models/set_label.py +0 -103
  210. services-pulpcore-client/models/set_label_response.py +0 -103
  211. services-pulpcore-client/models/signing_service_response.py +0 -111
  212. services-pulpcore-client/models/states_enum.py +0 -40
  213. services-pulpcore-client/models/status_response.py +0 -152
  214. services-pulpcore-client/models/storage_class_enum.py +0 -40
  215. services-pulpcore-client/models/storage_response.py +0 -108
  216. services-pulpcore-client/models/task_group_operation_response.py +0 -88
  217. services-pulpcore-client/models/task_group_response.py +0 -150
  218. services-pulpcore-client/models/task_response.py +0 -167
  219. services-pulpcore-client/models/task_schedule_response.py +0 -127
  220. services-pulpcore-client/models/unset_label.py +0 -96
  221. services-pulpcore-client/models/unset_label_response.py +0 -100
  222. services-pulpcore-client/models/upload.py +0 -88
  223. services-pulpcore-client/models/upload_chunk_response.py +0 -94
  224. services-pulpcore-client/models/upload_commit.py +0 -89
  225. services-pulpcore-client/models/upload_detail_response.py +0 -121
  226. services-pulpcore-client/models/upload_response.py +0 -109
  227. services-pulpcore-client/models/upstream_pulp.py +0 -147
  228. services-pulpcore-client/models/upstream_pulp_response.py +0 -158
  229. services-pulpcore-client/models/user.py +0 -106
  230. services-pulpcore-client/models/user_group.py +0 -89
  231. services-pulpcore-client/models/user_group_response.py +0 -97
  232. services-pulpcore-client/models/user_response.py +0 -140
  233. services-pulpcore-client/models/user_role.py +0 -110
  234. services-pulpcore-client/models/user_role_response.py +0 -134
  235. services-pulpcore-client/models/version_response.py +0 -96
  236. services-pulpcore-client/models/worker_response.py +0 -119
  237. services-pulpcore-client/py.typed +0 -0
  238. services-pulpcore-client/rest.py +0 -258
  239. {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250820.1.dist-info}/WHEEL +0 -0
@@ -1,21 +0,0 @@
1
- """API response object."""
2
-
3
- from __future__ import annotations
4
- from typing import Optional, Generic, Mapping, TypeVar
5
- from pydantic import Field, StrictInt, StrictBytes, BaseModel
6
-
7
- T = TypeVar("T")
8
-
9
- class ApiResponse(BaseModel, Generic[T]):
10
- """
11
- API response object
12
- """
13
-
14
- status_code: StrictInt = Field(description="HTTP status code")
15
- headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
16
- data: T = Field(description="Deserialized data given the data type")
17
- raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
18
-
19
- model_config = {
20
- "arbitrary_types_allowed": True
21
- }
@@ -1,628 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- import copy
17
- import http.client as httplib
18
- import logging
19
- from logging import FileHandler
20
- import multiprocessing
21
- import sys
22
- from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
23
- from typing_extensions import NotRequired, Self
24
-
25
- import urllib3
26
-
27
-
28
- JSON_SCHEMA_VALIDATION_KEYWORDS = {
29
- 'multipleOf', 'maximum', 'exclusiveMaximum',
30
- 'minimum', 'exclusiveMinimum', 'maxLength',
31
- 'minLength', 'pattern', 'maxItems', 'minItems'
32
- }
33
-
34
- ServerVariablesT = Dict[str, str]
35
-
36
- GenericAuthSetting = TypedDict(
37
- "GenericAuthSetting",
38
- {
39
- "type": str,
40
- "in": str,
41
- "key": str,
42
- "value": str,
43
- },
44
- )
45
-
46
-
47
- OAuth2AuthSetting = TypedDict(
48
- "OAuth2AuthSetting",
49
- {
50
- "type": Literal["oauth2"],
51
- "in": Literal["header"],
52
- "key": Literal["Authorization"],
53
- "value": str,
54
- },
55
- )
56
-
57
-
58
- APIKeyAuthSetting = TypedDict(
59
- "APIKeyAuthSetting",
60
- {
61
- "type": Literal["api_key"],
62
- "in": str,
63
- "key": str,
64
- "value": Optional[str],
65
- },
66
- )
67
-
68
-
69
- BasicAuthSetting = TypedDict(
70
- "BasicAuthSetting",
71
- {
72
- "type": Literal["basic"],
73
- "in": Literal["header"],
74
- "key": Literal["Authorization"],
75
- "value": Optional[str],
76
- },
77
- )
78
-
79
-
80
- BearerFormatAuthSetting = TypedDict(
81
- "BearerFormatAuthSetting",
82
- {
83
- "type": Literal["bearer"],
84
- "in": Literal["header"],
85
- "format": Literal["JWT"],
86
- "key": Literal["Authorization"],
87
- "value": str,
88
- },
89
- )
90
-
91
-
92
- BearerAuthSetting = TypedDict(
93
- "BearerAuthSetting",
94
- {
95
- "type": Literal["bearer"],
96
- "in": Literal["header"],
97
- "key": Literal["Authorization"],
98
- "value": str,
99
- },
100
- )
101
-
102
-
103
- HTTPSignatureAuthSetting = TypedDict(
104
- "HTTPSignatureAuthSetting",
105
- {
106
- "type": Literal["http-signature"],
107
- "in": Literal["header"],
108
- "key": Literal["Authorization"],
109
- "value": None,
110
- },
111
- )
112
-
113
-
114
- AuthSettings = TypedDict(
115
- "AuthSettings",
116
- {
117
- "basicAuth": BasicAuthSetting,
118
- "cookieAuth": APIKeyAuthSetting,
119
- "json_header_remote_authentication": OAuth2AuthSetting,
120
- },
121
- total=False,
122
- )
123
-
124
-
125
- class HostSettingVariable(TypedDict):
126
- description: str
127
- default_value: str
128
- enum_values: List[str]
129
-
130
-
131
- class HostSetting(TypedDict):
132
- url: str
133
- description: str
134
- variables: NotRequired[Dict[str, HostSettingVariable]]
135
-
136
-
137
- class Configuration:
138
- """This class contains various settings of the API client.
139
-
140
- :param host: Base url.
141
- :param ignore_operation_servers
142
- Boolean to ignore operation servers for the API client.
143
- Config will use `host` as the base url regardless of the operation servers.
144
- :param api_key: Dict to store API key(s).
145
- Each entry in the dict specifies an API key.
146
- The dict key is the name of the security scheme in the OAS specification.
147
- The dict value is the API key secret.
148
- :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
149
- The dict key is the name of the security scheme in the OAS specification.
150
- The dict value is an API key prefix when generating the auth data.
151
- :param username: Username for HTTP basic authentication.
152
- :param password: Password for HTTP basic authentication.
153
- :param access_token: Access token.
154
- :param server_index: Index to servers configuration.
155
- :param server_variables: Mapping with string values to replace variables in
156
- templated server configuration. The validation of enums is performed for
157
- variables with defined enum values before.
158
- :param server_operation_index: Mapping from operation ID to an index to server
159
- configuration.
160
- :param server_operation_variables: Mapping from operation ID to a mapping with
161
- string values to replace variables in templated server configuration.
162
- The validation of enums is performed for variables with defined enum
163
- values before.
164
- :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
165
- in PEM format.
166
- :param retries: Number of retries for API requests.
167
-
168
- :Example:
169
-
170
- API Key Authentication Example.
171
- Given the following security scheme in the OpenAPI specification:
172
- components:
173
- securitySchemes:
174
- cookieAuth: # name for the security scheme
175
- type: apiKey
176
- in: cookie
177
- name: JSESSIONID # cookie name
178
-
179
- You can programmatically set the cookie:
180
-
181
- conf = services-pulpcore-client.Configuration(
182
- api_key={'cookieAuth': 'abc123'}
183
- api_key_prefix={'cookieAuth': 'JSESSIONID'}
184
- )
185
-
186
- The following cookie will be added to the HTTP request:
187
- Cookie: JSESSIONID abc123
188
-
189
- HTTP Basic Authentication Example.
190
- Given the following security scheme in the OpenAPI specification:
191
- components:
192
- securitySchemes:
193
- http_basic_auth:
194
- type: http
195
- scheme: basic
196
-
197
- Configure API client with HTTP basic authentication:
198
-
199
- conf = services-pulpcore-client.Configuration(
200
- username='the-user',
201
- password='the-password',
202
- )
203
-
204
- """
205
-
206
- _default: ClassVar[Optional[Self]] = None
207
-
208
- def __init__(
209
- self,
210
- host: Optional[str]=None,
211
- api_key: Optional[Dict[str, str]]=None,
212
- api_key_prefix: Optional[Dict[str, str]]=None,
213
- username: Optional[str]=None,
214
- password: Optional[str]=None,
215
- access_token: Optional[str]=None,
216
- server_index: Optional[int]=None,
217
- server_variables: Optional[ServerVariablesT]=None,
218
- server_operation_index: Optional[Dict[int, int]]=None,
219
- server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
220
- ignore_operation_servers: bool=False,
221
- ssl_ca_cert: Optional[str]=None,
222
- retries: Optional[int] = None,
223
- *,
224
- debug: Optional[bool] = None,
225
- ) -> None:
226
- """Constructor
227
- """
228
- self._base_path = "https://env-ephemeral-pkrsh0.apps.crc-eph.r9lp.p1.openshiftapps.com" if host is None else host
229
- """Default Base url
230
- """
231
- self.server_index = 0 if server_index is None and host is None else server_index
232
- self.server_operation_index = server_operation_index or {}
233
- """Default server index
234
- """
235
- self.server_variables = server_variables or {}
236
- self.server_operation_variables = server_operation_variables or {}
237
- """Default server variables
238
- """
239
- self.ignore_operation_servers = ignore_operation_servers
240
- """Ignore operation servers
241
- """
242
- self.temp_folder_path = None
243
- """Temp file folder for downloading files
244
- """
245
- # Authentication Settings
246
- self.api_key = {}
247
- if api_key:
248
- self.api_key = api_key
249
- """dict to store API key(s)
250
- """
251
- self.api_key_prefix = {}
252
- if api_key_prefix:
253
- self.api_key_prefix = api_key_prefix
254
- """dict to store API prefix (e.g. Bearer)
255
- """
256
- self.refresh_api_key_hook = None
257
- """function hook to refresh API key if expired
258
- """
259
- self.username = username
260
- """Username for HTTP basic authentication
261
- """
262
- self.password = password
263
- """Password for HTTP basic authentication
264
- """
265
- self.access_token = access_token
266
- """Access token
267
- """
268
- self.logger = {}
269
- """Logging Settings
270
- """
271
- self.logger["package_logger"] = logging.getLogger("services-pulpcore-client")
272
- self.logger["urllib3_logger"] = logging.getLogger("urllib3")
273
- self.logger_format = '%(asctime)s %(levelname)s %(message)s'
274
- """Log format
275
- """
276
- self.logger_stream_handler = None
277
- """Log stream handler
278
- """
279
- self.logger_file_handler: Optional[FileHandler] = None
280
- """Log file handler
281
- """
282
- self.logger_file = None
283
- """Debug file location
284
- """
285
- if debug is not None:
286
- self.debug = debug
287
- else:
288
- self.__debug = False
289
- """Debug switch
290
- """
291
-
292
- self.verify_ssl = True
293
- """SSL/TLS verification
294
- Set this to false to skip verifying SSL certificate when calling API
295
- from https server.
296
- """
297
- self.ssl_ca_cert = ssl_ca_cert
298
- """Set this to customize the certificate file to verify the peer.
299
- """
300
- self.cert_file = None
301
- """client certificate file
302
- """
303
- self.key_file = None
304
- """client key file
305
- """
306
- self.assert_hostname = None
307
- """Set this to True/False to enable/disable SSL hostname verification.
308
- """
309
- self.tls_server_name = None
310
- """SSL/TLS Server Name Indication (SNI)
311
- Set this to the SNI value expected by the server.
312
- """
313
-
314
- self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
315
- """urllib3 connection pool's maximum number of connections saved
316
- per pool. urllib3 uses 1 connection as default value, but this is
317
- not the best value when you are making a lot of possibly parallel
318
- requests to the same host, which is often the case here.
319
- cpu_count * 5 is used as default value to increase performance.
320
- """
321
-
322
- self.proxy: Optional[str] = None
323
- """Proxy URL
324
- """
325
- self.proxy_headers = None
326
- """Proxy headers
327
- """
328
- self.safe_chars_for_path_param = '/'
329
- """Safe chars for path_param
330
- """
331
- self.retries = retries
332
- """Adding retries to override urllib3 default value 3
333
- """
334
- # Enable client side validation
335
- self.client_side_validation = True
336
-
337
- self.socket_options = None
338
- """Options to pass down to the underlying urllib3 socket
339
- """
340
-
341
- self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
342
- """datetime format
343
- """
344
-
345
- self.date_format = "%Y-%m-%d"
346
- """date format
347
- """
348
-
349
- def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
350
- cls = self.__class__
351
- result = cls.__new__(cls)
352
- memo[id(self)] = result
353
- for k, v in self.__dict__.items():
354
- if k not in ('logger', 'logger_file_handler'):
355
- setattr(result, k, copy.deepcopy(v, memo))
356
- # shallow copy of loggers
357
- result.logger = copy.copy(self.logger)
358
- # use setters to configure loggers
359
- result.logger_file = self.logger_file
360
- result.debug = self.debug
361
- return result
362
-
363
- def __setattr__(self, name: str, value: Any) -> None:
364
- object.__setattr__(self, name, value)
365
-
366
- @classmethod
367
- def set_default(cls, default: Optional[Self]) -> None:
368
- """Set default instance of configuration.
369
-
370
- It stores default configuration, which can be
371
- returned by get_default_copy method.
372
-
373
- :param default: object of Configuration
374
- """
375
- cls._default = default
376
-
377
- @classmethod
378
- def get_default_copy(cls) -> Self:
379
- """Deprecated. Please use `get_default` instead.
380
-
381
- Deprecated. Please use `get_default` instead.
382
-
383
- :return: The configuration object.
384
- """
385
- return cls.get_default()
386
-
387
- @classmethod
388
- def get_default(cls) -> Self:
389
- """Return the default configuration.
390
-
391
- This method returns newly created, based on default constructor,
392
- object of Configuration class or returns a copy of default
393
- configuration.
394
-
395
- :return: The configuration object.
396
- """
397
- if cls._default is None:
398
- cls._default = cls()
399
- return cls._default
400
-
401
- @property
402
- def logger_file(self) -> Optional[str]:
403
- """The logger file.
404
-
405
- If the logger_file is None, then add stream handler and remove file
406
- handler. Otherwise, add file handler and remove stream handler.
407
-
408
- :param value: The logger_file path.
409
- :type: str
410
- """
411
- return self.__logger_file
412
-
413
- @logger_file.setter
414
- def logger_file(self, value: Optional[str]) -> None:
415
- """The logger file.
416
-
417
- If the logger_file is None, then add stream handler and remove file
418
- handler. Otherwise, add file handler and remove stream handler.
419
-
420
- :param value: The logger_file path.
421
- :type: str
422
- """
423
- self.__logger_file = value
424
- if self.__logger_file:
425
- # If set logging file,
426
- # then add file handler and remove stream handler.
427
- self.logger_file_handler = logging.FileHandler(self.__logger_file)
428
- self.logger_file_handler.setFormatter(self.logger_formatter)
429
- for _, logger in self.logger.items():
430
- logger.addHandler(self.logger_file_handler)
431
-
432
- @property
433
- def debug(self) -> bool:
434
- """Debug status
435
-
436
- :param value: The debug status, True or False.
437
- :type: bool
438
- """
439
- return self.__debug
440
-
441
- @debug.setter
442
- def debug(self, value: bool) -> None:
443
- """Debug status
444
-
445
- :param value: The debug status, True or False.
446
- :type: bool
447
- """
448
- self.__debug = value
449
- if self.__debug:
450
- # if debug status is True, turn on debug logging
451
- for _, logger in self.logger.items():
452
- logger.setLevel(logging.DEBUG)
453
- # turn on httplib debug
454
- httplib.HTTPConnection.debuglevel = 1
455
- else:
456
- # if debug status is False, turn off debug logging,
457
- # setting log level to default `logging.WARNING`
458
- for _, logger in self.logger.items():
459
- logger.setLevel(logging.WARNING)
460
- # turn off httplib debug
461
- httplib.HTTPConnection.debuglevel = 0
462
-
463
- @property
464
- def logger_format(self) -> str:
465
- """The logger format.
466
-
467
- The logger_formatter will be updated when sets logger_format.
468
-
469
- :param value: The format string.
470
- :type: str
471
- """
472
- return self.__logger_format
473
-
474
- @logger_format.setter
475
- def logger_format(self, value: str) -> None:
476
- """The logger format.
477
-
478
- The logger_formatter will be updated when sets logger_format.
479
-
480
- :param value: The format string.
481
- :type: str
482
- """
483
- self.__logger_format = value
484
- self.logger_formatter = logging.Formatter(self.__logger_format)
485
-
486
- def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
487
- """Gets API key (with prefix if set).
488
-
489
- :param identifier: The identifier of apiKey.
490
- :param alias: The alternative identifier of apiKey.
491
- :return: The token for api key authentication.
492
- """
493
- if self.refresh_api_key_hook is not None:
494
- self.refresh_api_key_hook(self)
495
- key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
496
- if key:
497
- prefix = self.api_key_prefix.get(identifier)
498
- if prefix:
499
- return "%s %s" % (prefix, key)
500
- else:
501
- return key
502
-
503
- return None
504
-
505
- def get_basic_auth_token(self) -> Optional[str]:
506
- """Gets HTTP basic authentication header (string).
507
-
508
- :return: The token for basic HTTP authentication.
509
- """
510
- username = ""
511
- if self.username is not None:
512
- username = self.username
513
- password = ""
514
- if self.password is not None:
515
- password = self.password
516
- return urllib3.util.make_headers(
517
- basic_auth=username + ':' + password
518
- ).get('authorization')
519
-
520
- def auth_settings(self)-> AuthSettings:
521
- """Gets Auth Settings dict for api client.
522
-
523
- :return: The Auth Settings information dict.
524
- """
525
- auth: AuthSettings = {}
526
- if self.username is not None and self.password is not None:
527
- auth['basicAuth'] = {
528
- 'type': 'basic',
529
- 'in': 'header',
530
- 'key': 'Authorization',
531
- 'value': self.get_basic_auth_token()
532
- }
533
- if 'cookieAuth' in self.api_key:
534
- auth['cookieAuth'] = {
535
- 'type': 'api_key',
536
- 'in': 'cookie',
537
- 'key': 'sessionid',
538
- 'value': self.get_api_key_with_prefix(
539
- 'cookieAuth',
540
- ),
541
- }
542
- if self.access_token is not None:
543
- auth['json_header_remote_authentication'] = {
544
- 'type': 'oauth2',
545
- 'in': 'header',
546
- 'key': 'Authorization',
547
- 'value': 'Bearer ' + self.access_token
548
- }
549
- return auth
550
-
551
- def to_debug_report(self) -> str:
552
- """Gets the essential information for debugging.
553
-
554
- :return: The report for debugging.
555
- """
556
- return "Python SDK Debug Report:\n"\
557
- "OS: {env}\n"\
558
- "Python Version: {pyversion}\n"\
559
- "Version of the API: v3\n"\
560
- "SDK Package Version: 20250819.1".\
561
- format(env=sys.platform, pyversion=sys.version)
562
-
563
- def get_host_settings(self) -> List[HostSetting]:
564
- """Gets an array of host settings
565
-
566
- :return: An array of host settings
567
- """
568
- return [
569
- {
570
- 'url': "https://env-ephemeral-pkrsh0.apps.crc-eph.r9lp.p1.openshiftapps.com",
571
- 'description': "No description provided",
572
- }
573
- ]
574
-
575
- def get_host_from_settings(
576
- self,
577
- index: Optional[int],
578
- variables: Optional[ServerVariablesT]=None,
579
- servers: Optional[List[HostSetting]]=None,
580
- ) -> str:
581
- """Gets host URL based on the index and variables
582
- :param index: array index of the host settings
583
- :param variables: hash of variable and the corresponding value
584
- :param servers: an array of host settings or None
585
- :return: URL based on host settings
586
- """
587
- if index is None:
588
- return self._base_path
589
-
590
- variables = {} if variables is None else variables
591
- servers = self.get_host_settings() if servers is None else servers
592
-
593
- try:
594
- server = servers[index]
595
- except IndexError:
596
- raise ValueError(
597
- "Invalid index {0} when selecting the host settings. "
598
- "Must be less than {1}".format(index, len(servers)))
599
-
600
- url = server['url']
601
-
602
- # go through variables and replace placeholders
603
- for variable_name, variable in server.get('variables', {}).items():
604
- used_value = variables.get(
605
- variable_name, variable['default_value'])
606
-
607
- if 'enum_values' in variable \
608
- and used_value not in variable['enum_values']:
609
- raise ValueError(
610
- "The variable `{0}` in the host URL has invalid value "
611
- "{1}. Must be {2}.".format(
612
- variable_name, variables[variable_name],
613
- variable['enum_values']))
614
-
615
- url = url.replace("{" + variable_name + "}", used_value)
616
-
617
- return url
618
-
619
- @property
620
- def host(self) -> str:
621
- """Return generated host."""
622
- return self.get_host_from_settings(self.server_index, variables=self.server_variables)
623
-
624
- @host.setter
625
- def host(self, value: str) -> None:
626
- """Fix base path."""
627
- self._base_path = value
628
- self.server_index = None