pulp-ansible-client 0.28.0__py3-none-any.whl → 0.28.2__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.
Files changed (108) hide show
  1. pulp_ansible_client-0.28.2.dist-info/METADATA +437 -0
  2. {pulp_ansible_client-0.28.0.dist-info → pulp_ansible_client-0.28.2.dist-info}/RECORD +107 -107
  3. {pulp_ansible_client-0.28.0.dist-info → pulp_ansible_client-0.28.2.dist-info}/WHEEL +1 -1
  4. pulpcore/client/pulp_ansible/__init__.py +323 -160
  5. pulpcore/client/pulp_ansible/api/content_collection_versions_api.py +60 -60
  6. pulpcore/client/pulp_ansible/api/distributions_ansible_api.py +16 -10
  7. pulpcore/client/pulp_ansible/api/remotes_collection_api.py +16 -10
  8. pulpcore/client/pulp_ansible/api/remotes_git_api.py +16 -10
  9. pulpcore/client/pulp_ansible/api/remotes_role_api.py +16 -10
  10. pulpcore/client/pulp_ansible/api/repositories_ansible_api.py +16 -10
  11. pulpcore/client/pulp_ansible/api_client.py +6 -2
  12. pulpcore/client/pulp_ansible/configuration.py +10 -3
  13. pulpcore/client/pulp_ansible/exceptions.py +17 -0
  14. pulpcore/client/pulp_ansible/models/ansible_ansible_collection_deprecated.py +1 -6
  15. pulpcore/client/pulp_ansible/models/ansible_ansible_collection_deprecated_response.py +1 -10
  16. pulpcore/client/pulp_ansible/models/ansible_ansible_distribution.py +1 -8
  17. pulpcore/client/pulp_ansible/models/ansible_ansible_distribution_response.py +1 -11
  18. pulpcore/client/pulp_ansible/models/ansible_ansible_namespace_metadata.py +1 -9
  19. pulpcore/client/pulp_ansible/models/ansible_ansible_namespace_metadata_response.py +1 -12
  20. pulpcore/client/pulp_ansible/models/ansible_ansible_repository.py +1 -10
  21. pulpcore/client/pulp_ansible/models/ansible_ansible_repository_response.py +1 -17
  22. pulpcore/client/pulp_ansible/models/ansible_collection_remote.py +1 -28
  23. pulpcore/client/pulp_ansible/models/ansible_collection_remote_response.py +1 -28
  24. pulpcore/client/pulp_ansible/models/ansible_collection_remote_response_hidden_fields_inner.py +1 -4
  25. pulpcore/client/pulp_ansible/models/ansible_collection_response.py +1 -4
  26. pulpcore/client/pulp_ansible/models/ansible_collection_version_mark.py +1 -4
  27. pulpcore/client/pulp_ansible/models/ansible_collection_version_mark_response.py +1 -6
  28. pulpcore/client/pulp_ansible/models/ansible_collection_version_response.py +7 -39
  29. pulpcore/client/pulp_ansible/models/ansible_collection_version_signature_response.py +1 -11
  30. pulpcore/client/pulp_ansible/models/ansible_git_remote.py +55 -78
  31. pulpcore/client/pulp_ansible/models/ansible_git_remote_response.py +40 -63
  32. pulpcore/client/pulp_ansible/models/ansible_repository_mark.py +1 -4
  33. pulpcore/client/pulp_ansible/models/ansible_repository_rebuild.py +1 -5
  34. pulpcore/client/pulp_ansible/models/ansible_repository_signature.py +1 -4
  35. pulpcore/client/pulp_ansible/models/ansible_repository_sync_url.py +1 -5
  36. pulpcore/client/pulp_ansible/models/ansible_role.py +4 -11
  37. pulpcore/client/pulp_ansible/models/ansible_role_remote.py +1 -23
  38. pulpcore/client/pulp_ansible/models/ansible_role_remote_response.py +1 -23
  39. pulpcore/client/pulp_ansible/models/ansible_role_response.py +7 -18
  40. pulpcore/client/pulp_ansible/models/artifact_ref_response.py +1 -5
  41. pulpcore/client/pulp_ansible/models/async_operation_response.py +1 -3
  42. pulpcore/client/pulp_ansible/models/client_configuration_response.py +1 -3
  43. pulpcore/client/pulp_ansible/models/collection_import_detail_response.py +1 -10
  44. pulpcore/client/pulp_ansible/models/collection_metadata_response.py +1 -12
  45. pulpcore/client/pulp_ansible/models/collection_namespace_response.py +1 -4
  46. pulpcore/client/pulp_ansible/models/collection_ref_response.py +1 -5
  47. pulpcore/client/pulp_ansible/models/collection_response.py +1 -11
  48. pulpcore/client/pulp_ansible/models/collection_summary_response.py +1 -12
  49. pulpcore/client/pulp_ansible/models/collection_summary_response_tags_inner.py +1 -3
  50. pulpcore/client/pulp_ansible/models/collection_version_copy_move.py +1 -5
  51. pulpcore/client/pulp_ansible/models/collection_version_docs_response.py +1 -3
  52. pulpcore/client/pulp_ansible/models/collection_version_list_response.py +1 -8
  53. pulpcore/client/pulp_ansible/models/collection_version_response.py +1 -19
  54. pulpcore/client/pulp_ansible/models/collection_version_search_list.py +1 -7
  55. pulpcore/client/pulp_ansible/models/collection_version_search_list_response.py +1 -9
  56. pulpcore/client/pulp_ansible/models/collection_version_signature_response.py +1 -6
  57. pulpcore/client/pulp_ansible/models/content_summary_response.py +1 -5
  58. pulpcore/client/pulp_ansible/models/copy.py +1 -3
  59. pulpcore/client/pulp_ansible/models/galaxy_role_response.py +1 -5
  60. pulpcore/client/pulp_ansible/models/galaxy_role_version_response.py +1 -4
  61. pulpcore/client/pulp_ansible/models/my_permissions_response.py +1 -3
  62. pulpcore/client/pulp_ansible/models/namespace_link.py +1 -4
  63. pulpcore/client/pulp_ansible/models/namespace_link_response.py +1 -4
  64. pulpcore/client/pulp_ansible/models/nested_role.py +1 -5
  65. pulpcore/client/pulp_ansible/models/nested_role_response.py +1 -5
  66. pulpcore/client/pulp_ansible/models/object_roles_response.py +1 -3
  67. pulpcore/client/pulp_ansible/models/paginated_collection_response_list.py +1 -5
  68. pulpcore/client/pulp_ansible/models/paginated_collection_response_list_links.py +1 -6
  69. pulpcore/client/pulp_ansible/models/paginated_collection_response_list_meta.py +1 -3
  70. pulpcore/client/pulp_ansible/models/paginated_collection_version_list_response_list.py +1 -5
  71. pulpcore/client/pulp_ansible/models/paginated_collection_version_search_list_response_list.py +1 -5
  72. pulpcore/client/pulp_ansible/models/paginated_galaxy_role_response_list.py +1 -6
  73. pulpcore/client/pulp_ansible/models/paginated_galaxy_role_version_response_list.py +1 -6
  74. pulpcore/client/pulp_ansible/models/paginated_repository_version_response_list.py +1 -6
  75. pulpcore/client/pulp_ansible/models/paginated_tag_response_list.py +1 -6
  76. pulpcore/client/pulp_ansible/models/paginatedansible_ansible_collection_deprecated_response_list.py +1 -6
  77. pulpcore/client/pulp_ansible/models/paginatedansible_ansible_distribution_response_list.py +1 -6
  78. pulpcore/client/pulp_ansible/models/paginatedansible_ansible_namespace_metadata_response_list.py +1 -6
  79. pulpcore/client/pulp_ansible/models/paginatedansible_ansible_repository_response_list.py +1 -6
  80. pulpcore/client/pulp_ansible/models/paginatedansible_collection_remote_response_list.py +1 -6
  81. pulpcore/client/pulp_ansible/models/paginatedansible_collection_response_list.py +1 -6
  82. pulpcore/client/pulp_ansible/models/paginatedansible_collection_version_mark_response_list.py +1 -6
  83. pulpcore/client/pulp_ansible/models/paginatedansible_collection_version_response_list.py +1 -6
  84. pulpcore/client/pulp_ansible/models/paginatedansible_collection_version_signature_response_list.py +1 -6
  85. pulpcore/client/pulp_ansible/models/paginatedansible_git_remote_response_list.py +1 -6
  86. pulpcore/client/pulp_ansible/models/paginatedansible_role_remote_response_list.py +1 -6
  87. pulpcore/client/pulp_ansible/models/paginatedansible_role_response_list.py +1 -6
  88. pulpcore/client/pulp_ansible/models/patched_collection.py +1 -3
  89. pulpcore/client/pulp_ansible/models/patchedansible_ansible_distribution.py +1 -8
  90. pulpcore/client/pulp_ansible/models/patchedansible_ansible_repository.py +1 -10
  91. pulpcore/client/pulp_ansible/models/patchedansible_collection_remote.py +1 -28
  92. pulpcore/client/pulp_ansible/models/patchedansible_git_remote.py +55 -78
  93. pulpcore/client/pulp_ansible/models/patchedansible_role_remote.py +1 -23
  94. pulpcore/client/pulp_ansible/models/repair.py +1 -3
  95. pulpcore/client/pulp_ansible/models/repo_metadata_response.py +1 -3
  96. pulpcore/client/pulp_ansible/models/repository.py +1 -7
  97. pulpcore/client/pulp_ansible/models/repository_add_remove_content.py +1 -5
  98. pulpcore/client/pulp_ansible/models/repository_response.py +1 -13
  99. pulpcore/client/pulp_ansible/models/repository_version_response.py +1 -11
  100. pulpcore/client/pulp_ansible/models/set_label.py +1 -4
  101. pulpcore/client/pulp_ansible/models/set_label_response.py +1 -4
  102. pulpcore/client/pulp_ansible/models/tag_response.py +1 -4
  103. pulpcore/client/pulp_ansible/models/unpaginated_collection_version_response.py +1 -17
  104. pulpcore/client/pulp_ansible/models/unset_label.py +1 -3
  105. pulpcore/client/pulp_ansible/models/unset_label_response.py +1 -4
  106. pulpcore/client/pulp_ansible/rest.py +1 -0
  107. pulp_ansible_client-0.28.0.dist-info/METADATA +0 -17
  108. {pulp_ansible_client-0.28.0.dist-info → pulp_ansible_client-0.28.2.dist-info}/top_level.txt +0 -0
@@ -2336,10 +2336,10 @@ class RemotesRoleApi:
2336
2336
  _content_type: Optional[StrictStr] = None,
2337
2337
  _headers: Optional[Dict[StrictStr, Any]] = None,
2338
2338
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2339
- ) -> AsyncOperationResponse:
2339
+ ) -> AnsibleRoleRemoteResponse:
2340
2340
  """Update a role remote
2341
2341
 
2342
- Trigger an asynchronous partial update task
2342
+ Update the entity partially and trigger an asynchronous task if necessary
2343
2343
 
2344
2344
  :param ansible_role_remote_href: (required)
2345
2345
  :type ansible_role_remote_href: str
@@ -2380,6 +2380,7 @@ class RemotesRoleApi:
2380
2380
  )
2381
2381
 
2382
2382
  _response_types_map: Dict[str, Optional[str]] = {
2383
+ '200': "AnsibleRoleRemoteResponse",
2383
2384
  '202': "AsyncOperationResponse",
2384
2385
  }
2385
2386
  response_data = self.api_client.call_api(
@@ -2411,10 +2412,10 @@ class RemotesRoleApi:
2411
2412
  _content_type: Optional[StrictStr] = None,
2412
2413
  _headers: Optional[Dict[StrictStr, Any]] = None,
2413
2414
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2414
- ) -> ApiResponse[AsyncOperationResponse]:
2415
+ ) -> ApiResponse[AnsibleRoleRemoteResponse]:
2415
2416
  """Update a role remote
2416
2417
 
2417
- Trigger an asynchronous partial update task
2418
+ Update the entity partially and trigger an asynchronous task if necessary
2418
2419
 
2419
2420
  :param ansible_role_remote_href: (required)
2420
2421
  :type ansible_role_remote_href: str
@@ -2455,6 +2456,7 @@ class RemotesRoleApi:
2455
2456
  )
2456
2457
 
2457
2458
  _response_types_map: Dict[str, Optional[str]] = {
2459
+ '200': "AnsibleRoleRemoteResponse",
2458
2460
  '202': "AsyncOperationResponse",
2459
2461
  }
2460
2462
  response_data = self.api_client.call_api(
@@ -2489,7 +2491,7 @@ class RemotesRoleApi:
2489
2491
  ) -> RESTResponseType:
2490
2492
  """Update a role remote
2491
2493
 
2492
- Trigger an asynchronous partial update task
2494
+ Update the entity partially and trigger an asynchronous task if necessary
2493
2495
 
2494
2496
  :param ansible_role_remote_href: (required)
2495
2497
  :type ansible_role_remote_href: str
@@ -2530,6 +2532,7 @@ class RemotesRoleApi:
2530
2532
  )
2531
2533
 
2532
2534
  _response_types_map: Dict[str, Optional[str]] = {
2535
+ '200': "AnsibleRoleRemoteResponse",
2533
2536
  '202': "AsyncOperationResponse",
2534
2537
  }
2535
2538
  response_data = self.api_client.call_api(
@@ -3882,10 +3885,10 @@ class RemotesRoleApi:
3882
3885
  _content_type: Optional[StrictStr] = None,
3883
3886
  _headers: Optional[Dict[StrictStr, Any]] = None,
3884
3887
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3885
- ) -> AsyncOperationResponse:
3888
+ ) -> AnsibleRoleRemoteResponse:
3886
3889
  """Update a role remote
3887
3890
 
3888
- Trigger an asynchronous update task
3891
+ Update the entity and trigger an asynchronous task if necessary
3889
3892
 
3890
3893
  :param ansible_role_remote_href: (required)
3891
3894
  :type ansible_role_remote_href: str
@@ -3926,6 +3929,7 @@ class RemotesRoleApi:
3926
3929
  )
3927
3930
 
3928
3931
  _response_types_map: Dict[str, Optional[str]] = {
3932
+ '200': "AnsibleRoleRemoteResponse",
3929
3933
  '202': "AsyncOperationResponse",
3930
3934
  }
3931
3935
  response_data = self.api_client.call_api(
@@ -3957,10 +3961,10 @@ class RemotesRoleApi:
3957
3961
  _content_type: Optional[StrictStr] = None,
3958
3962
  _headers: Optional[Dict[StrictStr, Any]] = None,
3959
3963
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3960
- ) -> ApiResponse[AsyncOperationResponse]:
3964
+ ) -> ApiResponse[AnsibleRoleRemoteResponse]:
3961
3965
  """Update a role remote
3962
3966
 
3963
- Trigger an asynchronous update task
3967
+ Update the entity and trigger an asynchronous task if necessary
3964
3968
 
3965
3969
  :param ansible_role_remote_href: (required)
3966
3970
  :type ansible_role_remote_href: str
@@ -4001,6 +4005,7 @@ class RemotesRoleApi:
4001
4005
  )
4002
4006
 
4003
4007
  _response_types_map: Dict[str, Optional[str]] = {
4008
+ '200': "AnsibleRoleRemoteResponse",
4004
4009
  '202': "AsyncOperationResponse",
4005
4010
  }
4006
4011
  response_data = self.api_client.call_api(
@@ -4035,7 +4040,7 @@ class RemotesRoleApi:
4035
4040
  ) -> RESTResponseType:
4036
4041
  """Update a role remote
4037
4042
 
4038
- Trigger an asynchronous update task
4043
+ Update the entity and trigger an asynchronous task if necessary
4039
4044
 
4040
4045
  :param ansible_role_remote_href: (required)
4041
4046
  :type ansible_role_remote_href: str
@@ -4076,6 +4081,7 @@ class RemotesRoleApi:
4076
4081
  )
4077
4082
 
4078
4083
  _response_types_map: Dict[str, Optional[str]] = {
4084
+ '200': "AnsibleRoleRemoteResponse",
4079
4085
  '202': "AsyncOperationResponse",
4080
4086
  }
4081
4087
  response_data = self.api_client.call_api(
@@ -3596,10 +3596,10 @@ class RepositoriesAnsibleApi:
3596
3596
  _content_type: Optional[StrictStr] = None,
3597
3597
  _headers: Optional[Dict[StrictStr, Any]] = None,
3598
3598
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3599
- ) -> AsyncOperationResponse:
3599
+ ) -> AnsibleAnsibleRepositoryResponse:
3600
3600
  """Update an ansible repository
3601
3601
 
3602
- Trigger an asynchronous partial update task
3602
+ Update the entity partially and trigger an asynchronous task if necessary
3603
3603
 
3604
3604
  :param ansible_ansible_repository_href: (required)
3605
3605
  :type ansible_ansible_repository_href: str
@@ -3640,6 +3640,7 @@ class RepositoriesAnsibleApi:
3640
3640
  )
3641
3641
 
3642
3642
  _response_types_map: Dict[str, Optional[str]] = {
3643
+ '200': "AnsibleAnsibleRepositoryResponse",
3643
3644
  '202': "AsyncOperationResponse",
3644
3645
  }
3645
3646
  response_data = self.api_client.call_api(
@@ -3671,10 +3672,10 @@ class RepositoriesAnsibleApi:
3671
3672
  _content_type: Optional[StrictStr] = None,
3672
3673
  _headers: Optional[Dict[StrictStr, Any]] = None,
3673
3674
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3674
- ) -> ApiResponse[AsyncOperationResponse]:
3675
+ ) -> ApiResponse[AnsibleAnsibleRepositoryResponse]:
3675
3676
  """Update an ansible repository
3676
3677
 
3677
- Trigger an asynchronous partial update task
3678
+ Update the entity partially and trigger an asynchronous task if necessary
3678
3679
 
3679
3680
  :param ansible_ansible_repository_href: (required)
3680
3681
  :type ansible_ansible_repository_href: str
@@ -3715,6 +3716,7 @@ class RepositoriesAnsibleApi:
3715
3716
  )
3716
3717
 
3717
3718
  _response_types_map: Dict[str, Optional[str]] = {
3719
+ '200': "AnsibleAnsibleRepositoryResponse",
3718
3720
  '202': "AsyncOperationResponse",
3719
3721
  }
3720
3722
  response_data = self.api_client.call_api(
@@ -3749,7 +3751,7 @@ class RepositoriesAnsibleApi:
3749
3751
  ) -> RESTResponseType:
3750
3752
  """Update an ansible repository
3751
3753
 
3752
- Trigger an asynchronous partial update task
3754
+ Update the entity partially and trigger an asynchronous task if necessary
3753
3755
 
3754
3756
  :param ansible_ansible_repository_href: (required)
3755
3757
  :type ansible_ansible_repository_href: str
@@ -3790,6 +3792,7 @@ class RepositoriesAnsibleApi:
3790
3792
  )
3791
3793
 
3792
3794
  _response_types_map: Dict[str, Optional[str]] = {
3795
+ '200': "AnsibleAnsibleRepositoryResponse",
3793
3796
  '202': "AsyncOperationResponse",
3794
3797
  }
3795
3798
  response_data = self.api_client.call_api(
@@ -6374,10 +6377,10 @@ class RepositoriesAnsibleApi:
6374
6377
  _content_type: Optional[StrictStr] = None,
6375
6378
  _headers: Optional[Dict[StrictStr, Any]] = None,
6376
6379
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6377
- ) -> AsyncOperationResponse:
6380
+ ) -> AnsibleAnsibleRepositoryResponse:
6378
6381
  """Update an ansible repository
6379
6382
 
6380
- Trigger an asynchronous update task
6383
+ Update the entity and trigger an asynchronous task if necessary
6381
6384
 
6382
6385
  :param ansible_ansible_repository_href: (required)
6383
6386
  :type ansible_ansible_repository_href: str
@@ -6418,6 +6421,7 @@ class RepositoriesAnsibleApi:
6418
6421
  )
6419
6422
 
6420
6423
  _response_types_map: Dict[str, Optional[str]] = {
6424
+ '200': "AnsibleAnsibleRepositoryResponse",
6421
6425
  '202': "AsyncOperationResponse",
6422
6426
  }
6423
6427
  response_data = self.api_client.call_api(
@@ -6449,10 +6453,10 @@ class RepositoriesAnsibleApi:
6449
6453
  _content_type: Optional[StrictStr] = None,
6450
6454
  _headers: Optional[Dict[StrictStr, Any]] = None,
6451
6455
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6452
- ) -> ApiResponse[AsyncOperationResponse]:
6456
+ ) -> ApiResponse[AnsibleAnsibleRepositoryResponse]:
6453
6457
  """Update an ansible repository
6454
6458
 
6455
- Trigger an asynchronous update task
6459
+ Update the entity and trigger an asynchronous task if necessary
6456
6460
 
6457
6461
  :param ansible_ansible_repository_href: (required)
6458
6462
  :type ansible_ansible_repository_href: str
@@ -6493,6 +6497,7 @@ class RepositoriesAnsibleApi:
6493
6497
  )
6494
6498
 
6495
6499
  _response_types_map: Dict[str, Optional[str]] = {
6500
+ '200': "AnsibleAnsibleRepositoryResponse",
6496
6501
  '202': "AsyncOperationResponse",
6497
6502
  }
6498
6503
  response_data = self.api_client.call_api(
@@ -6527,7 +6532,7 @@ class RepositoriesAnsibleApi:
6527
6532
  ) -> RESTResponseType:
6528
6533
  """Update an ansible repository
6529
6534
 
6530
- Trigger an asynchronous update task
6535
+ Update the entity and trigger an asynchronous task if necessary
6531
6536
 
6532
6537
  :param ansible_ansible_repository_href: (required)
6533
6538
  :type ansible_ansible_repository_href: str
@@ -6568,6 +6573,7 @@ class RepositoriesAnsibleApi:
6568
6573
  )
6569
6574
 
6570
6575
  _response_types_map: Dict[str, Optional[str]] = {
6576
+ '200': "AnsibleAnsibleRepositoryResponse",
6571
6577
  '202': "AsyncOperationResponse",
6572
6578
  }
6573
6579
  response_data = self.api_client.call_api(
@@ -91,7 +91,7 @@ class ApiClient:
91
91
  self.default_headers[header_name] = header_value
92
92
  self.cookie = cookie
93
93
  # Set default User-Agent.
94
- self.user_agent = 'OpenAPI-Generator/0.28.0/python'
94
+ self.user_agent = 'OpenAPI-Generator/0.28.2/python'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  def __enter__(self):
@@ -383,6 +383,10 @@ class ApiClient:
383
383
  else:
384
384
  obj_dict = obj.__dict__
385
385
 
386
+ if isinstance(obj_dict, list):
387
+ # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict()
388
+ return self.sanitize_for_serialization(obj_dict)
389
+
386
390
  return {
387
391
  key: self.sanitize_for_serialization(val)
388
392
  for key, val in obj_dict.items()
@@ -518,7 +522,7 @@ class ApiClient:
518
522
  if k in collection_formats:
519
523
  collection_format = collection_formats[k]
520
524
  if collection_format == 'multi':
521
- new_params.extend((k, str(value)) for value in v)
525
+ new_params.extend((k, quote(str(value))) for value in v)
522
526
  else:
523
527
  if collection_format == 'ssv':
524
528
  delimiter = ' '
@@ -19,7 +19,7 @@ import logging
19
19
  from logging import FileHandler
20
20
  import multiprocessing
21
21
  import sys
22
- from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
22
+ from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
23
23
  from typing_extensions import NotRequired, Self
24
24
 
25
25
  import urllib3
@@ -163,6 +163,8 @@ class Configuration:
163
163
  :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
164
164
  in PEM format.
165
165
  :param retries: Number of retries for API requests.
166
+ :param ca_cert_data: verify the peer using concatenated CA certificate data
167
+ in PEM (str) or DER (bytes) format.
166
168
 
167
169
  :Example:
168
170
 
@@ -212,13 +214,14 @@ conf = pulpcore.client.pulp_ansible.Configuration(
212
214
  username: Optional[str]=None,
213
215
  password: Optional[str]=None,
214
216
  access_token: Optional[str]=None,
215
- server_index: Optional[int]=None,
217
+ server_index: Optional[int]=None,
216
218
  server_variables: Optional[ServerVariablesT]=None,
217
219
  server_operation_index: Optional[Dict[int, int]]=None,
218
220
  server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
219
221
  ignore_operation_servers: bool=False,
220
222
  ssl_ca_cert: Optional[str]=None,
221
223
  retries: Optional[int] = None,
224
+ ca_cert_data: Optional[Union[str, bytes]] = None,
222
225
  *,
223
226
  debug: Optional[bool] = None,
224
227
  ) -> None:
@@ -296,6 +299,10 @@ conf = pulpcore.client.pulp_ansible.Configuration(
296
299
  self.ssl_ca_cert = ssl_ca_cert
297
300
  """Set this to customize the certificate file to verify the peer.
298
301
  """
302
+ self.ca_cert_data = ca_cert_data
303
+ """Set this to verify the peer using PEM (str) or DER (bytes)
304
+ certificate data.
305
+ """
299
306
  self.cert_file = None
300
307
  """client certificate file
301
308
  """
@@ -549,7 +556,7 @@ conf = pulpcore.client.pulp_ansible.Configuration(
549
556
  "OS: {env}\n"\
550
557
  "Python Version: {pyversion}\n"\
551
558
  "Version of the API: v3\n"\
552
- "SDK Package Version: 0.28.0".\
559
+ "SDK Package Version: 0.28.2".\
553
560
  format(env=sys.platform, pyversion=sys.version)
554
561
 
555
562
  def get_host_settings(self) -> List[HostSetting]:
@@ -151,6 +151,13 @@ class ApiException(OpenApiException):
151
151
  if http_resp.status == 404:
152
152
  raise NotFoundException(http_resp=http_resp, body=body, data=data)
153
153
 
154
+ # Added new conditions for 409 and 422
155
+ if http_resp.status == 409:
156
+ raise ConflictException(http_resp=http_resp, body=body, data=data)
157
+
158
+ if http_resp.status == 422:
159
+ raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
160
+
154
161
  if 500 <= http_resp.status <= 599:
155
162
  raise ServiceException(http_resp=http_resp, body=body, data=data)
156
163
  raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -189,6 +196,16 @@ class ServiceException(ApiException):
189
196
  pass
190
197
 
191
198
 
199
+ class ConflictException(ApiException):
200
+ """Exception for HTTP 409 Conflict."""
201
+ pass
202
+
203
+
204
+ class UnprocessableEntityException(ApiException):
205
+ """Exception for HTTP 422 Unprocessable Entity."""
206
+ pass
207
+
208
+
192
209
  def render_path(path_to_item):
193
210
  """Returns a string representation of a path"""
194
211
  result = ""
@@ -84,12 +84,7 @@ class AnsibleAnsibleCollectionDeprecated(BaseModel):
84
84
  if not isinstance(obj, dict):
85
85
  return cls.model_validate(obj)
86
86
 
87
- _obj = cls.model_validate({
88
- "repository": obj.get("repository"),
89
- "pulp_labels": obj.get("pulp_labels"),
90
- "name": obj.get("name"),
91
- "namespace": obj.get("namespace")
92
- })
87
+ _obj = cls.model_validate(obj)
93
88
  return _obj
94
89
 
95
90
 
@@ -98,16 +98,7 @@ class AnsibleAnsibleCollectionDeprecatedResponse(BaseModel):
98
98
  if not isinstance(obj, dict):
99
99
  return cls.model_validate(obj)
100
100
 
101
- _obj = cls.model_validate({
102
- "pulp_href": obj.get("pulp_href"),
103
- "prn": obj.get("prn"),
104
- "pulp_created": obj.get("pulp_created"),
105
- "pulp_last_updated": obj.get("pulp_last_updated"),
106
- "pulp_labels": obj.get("pulp_labels"),
107
- "vuln_report": obj.get("vuln_report"),
108
- "name": obj.get("name"),
109
- "namespace": obj.get("namespace")
110
- })
101
+ _obj = cls.model_validate(obj)
111
102
  return _obj
112
103
 
113
104
 
@@ -101,14 +101,7 @@ class AnsibleAnsibleDistribution(BaseModel):
101
101
  if not isinstance(obj, dict):
102
102
  return cls.model_validate(obj)
103
103
 
104
- _obj = cls.model_validate({
105
- "base_path": obj.get("base_path"),
106
- "content_guard": obj.get("content_guard"),
107
- "name": obj.get("name"),
108
- "repository": obj.get("repository"),
109
- "repository_version": obj.get("repository_version"),
110
- "pulp_labels": obj.get("pulp_labels")
111
- })
104
+ _obj = cls.model_validate(obj)
112
105
  return _obj
113
106
 
114
107
 
@@ -110,17 +110,7 @@ class AnsibleAnsibleDistributionResponse(BaseModel):
110
110
  if not isinstance(obj, dict):
111
111
  return cls.model_validate(obj)
112
112
 
113
- _obj = cls.model_validate({
114
- "pulp_href": obj.get("pulp_href"),
115
- "pulp_created": obj.get("pulp_created"),
116
- "base_path": obj.get("base_path"),
117
- "content_guard": obj.get("content_guard"),
118
- "name": obj.get("name"),
119
- "repository": obj.get("repository"),
120
- "repository_version": obj.get("repository_version"),
121
- "client_url": obj.get("client_url"),
122
- "pulp_labels": obj.get("pulp_labels")
123
- })
113
+ _obj = cls.model_validate(obj)
124
114
  return _obj
125
115
 
126
116
 
@@ -102,15 +102,7 @@ class AnsibleAnsibleNamespaceMetadata(BaseModel):
102
102
  if not isinstance(obj, dict):
103
103
  return cls.model_validate(obj)
104
104
 
105
- _obj = cls.model_validate({
106
- "name": obj.get("name"),
107
- "company": obj.get("company"),
108
- "email": obj.get("email"),
109
- "description": obj.get("description"),
110
- "resources": obj.get("resources"),
111
- "links": [NamespaceLink.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
112
- "avatar": obj.get("avatar")
113
- })
105
+ _obj = cls.model_validate(obj)
114
106
  return _obj
115
107
 
116
108
 
@@ -113,18 +113,7 @@ class AnsibleAnsibleNamespaceMetadataResponse(BaseModel):
113
113
  if not isinstance(obj, dict):
114
114
  return cls.model_validate(obj)
115
115
 
116
- _obj = cls.model_validate({
117
- "pulp_href": obj.get("pulp_href"),
118
- "name": obj.get("name"),
119
- "company": obj.get("company"),
120
- "email": obj.get("email"),
121
- "description": obj.get("description"),
122
- "resources": obj.get("resources"),
123
- "links": [NamespaceLinkResponse.from_dict(_item) for _item in obj["links"]] if obj.get("links") is not None else None,
124
- "avatar_sha256": obj.get("avatar_sha256"),
125
- "avatar_url": obj.get("avatar_url"),
126
- "metadata_sha256": obj.get("metadata_sha256")
127
- })
116
+ _obj = cls.model_validate(obj)
128
117
  return _obj
129
118
 
130
119
 
@@ -114,16 +114,7 @@ class AnsibleAnsibleRepository(BaseModel):
114
114
  if not isinstance(obj, dict):
115
115
  return cls.model_validate(obj)
116
116
 
117
- _obj = cls.model_validate({
118
- "pulp_labels": obj.get("pulp_labels"),
119
- "name": obj.get("name"),
120
- "description": obj.get("description"),
121
- "retain_repo_versions": obj.get("retain_repo_versions"),
122
- "remote": obj.get("remote"),
123
- "last_synced_metadata_time": obj.get("last_synced_metadata_time"),
124
- "gpgkey": obj.get("gpgkey"),
125
- "private": obj.get("private")
126
- })
117
+ _obj = cls.model_validate(obj)
127
118
  return _obj
128
119
 
129
120
 
@@ -137,23 +137,7 @@ class AnsibleAnsibleRepositoryResponse(BaseModel):
137
137
  if not isinstance(obj, dict):
138
138
  return cls.model_validate(obj)
139
139
 
140
- _obj = cls.model_validate({
141
- "pulp_href": obj.get("pulp_href"),
142
- "prn": obj.get("prn"),
143
- "pulp_created": obj.get("pulp_created"),
144
- "pulp_last_updated": obj.get("pulp_last_updated"),
145
- "versions_href": obj.get("versions_href"),
146
- "pulp_labels": obj.get("pulp_labels"),
147
- "latest_version_href": obj.get("latest_version_href"),
148
- "name": obj.get("name"),
149
- "description": obj.get("description"),
150
- "retain_repo_versions": obj.get("retain_repo_versions"),
151
- "remote": obj.get("remote"),
152
- "last_synced_metadata_time": obj.get("last_synced_metadata_time"),
153
- "gpgkey": obj.get("gpgkey"),
154
- "last_sync_task": obj.get("last_sync_task"),
155
- "private": obj.get("private")
156
- })
140
+ _obj = cls.model_validate(obj)
157
141
  return _obj
158
142
 
159
143
 
@@ -197,34 +197,7 @@ class AnsibleCollectionRemote(BaseModel):
197
197
  if not isinstance(obj, dict):
198
198
  return cls.model_validate(obj)
199
199
 
200
- _obj = cls.model_validate({
201
- "name": obj.get("name"),
202
- "url": obj.get("url"),
203
- "ca_cert": obj.get("ca_cert"),
204
- "client_cert": obj.get("client_cert"),
205
- "client_key": obj.get("client_key"),
206
- "tls_validation": obj.get("tls_validation"),
207
- "proxy_url": obj.get("proxy_url"),
208
- "proxy_username": obj.get("proxy_username"),
209
- "proxy_password": obj.get("proxy_password"),
210
- "username": obj.get("username"),
211
- "password": obj.get("password"),
212
- "pulp_labels": obj.get("pulp_labels"),
213
- "download_concurrency": obj.get("download_concurrency"),
214
- "max_retries": obj.get("max_retries"),
215
- "policy": obj.get("policy"),
216
- "total_timeout": obj.get("total_timeout"),
217
- "connect_timeout": obj.get("connect_timeout"),
218
- "sock_connect_timeout": obj.get("sock_connect_timeout"),
219
- "sock_read_timeout": obj.get("sock_read_timeout"),
220
- "headers": obj.get("headers"),
221
- "rate_limit": obj.get("rate_limit"),
222
- "requirements_file": obj.get("requirements_file"),
223
- "auth_url": obj.get("auth_url"),
224
- "token": obj.get("token"),
225
- "sync_dependencies": obj.get("sync_dependencies"),
226
- "signed_only": obj.get("signed_only")
227
- })
200
+ _obj = cls.model_validate(obj)
228
201
  return _obj
229
202
 
230
203
 
@@ -186,34 +186,7 @@ class AnsibleCollectionRemoteResponse(BaseModel):
186
186
  if not isinstance(obj, dict):
187
187
  return cls.model_validate(obj)
188
188
 
189
- _obj = cls.model_validate({
190
- "pulp_href": obj.get("pulp_href"),
191
- "prn": obj.get("prn"),
192
- "pulp_created": obj.get("pulp_created"),
193
- "pulp_last_updated": obj.get("pulp_last_updated"),
194
- "name": obj.get("name"),
195
- "url": obj.get("url"),
196
- "ca_cert": obj.get("ca_cert"),
197
- "client_cert": obj.get("client_cert"),
198
- "tls_validation": obj.get("tls_validation"),
199
- "proxy_url": obj.get("proxy_url"),
200
- "pulp_labels": obj.get("pulp_labels"),
201
- "download_concurrency": obj.get("download_concurrency"),
202
- "max_retries": obj.get("max_retries"),
203
- "policy": obj.get("policy"),
204
- "total_timeout": obj.get("total_timeout"),
205
- "connect_timeout": obj.get("connect_timeout"),
206
- "sock_connect_timeout": obj.get("sock_connect_timeout"),
207
- "sock_read_timeout": obj.get("sock_read_timeout"),
208
- "headers": obj.get("headers"),
209
- "rate_limit": obj.get("rate_limit"),
210
- "hidden_fields": [AnsibleCollectionRemoteResponseHiddenFieldsInner.from_dict(_item) for _item in obj["hidden_fields"]] if obj.get("hidden_fields") is not None else None,
211
- "requirements_file": obj.get("requirements_file"),
212
- "auth_url": obj.get("auth_url"),
213
- "sync_dependencies": obj.get("sync_dependencies"),
214
- "signed_only": obj.get("signed_only"),
215
- "last_sync_task": obj.get("last_sync_task")
216
- })
189
+ _obj = cls.model_validate(obj)
217
190
  return _obj
218
191
 
219
192
 
@@ -81,10 +81,7 @@ class AnsibleCollectionRemoteResponseHiddenFieldsInner(BaseModel):
81
81
  if not isinstance(obj, dict):
82
82
  return cls.model_validate(obj)
83
83
 
84
- _obj = cls.model_validate({
85
- "name": obj.get("name"),
86
- "is_set": obj.get("is_set")
87
- })
84
+ _obj = cls.model_validate(obj)
88
85
  return _obj
89
86
 
90
87
 
@@ -81,10 +81,7 @@ class AnsibleCollectionResponse(BaseModel):
81
81
  if not isinstance(obj, dict):
82
82
  return cls.model_validate(obj)
83
83
 
84
- _obj = cls.model_validate({
85
- "name": obj.get("name"),
86
- "namespace": obj.get("namespace")
87
- })
84
+ _obj = cls.model_validate(obj)
88
85
  return _obj
89
86
 
90
87
 
@@ -89,10 +89,7 @@ class AnsibleCollectionVersionMark(BaseModel):
89
89
  if not isinstance(obj, dict):
90
90
  return cls.model_validate(obj)
91
91
 
92
- _obj = cls.model_validate({
93
- "marked_collection": obj.get("marked_collection"),
94
- "value": obj.get("value")
95
- })
92
+ _obj = cls.model_validate(obj)
96
93
  return _obj
97
94
 
98
95
 
@@ -96,12 +96,7 @@ class AnsibleCollectionVersionMarkResponse(BaseModel):
96
96
  if not isinstance(obj, dict):
97
97
  return cls.model_validate(obj)
98
98
 
99
- _obj = cls.model_validate({
100
- "pulp_created": obj.get("pulp_created"),
101
- "pulp_href": obj.get("pulp_href"),
102
- "marked_collection": obj.get("marked_collection"),
103
- "value": obj.get("value")
104
- })
99
+ _obj = cls.model_validate(obj)
105
100
  return _obj
106
101
 
107
102