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,3106 +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
- import warnings
16
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
- from typing import Any, Dict, List, Optional, Tuple, Union
18
- from typing_extensions import Annotated
19
-
20
- from pydantic import Field, StrictInt, StrictStr, field_validator
21
- from typing import List, Optional
22
- from typing_extensions import Annotated
23
- from services-pulpcore-client.models.async_operation_response import AsyncOperationResponse
24
- from services-pulpcore-client.models.domain import Domain
25
- from services-pulpcore-client.models.domain_backend_migrator import DomainBackendMigrator
26
- from services-pulpcore-client.models.domain_response import DomainResponse
27
- from services-pulpcore-client.models.paginated_domain_response_list import PaginatedDomainResponseList
28
- from services-pulpcore-client.models.patched_domain import PatchedDomain
29
- from services-pulpcore-client.models.set_label import SetLabel
30
- from services-pulpcore-client.models.set_label_response import SetLabelResponse
31
- from services-pulpcore-client.models.unset_label import UnsetLabel
32
- from services-pulpcore-client.models.unset_label_response import UnsetLabelResponse
33
-
34
- from services-pulpcore-client.api_client import ApiClient, RequestSerialized
35
- from services-pulpcore-client.api_response import ApiResponse
36
- from services-pulpcore-client.rest import RESTResponseType
37
-
38
-
39
- class DomainsApi:
40
- """NOTE: This class is auto generated by OpenAPI Generator
41
- Ref: https://openapi-generator.tech
42
-
43
- Do not edit the class manually.
44
- """
45
-
46
- def __init__(self, api_client=None) -> None:
47
- if api_client is None:
48
- api_client = ApiClient.get_default()
49
- self.api_client = api_client
50
-
51
-
52
- @validate_call
53
- def create(
54
- self,
55
- domain: Domain,
56
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
57
- pulp_domain: StrictStr = "default",
58
- _request_timeout: Union[
59
- None,
60
- Annotated[StrictFloat, Field(gt=0)],
61
- Tuple[
62
- Annotated[StrictFloat, Field(gt=0)],
63
- Annotated[StrictFloat, Field(gt=0)]
64
- ]
65
- ] = None,
66
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
- _content_type: Optional[StrictStr] = None,
68
- _headers: Optional[Dict[StrictStr, Any]] = None,
69
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
- ) -> DomainResponse:
71
- """Create a domain
72
-
73
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
74
-
75
- :param pulp_domain: (required)
76
- :type pulp_domain: str
77
- :param domain: (required)
78
- :type domain: Domain
79
- :param x_task_diagnostics: List of profilers to use on tasks.
80
- :type x_task_diagnostics: List[str]
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
- :type _request_timeout: int, tuple(int, int), optional
86
- :param _request_auth: set to override the auth_settings for an a single
87
- request; this effectively ignores the
88
- authentication in the spec for a single request.
89
- :type _request_auth: dict, optional
90
- :param _content_type: force content-type for the request.
91
- :type _content_type: str, Optional
92
- :param _headers: set to override the headers for a single
93
- request; this effectively ignores the headers
94
- in the spec for a single request.
95
- :type _headers: dict, optional
96
- :param _host_index: set to override the host_index for a single
97
- request; this effectively ignores the host_index
98
- in the spec for a single request.
99
- :type _host_index: int, optional
100
- :return: Returns the result object.
101
- """ # noqa: E501
102
-
103
- _param = self._create_serialize(
104
- pulp_domain=pulp_domain,
105
- domain=domain,
106
- x_task_diagnostics=x_task_diagnostics,
107
- _request_auth=_request_auth,
108
- _content_type=_content_type,
109
- _headers=_headers,
110
- _host_index=_host_index
111
- )
112
-
113
- _response_types_map: Dict[str, Optional[str]] = {
114
- '201': "DomainResponse",
115
- }
116
- response_data = self.api_client.call_api(
117
- *_param,
118
- _request_timeout=_request_timeout
119
- )
120
- response_data.read()
121
- return self.api_client.response_deserialize(
122
- response_data=response_data,
123
- response_types_map=_response_types_map,
124
- ).data
125
-
126
-
127
- @validate_call
128
- def create_with_http_info(
129
- self,
130
- domain: Domain,
131
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
132
- pulp_domain: StrictStr = "default",
133
- _request_timeout: Union[
134
- None,
135
- Annotated[StrictFloat, Field(gt=0)],
136
- Tuple[
137
- Annotated[StrictFloat, Field(gt=0)],
138
- Annotated[StrictFloat, Field(gt=0)]
139
- ]
140
- ] = None,
141
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
142
- _content_type: Optional[StrictStr] = None,
143
- _headers: Optional[Dict[StrictStr, Any]] = None,
144
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
145
- ) -> ApiResponse[DomainResponse]:
146
- """Create a domain
147
-
148
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
149
-
150
- :param pulp_domain: (required)
151
- :type pulp_domain: str
152
- :param domain: (required)
153
- :type domain: Domain
154
- :param x_task_diagnostics: List of profilers to use on tasks.
155
- :type x_task_diagnostics: List[str]
156
- :param _request_timeout: timeout setting for this request. If one
157
- number provided, it will be total request
158
- timeout. It can also be a pair (tuple) of
159
- (connection, read) timeouts.
160
- :type _request_timeout: int, tuple(int, int), optional
161
- :param _request_auth: set to override the auth_settings for an a single
162
- request; this effectively ignores the
163
- authentication in the spec for a single request.
164
- :type _request_auth: dict, optional
165
- :param _content_type: force content-type for the request.
166
- :type _content_type: str, Optional
167
- :param _headers: set to override the headers for a single
168
- request; this effectively ignores the headers
169
- in the spec for a single request.
170
- :type _headers: dict, optional
171
- :param _host_index: set to override the host_index for a single
172
- request; this effectively ignores the host_index
173
- in the spec for a single request.
174
- :type _host_index: int, optional
175
- :return: Returns the result object.
176
- """ # noqa: E501
177
-
178
- _param = self._create_serialize(
179
- pulp_domain=pulp_domain,
180
- domain=domain,
181
- x_task_diagnostics=x_task_diagnostics,
182
- _request_auth=_request_auth,
183
- _content_type=_content_type,
184
- _headers=_headers,
185
- _host_index=_host_index
186
- )
187
-
188
- _response_types_map: Dict[str, Optional[str]] = {
189
- '201': "DomainResponse",
190
- }
191
- response_data = self.api_client.call_api(
192
- *_param,
193
- _request_timeout=_request_timeout
194
- )
195
- response_data.read()
196
- return self.api_client.response_deserialize(
197
- response_data=response_data,
198
- response_types_map=_response_types_map,
199
- )
200
-
201
-
202
- @validate_call
203
- def create_without_preload_content(
204
- self,
205
- domain: Domain,
206
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
207
- pulp_domain: StrictStr = "default",
208
- _request_timeout: Union[
209
- None,
210
- Annotated[StrictFloat, Field(gt=0)],
211
- Tuple[
212
- Annotated[StrictFloat, Field(gt=0)],
213
- Annotated[StrictFloat, Field(gt=0)]
214
- ]
215
- ] = None,
216
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
217
- _content_type: Optional[StrictStr] = None,
218
- _headers: Optional[Dict[StrictStr, Any]] = None,
219
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
220
- ) -> RESTResponseType:
221
- """Create a domain
222
-
223
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
224
-
225
- :param pulp_domain: (required)
226
- :type pulp_domain: str
227
- :param domain: (required)
228
- :type domain: Domain
229
- :param x_task_diagnostics: List of profilers to use on tasks.
230
- :type x_task_diagnostics: List[str]
231
- :param _request_timeout: timeout setting for this request. If one
232
- number provided, it will be total request
233
- timeout. It can also be a pair (tuple) of
234
- (connection, read) timeouts.
235
- :type _request_timeout: int, tuple(int, int), optional
236
- :param _request_auth: set to override the auth_settings for an a single
237
- request; this effectively ignores the
238
- authentication in the spec for a single request.
239
- :type _request_auth: dict, optional
240
- :param _content_type: force content-type for the request.
241
- :type _content_type: str, Optional
242
- :param _headers: set to override the headers for a single
243
- request; this effectively ignores the headers
244
- in the spec for a single request.
245
- :type _headers: dict, optional
246
- :param _host_index: set to override the host_index for a single
247
- request; this effectively ignores the host_index
248
- in the spec for a single request.
249
- :type _host_index: int, optional
250
- :return: Returns the result object.
251
- """ # noqa: E501
252
-
253
- _param = self._create_serialize(
254
- pulp_domain=pulp_domain,
255
- domain=domain,
256
- x_task_diagnostics=x_task_diagnostics,
257
- _request_auth=_request_auth,
258
- _content_type=_content_type,
259
- _headers=_headers,
260
- _host_index=_host_index
261
- )
262
-
263
- _response_types_map: Dict[str, Optional[str]] = {
264
- '201': "DomainResponse",
265
- }
266
- response_data = self.api_client.call_api(
267
- *_param,
268
- _request_timeout=_request_timeout
269
- )
270
- return response_data.response
271
-
272
-
273
- def _create_serialize(
274
- self,
275
- pulp_domain,
276
- domain,
277
- x_task_diagnostics,
278
- _request_auth,
279
- _content_type,
280
- _headers,
281
- _host_index,
282
- ) -> RequestSerialized:
283
-
284
- _host = None
285
-
286
- _collection_formats: Dict[str, str] = {
287
- 'X-Task-Diagnostics': 'csv',
288
- }
289
-
290
- _path_params: Dict[str, str] = {}
291
- _query_params: List[Tuple[str, str]] = []
292
- _header_params: Dict[str, Optional[str]] = _headers or {}
293
- _form_params: List[Tuple[str, str]] = []
294
- _files: Dict[
295
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
296
- ] = {}
297
- _body_params: Optional[bytes] = None
298
-
299
- # process the path parameters
300
- if pulp_domain is not None:
301
- _path_params['pulp_domain'] = pulp_domain
302
- # process the query parameters
303
- # process the header parameters
304
- if x_task_diagnostics is not None:
305
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
306
- # process the form parameters
307
- # process the body parameter
308
- if domain is not None:
309
- _body_params = domain
310
-
311
-
312
- # set the HTTP header `Accept`
313
- if 'Accept' not in _header_params:
314
- _header_params['Accept'] = self.api_client.select_header_accept(
315
- [
316
- 'application/json'
317
- ]
318
- )
319
-
320
- # set the HTTP header `Content-Type`
321
- if _content_type:
322
- _header_params['Content-Type'] = _content_type
323
- else:
324
- _default_content_type = (
325
- self.api_client.select_header_content_type(
326
- [
327
- 'application/json',
328
- 'application/x-www-form-urlencoded',
329
- 'multipart/form-data'
330
- ]
331
- )
332
- )
333
- if _default_content_type is not None:
334
- _header_params['Content-Type'] = _default_content_type
335
-
336
- # authentication setting
337
- _auth_settings: List[str] = [
338
- 'json_header_remote_authentication',
339
- 'basicAuth',
340
- 'cookieAuth'
341
- ]
342
-
343
- return self.api_client.param_serialize(
344
- method='POST',
345
- resource_path='/api/pulp/{pulp_domain}/api/v3/domains/',
346
- path_params=_path_params,
347
- query_params=_query_params,
348
- header_params=_header_params,
349
- body=_body_params,
350
- post_params=_form_params,
351
- files=_files,
352
- auth_settings=_auth_settings,
353
- collection_formats=_collection_formats,
354
- _host=_host,
355
- _request_auth=_request_auth
356
- )
357
-
358
-
359
-
360
-
361
- @validate_call
362
- def delete(
363
- self,
364
- domain_href: StrictStr,
365
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
366
- _request_timeout: Union[
367
- None,
368
- Annotated[StrictFloat, Field(gt=0)],
369
- Tuple[
370
- Annotated[StrictFloat, Field(gt=0)],
371
- Annotated[StrictFloat, Field(gt=0)]
372
- ]
373
- ] = None,
374
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
375
- _content_type: Optional[StrictStr] = None,
376
- _headers: Optional[Dict[StrictStr, Any]] = None,
377
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
- ) -> AsyncOperationResponse:
379
- """Delete a domain
380
-
381
- Trigger an asynchronous delete task
382
-
383
- :param domain_href: (required)
384
- :type domain_href: str
385
- :param x_task_diagnostics: List of profilers to use on tasks.
386
- :type x_task_diagnostics: List[str]
387
- :param _request_timeout: timeout setting for this request. If one
388
- number provided, it will be total request
389
- timeout. It can also be a pair (tuple) of
390
- (connection, read) timeouts.
391
- :type _request_timeout: int, tuple(int, int), optional
392
- :param _request_auth: set to override the auth_settings for an a single
393
- request; this effectively ignores the
394
- authentication in the spec for a single request.
395
- :type _request_auth: dict, optional
396
- :param _content_type: force content-type for the request.
397
- :type _content_type: str, Optional
398
- :param _headers: set to override the headers for a single
399
- request; this effectively ignores the headers
400
- in the spec for a single request.
401
- :type _headers: dict, optional
402
- :param _host_index: set to override the host_index for a single
403
- request; this effectively ignores the host_index
404
- in the spec for a single request.
405
- :type _host_index: int, optional
406
- :return: Returns the result object.
407
- """ # noqa: E501
408
-
409
- _param = self._delete_serialize(
410
- domain_href=domain_href,
411
- x_task_diagnostics=x_task_diagnostics,
412
- _request_auth=_request_auth,
413
- _content_type=_content_type,
414
- _headers=_headers,
415
- _host_index=_host_index
416
- )
417
-
418
- _response_types_map: Dict[str, Optional[str]] = {
419
- '202': "AsyncOperationResponse",
420
- }
421
- response_data = self.api_client.call_api(
422
- *_param,
423
- _request_timeout=_request_timeout
424
- )
425
- response_data.read()
426
- return self.api_client.response_deserialize(
427
- response_data=response_data,
428
- response_types_map=_response_types_map,
429
- ).data
430
-
431
-
432
- @validate_call
433
- def delete_with_http_info(
434
- self,
435
- domain_href: StrictStr,
436
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
437
- _request_timeout: Union[
438
- None,
439
- Annotated[StrictFloat, Field(gt=0)],
440
- Tuple[
441
- Annotated[StrictFloat, Field(gt=0)],
442
- Annotated[StrictFloat, Field(gt=0)]
443
- ]
444
- ] = None,
445
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
446
- _content_type: Optional[StrictStr] = None,
447
- _headers: Optional[Dict[StrictStr, Any]] = None,
448
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
449
- ) -> ApiResponse[AsyncOperationResponse]:
450
- """Delete a domain
451
-
452
- Trigger an asynchronous delete task
453
-
454
- :param domain_href: (required)
455
- :type domain_href: str
456
- :param x_task_diagnostics: List of profilers to use on tasks.
457
- :type x_task_diagnostics: List[str]
458
- :param _request_timeout: timeout setting for this request. If one
459
- number provided, it will be total request
460
- timeout. It can also be a pair (tuple) of
461
- (connection, read) timeouts.
462
- :type _request_timeout: int, tuple(int, int), optional
463
- :param _request_auth: set to override the auth_settings for an a single
464
- request; this effectively ignores the
465
- authentication in the spec for a single request.
466
- :type _request_auth: dict, optional
467
- :param _content_type: force content-type for the request.
468
- :type _content_type: str, Optional
469
- :param _headers: set to override the headers for a single
470
- request; this effectively ignores the headers
471
- in the spec for a single request.
472
- :type _headers: dict, optional
473
- :param _host_index: set to override the host_index for a single
474
- request; this effectively ignores the host_index
475
- in the spec for a single request.
476
- :type _host_index: int, optional
477
- :return: Returns the result object.
478
- """ # noqa: E501
479
-
480
- _param = self._delete_serialize(
481
- domain_href=domain_href,
482
- x_task_diagnostics=x_task_diagnostics,
483
- _request_auth=_request_auth,
484
- _content_type=_content_type,
485
- _headers=_headers,
486
- _host_index=_host_index
487
- )
488
-
489
- _response_types_map: Dict[str, Optional[str]] = {
490
- '202': "AsyncOperationResponse",
491
- }
492
- response_data = self.api_client.call_api(
493
- *_param,
494
- _request_timeout=_request_timeout
495
- )
496
- response_data.read()
497
- return self.api_client.response_deserialize(
498
- response_data=response_data,
499
- response_types_map=_response_types_map,
500
- )
501
-
502
-
503
- @validate_call
504
- def delete_without_preload_content(
505
- self,
506
- domain_href: StrictStr,
507
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
508
- _request_timeout: Union[
509
- None,
510
- Annotated[StrictFloat, Field(gt=0)],
511
- Tuple[
512
- Annotated[StrictFloat, Field(gt=0)],
513
- Annotated[StrictFloat, Field(gt=0)]
514
- ]
515
- ] = None,
516
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
517
- _content_type: Optional[StrictStr] = None,
518
- _headers: Optional[Dict[StrictStr, Any]] = None,
519
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
520
- ) -> RESTResponseType:
521
- """Delete a domain
522
-
523
- Trigger an asynchronous delete task
524
-
525
- :param domain_href: (required)
526
- :type domain_href: str
527
- :param x_task_diagnostics: List of profilers to use on tasks.
528
- :type x_task_diagnostics: List[str]
529
- :param _request_timeout: timeout setting for this request. If one
530
- number provided, it will be total request
531
- timeout. It can also be a pair (tuple) of
532
- (connection, read) timeouts.
533
- :type _request_timeout: int, tuple(int, int), optional
534
- :param _request_auth: set to override the auth_settings for an a single
535
- request; this effectively ignores the
536
- authentication in the spec for a single request.
537
- :type _request_auth: dict, optional
538
- :param _content_type: force content-type for the request.
539
- :type _content_type: str, Optional
540
- :param _headers: set to override the headers for a single
541
- request; this effectively ignores the headers
542
- in the spec for a single request.
543
- :type _headers: dict, optional
544
- :param _host_index: set to override the host_index for a single
545
- request; this effectively ignores the host_index
546
- in the spec for a single request.
547
- :type _host_index: int, optional
548
- :return: Returns the result object.
549
- """ # noqa: E501
550
-
551
- _param = self._delete_serialize(
552
- domain_href=domain_href,
553
- x_task_diagnostics=x_task_diagnostics,
554
- _request_auth=_request_auth,
555
- _content_type=_content_type,
556
- _headers=_headers,
557
- _host_index=_host_index
558
- )
559
-
560
- _response_types_map: Dict[str, Optional[str]] = {
561
- '202': "AsyncOperationResponse",
562
- }
563
- response_data = self.api_client.call_api(
564
- *_param,
565
- _request_timeout=_request_timeout
566
- )
567
- return response_data.response
568
-
569
-
570
- def _delete_serialize(
571
- self,
572
- domain_href,
573
- x_task_diagnostics,
574
- _request_auth,
575
- _content_type,
576
- _headers,
577
- _host_index,
578
- ) -> RequestSerialized:
579
-
580
- _host = None
581
-
582
- _collection_formats: Dict[str, str] = {
583
- 'X-Task-Diagnostics': 'csv',
584
- }
585
-
586
- _path_params: Dict[str, str] = {}
587
- _query_params: List[Tuple[str, str]] = []
588
- _header_params: Dict[str, Optional[str]] = _headers or {}
589
- _form_params: List[Tuple[str, str]] = []
590
- _files: Dict[
591
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
592
- ] = {}
593
- _body_params: Optional[bytes] = None
594
-
595
- # process the path parameters
596
- if domain_href is not None:
597
- _path_params['domain_href'] = domain_href
598
- # process the query parameters
599
- # process the header parameters
600
- if x_task_diagnostics is not None:
601
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
602
- # process the form parameters
603
- # process the body parameter
604
-
605
-
606
- # set the HTTP header `Accept`
607
- if 'Accept' not in _header_params:
608
- _header_params['Accept'] = self.api_client.select_header_accept(
609
- [
610
- 'application/json'
611
- ]
612
- )
613
-
614
-
615
- # authentication setting
616
- _auth_settings: List[str] = [
617
- 'json_header_remote_authentication',
618
- 'basicAuth',
619
- 'cookieAuth'
620
- ]
621
-
622
- return self.api_client.param_serialize(
623
- method='DELETE',
624
- resource_path='{domain_href}',
625
- path_params=_path_params,
626
- query_params=_query_params,
627
- header_params=_header_params,
628
- body=_body_params,
629
- post_params=_form_params,
630
- files=_files,
631
- auth_settings=_auth_settings,
632
- collection_formats=_collection_formats,
633
- _host=_host,
634
- _request_auth=_request_auth
635
- )
636
-
637
-
638
-
639
-
640
- @validate_call
641
- def list(
642
- self,
643
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
644
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
645
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
646
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
647
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
648
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
649
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
650
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
651
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
652
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
653
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
654
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
655
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
656
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
657
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
658
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
659
- pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
660
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
661
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
662
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
663
- pulp_domain: StrictStr = "default",
664
- _request_timeout: Union[
665
- None,
666
- Annotated[StrictFloat, Field(gt=0)],
667
- Tuple[
668
- Annotated[StrictFloat, Field(gt=0)],
669
- Annotated[StrictFloat, Field(gt=0)]
670
- ]
671
- ] = None,
672
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
673
- _content_type: Optional[StrictStr] = None,
674
- _headers: Optional[Dict[StrictStr, Any]] = None,
675
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
676
- ) -> PaginatedDomainResponseList:
677
- """List domains
678
-
679
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
680
-
681
- :param pulp_domain: (required)
682
- :type pulp_domain: str
683
- :param x_task_diagnostics: List of profilers to use on tasks.
684
- :type x_task_diagnostics: List[str]
685
- :param limit: Number of results to return per page.
686
- :type limit: int
687
- :param name: Filter results where name matches value
688
- :type name: str
689
- :param name__contains: Filter results where name contains value
690
- :type name__contains: str
691
- :param name__icontains: Filter results where name contains value
692
- :type name__icontains: str
693
- :param name__iexact: Filter results where name matches value
694
- :type name__iexact: str
695
- :param name__in: Filter results where name is in a comma-separated list of values
696
- :type name__in: List[str]
697
- :param name__iregex: Filter results where name matches regex value
698
- :type name__iregex: str
699
- :param name__istartswith: Filter results where name starts with value
700
- :type name__istartswith: str
701
- :param name__regex: Filter results where name matches regex value
702
- :type name__regex: str
703
- :param name__startswith: Filter results where name starts with value
704
- :type name__startswith: str
705
- :param offset: The initial index from which to return the results.
706
- :type offset: int
707
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending)
708
- :type ordering: List[str]
709
- :param prn__in: Multiple values may be separated by commas.
710
- :type prn__in: List[str]
711
- :param pulp_href__in: Multiple values may be separated by commas.
712
- :type pulp_href__in: List[str]
713
- :param pulp_id__in: Multiple values may be separated by commas.
714
- :type pulp_id__in: List[str]
715
- :param pulp_label_select: Filter labels by search string
716
- :type pulp_label_select: str
717
- :param q: Filter results by using NOT, AND and OR operations on other filters
718
- :type q: str
719
- :param fields: A list of fields to include in the response.
720
- :type fields: List[str]
721
- :param exclude_fields: A list of fields to exclude from the response.
722
- :type exclude_fields: List[str]
723
- :param _request_timeout: timeout setting for this request. If one
724
- number provided, it will be total request
725
- timeout. It can also be a pair (tuple) of
726
- (connection, read) timeouts.
727
- :type _request_timeout: int, tuple(int, int), optional
728
- :param _request_auth: set to override the auth_settings for an a single
729
- request; this effectively ignores the
730
- authentication in the spec for a single request.
731
- :type _request_auth: dict, optional
732
- :param _content_type: force content-type for the request.
733
- :type _content_type: str, Optional
734
- :param _headers: set to override the headers for a single
735
- request; this effectively ignores the headers
736
- in the spec for a single request.
737
- :type _headers: dict, optional
738
- :param _host_index: set to override the host_index for a single
739
- request; this effectively ignores the host_index
740
- in the spec for a single request.
741
- :type _host_index: int, optional
742
- :return: Returns the result object.
743
- """ # noqa: E501
744
-
745
- _param = self._list_serialize(
746
- pulp_domain=pulp_domain,
747
- x_task_diagnostics=x_task_diagnostics,
748
- limit=limit,
749
- name=name,
750
- name__contains=name__contains,
751
- name__icontains=name__icontains,
752
- name__iexact=name__iexact,
753
- name__in=name__in,
754
- name__iregex=name__iregex,
755
- name__istartswith=name__istartswith,
756
- name__regex=name__regex,
757
- name__startswith=name__startswith,
758
- offset=offset,
759
- ordering=ordering,
760
- prn__in=prn__in,
761
- pulp_href__in=pulp_href__in,
762
- pulp_id__in=pulp_id__in,
763
- pulp_label_select=pulp_label_select,
764
- q=q,
765
- fields=fields,
766
- exclude_fields=exclude_fields,
767
- _request_auth=_request_auth,
768
- _content_type=_content_type,
769
- _headers=_headers,
770
- _host_index=_host_index
771
- )
772
-
773
- _response_types_map: Dict[str, Optional[str]] = {
774
- '200': "PaginatedDomainResponseList",
775
- }
776
- response_data = self.api_client.call_api(
777
- *_param,
778
- _request_timeout=_request_timeout
779
- )
780
- response_data.read()
781
- return self.api_client.response_deserialize(
782
- response_data=response_data,
783
- response_types_map=_response_types_map,
784
- ).data
785
-
786
-
787
- @validate_call
788
- def list_with_http_info(
789
- self,
790
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
791
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
792
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
793
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
794
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
795
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
796
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
797
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
798
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
799
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
800
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
801
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
802
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
803
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
804
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
805
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
806
- pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
807
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
808
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
809
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
810
- pulp_domain: StrictStr = "default",
811
- _request_timeout: Union[
812
- None,
813
- Annotated[StrictFloat, Field(gt=0)],
814
- Tuple[
815
- Annotated[StrictFloat, Field(gt=0)],
816
- Annotated[StrictFloat, Field(gt=0)]
817
- ]
818
- ] = None,
819
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
820
- _content_type: Optional[StrictStr] = None,
821
- _headers: Optional[Dict[StrictStr, Any]] = None,
822
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
823
- ) -> ApiResponse[PaginatedDomainResponseList]:
824
- """List domains
825
-
826
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
827
-
828
- :param pulp_domain: (required)
829
- :type pulp_domain: str
830
- :param x_task_diagnostics: List of profilers to use on tasks.
831
- :type x_task_diagnostics: List[str]
832
- :param limit: Number of results to return per page.
833
- :type limit: int
834
- :param name: Filter results where name matches value
835
- :type name: str
836
- :param name__contains: Filter results where name contains value
837
- :type name__contains: str
838
- :param name__icontains: Filter results where name contains value
839
- :type name__icontains: str
840
- :param name__iexact: Filter results where name matches value
841
- :type name__iexact: str
842
- :param name__in: Filter results where name is in a comma-separated list of values
843
- :type name__in: List[str]
844
- :param name__iregex: Filter results where name matches regex value
845
- :type name__iregex: str
846
- :param name__istartswith: Filter results where name starts with value
847
- :type name__istartswith: str
848
- :param name__regex: Filter results where name matches regex value
849
- :type name__regex: str
850
- :param name__startswith: Filter results where name starts with value
851
- :type name__startswith: str
852
- :param offset: The initial index from which to return the results.
853
- :type offset: int
854
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending)
855
- :type ordering: List[str]
856
- :param prn__in: Multiple values may be separated by commas.
857
- :type prn__in: List[str]
858
- :param pulp_href__in: Multiple values may be separated by commas.
859
- :type pulp_href__in: List[str]
860
- :param pulp_id__in: Multiple values may be separated by commas.
861
- :type pulp_id__in: List[str]
862
- :param pulp_label_select: Filter labels by search string
863
- :type pulp_label_select: str
864
- :param q: Filter results by using NOT, AND and OR operations on other filters
865
- :type q: str
866
- :param fields: A list of fields to include in the response.
867
- :type fields: List[str]
868
- :param exclude_fields: A list of fields to exclude from the response.
869
- :type exclude_fields: List[str]
870
- :param _request_timeout: timeout setting for this request. If one
871
- number provided, it will be total request
872
- timeout. It can also be a pair (tuple) of
873
- (connection, read) timeouts.
874
- :type _request_timeout: int, tuple(int, int), optional
875
- :param _request_auth: set to override the auth_settings for an a single
876
- request; this effectively ignores the
877
- authentication in the spec for a single request.
878
- :type _request_auth: dict, optional
879
- :param _content_type: force content-type for the request.
880
- :type _content_type: str, Optional
881
- :param _headers: set to override the headers for a single
882
- request; this effectively ignores the headers
883
- in the spec for a single request.
884
- :type _headers: dict, optional
885
- :param _host_index: set to override the host_index for a single
886
- request; this effectively ignores the host_index
887
- in the spec for a single request.
888
- :type _host_index: int, optional
889
- :return: Returns the result object.
890
- """ # noqa: E501
891
-
892
- _param = self._list_serialize(
893
- pulp_domain=pulp_domain,
894
- x_task_diagnostics=x_task_diagnostics,
895
- limit=limit,
896
- name=name,
897
- name__contains=name__contains,
898
- name__icontains=name__icontains,
899
- name__iexact=name__iexact,
900
- name__in=name__in,
901
- name__iregex=name__iregex,
902
- name__istartswith=name__istartswith,
903
- name__regex=name__regex,
904
- name__startswith=name__startswith,
905
- offset=offset,
906
- ordering=ordering,
907
- prn__in=prn__in,
908
- pulp_href__in=pulp_href__in,
909
- pulp_id__in=pulp_id__in,
910
- pulp_label_select=pulp_label_select,
911
- q=q,
912
- fields=fields,
913
- exclude_fields=exclude_fields,
914
- _request_auth=_request_auth,
915
- _content_type=_content_type,
916
- _headers=_headers,
917
- _host_index=_host_index
918
- )
919
-
920
- _response_types_map: Dict[str, Optional[str]] = {
921
- '200': "PaginatedDomainResponseList",
922
- }
923
- response_data = self.api_client.call_api(
924
- *_param,
925
- _request_timeout=_request_timeout
926
- )
927
- response_data.read()
928
- return self.api_client.response_deserialize(
929
- response_data=response_data,
930
- response_types_map=_response_types_map,
931
- )
932
-
933
-
934
- @validate_call
935
- def list_without_preload_content(
936
- self,
937
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
938
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
939
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
940
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
941
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
942
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
943
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
944
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
945
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
946
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
947
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
948
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
949
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
950
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
951
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
952
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
953
- pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
954
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
955
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
956
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
957
- pulp_domain: StrictStr = "default",
958
- _request_timeout: Union[
959
- None,
960
- Annotated[StrictFloat, Field(gt=0)],
961
- Tuple[
962
- Annotated[StrictFloat, Field(gt=0)],
963
- Annotated[StrictFloat, Field(gt=0)]
964
- ]
965
- ] = None,
966
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
967
- _content_type: Optional[StrictStr] = None,
968
- _headers: Optional[Dict[StrictStr, Any]] = None,
969
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
970
- ) -> RESTResponseType:
971
- """List domains
972
-
973
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
974
-
975
- :param pulp_domain: (required)
976
- :type pulp_domain: str
977
- :param x_task_diagnostics: List of profilers to use on tasks.
978
- :type x_task_diagnostics: List[str]
979
- :param limit: Number of results to return per page.
980
- :type limit: int
981
- :param name: Filter results where name matches value
982
- :type name: str
983
- :param name__contains: Filter results where name contains value
984
- :type name__contains: str
985
- :param name__icontains: Filter results where name contains value
986
- :type name__icontains: str
987
- :param name__iexact: Filter results where name matches value
988
- :type name__iexact: str
989
- :param name__in: Filter results where name is in a comma-separated list of values
990
- :type name__in: List[str]
991
- :param name__iregex: Filter results where name matches regex value
992
- :type name__iregex: str
993
- :param name__istartswith: Filter results where name starts with value
994
- :type name__istartswith: str
995
- :param name__regex: Filter results where name matches regex value
996
- :type name__regex: str
997
- :param name__startswith: Filter results where name starts with value
998
- :type name__startswith: str
999
- :param offset: The initial index from which to return the results.
1000
- :type offset: int
1001
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending)
1002
- :type ordering: List[str]
1003
- :param prn__in: Multiple values may be separated by commas.
1004
- :type prn__in: List[str]
1005
- :param pulp_href__in: Multiple values may be separated by commas.
1006
- :type pulp_href__in: List[str]
1007
- :param pulp_id__in: Multiple values may be separated by commas.
1008
- :type pulp_id__in: List[str]
1009
- :param pulp_label_select: Filter labels by search string
1010
- :type pulp_label_select: str
1011
- :param q: Filter results by using NOT, AND and OR operations on other filters
1012
- :type q: str
1013
- :param fields: A list of fields to include in the response.
1014
- :type fields: List[str]
1015
- :param exclude_fields: A list of fields to exclude from the response.
1016
- :type exclude_fields: List[str]
1017
- :param _request_timeout: timeout setting for this request. If one
1018
- number provided, it will be total request
1019
- timeout. It can also be a pair (tuple) of
1020
- (connection, read) timeouts.
1021
- :type _request_timeout: int, tuple(int, int), optional
1022
- :param _request_auth: set to override the auth_settings for an a single
1023
- request; this effectively ignores the
1024
- authentication in the spec for a single request.
1025
- :type _request_auth: dict, optional
1026
- :param _content_type: force content-type for the request.
1027
- :type _content_type: str, Optional
1028
- :param _headers: set to override the headers for a single
1029
- request; this effectively ignores the headers
1030
- in the spec for a single request.
1031
- :type _headers: dict, optional
1032
- :param _host_index: set to override the host_index for a single
1033
- request; this effectively ignores the host_index
1034
- in the spec for a single request.
1035
- :type _host_index: int, optional
1036
- :return: Returns the result object.
1037
- """ # noqa: E501
1038
-
1039
- _param = self._list_serialize(
1040
- pulp_domain=pulp_domain,
1041
- x_task_diagnostics=x_task_diagnostics,
1042
- limit=limit,
1043
- name=name,
1044
- name__contains=name__contains,
1045
- name__icontains=name__icontains,
1046
- name__iexact=name__iexact,
1047
- name__in=name__in,
1048
- name__iregex=name__iregex,
1049
- name__istartswith=name__istartswith,
1050
- name__regex=name__regex,
1051
- name__startswith=name__startswith,
1052
- offset=offset,
1053
- ordering=ordering,
1054
- prn__in=prn__in,
1055
- pulp_href__in=pulp_href__in,
1056
- pulp_id__in=pulp_id__in,
1057
- pulp_label_select=pulp_label_select,
1058
- q=q,
1059
- fields=fields,
1060
- exclude_fields=exclude_fields,
1061
- _request_auth=_request_auth,
1062
- _content_type=_content_type,
1063
- _headers=_headers,
1064
- _host_index=_host_index
1065
- )
1066
-
1067
- _response_types_map: Dict[str, Optional[str]] = {
1068
- '200': "PaginatedDomainResponseList",
1069
- }
1070
- response_data = self.api_client.call_api(
1071
- *_param,
1072
- _request_timeout=_request_timeout
1073
- )
1074
- return response_data.response
1075
-
1076
-
1077
- def _list_serialize(
1078
- self,
1079
- pulp_domain,
1080
- x_task_diagnostics,
1081
- limit,
1082
- name,
1083
- name__contains,
1084
- name__icontains,
1085
- name__iexact,
1086
- name__in,
1087
- name__iregex,
1088
- name__istartswith,
1089
- name__regex,
1090
- name__startswith,
1091
- offset,
1092
- ordering,
1093
- prn__in,
1094
- pulp_href__in,
1095
- pulp_id__in,
1096
- pulp_label_select,
1097
- q,
1098
- fields,
1099
- exclude_fields,
1100
- _request_auth,
1101
- _content_type,
1102
- _headers,
1103
- _host_index,
1104
- ) -> RequestSerialized:
1105
-
1106
- _host = None
1107
-
1108
- _collection_formats: Dict[str, str] = {
1109
- 'X-Task-Diagnostics': 'csv',
1110
- 'name__in': 'csv',
1111
- 'ordering': 'csv',
1112
- 'prn__in': 'csv',
1113
- 'pulp_href__in': 'csv',
1114
- 'pulp_id__in': 'csv',
1115
- 'fields': 'multi',
1116
- 'exclude_fields': 'multi',
1117
- }
1118
-
1119
- _path_params: Dict[str, str] = {}
1120
- _query_params: List[Tuple[str, str]] = []
1121
- _header_params: Dict[str, Optional[str]] = _headers or {}
1122
- _form_params: List[Tuple[str, str]] = []
1123
- _files: Dict[
1124
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1125
- ] = {}
1126
- _body_params: Optional[bytes] = None
1127
-
1128
- # process the path parameters
1129
- if pulp_domain is not None:
1130
- _path_params['pulp_domain'] = pulp_domain
1131
- # process the query parameters
1132
- if limit is not None:
1133
-
1134
- _query_params.append(('limit', limit))
1135
-
1136
- if name is not None:
1137
-
1138
- _query_params.append(('name', name))
1139
-
1140
- if name__contains is not None:
1141
-
1142
- _query_params.append(('name__contains', name__contains))
1143
-
1144
- if name__icontains is not None:
1145
-
1146
- _query_params.append(('name__icontains', name__icontains))
1147
-
1148
- if name__iexact is not None:
1149
-
1150
- _query_params.append(('name__iexact', name__iexact))
1151
-
1152
- if name__in is not None:
1153
-
1154
- _query_params.append(('name__in', name__in))
1155
-
1156
- if name__iregex is not None:
1157
-
1158
- _query_params.append(('name__iregex', name__iregex))
1159
-
1160
- if name__istartswith is not None:
1161
-
1162
- _query_params.append(('name__istartswith', name__istartswith))
1163
-
1164
- if name__regex is not None:
1165
-
1166
- _query_params.append(('name__regex', name__regex))
1167
-
1168
- if name__startswith is not None:
1169
-
1170
- _query_params.append(('name__startswith', name__startswith))
1171
-
1172
- if offset is not None:
1173
-
1174
- _query_params.append(('offset', offset))
1175
-
1176
- if ordering is not None:
1177
-
1178
- _query_params.append(('ordering', ordering))
1179
-
1180
- if prn__in is not None:
1181
-
1182
- _query_params.append(('prn__in', prn__in))
1183
-
1184
- if pulp_href__in is not None:
1185
-
1186
- _query_params.append(('pulp_href__in', pulp_href__in))
1187
-
1188
- if pulp_id__in is not None:
1189
-
1190
- _query_params.append(('pulp_id__in', pulp_id__in))
1191
-
1192
- if pulp_label_select is not None:
1193
-
1194
- _query_params.append(('pulp_label_select', pulp_label_select))
1195
-
1196
- if q is not None:
1197
-
1198
- _query_params.append(('q', q))
1199
-
1200
- if fields is not None:
1201
-
1202
- _query_params.append(('fields', fields))
1203
-
1204
- if exclude_fields is not None:
1205
-
1206
- _query_params.append(('exclude_fields', exclude_fields))
1207
-
1208
- # process the header parameters
1209
- if x_task_diagnostics is not None:
1210
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1211
- # process the form parameters
1212
- # process the body parameter
1213
-
1214
-
1215
- # set the HTTP header `Accept`
1216
- if 'Accept' not in _header_params:
1217
- _header_params['Accept'] = self.api_client.select_header_accept(
1218
- [
1219
- 'application/json'
1220
- ]
1221
- )
1222
-
1223
-
1224
- # authentication setting
1225
- _auth_settings: List[str] = [
1226
- 'json_header_remote_authentication',
1227
- 'basicAuth',
1228
- 'cookieAuth'
1229
- ]
1230
-
1231
- return self.api_client.param_serialize(
1232
- method='GET',
1233
- resource_path='/api/pulp/{pulp_domain}/api/v3/domains/',
1234
- path_params=_path_params,
1235
- query_params=_query_params,
1236
- header_params=_header_params,
1237
- body=_body_params,
1238
- post_params=_form_params,
1239
- files=_files,
1240
- auth_settings=_auth_settings,
1241
- collection_formats=_collection_formats,
1242
- _host=_host,
1243
- _request_auth=_request_auth
1244
- )
1245
-
1246
-
1247
-
1248
-
1249
- @validate_call
1250
- def migrate(
1251
- self,
1252
- domain_backend_migrator: DomainBackendMigrator,
1253
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1254
- pulp_domain: StrictStr = "default",
1255
- _request_timeout: Union[
1256
- None,
1257
- Annotated[StrictFloat, Field(gt=0)],
1258
- Tuple[
1259
- Annotated[StrictFloat, Field(gt=0)],
1260
- Annotated[StrictFloat, Field(gt=0)]
1261
- ]
1262
- ] = None,
1263
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1264
- _content_type: Optional[StrictStr] = None,
1265
- _headers: Optional[Dict[StrictStr, Any]] = None,
1266
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1267
- ) -> AsyncOperationResponse:
1268
- """Migrate storage backend
1269
-
1270
- Migrate the domain's storage backend to a new one. Launches a background task to copy the domain's artifacts over to the supplied storage backend. Then updates the domain's storage settings to the new storage backend. This task does not delete the stored files of the artifacts from the previous backend. **IMPORTANT** This task will block all other tasks within the domain until the migration is completed, essentially putting the domain into a read only state. Content will still be served from the old storage backend until the migration has completed, so don't remove the old backend until then. Note, this endpoint is not allowed on the default domain. This feature is in Tech Preview and is subject to future change and thus not guaranteed to be backwards compatible.
1271
-
1272
- :param pulp_domain: (required)
1273
- :type pulp_domain: str
1274
- :param domain_backend_migrator: (required)
1275
- :type domain_backend_migrator: DomainBackendMigrator
1276
- :param x_task_diagnostics: List of profilers to use on tasks.
1277
- :type x_task_diagnostics: List[str]
1278
- :param _request_timeout: timeout setting for this request. If one
1279
- number provided, it will be total request
1280
- timeout. It can also be a pair (tuple) of
1281
- (connection, read) timeouts.
1282
- :type _request_timeout: int, tuple(int, int), optional
1283
- :param _request_auth: set to override the auth_settings for an a single
1284
- request; this effectively ignores the
1285
- authentication in the spec for a single request.
1286
- :type _request_auth: dict, optional
1287
- :param _content_type: force content-type for the request.
1288
- :type _content_type: str, Optional
1289
- :param _headers: set to override the headers for a single
1290
- request; this effectively ignores the headers
1291
- in the spec for a single request.
1292
- :type _headers: dict, optional
1293
- :param _host_index: set to override the host_index for a single
1294
- request; this effectively ignores the host_index
1295
- in the spec for a single request.
1296
- :type _host_index: int, optional
1297
- :return: Returns the result object.
1298
- """ # noqa: E501
1299
-
1300
- _param = self._migrate_serialize(
1301
- pulp_domain=pulp_domain,
1302
- domain_backend_migrator=domain_backend_migrator,
1303
- x_task_diagnostics=x_task_diagnostics,
1304
- _request_auth=_request_auth,
1305
- _content_type=_content_type,
1306
- _headers=_headers,
1307
- _host_index=_host_index
1308
- )
1309
-
1310
- _response_types_map: Dict[str, Optional[str]] = {
1311
- '202': "AsyncOperationResponse",
1312
- }
1313
- response_data = self.api_client.call_api(
1314
- *_param,
1315
- _request_timeout=_request_timeout
1316
- )
1317
- response_data.read()
1318
- return self.api_client.response_deserialize(
1319
- response_data=response_data,
1320
- response_types_map=_response_types_map,
1321
- ).data
1322
-
1323
-
1324
- @validate_call
1325
- def migrate_with_http_info(
1326
- self,
1327
- domain_backend_migrator: DomainBackendMigrator,
1328
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1329
- pulp_domain: StrictStr = "default",
1330
- _request_timeout: Union[
1331
- None,
1332
- Annotated[StrictFloat, Field(gt=0)],
1333
- Tuple[
1334
- Annotated[StrictFloat, Field(gt=0)],
1335
- Annotated[StrictFloat, Field(gt=0)]
1336
- ]
1337
- ] = None,
1338
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1339
- _content_type: Optional[StrictStr] = None,
1340
- _headers: Optional[Dict[StrictStr, Any]] = None,
1341
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1342
- ) -> ApiResponse[AsyncOperationResponse]:
1343
- """Migrate storage backend
1344
-
1345
- Migrate the domain's storage backend to a new one. Launches a background task to copy the domain's artifacts over to the supplied storage backend. Then updates the domain's storage settings to the new storage backend. This task does not delete the stored files of the artifacts from the previous backend. **IMPORTANT** This task will block all other tasks within the domain until the migration is completed, essentially putting the domain into a read only state. Content will still be served from the old storage backend until the migration has completed, so don't remove the old backend until then. Note, this endpoint is not allowed on the default domain. This feature is in Tech Preview and is subject to future change and thus not guaranteed to be backwards compatible.
1346
-
1347
- :param pulp_domain: (required)
1348
- :type pulp_domain: str
1349
- :param domain_backend_migrator: (required)
1350
- :type domain_backend_migrator: DomainBackendMigrator
1351
- :param x_task_diagnostics: List of profilers to use on tasks.
1352
- :type x_task_diagnostics: List[str]
1353
- :param _request_timeout: timeout setting for this request. If one
1354
- number provided, it will be total request
1355
- timeout. It can also be a pair (tuple) of
1356
- (connection, read) timeouts.
1357
- :type _request_timeout: int, tuple(int, int), optional
1358
- :param _request_auth: set to override the auth_settings for an a single
1359
- request; this effectively ignores the
1360
- authentication in the spec for a single request.
1361
- :type _request_auth: dict, optional
1362
- :param _content_type: force content-type for the request.
1363
- :type _content_type: str, Optional
1364
- :param _headers: set to override the headers for a single
1365
- request; this effectively ignores the headers
1366
- in the spec for a single request.
1367
- :type _headers: dict, optional
1368
- :param _host_index: set to override the host_index for a single
1369
- request; this effectively ignores the host_index
1370
- in the spec for a single request.
1371
- :type _host_index: int, optional
1372
- :return: Returns the result object.
1373
- """ # noqa: E501
1374
-
1375
- _param = self._migrate_serialize(
1376
- pulp_domain=pulp_domain,
1377
- domain_backend_migrator=domain_backend_migrator,
1378
- x_task_diagnostics=x_task_diagnostics,
1379
- _request_auth=_request_auth,
1380
- _content_type=_content_type,
1381
- _headers=_headers,
1382
- _host_index=_host_index
1383
- )
1384
-
1385
- _response_types_map: Dict[str, Optional[str]] = {
1386
- '202': "AsyncOperationResponse",
1387
- }
1388
- response_data = self.api_client.call_api(
1389
- *_param,
1390
- _request_timeout=_request_timeout
1391
- )
1392
- response_data.read()
1393
- return self.api_client.response_deserialize(
1394
- response_data=response_data,
1395
- response_types_map=_response_types_map,
1396
- )
1397
-
1398
-
1399
- @validate_call
1400
- def migrate_without_preload_content(
1401
- self,
1402
- domain_backend_migrator: DomainBackendMigrator,
1403
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1404
- pulp_domain: StrictStr = "default",
1405
- _request_timeout: Union[
1406
- None,
1407
- Annotated[StrictFloat, Field(gt=0)],
1408
- Tuple[
1409
- Annotated[StrictFloat, Field(gt=0)],
1410
- Annotated[StrictFloat, Field(gt=0)]
1411
- ]
1412
- ] = None,
1413
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1414
- _content_type: Optional[StrictStr] = None,
1415
- _headers: Optional[Dict[StrictStr, Any]] = None,
1416
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1417
- ) -> RESTResponseType:
1418
- """Migrate storage backend
1419
-
1420
- Migrate the domain's storage backend to a new one. Launches a background task to copy the domain's artifacts over to the supplied storage backend. Then updates the domain's storage settings to the new storage backend. This task does not delete the stored files of the artifacts from the previous backend. **IMPORTANT** This task will block all other tasks within the domain until the migration is completed, essentially putting the domain into a read only state. Content will still be served from the old storage backend until the migration has completed, so don't remove the old backend until then. Note, this endpoint is not allowed on the default domain. This feature is in Tech Preview and is subject to future change and thus not guaranteed to be backwards compatible.
1421
-
1422
- :param pulp_domain: (required)
1423
- :type pulp_domain: str
1424
- :param domain_backend_migrator: (required)
1425
- :type domain_backend_migrator: DomainBackendMigrator
1426
- :param x_task_diagnostics: List of profilers to use on tasks.
1427
- :type x_task_diagnostics: List[str]
1428
- :param _request_timeout: timeout setting for this request. If one
1429
- number provided, it will be total request
1430
- timeout. It can also be a pair (tuple) of
1431
- (connection, read) timeouts.
1432
- :type _request_timeout: int, tuple(int, int), optional
1433
- :param _request_auth: set to override the auth_settings for an a single
1434
- request; this effectively ignores the
1435
- authentication in the spec for a single request.
1436
- :type _request_auth: dict, optional
1437
- :param _content_type: force content-type for the request.
1438
- :type _content_type: str, Optional
1439
- :param _headers: set to override the headers for a single
1440
- request; this effectively ignores the headers
1441
- in the spec for a single request.
1442
- :type _headers: dict, optional
1443
- :param _host_index: set to override the host_index for a single
1444
- request; this effectively ignores the host_index
1445
- in the spec for a single request.
1446
- :type _host_index: int, optional
1447
- :return: Returns the result object.
1448
- """ # noqa: E501
1449
-
1450
- _param = self._migrate_serialize(
1451
- pulp_domain=pulp_domain,
1452
- domain_backend_migrator=domain_backend_migrator,
1453
- x_task_diagnostics=x_task_diagnostics,
1454
- _request_auth=_request_auth,
1455
- _content_type=_content_type,
1456
- _headers=_headers,
1457
- _host_index=_host_index
1458
- )
1459
-
1460
- _response_types_map: Dict[str, Optional[str]] = {
1461
- '202': "AsyncOperationResponse",
1462
- }
1463
- response_data = self.api_client.call_api(
1464
- *_param,
1465
- _request_timeout=_request_timeout
1466
- )
1467
- return response_data.response
1468
-
1469
-
1470
- def _migrate_serialize(
1471
- self,
1472
- pulp_domain,
1473
- domain_backend_migrator,
1474
- x_task_diagnostics,
1475
- _request_auth,
1476
- _content_type,
1477
- _headers,
1478
- _host_index,
1479
- ) -> RequestSerialized:
1480
-
1481
- _host = None
1482
-
1483
- _collection_formats: Dict[str, str] = {
1484
- 'X-Task-Diagnostics': 'csv',
1485
- }
1486
-
1487
- _path_params: Dict[str, str] = {}
1488
- _query_params: List[Tuple[str, str]] = []
1489
- _header_params: Dict[str, Optional[str]] = _headers or {}
1490
- _form_params: List[Tuple[str, str]] = []
1491
- _files: Dict[
1492
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1493
- ] = {}
1494
- _body_params: Optional[bytes] = None
1495
-
1496
- # process the path parameters
1497
- if pulp_domain is not None:
1498
- _path_params['pulp_domain'] = pulp_domain
1499
- # process the query parameters
1500
- # process the header parameters
1501
- if x_task_diagnostics is not None:
1502
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1503
- # process the form parameters
1504
- # process the body parameter
1505
- if domain_backend_migrator is not None:
1506
- _body_params = domain_backend_migrator
1507
-
1508
-
1509
- # set the HTTP header `Accept`
1510
- if 'Accept' not in _header_params:
1511
- _header_params['Accept'] = self.api_client.select_header_accept(
1512
- [
1513
- 'application/json'
1514
- ]
1515
- )
1516
-
1517
- # set the HTTP header `Content-Type`
1518
- if _content_type:
1519
- _header_params['Content-Type'] = _content_type
1520
- else:
1521
- _default_content_type = (
1522
- self.api_client.select_header_content_type(
1523
- [
1524
- 'application/json',
1525
- 'application/x-www-form-urlencoded',
1526
- 'multipart/form-data'
1527
- ]
1528
- )
1529
- )
1530
- if _default_content_type is not None:
1531
- _header_params['Content-Type'] = _default_content_type
1532
-
1533
- # authentication setting
1534
- _auth_settings: List[str] = [
1535
- 'json_header_remote_authentication',
1536
- 'basicAuth',
1537
- 'cookieAuth'
1538
- ]
1539
-
1540
- return self.api_client.param_serialize(
1541
- method='POST',
1542
- resource_path='/api/pulp/{pulp_domain}/api/v3/domains/migrate/',
1543
- path_params=_path_params,
1544
- query_params=_query_params,
1545
- header_params=_header_params,
1546
- body=_body_params,
1547
- post_params=_form_params,
1548
- files=_files,
1549
- auth_settings=_auth_settings,
1550
- collection_formats=_collection_formats,
1551
- _host=_host,
1552
- _request_auth=_request_auth
1553
- )
1554
-
1555
-
1556
-
1557
-
1558
- @validate_call
1559
- def partial_update(
1560
- self,
1561
- domain_href: StrictStr,
1562
- patched_domain: PatchedDomain,
1563
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1564
- _request_timeout: Union[
1565
- None,
1566
- Annotated[StrictFloat, Field(gt=0)],
1567
- Tuple[
1568
- Annotated[StrictFloat, Field(gt=0)],
1569
- Annotated[StrictFloat, Field(gt=0)]
1570
- ]
1571
- ] = None,
1572
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1573
- _content_type: Optional[StrictStr] = None,
1574
- _headers: Optional[Dict[StrictStr, Any]] = None,
1575
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1576
- ) -> AsyncOperationResponse:
1577
- """Update a domain
1578
-
1579
- Trigger an asynchronous partial update task
1580
-
1581
- :param domain_href: (required)
1582
- :type domain_href: str
1583
- :param patched_domain: (required)
1584
- :type patched_domain: PatchedDomain
1585
- :param x_task_diagnostics: List of profilers to use on tasks.
1586
- :type x_task_diagnostics: List[str]
1587
- :param _request_timeout: timeout setting for this request. If one
1588
- number provided, it will be total request
1589
- timeout. It can also be a pair (tuple) of
1590
- (connection, read) timeouts.
1591
- :type _request_timeout: int, tuple(int, int), optional
1592
- :param _request_auth: set to override the auth_settings for an a single
1593
- request; this effectively ignores the
1594
- authentication in the spec for a single request.
1595
- :type _request_auth: dict, optional
1596
- :param _content_type: force content-type for the request.
1597
- :type _content_type: str, Optional
1598
- :param _headers: set to override the headers for a single
1599
- request; this effectively ignores the headers
1600
- in the spec for a single request.
1601
- :type _headers: dict, optional
1602
- :param _host_index: set to override the host_index for a single
1603
- request; this effectively ignores the host_index
1604
- in the spec for a single request.
1605
- :type _host_index: int, optional
1606
- :return: Returns the result object.
1607
- """ # noqa: E501
1608
-
1609
- _param = self._partial_update_serialize(
1610
- domain_href=domain_href,
1611
- patched_domain=patched_domain,
1612
- x_task_diagnostics=x_task_diagnostics,
1613
- _request_auth=_request_auth,
1614
- _content_type=_content_type,
1615
- _headers=_headers,
1616
- _host_index=_host_index
1617
- )
1618
-
1619
- _response_types_map: Dict[str, Optional[str]] = {
1620
- '202': "AsyncOperationResponse",
1621
- }
1622
- response_data = self.api_client.call_api(
1623
- *_param,
1624
- _request_timeout=_request_timeout
1625
- )
1626
- response_data.read()
1627
- return self.api_client.response_deserialize(
1628
- response_data=response_data,
1629
- response_types_map=_response_types_map,
1630
- ).data
1631
-
1632
-
1633
- @validate_call
1634
- def partial_update_with_http_info(
1635
- self,
1636
- domain_href: StrictStr,
1637
- patched_domain: PatchedDomain,
1638
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1639
- _request_timeout: Union[
1640
- None,
1641
- Annotated[StrictFloat, Field(gt=0)],
1642
- Tuple[
1643
- Annotated[StrictFloat, Field(gt=0)],
1644
- Annotated[StrictFloat, Field(gt=0)]
1645
- ]
1646
- ] = None,
1647
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1648
- _content_type: Optional[StrictStr] = None,
1649
- _headers: Optional[Dict[StrictStr, Any]] = None,
1650
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1651
- ) -> ApiResponse[AsyncOperationResponse]:
1652
- """Update a domain
1653
-
1654
- Trigger an asynchronous partial update task
1655
-
1656
- :param domain_href: (required)
1657
- :type domain_href: str
1658
- :param patched_domain: (required)
1659
- :type patched_domain: PatchedDomain
1660
- :param x_task_diagnostics: List of profilers to use on tasks.
1661
- :type x_task_diagnostics: List[str]
1662
- :param _request_timeout: timeout setting for this request. If one
1663
- number provided, it will be total request
1664
- timeout. It can also be a pair (tuple) of
1665
- (connection, read) timeouts.
1666
- :type _request_timeout: int, tuple(int, int), optional
1667
- :param _request_auth: set to override the auth_settings for an a single
1668
- request; this effectively ignores the
1669
- authentication in the spec for a single request.
1670
- :type _request_auth: dict, optional
1671
- :param _content_type: force content-type for the request.
1672
- :type _content_type: str, Optional
1673
- :param _headers: set to override the headers for a single
1674
- request; this effectively ignores the headers
1675
- in the spec for a single request.
1676
- :type _headers: dict, optional
1677
- :param _host_index: set to override the host_index for a single
1678
- request; this effectively ignores the host_index
1679
- in the spec for a single request.
1680
- :type _host_index: int, optional
1681
- :return: Returns the result object.
1682
- """ # noqa: E501
1683
-
1684
- _param = self._partial_update_serialize(
1685
- domain_href=domain_href,
1686
- patched_domain=patched_domain,
1687
- x_task_diagnostics=x_task_diagnostics,
1688
- _request_auth=_request_auth,
1689
- _content_type=_content_type,
1690
- _headers=_headers,
1691
- _host_index=_host_index
1692
- )
1693
-
1694
- _response_types_map: Dict[str, Optional[str]] = {
1695
- '202': "AsyncOperationResponse",
1696
- }
1697
- response_data = self.api_client.call_api(
1698
- *_param,
1699
- _request_timeout=_request_timeout
1700
- )
1701
- response_data.read()
1702
- return self.api_client.response_deserialize(
1703
- response_data=response_data,
1704
- response_types_map=_response_types_map,
1705
- )
1706
-
1707
-
1708
- @validate_call
1709
- def partial_update_without_preload_content(
1710
- self,
1711
- domain_href: StrictStr,
1712
- patched_domain: PatchedDomain,
1713
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1714
- _request_timeout: Union[
1715
- None,
1716
- Annotated[StrictFloat, Field(gt=0)],
1717
- Tuple[
1718
- Annotated[StrictFloat, Field(gt=0)],
1719
- Annotated[StrictFloat, Field(gt=0)]
1720
- ]
1721
- ] = None,
1722
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1723
- _content_type: Optional[StrictStr] = None,
1724
- _headers: Optional[Dict[StrictStr, Any]] = None,
1725
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1726
- ) -> RESTResponseType:
1727
- """Update a domain
1728
-
1729
- Trigger an asynchronous partial update task
1730
-
1731
- :param domain_href: (required)
1732
- :type domain_href: str
1733
- :param patched_domain: (required)
1734
- :type patched_domain: PatchedDomain
1735
- :param x_task_diagnostics: List of profilers to use on tasks.
1736
- :type x_task_diagnostics: List[str]
1737
- :param _request_timeout: timeout setting for this request. If one
1738
- number provided, it will be total request
1739
- timeout. It can also be a pair (tuple) of
1740
- (connection, read) timeouts.
1741
- :type _request_timeout: int, tuple(int, int), optional
1742
- :param _request_auth: set to override the auth_settings for an a single
1743
- request; this effectively ignores the
1744
- authentication in the spec for a single request.
1745
- :type _request_auth: dict, optional
1746
- :param _content_type: force content-type for the request.
1747
- :type _content_type: str, Optional
1748
- :param _headers: set to override the headers for a single
1749
- request; this effectively ignores the headers
1750
- in the spec for a single request.
1751
- :type _headers: dict, optional
1752
- :param _host_index: set to override the host_index for a single
1753
- request; this effectively ignores the host_index
1754
- in the spec for a single request.
1755
- :type _host_index: int, optional
1756
- :return: Returns the result object.
1757
- """ # noqa: E501
1758
-
1759
- _param = self._partial_update_serialize(
1760
- domain_href=domain_href,
1761
- patched_domain=patched_domain,
1762
- x_task_diagnostics=x_task_diagnostics,
1763
- _request_auth=_request_auth,
1764
- _content_type=_content_type,
1765
- _headers=_headers,
1766
- _host_index=_host_index
1767
- )
1768
-
1769
- _response_types_map: Dict[str, Optional[str]] = {
1770
- '202': "AsyncOperationResponse",
1771
- }
1772
- response_data = self.api_client.call_api(
1773
- *_param,
1774
- _request_timeout=_request_timeout
1775
- )
1776
- return response_data.response
1777
-
1778
-
1779
- def _partial_update_serialize(
1780
- self,
1781
- domain_href,
1782
- patched_domain,
1783
- x_task_diagnostics,
1784
- _request_auth,
1785
- _content_type,
1786
- _headers,
1787
- _host_index,
1788
- ) -> RequestSerialized:
1789
-
1790
- _host = None
1791
-
1792
- _collection_formats: Dict[str, str] = {
1793
- 'X-Task-Diagnostics': 'csv',
1794
- }
1795
-
1796
- _path_params: Dict[str, str] = {}
1797
- _query_params: List[Tuple[str, str]] = []
1798
- _header_params: Dict[str, Optional[str]] = _headers or {}
1799
- _form_params: List[Tuple[str, str]] = []
1800
- _files: Dict[
1801
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1802
- ] = {}
1803
- _body_params: Optional[bytes] = None
1804
-
1805
- # process the path parameters
1806
- if domain_href is not None:
1807
- _path_params['domain_href'] = domain_href
1808
- # process the query parameters
1809
- # process the header parameters
1810
- if x_task_diagnostics is not None:
1811
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1812
- # process the form parameters
1813
- # process the body parameter
1814
- if patched_domain is not None:
1815
- _body_params = patched_domain
1816
-
1817
-
1818
- # set the HTTP header `Accept`
1819
- if 'Accept' not in _header_params:
1820
- _header_params['Accept'] = self.api_client.select_header_accept(
1821
- [
1822
- 'application/json'
1823
- ]
1824
- )
1825
-
1826
- # set the HTTP header `Content-Type`
1827
- if _content_type:
1828
- _header_params['Content-Type'] = _content_type
1829
- else:
1830
- _default_content_type = (
1831
- self.api_client.select_header_content_type(
1832
- [
1833
- 'application/json',
1834
- 'application/x-www-form-urlencoded',
1835
- 'multipart/form-data'
1836
- ]
1837
- )
1838
- )
1839
- if _default_content_type is not None:
1840
- _header_params['Content-Type'] = _default_content_type
1841
-
1842
- # authentication setting
1843
- _auth_settings: List[str] = [
1844
- 'json_header_remote_authentication',
1845
- 'basicAuth',
1846
- 'cookieAuth'
1847
- ]
1848
-
1849
- return self.api_client.param_serialize(
1850
- method='PATCH',
1851
- resource_path='{domain_href}',
1852
- path_params=_path_params,
1853
- query_params=_query_params,
1854
- header_params=_header_params,
1855
- body=_body_params,
1856
- post_params=_form_params,
1857
- files=_files,
1858
- auth_settings=_auth_settings,
1859
- collection_formats=_collection_formats,
1860
- _host=_host,
1861
- _request_auth=_request_auth
1862
- )
1863
-
1864
-
1865
-
1866
-
1867
- @validate_call
1868
- def read(
1869
- self,
1870
- domain_href: StrictStr,
1871
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1872
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1873
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1874
- _request_timeout: Union[
1875
- None,
1876
- Annotated[StrictFloat, Field(gt=0)],
1877
- Tuple[
1878
- Annotated[StrictFloat, Field(gt=0)],
1879
- Annotated[StrictFloat, Field(gt=0)]
1880
- ]
1881
- ] = None,
1882
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1883
- _content_type: Optional[StrictStr] = None,
1884
- _headers: Optional[Dict[StrictStr, Any]] = None,
1885
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1886
- ) -> DomainResponse:
1887
- """Inspect a domain
1888
-
1889
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
1890
-
1891
- :param domain_href: (required)
1892
- :type domain_href: str
1893
- :param x_task_diagnostics: List of profilers to use on tasks.
1894
- :type x_task_diagnostics: List[str]
1895
- :param fields: A list of fields to include in the response.
1896
- :type fields: List[str]
1897
- :param exclude_fields: A list of fields to exclude from the response.
1898
- :type exclude_fields: List[str]
1899
- :param _request_timeout: timeout setting for this request. If one
1900
- number provided, it will be total request
1901
- timeout. It can also be a pair (tuple) of
1902
- (connection, read) timeouts.
1903
- :type _request_timeout: int, tuple(int, int), optional
1904
- :param _request_auth: set to override the auth_settings for an a single
1905
- request; this effectively ignores the
1906
- authentication in the spec for a single request.
1907
- :type _request_auth: dict, optional
1908
- :param _content_type: force content-type for the request.
1909
- :type _content_type: str, Optional
1910
- :param _headers: set to override the headers for a single
1911
- request; this effectively ignores the headers
1912
- in the spec for a single request.
1913
- :type _headers: dict, optional
1914
- :param _host_index: set to override the host_index for a single
1915
- request; this effectively ignores the host_index
1916
- in the spec for a single request.
1917
- :type _host_index: int, optional
1918
- :return: Returns the result object.
1919
- """ # noqa: E501
1920
-
1921
- _param = self._read_serialize(
1922
- domain_href=domain_href,
1923
- x_task_diagnostics=x_task_diagnostics,
1924
- fields=fields,
1925
- exclude_fields=exclude_fields,
1926
- _request_auth=_request_auth,
1927
- _content_type=_content_type,
1928
- _headers=_headers,
1929
- _host_index=_host_index
1930
- )
1931
-
1932
- _response_types_map: Dict[str, Optional[str]] = {
1933
- '200': "DomainResponse",
1934
- }
1935
- response_data = self.api_client.call_api(
1936
- *_param,
1937
- _request_timeout=_request_timeout
1938
- )
1939
- response_data.read()
1940
- return self.api_client.response_deserialize(
1941
- response_data=response_data,
1942
- response_types_map=_response_types_map,
1943
- ).data
1944
-
1945
-
1946
- @validate_call
1947
- def read_with_http_info(
1948
- self,
1949
- domain_href: StrictStr,
1950
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1951
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1952
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1953
- _request_timeout: Union[
1954
- None,
1955
- Annotated[StrictFloat, Field(gt=0)],
1956
- Tuple[
1957
- Annotated[StrictFloat, Field(gt=0)],
1958
- Annotated[StrictFloat, Field(gt=0)]
1959
- ]
1960
- ] = None,
1961
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1962
- _content_type: Optional[StrictStr] = None,
1963
- _headers: Optional[Dict[StrictStr, Any]] = None,
1964
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1965
- ) -> ApiResponse[DomainResponse]:
1966
- """Inspect a domain
1967
-
1968
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
1969
-
1970
- :param domain_href: (required)
1971
- :type domain_href: str
1972
- :param x_task_diagnostics: List of profilers to use on tasks.
1973
- :type x_task_diagnostics: List[str]
1974
- :param fields: A list of fields to include in the response.
1975
- :type fields: List[str]
1976
- :param exclude_fields: A list of fields to exclude from the response.
1977
- :type exclude_fields: List[str]
1978
- :param _request_timeout: timeout setting for this request. If one
1979
- number provided, it will be total request
1980
- timeout. It can also be a pair (tuple) of
1981
- (connection, read) timeouts.
1982
- :type _request_timeout: int, tuple(int, int), optional
1983
- :param _request_auth: set to override the auth_settings for an a single
1984
- request; this effectively ignores the
1985
- authentication in the spec for a single request.
1986
- :type _request_auth: dict, optional
1987
- :param _content_type: force content-type for the request.
1988
- :type _content_type: str, Optional
1989
- :param _headers: set to override the headers for a single
1990
- request; this effectively ignores the headers
1991
- in the spec for a single request.
1992
- :type _headers: dict, optional
1993
- :param _host_index: set to override the host_index for a single
1994
- request; this effectively ignores the host_index
1995
- in the spec for a single request.
1996
- :type _host_index: int, optional
1997
- :return: Returns the result object.
1998
- """ # noqa: E501
1999
-
2000
- _param = self._read_serialize(
2001
- domain_href=domain_href,
2002
- x_task_diagnostics=x_task_diagnostics,
2003
- fields=fields,
2004
- exclude_fields=exclude_fields,
2005
- _request_auth=_request_auth,
2006
- _content_type=_content_type,
2007
- _headers=_headers,
2008
- _host_index=_host_index
2009
- )
2010
-
2011
- _response_types_map: Dict[str, Optional[str]] = {
2012
- '200': "DomainResponse",
2013
- }
2014
- response_data = self.api_client.call_api(
2015
- *_param,
2016
- _request_timeout=_request_timeout
2017
- )
2018
- response_data.read()
2019
- return self.api_client.response_deserialize(
2020
- response_data=response_data,
2021
- response_types_map=_response_types_map,
2022
- )
2023
-
2024
-
2025
- @validate_call
2026
- def read_without_preload_content(
2027
- self,
2028
- domain_href: StrictStr,
2029
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2030
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2031
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2032
- _request_timeout: Union[
2033
- None,
2034
- Annotated[StrictFloat, Field(gt=0)],
2035
- Tuple[
2036
- Annotated[StrictFloat, Field(gt=0)],
2037
- Annotated[StrictFloat, Field(gt=0)]
2038
- ]
2039
- ] = None,
2040
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2041
- _content_type: Optional[StrictStr] = None,
2042
- _headers: Optional[Dict[StrictStr, Any]] = None,
2043
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2044
- ) -> RESTResponseType:
2045
- """Inspect a domain
2046
-
2047
- ViewSet for Domain. NOTE: This API endpoint is in \"tech preview\" and subject to change
2048
-
2049
- :param domain_href: (required)
2050
- :type domain_href: str
2051
- :param x_task_diagnostics: List of profilers to use on tasks.
2052
- :type x_task_diagnostics: List[str]
2053
- :param fields: A list of fields to include in the response.
2054
- :type fields: List[str]
2055
- :param exclude_fields: A list of fields to exclude from the response.
2056
- :type exclude_fields: List[str]
2057
- :param _request_timeout: timeout setting for this request. If one
2058
- number provided, it will be total request
2059
- timeout. It can also be a pair (tuple) of
2060
- (connection, read) timeouts.
2061
- :type _request_timeout: int, tuple(int, int), optional
2062
- :param _request_auth: set to override the auth_settings for an a single
2063
- request; this effectively ignores the
2064
- authentication in the spec for a single request.
2065
- :type _request_auth: dict, optional
2066
- :param _content_type: force content-type for the request.
2067
- :type _content_type: str, Optional
2068
- :param _headers: set to override the headers for a single
2069
- request; this effectively ignores the headers
2070
- in the spec for a single request.
2071
- :type _headers: dict, optional
2072
- :param _host_index: set to override the host_index for a single
2073
- request; this effectively ignores the host_index
2074
- in the spec for a single request.
2075
- :type _host_index: int, optional
2076
- :return: Returns the result object.
2077
- """ # noqa: E501
2078
-
2079
- _param = self._read_serialize(
2080
- domain_href=domain_href,
2081
- x_task_diagnostics=x_task_diagnostics,
2082
- fields=fields,
2083
- exclude_fields=exclude_fields,
2084
- _request_auth=_request_auth,
2085
- _content_type=_content_type,
2086
- _headers=_headers,
2087
- _host_index=_host_index
2088
- )
2089
-
2090
- _response_types_map: Dict[str, Optional[str]] = {
2091
- '200': "DomainResponse",
2092
- }
2093
- response_data = self.api_client.call_api(
2094
- *_param,
2095
- _request_timeout=_request_timeout
2096
- )
2097
- return response_data.response
2098
-
2099
-
2100
- def _read_serialize(
2101
- self,
2102
- domain_href,
2103
- x_task_diagnostics,
2104
- fields,
2105
- exclude_fields,
2106
- _request_auth,
2107
- _content_type,
2108
- _headers,
2109
- _host_index,
2110
- ) -> RequestSerialized:
2111
-
2112
- _host = None
2113
-
2114
- _collection_formats: Dict[str, str] = {
2115
- 'X-Task-Diagnostics': 'csv',
2116
- 'fields': 'multi',
2117
- 'exclude_fields': 'multi',
2118
- }
2119
-
2120
- _path_params: Dict[str, str] = {}
2121
- _query_params: List[Tuple[str, str]] = []
2122
- _header_params: Dict[str, Optional[str]] = _headers or {}
2123
- _form_params: List[Tuple[str, str]] = []
2124
- _files: Dict[
2125
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2126
- ] = {}
2127
- _body_params: Optional[bytes] = None
2128
-
2129
- # process the path parameters
2130
- if domain_href is not None:
2131
- _path_params['domain_href'] = domain_href
2132
- # process the query parameters
2133
- if fields is not None:
2134
-
2135
- _query_params.append(('fields', fields))
2136
-
2137
- if exclude_fields is not None:
2138
-
2139
- _query_params.append(('exclude_fields', exclude_fields))
2140
-
2141
- # process the header parameters
2142
- if x_task_diagnostics is not None:
2143
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2144
- # process the form parameters
2145
- # process the body parameter
2146
-
2147
-
2148
- # set the HTTP header `Accept`
2149
- if 'Accept' not in _header_params:
2150
- _header_params['Accept'] = self.api_client.select_header_accept(
2151
- [
2152
- 'application/json'
2153
- ]
2154
- )
2155
-
2156
-
2157
- # authentication setting
2158
- _auth_settings: List[str] = [
2159
- 'json_header_remote_authentication',
2160
- 'basicAuth',
2161
- 'cookieAuth'
2162
- ]
2163
-
2164
- return self.api_client.param_serialize(
2165
- method='GET',
2166
- resource_path='{domain_href}',
2167
- path_params=_path_params,
2168
- query_params=_query_params,
2169
- header_params=_header_params,
2170
- body=_body_params,
2171
- post_params=_form_params,
2172
- files=_files,
2173
- auth_settings=_auth_settings,
2174
- collection_formats=_collection_formats,
2175
- _host=_host,
2176
- _request_auth=_request_auth
2177
- )
2178
-
2179
-
2180
-
2181
-
2182
- @validate_call
2183
- def set_label(
2184
- self,
2185
- domain_href: StrictStr,
2186
- set_label: SetLabel,
2187
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2188
- _request_timeout: Union[
2189
- None,
2190
- Annotated[StrictFloat, Field(gt=0)],
2191
- Tuple[
2192
- Annotated[StrictFloat, Field(gt=0)],
2193
- Annotated[StrictFloat, Field(gt=0)]
2194
- ]
2195
- ] = None,
2196
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2197
- _content_type: Optional[StrictStr] = None,
2198
- _headers: Optional[Dict[StrictStr, Any]] = None,
2199
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2200
- ) -> SetLabelResponse:
2201
- """Set a label
2202
-
2203
- Set a single pulp_label on the object to a specific value or null.
2204
-
2205
- :param domain_href: (required)
2206
- :type domain_href: str
2207
- :param set_label: (required)
2208
- :type set_label: SetLabel
2209
- :param x_task_diagnostics: List of profilers to use on tasks.
2210
- :type x_task_diagnostics: List[str]
2211
- :param _request_timeout: timeout setting for this request. If one
2212
- number provided, it will be total request
2213
- timeout. It can also be a pair (tuple) of
2214
- (connection, read) timeouts.
2215
- :type _request_timeout: int, tuple(int, int), optional
2216
- :param _request_auth: set to override the auth_settings for an a single
2217
- request; this effectively ignores the
2218
- authentication in the spec for a single request.
2219
- :type _request_auth: dict, optional
2220
- :param _content_type: force content-type for the request.
2221
- :type _content_type: str, Optional
2222
- :param _headers: set to override the headers for a single
2223
- request; this effectively ignores the headers
2224
- in the spec for a single request.
2225
- :type _headers: dict, optional
2226
- :param _host_index: set to override the host_index for a single
2227
- request; this effectively ignores the host_index
2228
- in the spec for a single request.
2229
- :type _host_index: int, optional
2230
- :return: Returns the result object.
2231
- """ # noqa: E501
2232
-
2233
- _param = self._set_label_serialize(
2234
- domain_href=domain_href,
2235
- set_label=set_label,
2236
- x_task_diagnostics=x_task_diagnostics,
2237
- _request_auth=_request_auth,
2238
- _content_type=_content_type,
2239
- _headers=_headers,
2240
- _host_index=_host_index
2241
- )
2242
-
2243
- _response_types_map: Dict[str, Optional[str]] = {
2244
- '201': "SetLabelResponse",
2245
- }
2246
- response_data = self.api_client.call_api(
2247
- *_param,
2248
- _request_timeout=_request_timeout
2249
- )
2250
- response_data.read()
2251
- return self.api_client.response_deserialize(
2252
- response_data=response_data,
2253
- response_types_map=_response_types_map,
2254
- ).data
2255
-
2256
-
2257
- @validate_call
2258
- def set_label_with_http_info(
2259
- self,
2260
- domain_href: StrictStr,
2261
- set_label: SetLabel,
2262
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2263
- _request_timeout: Union[
2264
- None,
2265
- Annotated[StrictFloat, Field(gt=0)],
2266
- Tuple[
2267
- Annotated[StrictFloat, Field(gt=0)],
2268
- Annotated[StrictFloat, Field(gt=0)]
2269
- ]
2270
- ] = None,
2271
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2272
- _content_type: Optional[StrictStr] = None,
2273
- _headers: Optional[Dict[StrictStr, Any]] = None,
2274
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2275
- ) -> ApiResponse[SetLabelResponse]:
2276
- """Set a label
2277
-
2278
- Set a single pulp_label on the object to a specific value or null.
2279
-
2280
- :param domain_href: (required)
2281
- :type domain_href: str
2282
- :param set_label: (required)
2283
- :type set_label: SetLabel
2284
- :param x_task_diagnostics: List of profilers to use on tasks.
2285
- :type x_task_diagnostics: List[str]
2286
- :param _request_timeout: timeout setting for this request. If one
2287
- number provided, it will be total request
2288
- timeout. It can also be a pair (tuple) of
2289
- (connection, read) timeouts.
2290
- :type _request_timeout: int, tuple(int, int), optional
2291
- :param _request_auth: set to override the auth_settings for an a single
2292
- request; this effectively ignores the
2293
- authentication in the spec for a single request.
2294
- :type _request_auth: dict, optional
2295
- :param _content_type: force content-type for the request.
2296
- :type _content_type: str, Optional
2297
- :param _headers: set to override the headers for a single
2298
- request; this effectively ignores the headers
2299
- in the spec for a single request.
2300
- :type _headers: dict, optional
2301
- :param _host_index: set to override the host_index for a single
2302
- request; this effectively ignores the host_index
2303
- in the spec for a single request.
2304
- :type _host_index: int, optional
2305
- :return: Returns the result object.
2306
- """ # noqa: E501
2307
-
2308
- _param = self._set_label_serialize(
2309
- domain_href=domain_href,
2310
- set_label=set_label,
2311
- x_task_diagnostics=x_task_diagnostics,
2312
- _request_auth=_request_auth,
2313
- _content_type=_content_type,
2314
- _headers=_headers,
2315
- _host_index=_host_index
2316
- )
2317
-
2318
- _response_types_map: Dict[str, Optional[str]] = {
2319
- '201': "SetLabelResponse",
2320
- }
2321
- response_data = self.api_client.call_api(
2322
- *_param,
2323
- _request_timeout=_request_timeout
2324
- )
2325
- response_data.read()
2326
- return self.api_client.response_deserialize(
2327
- response_data=response_data,
2328
- response_types_map=_response_types_map,
2329
- )
2330
-
2331
-
2332
- @validate_call
2333
- def set_label_without_preload_content(
2334
- self,
2335
- domain_href: StrictStr,
2336
- set_label: SetLabel,
2337
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2338
- _request_timeout: Union[
2339
- None,
2340
- Annotated[StrictFloat, Field(gt=0)],
2341
- Tuple[
2342
- Annotated[StrictFloat, Field(gt=0)],
2343
- Annotated[StrictFloat, Field(gt=0)]
2344
- ]
2345
- ] = None,
2346
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2347
- _content_type: Optional[StrictStr] = None,
2348
- _headers: Optional[Dict[StrictStr, Any]] = None,
2349
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2350
- ) -> RESTResponseType:
2351
- """Set a label
2352
-
2353
- Set a single pulp_label on the object to a specific value or null.
2354
-
2355
- :param domain_href: (required)
2356
- :type domain_href: str
2357
- :param set_label: (required)
2358
- :type set_label: SetLabel
2359
- :param x_task_diagnostics: List of profilers to use on tasks.
2360
- :type x_task_diagnostics: List[str]
2361
- :param _request_timeout: timeout setting for this request. If one
2362
- number provided, it will be total request
2363
- timeout. It can also be a pair (tuple) of
2364
- (connection, read) timeouts.
2365
- :type _request_timeout: int, tuple(int, int), optional
2366
- :param _request_auth: set to override the auth_settings for an a single
2367
- request; this effectively ignores the
2368
- authentication in the spec for a single request.
2369
- :type _request_auth: dict, optional
2370
- :param _content_type: force content-type for the request.
2371
- :type _content_type: str, Optional
2372
- :param _headers: set to override the headers for a single
2373
- request; this effectively ignores the headers
2374
- in the spec for a single request.
2375
- :type _headers: dict, optional
2376
- :param _host_index: set to override the host_index for a single
2377
- request; this effectively ignores the host_index
2378
- in the spec for a single request.
2379
- :type _host_index: int, optional
2380
- :return: Returns the result object.
2381
- """ # noqa: E501
2382
-
2383
- _param = self._set_label_serialize(
2384
- domain_href=domain_href,
2385
- set_label=set_label,
2386
- x_task_diagnostics=x_task_diagnostics,
2387
- _request_auth=_request_auth,
2388
- _content_type=_content_type,
2389
- _headers=_headers,
2390
- _host_index=_host_index
2391
- )
2392
-
2393
- _response_types_map: Dict[str, Optional[str]] = {
2394
- '201': "SetLabelResponse",
2395
- }
2396
- response_data = self.api_client.call_api(
2397
- *_param,
2398
- _request_timeout=_request_timeout
2399
- )
2400
- return response_data.response
2401
-
2402
-
2403
- def _set_label_serialize(
2404
- self,
2405
- domain_href,
2406
- set_label,
2407
- x_task_diagnostics,
2408
- _request_auth,
2409
- _content_type,
2410
- _headers,
2411
- _host_index,
2412
- ) -> RequestSerialized:
2413
-
2414
- _host = None
2415
-
2416
- _collection_formats: Dict[str, str] = {
2417
- 'X-Task-Diagnostics': 'csv',
2418
- }
2419
-
2420
- _path_params: Dict[str, str] = {}
2421
- _query_params: List[Tuple[str, str]] = []
2422
- _header_params: Dict[str, Optional[str]] = _headers or {}
2423
- _form_params: List[Tuple[str, str]] = []
2424
- _files: Dict[
2425
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2426
- ] = {}
2427
- _body_params: Optional[bytes] = None
2428
-
2429
- # process the path parameters
2430
- if domain_href is not None:
2431
- _path_params['domain_href'] = domain_href
2432
- # process the query parameters
2433
- # process the header parameters
2434
- if x_task_diagnostics is not None:
2435
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2436
- # process the form parameters
2437
- # process the body parameter
2438
- if set_label is not None:
2439
- _body_params = set_label
2440
-
2441
-
2442
- # set the HTTP header `Accept`
2443
- if 'Accept' not in _header_params:
2444
- _header_params['Accept'] = self.api_client.select_header_accept(
2445
- [
2446
- 'application/json'
2447
- ]
2448
- )
2449
-
2450
- # set the HTTP header `Content-Type`
2451
- if _content_type:
2452
- _header_params['Content-Type'] = _content_type
2453
- else:
2454
- _default_content_type = (
2455
- self.api_client.select_header_content_type(
2456
- [
2457
- 'application/json',
2458
- 'application/x-www-form-urlencoded',
2459
- 'multipart/form-data'
2460
- ]
2461
- )
2462
- )
2463
- if _default_content_type is not None:
2464
- _header_params['Content-Type'] = _default_content_type
2465
-
2466
- # authentication setting
2467
- _auth_settings: List[str] = [
2468
- 'json_header_remote_authentication',
2469
- 'basicAuth',
2470
- 'cookieAuth'
2471
- ]
2472
-
2473
- return self.api_client.param_serialize(
2474
- method='POST',
2475
- resource_path='{domain_href}set_label/',
2476
- path_params=_path_params,
2477
- query_params=_query_params,
2478
- header_params=_header_params,
2479
- body=_body_params,
2480
- post_params=_form_params,
2481
- files=_files,
2482
- auth_settings=_auth_settings,
2483
- collection_formats=_collection_formats,
2484
- _host=_host,
2485
- _request_auth=_request_auth
2486
- )
2487
-
2488
-
2489
-
2490
-
2491
- @validate_call
2492
- def unset_label(
2493
- self,
2494
- domain_href: StrictStr,
2495
- unset_label: UnsetLabel,
2496
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2497
- _request_timeout: Union[
2498
- None,
2499
- Annotated[StrictFloat, Field(gt=0)],
2500
- Tuple[
2501
- Annotated[StrictFloat, Field(gt=0)],
2502
- Annotated[StrictFloat, Field(gt=0)]
2503
- ]
2504
- ] = None,
2505
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2506
- _content_type: Optional[StrictStr] = None,
2507
- _headers: Optional[Dict[StrictStr, Any]] = None,
2508
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2509
- ) -> UnsetLabelResponse:
2510
- """Unset a label
2511
-
2512
- Unset a single pulp_label on the object.
2513
-
2514
- :param domain_href: (required)
2515
- :type domain_href: str
2516
- :param unset_label: (required)
2517
- :type unset_label: UnsetLabel
2518
- :param x_task_diagnostics: List of profilers to use on tasks.
2519
- :type x_task_diagnostics: List[str]
2520
- :param _request_timeout: timeout setting for this request. If one
2521
- number provided, it will be total request
2522
- timeout. It can also be a pair (tuple) of
2523
- (connection, read) timeouts.
2524
- :type _request_timeout: int, tuple(int, int), optional
2525
- :param _request_auth: set to override the auth_settings for an a single
2526
- request; this effectively ignores the
2527
- authentication in the spec for a single request.
2528
- :type _request_auth: dict, optional
2529
- :param _content_type: force content-type for the request.
2530
- :type _content_type: str, Optional
2531
- :param _headers: set to override the headers for a single
2532
- request; this effectively ignores the headers
2533
- in the spec for a single request.
2534
- :type _headers: dict, optional
2535
- :param _host_index: set to override the host_index for a single
2536
- request; this effectively ignores the host_index
2537
- in the spec for a single request.
2538
- :type _host_index: int, optional
2539
- :return: Returns the result object.
2540
- """ # noqa: E501
2541
-
2542
- _param = self._unset_label_serialize(
2543
- domain_href=domain_href,
2544
- unset_label=unset_label,
2545
- x_task_diagnostics=x_task_diagnostics,
2546
- _request_auth=_request_auth,
2547
- _content_type=_content_type,
2548
- _headers=_headers,
2549
- _host_index=_host_index
2550
- )
2551
-
2552
- _response_types_map: Dict[str, Optional[str]] = {
2553
- '201': "UnsetLabelResponse",
2554
- }
2555
- response_data = self.api_client.call_api(
2556
- *_param,
2557
- _request_timeout=_request_timeout
2558
- )
2559
- response_data.read()
2560
- return self.api_client.response_deserialize(
2561
- response_data=response_data,
2562
- response_types_map=_response_types_map,
2563
- ).data
2564
-
2565
-
2566
- @validate_call
2567
- def unset_label_with_http_info(
2568
- self,
2569
- domain_href: StrictStr,
2570
- unset_label: UnsetLabel,
2571
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2572
- _request_timeout: Union[
2573
- None,
2574
- Annotated[StrictFloat, Field(gt=0)],
2575
- Tuple[
2576
- Annotated[StrictFloat, Field(gt=0)],
2577
- Annotated[StrictFloat, Field(gt=0)]
2578
- ]
2579
- ] = None,
2580
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2581
- _content_type: Optional[StrictStr] = None,
2582
- _headers: Optional[Dict[StrictStr, Any]] = None,
2583
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2584
- ) -> ApiResponse[UnsetLabelResponse]:
2585
- """Unset a label
2586
-
2587
- Unset a single pulp_label on the object.
2588
-
2589
- :param domain_href: (required)
2590
- :type domain_href: str
2591
- :param unset_label: (required)
2592
- :type unset_label: UnsetLabel
2593
- :param x_task_diagnostics: List of profilers to use on tasks.
2594
- :type x_task_diagnostics: List[str]
2595
- :param _request_timeout: timeout setting for this request. If one
2596
- number provided, it will be total request
2597
- timeout. It can also be a pair (tuple) of
2598
- (connection, read) timeouts.
2599
- :type _request_timeout: int, tuple(int, int), optional
2600
- :param _request_auth: set to override the auth_settings for an a single
2601
- request; this effectively ignores the
2602
- authentication in the spec for a single request.
2603
- :type _request_auth: dict, optional
2604
- :param _content_type: force content-type for the request.
2605
- :type _content_type: str, Optional
2606
- :param _headers: set to override the headers for a single
2607
- request; this effectively ignores the headers
2608
- in the spec for a single request.
2609
- :type _headers: dict, optional
2610
- :param _host_index: set to override the host_index for a single
2611
- request; this effectively ignores the host_index
2612
- in the spec for a single request.
2613
- :type _host_index: int, optional
2614
- :return: Returns the result object.
2615
- """ # noqa: E501
2616
-
2617
- _param = self._unset_label_serialize(
2618
- domain_href=domain_href,
2619
- unset_label=unset_label,
2620
- x_task_diagnostics=x_task_diagnostics,
2621
- _request_auth=_request_auth,
2622
- _content_type=_content_type,
2623
- _headers=_headers,
2624
- _host_index=_host_index
2625
- )
2626
-
2627
- _response_types_map: Dict[str, Optional[str]] = {
2628
- '201': "UnsetLabelResponse",
2629
- }
2630
- response_data = self.api_client.call_api(
2631
- *_param,
2632
- _request_timeout=_request_timeout
2633
- )
2634
- response_data.read()
2635
- return self.api_client.response_deserialize(
2636
- response_data=response_data,
2637
- response_types_map=_response_types_map,
2638
- )
2639
-
2640
-
2641
- @validate_call
2642
- def unset_label_without_preload_content(
2643
- self,
2644
- domain_href: StrictStr,
2645
- unset_label: UnsetLabel,
2646
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2647
- _request_timeout: Union[
2648
- None,
2649
- Annotated[StrictFloat, Field(gt=0)],
2650
- Tuple[
2651
- Annotated[StrictFloat, Field(gt=0)],
2652
- Annotated[StrictFloat, Field(gt=0)]
2653
- ]
2654
- ] = None,
2655
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2656
- _content_type: Optional[StrictStr] = None,
2657
- _headers: Optional[Dict[StrictStr, Any]] = None,
2658
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2659
- ) -> RESTResponseType:
2660
- """Unset a label
2661
-
2662
- Unset a single pulp_label on the object.
2663
-
2664
- :param domain_href: (required)
2665
- :type domain_href: str
2666
- :param unset_label: (required)
2667
- :type unset_label: UnsetLabel
2668
- :param x_task_diagnostics: List of profilers to use on tasks.
2669
- :type x_task_diagnostics: List[str]
2670
- :param _request_timeout: timeout setting for this request. If one
2671
- number provided, it will be total request
2672
- timeout. It can also be a pair (tuple) of
2673
- (connection, read) timeouts.
2674
- :type _request_timeout: int, tuple(int, int), optional
2675
- :param _request_auth: set to override the auth_settings for an a single
2676
- request; this effectively ignores the
2677
- authentication in the spec for a single request.
2678
- :type _request_auth: dict, optional
2679
- :param _content_type: force content-type for the request.
2680
- :type _content_type: str, Optional
2681
- :param _headers: set to override the headers for a single
2682
- request; this effectively ignores the headers
2683
- in the spec for a single request.
2684
- :type _headers: dict, optional
2685
- :param _host_index: set to override the host_index for a single
2686
- request; this effectively ignores the host_index
2687
- in the spec for a single request.
2688
- :type _host_index: int, optional
2689
- :return: Returns the result object.
2690
- """ # noqa: E501
2691
-
2692
- _param = self._unset_label_serialize(
2693
- domain_href=domain_href,
2694
- unset_label=unset_label,
2695
- x_task_diagnostics=x_task_diagnostics,
2696
- _request_auth=_request_auth,
2697
- _content_type=_content_type,
2698
- _headers=_headers,
2699
- _host_index=_host_index
2700
- )
2701
-
2702
- _response_types_map: Dict[str, Optional[str]] = {
2703
- '201': "UnsetLabelResponse",
2704
- }
2705
- response_data = self.api_client.call_api(
2706
- *_param,
2707
- _request_timeout=_request_timeout
2708
- )
2709
- return response_data.response
2710
-
2711
-
2712
- def _unset_label_serialize(
2713
- self,
2714
- domain_href,
2715
- unset_label,
2716
- x_task_diagnostics,
2717
- _request_auth,
2718
- _content_type,
2719
- _headers,
2720
- _host_index,
2721
- ) -> RequestSerialized:
2722
-
2723
- _host = None
2724
-
2725
- _collection_formats: Dict[str, str] = {
2726
- 'X-Task-Diagnostics': 'csv',
2727
- }
2728
-
2729
- _path_params: Dict[str, str] = {}
2730
- _query_params: List[Tuple[str, str]] = []
2731
- _header_params: Dict[str, Optional[str]] = _headers or {}
2732
- _form_params: List[Tuple[str, str]] = []
2733
- _files: Dict[
2734
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2735
- ] = {}
2736
- _body_params: Optional[bytes] = None
2737
-
2738
- # process the path parameters
2739
- if domain_href is not None:
2740
- _path_params['domain_href'] = domain_href
2741
- # process the query parameters
2742
- # process the header parameters
2743
- if x_task_diagnostics is not None:
2744
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2745
- # process the form parameters
2746
- # process the body parameter
2747
- if unset_label is not None:
2748
- _body_params = unset_label
2749
-
2750
-
2751
- # set the HTTP header `Accept`
2752
- if 'Accept' not in _header_params:
2753
- _header_params['Accept'] = self.api_client.select_header_accept(
2754
- [
2755
- 'application/json'
2756
- ]
2757
- )
2758
-
2759
- # set the HTTP header `Content-Type`
2760
- if _content_type:
2761
- _header_params['Content-Type'] = _content_type
2762
- else:
2763
- _default_content_type = (
2764
- self.api_client.select_header_content_type(
2765
- [
2766
- 'application/json',
2767
- 'application/x-www-form-urlencoded',
2768
- 'multipart/form-data'
2769
- ]
2770
- )
2771
- )
2772
- if _default_content_type is not None:
2773
- _header_params['Content-Type'] = _default_content_type
2774
-
2775
- # authentication setting
2776
- _auth_settings: List[str] = [
2777
- 'json_header_remote_authentication',
2778
- 'basicAuth',
2779
- 'cookieAuth'
2780
- ]
2781
-
2782
- return self.api_client.param_serialize(
2783
- method='POST',
2784
- resource_path='{domain_href}unset_label/',
2785
- path_params=_path_params,
2786
- query_params=_query_params,
2787
- header_params=_header_params,
2788
- body=_body_params,
2789
- post_params=_form_params,
2790
- files=_files,
2791
- auth_settings=_auth_settings,
2792
- collection_formats=_collection_formats,
2793
- _host=_host,
2794
- _request_auth=_request_auth
2795
- )
2796
-
2797
-
2798
-
2799
-
2800
- @validate_call
2801
- def update(
2802
- self,
2803
- domain_href: StrictStr,
2804
- domain: Domain,
2805
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2806
- _request_timeout: Union[
2807
- None,
2808
- Annotated[StrictFloat, Field(gt=0)],
2809
- Tuple[
2810
- Annotated[StrictFloat, Field(gt=0)],
2811
- Annotated[StrictFloat, Field(gt=0)]
2812
- ]
2813
- ] = None,
2814
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2815
- _content_type: Optional[StrictStr] = None,
2816
- _headers: Optional[Dict[StrictStr, Any]] = None,
2817
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2818
- ) -> AsyncOperationResponse:
2819
- """Update a domain
2820
-
2821
- Trigger an asynchronous update task
2822
-
2823
- :param domain_href: (required)
2824
- :type domain_href: str
2825
- :param domain: (required)
2826
- :type domain: Domain
2827
- :param x_task_diagnostics: List of profilers to use on tasks.
2828
- :type x_task_diagnostics: List[str]
2829
- :param _request_timeout: timeout setting for this request. If one
2830
- number provided, it will be total request
2831
- timeout. It can also be a pair (tuple) of
2832
- (connection, read) timeouts.
2833
- :type _request_timeout: int, tuple(int, int), optional
2834
- :param _request_auth: set to override the auth_settings for an a single
2835
- request; this effectively ignores the
2836
- authentication in the spec for a single request.
2837
- :type _request_auth: dict, optional
2838
- :param _content_type: force content-type for the request.
2839
- :type _content_type: str, Optional
2840
- :param _headers: set to override the headers for a single
2841
- request; this effectively ignores the headers
2842
- in the spec for a single request.
2843
- :type _headers: dict, optional
2844
- :param _host_index: set to override the host_index for a single
2845
- request; this effectively ignores the host_index
2846
- in the spec for a single request.
2847
- :type _host_index: int, optional
2848
- :return: Returns the result object.
2849
- """ # noqa: E501
2850
-
2851
- _param = self._update_serialize(
2852
- domain_href=domain_href,
2853
- domain=domain,
2854
- x_task_diagnostics=x_task_diagnostics,
2855
- _request_auth=_request_auth,
2856
- _content_type=_content_type,
2857
- _headers=_headers,
2858
- _host_index=_host_index
2859
- )
2860
-
2861
- _response_types_map: Dict[str, Optional[str]] = {
2862
- '202': "AsyncOperationResponse",
2863
- }
2864
- response_data = self.api_client.call_api(
2865
- *_param,
2866
- _request_timeout=_request_timeout
2867
- )
2868
- response_data.read()
2869
- return self.api_client.response_deserialize(
2870
- response_data=response_data,
2871
- response_types_map=_response_types_map,
2872
- ).data
2873
-
2874
-
2875
- @validate_call
2876
- def update_with_http_info(
2877
- self,
2878
- domain_href: StrictStr,
2879
- domain: Domain,
2880
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2881
- _request_timeout: Union[
2882
- None,
2883
- Annotated[StrictFloat, Field(gt=0)],
2884
- Tuple[
2885
- Annotated[StrictFloat, Field(gt=0)],
2886
- Annotated[StrictFloat, Field(gt=0)]
2887
- ]
2888
- ] = None,
2889
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2890
- _content_type: Optional[StrictStr] = None,
2891
- _headers: Optional[Dict[StrictStr, Any]] = None,
2892
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2893
- ) -> ApiResponse[AsyncOperationResponse]:
2894
- """Update a domain
2895
-
2896
- Trigger an asynchronous update task
2897
-
2898
- :param domain_href: (required)
2899
- :type domain_href: str
2900
- :param domain: (required)
2901
- :type domain: Domain
2902
- :param x_task_diagnostics: List of profilers to use on tasks.
2903
- :type x_task_diagnostics: List[str]
2904
- :param _request_timeout: timeout setting for this request. If one
2905
- number provided, it will be total request
2906
- timeout. It can also be a pair (tuple) of
2907
- (connection, read) timeouts.
2908
- :type _request_timeout: int, tuple(int, int), optional
2909
- :param _request_auth: set to override the auth_settings for an a single
2910
- request; this effectively ignores the
2911
- authentication in the spec for a single request.
2912
- :type _request_auth: dict, optional
2913
- :param _content_type: force content-type for the request.
2914
- :type _content_type: str, Optional
2915
- :param _headers: set to override the headers for a single
2916
- request; this effectively ignores the headers
2917
- in the spec for a single request.
2918
- :type _headers: dict, optional
2919
- :param _host_index: set to override the host_index for a single
2920
- request; this effectively ignores the host_index
2921
- in the spec for a single request.
2922
- :type _host_index: int, optional
2923
- :return: Returns the result object.
2924
- """ # noqa: E501
2925
-
2926
- _param = self._update_serialize(
2927
- domain_href=domain_href,
2928
- domain=domain,
2929
- x_task_diagnostics=x_task_diagnostics,
2930
- _request_auth=_request_auth,
2931
- _content_type=_content_type,
2932
- _headers=_headers,
2933
- _host_index=_host_index
2934
- )
2935
-
2936
- _response_types_map: Dict[str, Optional[str]] = {
2937
- '202': "AsyncOperationResponse",
2938
- }
2939
- response_data = self.api_client.call_api(
2940
- *_param,
2941
- _request_timeout=_request_timeout
2942
- )
2943
- response_data.read()
2944
- return self.api_client.response_deserialize(
2945
- response_data=response_data,
2946
- response_types_map=_response_types_map,
2947
- )
2948
-
2949
-
2950
- @validate_call
2951
- def update_without_preload_content(
2952
- self,
2953
- domain_href: StrictStr,
2954
- domain: Domain,
2955
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2956
- _request_timeout: Union[
2957
- None,
2958
- Annotated[StrictFloat, Field(gt=0)],
2959
- Tuple[
2960
- Annotated[StrictFloat, Field(gt=0)],
2961
- Annotated[StrictFloat, Field(gt=0)]
2962
- ]
2963
- ] = None,
2964
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2965
- _content_type: Optional[StrictStr] = None,
2966
- _headers: Optional[Dict[StrictStr, Any]] = None,
2967
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2968
- ) -> RESTResponseType:
2969
- """Update a domain
2970
-
2971
- Trigger an asynchronous update task
2972
-
2973
- :param domain_href: (required)
2974
- :type domain_href: str
2975
- :param domain: (required)
2976
- :type domain: Domain
2977
- :param x_task_diagnostics: List of profilers to use on tasks.
2978
- :type x_task_diagnostics: List[str]
2979
- :param _request_timeout: timeout setting for this request. If one
2980
- number provided, it will be total request
2981
- timeout. It can also be a pair (tuple) of
2982
- (connection, read) timeouts.
2983
- :type _request_timeout: int, tuple(int, int), optional
2984
- :param _request_auth: set to override the auth_settings for an a single
2985
- request; this effectively ignores the
2986
- authentication in the spec for a single request.
2987
- :type _request_auth: dict, optional
2988
- :param _content_type: force content-type for the request.
2989
- :type _content_type: str, Optional
2990
- :param _headers: set to override the headers for a single
2991
- request; this effectively ignores the headers
2992
- in the spec for a single request.
2993
- :type _headers: dict, optional
2994
- :param _host_index: set to override the host_index for a single
2995
- request; this effectively ignores the host_index
2996
- in the spec for a single request.
2997
- :type _host_index: int, optional
2998
- :return: Returns the result object.
2999
- """ # noqa: E501
3000
-
3001
- _param = self._update_serialize(
3002
- domain_href=domain_href,
3003
- domain=domain,
3004
- x_task_diagnostics=x_task_diagnostics,
3005
- _request_auth=_request_auth,
3006
- _content_type=_content_type,
3007
- _headers=_headers,
3008
- _host_index=_host_index
3009
- )
3010
-
3011
- _response_types_map: Dict[str, Optional[str]] = {
3012
- '202': "AsyncOperationResponse",
3013
- }
3014
- response_data = self.api_client.call_api(
3015
- *_param,
3016
- _request_timeout=_request_timeout
3017
- )
3018
- return response_data.response
3019
-
3020
-
3021
- def _update_serialize(
3022
- self,
3023
- domain_href,
3024
- domain,
3025
- x_task_diagnostics,
3026
- _request_auth,
3027
- _content_type,
3028
- _headers,
3029
- _host_index,
3030
- ) -> RequestSerialized:
3031
-
3032
- _host = None
3033
-
3034
- _collection_formats: Dict[str, str] = {
3035
- 'X-Task-Diagnostics': 'csv',
3036
- }
3037
-
3038
- _path_params: Dict[str, str] = {}
3039
- _query_params: List[Tuple[str, str]] = []
3040
- _header_params: Dict[str, Optional[str]] = _headers or {}
3041
- _form_params: List[Tuple[str, str]] = []
3042
- _files: Dict[
3043
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3044
- ] = {}
3045
- _body_params: Optional[bytes] = None
3046
-
3047
- # process the path parameters
3048
- if domain_href is not None:
3049
- _path_params['domain_href'] = domain_href
3050
- # process the query parameters
3051
- # process the header parameters
3052
- if x_task_diagnostics is not None:
3053
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3054
- # process the form parameters
3055
- # process the body parameter
3056
- if domain is not None:
3057
- _body_params = domain
3058
-
3059
-
3060
- # set the HTTP header `Accept`
3061
- if 'Accept' not in _header_params:
3062
- _header_params['Accept'] = self.api_client.select_header_accept(
3063
- [
3064
- 'application/json'
3065
- ]
3066
- )
3067
-
3068
- # set the HTTP header `Content-Type`
3069
- if _content_type:
3070
- _header_params['Content-Type'] = _content_type
3071
- else:
3072
- _default_content_type = (
3073
- self.api_client.select_header_content_type(
3074
- [
3075
- 'application/json',
3076
- 'application/x-www-form-urlencoded',
3077
- 'multipart/form-data'
3078
- ]
3079
- )
3080
- )
3081
- if _default_content_type is not None:
3082
- _header_params['Content-Type'] = _default_content_type
3083
-
3084
- # authentication setting
3085
- _auth_settings: List[str] = [
3086
- 'json_header_remote_authentication',
3087
- 'basicAuth',
3088
- 'cookieAuth'
3089
- ]
3090
-
3091
- return self.api_client.param_serialize(
3092
- method='PUT',
3093
- resource_path='{domain_href}',
3094
- path_params=_path_params,
3095
- query_params=_query_params,
3096
- header_params=_header_params,
3097
- body=_body_params,
3098
- post_params=_form_params,
3099
- files=_files,
3100
- auth_settings=_auth_settings,
3101
- collection_formats=_collection_formats,
3102
- _host=_host,
3103
- _request_auth=_request_auth
3104
- )
3105
-
3106
-