crc-pulp-file-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-pulp-file-client might be problematic. Click here for more details.
- crc-pulp_file-client/api_client.py +1 -1
- crc-pulp_file-client/configuration.py +3 -3
- {crc_pulp_file_client-20250819.1.dist-info → crc_pulp_file_client-20250820.1.dist-info}/METADATA +1 -1
- crc_pulp_file_client-20250820.1.dist-info/RECORD +59 -0
- crc_pulp_file_client-20250820.1.dist-info/top_level.txt +1 -0
- crc_pulp_file_client-20250819.1.dist-info/RECORD +0 -114
- crc_pulp_file_client-20250819.1.dist-info/top_level.txt +0 -2
- services-pulp_file-client/__init__.py +0 -2
- services-pulp_file-client/api/__init__.py +0 -11
- services-pulp_file-client/api/acs_file_api.py +0 -3689
- services-pulp_file-client/api/content_files_api.py +0 -2088
- services-pulp_file-client/api/distributions_file_api.py +0 -4186
- services-pulp_file-client/api/publications_file_api.py +0 -2881
- services-pulp_file-client/api/remotes_file_api.py +0 -4214
- services-pulp_file-client/api/repositories_file_api.py +0 -4856
- services-pulp_file-client/api/repositories_file_versions_api.py +0 -1670
- services-pulp_file-client/api_client.py +0 -798
- services-pulp_file-client/api_response.py +0 -21
- services-pulp_file-client/configuration.py +0 -628
- services-pulp_file-client/exceptions.py +0 -200
- services-pulp_file-client/models/__init__.py +0 -56
- services-pulp_file-client/models/async_operation_response.py +0 -88
- services-pulp_file-client/models/content_summary_response.py +0 -92
- services-pulp_file-client/models/file_file_alternate_content_source.py +0 -101
- services-pulp_file-client/models/file_file_alternate_content_source_response.py +0 -116
- services-pulp_file-client/models/file_file_content_response.py +0 -133
- services-pulp_file-client/models/file_file_distribution.py +0 -118
- services-pulp_file-client/models/file_file_distribution_response.py +0 -142
- services-pulp_file-client/models/file_file_publication.py +0 -100
- services-pulp_file-client/models/file_file_publication_response.py +0 -120
- services-pulp_file-client/models/file_file_remote.py +0 -205
- services-pulp_file-client/models/file_file_remote_response.py +0 -199
- services-pulp_file-client/models/file_file_remote_response_hidden_fields_inner.py +0 -90
- services-pulp_file-client/models/file_file_repository.py +0 -121
- services-pulp_file-client/models/file_file_repository_response.py +0 -146
- services-pulp_file-client/models/my_permissions_response.py +0 -88
- services-pulp_file-client/models/nested_role.py +0 -93
- services-pulp_file-client/models/nested_role_response.py +0 -92
- services-pulp_file-client/models/object_roles_response.py +0 -96
- services-pulp_file-client/models/paginated_repository_version_response_list.py +0 -112
- services-pulp_file-client/models/paginatedfile_file_alternate_content_source_response_list.py +0 -112
- services-pulp_file-client/models/paginatedfile_file_content_response_list.py +0 -112
- services-pulp_file-client/models/paginatedfile_file_distribution_response_list.py +0 -112
- services-pulp_file-client/models/paginatedfile_file_publication_response_list.py +0 -112
- services-pulp_file-client/models/paginatedfile_file_remote_response_list.py +0 -112
- services-pulp_file-client/models/paginatedfile_file_repository_response_list.py +0 -112
- services-pulp_file-client/models/patchedfile_file_alternate_content_source.py +0 -101
- services-pulp_file-client/models/patchedfile_file_distribution.py +0 -118
- services-pulp_file-client/models/patchedfile_file_remote.py +0 -205
- services-pulp_file-client/models/patchedfile_file_repository.py +0 -121
- services-pulp_file-client/models/policy_enum.py +0 -39
- services-pulp_file-client/models/repair.py +0 -88
- services-pulp_file-client/models/repository_add_remove_content.py +0 -93
- services-pulp_file-client/models/repository_sync_url.py +0 -90
- services-pulp_file-client/models/repository_version_response.py +0 -121
- services-pulp_file-client/models/set_label.py +0 -103
- services-pulp_file-client/models/set_label_response.py +0 -103
- services-pulp_file-client/models/task_group_operation_response.py +0 -88
- services-pulp_file-client/models/unset_label.py +0 -96
- services-pulp_file-client/models/unset_label_response.py +0 -100
- services-pulp_file-client/py.typed +0 -0
- services-pulp_file-client/rest.py +0 -258
- {crc_pulp_file_client-20250819.1.dist-info → crc_pulp_file_client-20250820.1.dist-info}/WHEEL +0 -0
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from datetime import datetime
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class PatchedfileFileAlternateContentSource(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Serializer for File alternate content source.
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Name of Alternate Content Source.")
|
|
33
|
-
last_refreshed: Optional[datetime] = Field(default=None, description="Date of last refresh of AlternateContentSource.")
|
|
34
|
-
paths: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="List of paths that will be appended to the Remote url when searching for content.")
|
|
35
|
-
remote: Optional[StrictStr] = Field(default=None, description="The remote to provide alternate content source.")
|
|
36
|
-
__properties: ClassVar[List[str]] = ["name", "last_refreshed", "paths", "remote"]
|
|
37
|
-
|
|
38
|
-
model_config = ConfigDict(
|
|
39
|
-
populate_by_name=True,
|
|
40
|
-
validate_assignment=True,
|
|
41
|
-
protected_namespaces=(),
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def to_str(self) -> str:
|
|
46
|
-
"""Returns the string representation of the model using alias"""
|
|
47
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
-
|
|
49
|
-
def to_json(self) -> str:
|
|
50
|
-
"""Returns the JSON representation of the model using alias"""
|
|
51
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
-
return json.dumps(self.to_dict())
|
|
53
|
-
|
|
54
|
-
@classmethod
|
|
55
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of PatchedfileFileAlternateContentSource from a JSON string"""
|
|
57
|
-
return cls.from_dict(json.loads(json_str))
|
|
58
|
-
|
|
59
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
-
"""Return the dictionary representation of the model using alias.
|
|
61
|
-
|
|
62
|
-
This has the following differences from calling pydantic's
|
|
63
|
-
`self.model_dump(by_alias=True)`:
|
|
64
|
-
|
|
65
|
-
* `None` is only added to the output dict for nullable fields that
|
|
66
|
-
were set at model initialization. Other fields with value `None`
|
|
67
|
-
are ignored.
|
|
68
|
-
"""
|
|
69
|
-
excluded_fields: Set[str] = set([
|
|
70
|
-
])
|
|
71
|
-
|
|
72
|
-
_dict = self.model_dump(
|
|
73
|
-
by_alias=True,
|
|
74
|
-
exclude=excluded_fields,
|
|
75
|
-
exclude_none=True,
|
|
76
|
-
)
|
|
77
|
-
# set to None if last_refreshed (nullable) is None
|
|
78
|
-
# and model_fields_set contains the field
|
|
79
|
-
if self.last_refreshed is None and "last_refreshed" in self.model_fields_set:
|
|
80
|
-
_dict['last_refreshed'] = None
|
|
81
|
-
|
|
82
|
-
return _dict
|
|
83
|
-
|
|
84
|
-
@classmethod
|
|
85
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
-
"""Create an instance of PatchedfileFileAlternateContentSource from a dict"""
|
|
87
|
-
if obj is None:
|
|
88
|
-
return None
|
|
89
|
-
|
|
90
|
-
if not isinstance(obj, dict):
|
|
91
|
-
return cls.model_validate(obj)
|
|
92
|
-
|
|
93
|
-
_obj = cls.model_validate({
|
|
94
|
-
"name": obj.get("name"),
|
|
95
|
-
"last_refreshed": obj.get("last_refreshed"),
|
|
96
|
-
"paths": obj.get("paths"),
|
|
97
|
-
"remote": obj.get("remote")
|
|
98
|
-
})
|
|
99
|
-
return _obj
|
|
100
|
-
|
|
101
|
-
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class PatchedfileFileDistribution(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for File Distributions.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
base_path: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")")
|
|
32
|
-
content_guard: Optional[StrictStr] = Field(default=None, description="An optional content-guard.")
|
|
33
|
-
hidden: Optional[StrictBool] = Field(default=False, description="Whether this distribution should be shown in the content app.")
|
|
34
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
35
|
-
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name. Ex, `rawhide` and `stable`.")
|
|
36
|
-
repository: Optional[StrictStr] = Field(default=None, description="The latest RepositoryVersion for this Repository will be served.")
|
|
37
|
-
publication: Optional[StrictStr] = Field(default=None, description="Publication to be served")
|
|
38
|
-
checkpoint: Optional[StrictBool] = None
|
|
39
|
-
__properties: ClassVar[List[str]] = ["base_path", "content_guard", "hidden", "pulp_labels", "name", "repository", "publication", "checkpoint"]
|
|
40
|
-
|
|
41
|
-
model_config = ConfigDict(
|
|
42
|
-
populate_by_name=True,
|
|
43
|
-
validate_assignment=True,
|
|
44
|
-
protected_namespaces=(),
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def to_str(self) -> str:
|
|
49
|
-
"""Returns the string representation of the model using alias"""
|
|
50
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
-
|
|
52
|
-
def to_json(self) -> str:
|
|
53
|
-
"""Returns the JSON representation of the model using alias"""
|
|
54
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
-
return json.dumps(self.to_dict())
|
|
56
|
-
|
|
57
|
-
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
-
"""Create an instance of PatchedfileFileDistribution from a JSON string"""
|
|
60
|
-
return cls.from_dict(json.loads(json_str))
|
|
61
|
-
|
|
62
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
-
"""Return the dictionary representation of the model using alias.
|
|
64
|
-
|
|
65
|
-
This has the following differences from calling pydantic's
|
|
66
|
-
`self.model_dump(by_alias=True)`:
|
|
67
|
-
|
|
68
|
-
* `None` is only added to the output dict for nullable fields that
|
|
69
|
-
were set at model initialization. Other fields with value `None`
|
|
70
|
-
are ignored.
|
|
71
|
-
"""
|
|
72
|
-
excluded_fields: Set[str] = set([
|
|
73
|
-
])
|
|
74
|
-
|
|
75
|
-
_dict = self.model_dump(
|
|
76
|
-
by_alias=True,
|
|
77
|
-
exclude=excluded_fields,
|
|
78
|
-
exclude_none=True,
|
|
79
|
-
)
|
|
80
|
-
# set to None if content_guard (nullable) is None
|
|
81
|
-
# and model_fields_set contains the field
|
|
82
|
-
if self.content_guard is None and "content_guard" in self.model_fields_set:
|
|
83
|
-
_dict['content_guard'] = None
|
|
84
|
-
|
|
85
|
-
# set to None if repository (nullable) is None
|
|
86
|
-
# and model_fields_set contains the field
|
|
87
|
-
if self.repository is None and "repository" in self.model_fields_set:
|
|
88
|
-
_dict['repository'] = None
|
|
89
|
-
|
|
90
|
-
# set to None if publication (nullable) is None
|
|
91
|
-
# and model_fields_set contains the field
|
|
92
|
-
if self.publication is None and "publication" in self.model_fields_set:
|
|
93
|
-
_dict['publication'] = None
|
|
94
|
-
|
|
95
|
-
return _dict
|
|
96
|
-
|
|
97
|
-
@classmethod
|
|
98
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
99
|
-
"""Create an instance of PatchedfileFileDistribution from a dict"""
|
|
100
|
-
if obj is None:
|
|
101
|
-
return None
|
|
102
|
-
|
|
103
|
-
if not isinstance(obj, dict):
|
|
104
|
-
return cls.model_validate(obj)
|
|
105
|
-
|
|
106
|
-
_obj = cls.model_validate({
|
|
107
|
-
"base_path": obj.get("base_path"),
|
|
108
|
-
"content_guard": obj.get("content_guard"),
|
|
109
|
-
"hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
|
|
110
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
111
|
-
"name": obj.get("name"),
|
|
112
|
-
"repository": obj.get("repository"),
|
|
113
|
-
"publication": obj.get("publication"),
|
|
114
|
-
"checkpoint": obj.get("checkpoint")
|
|
115
|
-
})
|
|
116
|
-
return _obj
|
|
117
|
-
|
|
118
|
-
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from services-pulp_file-client.models.policy_enum import PolicyEnum
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class PatchedfileFileRemote(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Serializer for File Remotes.
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this remote.")
|
|
33
|
-
url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The URL of an external content source.")
|
|
34
|
-
ca_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
|
|
35
|
-
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
36
|
-
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
37
|
-
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
38
|
-
proxy_url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
|
|
39
|
-
proxy_username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to authenticte to the proxy.")
|
|
40
|
-
proxy_password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.")
|
|
41
|
-
username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
|
|
42
|
-
password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.")
|
|
43
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
44
|
-
download_concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
45
|
-
max_retries: Optional[StrictInt] = Field(default=None, description="Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.")
|
|
46
|
-
policy: Optional[PolicyEnum] = Field(default=None, description="The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.")
|
|
47
|
-
total_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
48
|
-
connect_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
49
|
-
sock_connect_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
50
|
-
sock_read_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
51
|
-
headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
|
|
52
|
-
rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
|
|
53
|
-
__properties: ClassVar[List[str]] = ["name", "url", "ca_cert", "client_cert", "client_key", "tls_validation", "proxy_url", "proxy_username", "proxy_password", "username", "password", "pulp_labels", "download_concurrency", "max_retries", "policy", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "rate_limit"]
|
|
54
|
-
|
|
55
|
-
model_config = ConfigDict(
|
|
56
|
-
populate_by_name=True,
|
|
57
|
-
validate_assignment=True,
|
|
58
|
-
protected_namespaces=(),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def to_str(self) -> str:
|
|
63
|
-
"""Returns the string representation of the model using alias"""
|
|
64
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
65
|
-
|
|
66
|
-
def to_json(self) -> str:
|
|
67
|
-
"""Returns the JSON representation of the model using alias"""
|
|
68
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
69
|
-
return json.dumps(self.to_dict())
|
|
70
|
-
|
|
71
|
-
@classmethod
|
|
72
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
73
|
-
"""Create an instance of PatchedfileFileRemote from a JSON string"""
|
|
74
|
-
return cls.from_dict(json.loads(json_str))
|
|
75
|
-
|
|
76
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
77
|
-
"""Return the dictionary representation of the model using alias.
|
|
78
|
-
|
|
79
|
-
This has the following differences from calling pydantic's
|
|
80
|
-
`self.model_dump(by_alias=True)`:
|
|
81
|
-
|
|
82
|
-
* `None` is only added to the output dict for nullable fields that
|
|
83
|
-
were set at model initialization. Other fields with value `None`
|
|
84
|
-
are ignored.
|
|
85
|
-
"""
|
|
86
|
-
excluded_fields: Set[str] = set([
|
|
87
|
-
])
|
|
88
|
-
|
|
89
|
-
_dict = self.model_dump(
|
|
90
|
-
by_alias=True,
|
|
91
|
-
exclude=excluded_fields,
|
|
92
|
-
exclude_none=True,
|
|
93
|
-
)
|
|
94
|
-
# set to None if ca_cert (nullable) is None
|
|
95
|
-
# and model_fields_set contains the field
|
|
96
|
-
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
97
|
-
_dict['ca_cert'] = None
|
|
98
|
-
|
|
99
|
-
# set to None if client_cert (nullable) is None
|
|
100
|
-
# and model_fields_set contains the field
|
|
101
|
-
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
102
|
-
_dict['client_cert'] = None
|
|
103
|
-
|
|
104
|
-
# set to None if client_key (nullable) is None
|
|
105
|
-
# and model_fields_set contains the field
|
|
106
|
-
if self.client_key is None and "client_key" in self.model_fields_set:
|
|
107
|
-
_dict['client_key'] = None
|
|
108
|
-
|
|
109
|
-
# set to None if proxy_url (nullable) is None
|
|
110
|
-
# and model_fields_set contains the field
|
|
111
|
-
if self.proxy_url is None and "proxy_url" in self.model_fields_set:
|
|
112
|
-
_dict['proxy_url'] = None
|
|
113
|
-
|
|
114
|
-
# set to None if proxy_username (nullable) is None
|
|
115
|
-
# and model_fields_set contains the field
|
|
116
|
-
if self.proxy_username is None and "proxy_username" in self.model_fields_set:
|
|
117
|
-
_dict['proxy_username'] = None
|
|
118
|
-
|
|
119
|
-
# set to None if proxy_password (nullable) is None
|
|
120
|
-
# and model_fields_set contains the field
|
|
121
|
-
if self.proxy_password is None and "proxy_password" in self.model_fields_set:
|
|
122
|
-
_dict['proxy_password'] = None
|
|
123
|
-
|
|
124
|
-
# set to None if username (nullable) is None
|
|
125
|
-
# and model_fields_set contains the field
|
|
126
|
-
if self.username is None and "username" in self.model_fields_set:
|
|
127
|
-
_dict['username'] = None
|
|
128
|
-
|
|
129
|
-
# set to None if password (nullable) is None
|
|
130
|
-
# and model_fields_set contains the field
|
|
131
|
-
if self.password is None and "password" in self.model_fields_set:
|
|
132
|
-
_dict['password'] = None
|
|
133
|
-
|
|
134
|
-
# set to None if download_concurrency (nullable) is None
|
|
135
|
-
# and model_fields_set contains the field
|
|
136
|
-
if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
|
|
137
|
-
_dict['download_concurrency'] = None
|
|
138
|
-
|
|
139
|
-
# set to None if max_retries (nullable) is None
|
|
140
|
-
# and model_fields_set contains the field
|
|
141
|
-
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
142
|
-
_dict['max_retries'] = None
|
|
143
|
-
|
|
144
|
-
# set to None if total_timeout (nullable) is None
|
|
145
|
-
# and model_fields_set contains the field
|
|
146
|
-
if self.total_timeout is None and "total_timeout" in self.model_fields_set:
|
|
147
|
-
_dict['total_timeout'] = None
|
|
148
|
-
|
|
149
|
-
# set to None if connect_timeout (nullable) is None
|
|
150
|
-
# and model_fields_set contains the field
|
|
151
|
-
if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
|
|
152
|
-
_dict['connect_timeout'] = None
|
|
153
|
-
|
|
154
|
-
# set to None if sock_connect_timeout (nullable) is None
|
|
155
|
-
# and model_fields_set contains the field
|
|
156
|
-
if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
|
|
157
|
-
_dict['sock_connect_timeout'] = None
|
|
158
|
-
|
|
159
|
-
# set to None if sock_read_timeout (nullable) is None
|
|
160
|
-
# and model_fields_set contains the field
|
|
161
|
-
if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
|
|
162
|
-
_dict['sock_read_timeout'] = None
|
|
163
|
-
|
|
164
|
-
# set to None if rate_limit (nullable) is None
|
|
165
|
-
# and model_fields_set contains the field
|
|
166
|
-
if self.rate_limit is None and "rate_limit" in self.model_fields_set:
|
|
167
|
-
_dict['rate_limit'] = None
|
|
168
|
-
|
|
169
|
-
return _dict
|
|
170
|
-
|
|
171
|
-
@classmethod
|
|
172
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
173
|
-
"""Create an instance of PatchedfileFileRemote from a dict"""
|
|
174
|
-
if obj is None:
|
|
175
|
-
return None
|
|
176
|
-
|
|
177
|
-
if not isinstance(obj, dict):
|
|
178
|
-
return cls.model_validate(obj)
|
|
179
|
-
|
|
180
|
-
_obj = cls.model_validate({
|
|
181
|
-
"name": obj.get("name"),
|
|
182
|
-
"url": obj.get("url"),
|
|
183
|
-
"ca_cert": obj.get("ca_cert"),
|
|
184
|
-
"client_cert": obj.get("client_cert"),
|
|
185
|
-
"client_key": obj.get("client_key"),
|
|
186
|
-
"tls_validation": obj.get("tls_validation"),
|
|
187
|
-
"proxy_url": obj.get("proxy_url"),
|
|
188
|
-
"proxy_username": obj.get("proxy_username"),
|
|
189
|
-
"proxy_password": obj.get("proxy_password"),
|
|
190
|
-
"username": obj.get("username"),
|
|
191
|
-
"password": obj.get("password"),
|
|
192
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
193
|
-
"download_concurrency": obj.get("download_concurrency"),
|
|
194
|
-
"max_retries": obj.get("max_retries"),
|
|
195
|
-
"policy": obj.get("policy"),
|
|
196
|
-
"total_timeout": obj.get("total_timeout"),
|
|
197
|
-
"connect_timeout": obj.get("connect_timeout"),
|
|
198
|
-
"sock_connect_timeout": obj.get("sock_connect_timeout"),
|
|
199
|
-
"sock_read_timeout": obj.get("sock_read_timeout"),
|
|
200
|
-
"headers": obj.get("headers"),
|
|
201
|
-
"rate_limit": obj.get("rate_limit")
|
|
202
|
-
})
|
|
203
|
-
return _obj
|
|
204
|
-
|
|
205
|
-
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class PatchedfileFileRepository(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for File Repositories.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
32
|
-
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this repository.")
|
|
33
|
-
description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
|
|
34
|
-
retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
|
|
35
|
-
remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
|
|
36
|
-
autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.")
|
|
37
|
-
manifest: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default='PULP_MANIFEST', description="Filename to use for manifest file containing metadata for all the files.")
|
|
38
|
-
__properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "remote", "autopublish", "manifest"]
|
|
39
|
-
|
|
40
|
-
model_config = ConfigDict(
|
|
41
|
-
populate_by_name=True,
|
|
42
|
-
validate_assignment=True,
|
|
43
|
-
protected_namespaces=(),
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def to_str(self) -> str:
|
|
48
|
-
"""Returns the string representation of the model using alias"""
|
|
49
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
-
|
|
51
|
-
def to_json(self) -> str:
|
|
52
|
-
"""Returns the JSON representation of the model using alias"""
|
|
53
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
-
return json.dumps(self.to_dict())
|
|
55
|
-
|
|
56
|
-
@classmethod
|
|
57
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
-
"""Create an instance of PatchedfileFileRepository from a JSON string"""
|
|
59
|
-
return cls.from_dict(json.loads(json_str))
|
|
60
|
-
|
|
61
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
-
"""Return the dictionary representation of the model using alias.
|
|
63
|
-
|
|
64
|
-
This has the following differences from calling pydantic's
|
|
65
|
-
`self.model_dump(by_alias=True)`:
|
|
66
|
-
|
|
67
|
-
* `None` is only added to the output dict for nullable fields that
|
|
68
|
-
were set at model initialization. Other fields with value `None`
|
|
69
|
-
are ignored.
|
|
70
|
-
"""
|
|
71
|
-
excluded_fields: Set[str] = set([
|
|
72
|
-
])
|
|
73
|
-
|
|
74
|
-
_dict = self.model_dump(
|
|
75
|
-
by_alias=True,
|
|
76
|
-
exclude=excluded_fields,
|
|
77
|
-
exclude_none=True,
|
|
78
|
-
)
|
|
79
|
-
# set to None if description (nullable) is None
|
|
80
|
-
# and model_fields_set contains the field
|
|
81
|
-
if self.description is None and "description" in self.model_fields_set:
|
|
82
|
-
_dict['description'] = None
|
|
83
|
-
|
|
84
|
-
# set to None if retain_repo_versions (nullable) is None
|
|
85
|
-
# and model_fields_set contains the field
|
|
86
|
-
if self.retain_repo_versions is None and "retain_repo_versions" in self.model_fields_set:
|
|
87
|
-
_dict['retain_repo_versions'] = None
|
|
88
|
-
|
|
89
|
-
# set to None if remote (nullable) is None
|
|
90
|
-
# and model_fields_set contains the field
|
|
91
|
-
if self.remote is None and "remote" in self.model_fields_set:
|
|
92
|
-
_dict['remote'] = None
|
|
93
|
-
|
|
94
|
-
# set to None if manifest (nullable) is None
|
|
95
|
-
# and model_fields_set contains the field
|
|
96
|
-
if self.manifest is None and "manifest" in self.model_fields_set:
|
|
97
|
-
_dict['manifest'] = None
|
|
98
|
-
|
|
99
|
-
return _dict
|
|
100
|
-
|
|
101
|
-
@classmethod
|
|
102
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
103
|
-
"""Create an instance of PatchedfileFileRepository from a dict"""
|
|
104
|
-
if obj is None:
|
|
105
|
-
return None
|
|
106
|
-
|
|
107
|
-
if not isinstance(obj, dict):
|
|
108
|
-
return cls.model_validate(obj)
|
|
109
|
-
|
|
110
|
-
_obj = cls.model_validate({
|
|
111
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
112
|
-
"name": obj.get("name"),
|
|
113
|
-
"description": obj.get("description"),
|
|
114
|
-
"retain_repo_versions": obj.get("retain_repo_versions"),
|
|
115
|
-
"remote": obj.get("remote"),
|
|
116
|
-
"autopublish": obj.get("autopublish") if obj.get("autopublish") is not None else False,
|
|
117
|
-
"manifest": obj.get("manifest") if obj.get("manifest") is not None else 'PULP_MANIFEST'
|
|
118
|
-
})
|
|
119
|
-
return _obj
|
|
120
|
-
|
|
121
|
-
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import json
|
|
18
|
-
from enum import Enum
|
|
19
|
-
from typing_extensions import Self
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class PolicyEnum(str, Enum):
|
|
23
|
-
"""
|
|
24
|
-
* `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
"""
|
|
28
|
-
allowed enum values
|
|
29
|
-
"""
|
|
30
|
-
IMMEDIATE = 'immediate'
|
|
31
|
-
ON_DEMAND = 'on_demand'
|
|
32
|
-
STREAMED = 'streamed'
|
|
33
|
-
|
|
34
|
-
@classmethod
|
|
35
|
-
def from_json(cls, json_str: str) -> Self:
|
|
36
|
-
"""Create an instance of PolicyEnum from a JSON string"""
|
|
37
|
-
return cls(json.loads(json_str))
|
|
38
|
-
|
|
39
|
-
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class Repair(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
Repair
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
verify_checksums: Optional[StrictBool] = Field(default=True, description="Will verify that the checksum of all stored files matches what saved in the database. Otherwise only the existence of the files will be checked. Enabled by default")
|
|
31
|
-
__properties: ClassVar[List[str]] = ["verify_checksums"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of Repair from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
return _dict
|
|
73
|
-
|
|
74
|
-
@classmethod
|
|
75
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of Repair from a dict"""
|
|
77
|
-
if obj is None:
|
|
78
|
-
return None
|
|
79
|
-
|
|
80
|
-
if not isinstance(obj, dict):
|
|
81
|
-
return cls.model_validate(obj)
|
|
82
|
-
|
|
83
|
-
_obj = cls.model_validate({
|
|
84
|
-
"verify_checksums": obj.get("verify_checksums") if obj.get("verify_checksums") is not None else True
|
|
85
|
-
})
|
|
86
|
-
return _obj
|
|
87
|
-
|
|
88
|
-
|