pulp-ansible-client 0.29.1__py3-none-any.whl → 0.29.3__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.
- {pulp_ansible_client-0.29.1.dist-info → pulp_ansible_client-0.29.3.dist-info}/METADATA +4 -2
- {pulp_ansible_client-0.29.1.dist-info → pulp_ansible_client-0.29.3.dist-info}/RECORD +24 -22
- pulpcore/client/pulp_ansible/__init__.py +5 -1
- pulpcore/client/pulp_ansible/api/content_collection_signatures_api.py +16 -1
- pulpcore/client/pulp_ansible/api/content_collection_versions_api.py +61 -46
- pulpcore/client/pulp_ansible/api_client.py +1 -1
- pulpcore/client/pulp_ansible/configuration.py +1 -1
- pulpcore/client/pulp_ansible/models/__init__.py +2 -0
- pulpcore/client/pulp_ansible/models/ansible_collection_remote.py +9 -9
- pulpcore/client/pulp_ansible/models/ansible_collection_remote_response.py +10 -10
- pulpcore/client/pulp_ansible/models/ansible_collection_version_response.py +6 -16
- pulpcore/client/pulp_ansible/models/ansible_git_remote.py +49 -49
- pulpcore/client/pulp_ansible/models/ansible_git_remote_response.py +37 -37
- pulpcore/client/pulp_ansible/models/ansible_role.py +2 -2
- pulpcore/client/pulp_ansible/models/ansible_role_remote.py +9 -9
- pulpcore/client/pulp_ansible/models/ansible_role_remote_response.py +10 -10
- pulpcore/client/pulp_ansible/models/ansible_role_response.py +6 -6
- pulpcore/client/pulp_ansible/models/patchedansible_collection_remote.py +9 -9
- pulpcore/client/pulp_ansible/models/patchedansible_git_remote.py +49 -49
- pulpcore/client/pulp_ansible/models/patchedansible_role_remote.py +9 -9
- pulpcore/client/pulp_ansible/models/remote_network_config.py +178 -0
- pulpcore/client/pulp_ansible/models/remote_network_config_response.py +148 -0
- {pulp_ansible_client-0.29.1.dist-info → pulp_ansible_client-0.29.3.dist-info}/WHEEL +0 -0
- {pulp_ansible_client-0.29.1.dist-info → pulp_ansible_client-0.29.3.dist-info}/top_level.txt +0 -0
|
@@ -28,29 +28,29 @@ class PatchedansibleGitRemote(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
A serializer for Git Collection Remotes.
|
|
30
30
|
""" # noqa: E501
|
|
31
|
+
url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The URL of an external content source.")
|
|
32
|
+
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.")
|
|
31
33
|
proxy_url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
|
|
32
|
-
download_concurrency: Optional[StrictInt] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
33
|
-
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.")
|
|
34
|
-
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this remote.")
|
|
35
34
|
headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
|
|
36
|
-
|
|
35
|
+
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
36
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this remote.")
|
|
37
|
+
download_concurrency: Optional[StrictInt] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
38
|
+
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
39
|
+
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.")
|
|
37
40
|
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
38
|
-
|
|
41
|
+
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.")
|
|
42
|
+
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.")
|
|
39
43
|
rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
|
|
40
|
-
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.")
|
|
41
|
-
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.")
|
|
42
44
|
proxy_username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to authenticte to the proxy.")
|
|
43
|
-
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.")
|
|
44
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
45
45
|
username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
|
|
46
|
-
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.")
|
|
47
|
-
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
48
|
-
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.")
|
|
49
|
-
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
50
46
|
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.")
|
|
47
|
+
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.")
|
|
48
|
+
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.")
|
|
49
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
50
|
+
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.")
|
|
51
51
|
metadata_only: Optional[StrictBool] = Field(default=None, description="If True, only metadata about the content will be stored in Pulp. Clients will retrieve content from the remote URL.")
|
|
52
52
|
git_ref: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A git ref. e.g.: branch, tag, or commit sha.")
|
|
53
|
-
__properties: ClassVar[List[str]] = ["
|
|
53
|
+
__properties: ClassVar[List[str]] = ["url", "max_retries", "proxy_url", "headers", "client_key", "name", "download_concurrency", "client_cert", "total_timeout", "tls_validation", "password", "sock_read_timeout", "rate_limit", "proxy_username", "username", "sock_connect_timeout", "proxy_password", "ca_cert", "pulp_labels", "connect_timeout", "metadata_only", "git_ref"]
|
|
54
54
|
|
|
55
55
|
model_config = ConfigDict(
|
|
56
56
|
populate_by_name=True,
|
|
@@ -91,80 +91,80 @@ class PatchedansibleGitRemote(BaseModel):
|
|
|
91
91
|
exclude=excluded_fields,
|
|
92
92
|
exclude_none=True,
|
|
93
93
|
)
|
|
94
|
+
# set to None if max_retries (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
97
|
+
_dict['max_retries'] = None
|
|
98
|
+
|
|
94
99
|
# set to None if proxy_url (nullable) is None
|
|
95
100
|
# and model_fields_set contains the field
|
|
96
101
|
if self.proxy_url is None and "proxy_url" in self.model_fields_set:
|
|
97
102
|
_dict['proxy_url'] = None
|
|
98
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
|
+
|
|
99
109
|
# set to None if download_concurrency (nullable) is None
|
|
100
110
|
# and model_fields_set contains the field
|
|
101
111
|
if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
|
|
102
112
|
_dict['download_concurrency'] = None
|
|
103
113
|
|
|
104
|
-
# set to None if
|
|
114
|
+
# set to None if client_cert (nullable) is None
|
|
105
115
|
# and model_fields_set contains the field
|
|
106
|
-
if self.
|
|
107
|
-
_dict['
|
|
116
|
+
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
117
|
+
_dict['client_cert'] = None
|
|
118
|
+
|
|
119
|
+
# set to None if total_timeout (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.total_timeout is None and "total_timeout" in self.model_fields_set:
|
|
122
|
+
_dict['total_timeout'] = None
|
|
108
123
|
|
|
109
124
|
# set to None if password (nullable) is None
|
|
110
125
|
# and model_fields_set contains the field
|
|
111
126
|
if self.password is None and "password" in self.model_fields_set:
|
|
112
127
|
_dict['password'] = None
|
|
113
128
|
|
|
129
|
+
# set to None if sock_read_timeout (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
|
|
132
|
+
_dict['sock_read_timeout'] = None
|
|
133
|
+
|
|
114
134
|
# set to None if rate_limit (nullable) is None
|
|
115
135
|
# and model_fields_set contains the field
|
|
116
136
|
if self.rate_limit is None and "rate_limit" in self.model_fields_set:
|
|
117
137
|
_dict['rate_limit'] = None
|
|
118
138
|
|
|
119
|
-
# set to None if ca_cert (nullable) is None
|
|
120
|
-
# and model_fields_set contains the field
|
|
121
|
-
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
122
|
-
_dict['ca_cert'] = None
|
|
123
|
-
|
|
124
|
-
# set to None if total_timeout (nullable) is None
|
|
125
|
-
# and model_fields_set contains the field
|
|
126
|
-
if self.total_timeout is None and "total_timeout" in self.model_fields_set:
|
|
127
|
-
_dict['total_timeout'] = None
|
|
128
|
-
|
|
129
139
|
# set to None if proxy_username (nullable) is None
|
|
130
140
|
# and model_fields_set contains the field
|
|
131
141
|
if self.proxy_username is None and "proxy_username" in self.model_fields_set:
|
|
132
142
|
_dict['proxy_username'] = None
|
|
133
143
|
|
|
134
|
-
# set to None if proxy_password (nullable) is None
|
|
135
|
-
# and model_fields_set contains the field
|
|
136
|
-
if self.proxy_password is None and "proxy_password" in self.model_fields_set:
|
|
137
|
-
_dict['proxy_password'] = None
|
|
138
|
-
|
|
139
144
|
# set to None if username (nullable) is None
|
|
140
145
|
# and model_fields_set contains the field
|
|
141
146
|
if self.username is None and "username" in self.model_fields_set:
|
|
142
147
|
_dict['username'] = None
|
|
143
148
|
|
|
144
|
-
# set to None if
|
|
145
|
-
# and model_fields_set contains the field
|
|
146
|
-
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
147
|
-
_dict['max_retries'] = None
|
|
148
|
-
|
|
149
|
-
# set to None if client_key (nullable) is None
|
|
149
|
+
# set to None if sock_connect_timeout (nullable) is None
|
|
150
150
|
# and model_fields_set contains the field
|
|
151
|
-
if self.
|
|
152
|
-
_dict['
|
|
151
|
+
if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
|
|
152
|
+
_dict['sock_connect_timeout'] = None
|
|
153
153
|
|
|
154
|
-
# set to None if
|
|
154
|
+
# set to None if proxy_password (nullable) is None
|
|
155
155
|
# and model_fields_set contains the field
|
|
156
|
-
if self.
|
|
157
|
-
_dict['
|
|
156
|
+
if self.proxy_password is None and "proxy_password" in self.model_fields_set:
|
|
157
|
+
_dict['proxy_password'] = None
|
|
158
158
|
|
|
159
|
-
# set to None if
|
|
159
|
+
# set to None if ca_cert (nullable) is None
|
|
160
160
|
# and model_fields_set contains the field
|
|
161
|
-
if self.
|
|
162
|
-
_dict['
|
|
161
|
+
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
162
|
+
_dict['ca_cert'] = None
|
|
163
163
|
|
|
164
|
-
# set to None if
|
|
164
|
+
# set to None if connect_timeout (nullable) is None
|
|
165
165
|
# and model_fields_set contains the field
|
|
166
|
-
if self.
|
|
167
|
-
_dict['
|
|
166
|
+
if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
|
|
167
|
+
_dict['connect_timeout'] = None
|
|
168
168
|
|
|
169
169
|
return _dict
|
|
170
170
|
|
|
@@ -31,6 +31,8 @@ class PatchedansibleRoleRemote(BaseModel):
|
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this remote.")
|
|
33
33
|
url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The URL of an external content source.")
|
|
34
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
35
|
+
policy: Optional[PolicyEnum] = Field(default=None, description="The policy to use when downloading content. * `immediate` - When syncing, download all metadata and content now.")
|
|
34
36
|
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
37
|
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
36
38
|
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
@@ -40,17 +42,15 @@ class PatchedansibleRoleRemote(BaseModel):
|
|
|
40
42
|
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
43
|
username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
|
|
42
44
|
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[StrictInt] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
45
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. * `immediate` - When syncing, download all metadata and content now.")
|
|
47
46
|
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
47
|
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
48
|
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
49
|
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
50
|
headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
|
|
51
|
+
download_concurrency: Optional[StrictInt] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
52
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", "
|
|
53
|
+
__properties: ClassVar[List[str]] = ["name", "url", "pulp_labels", "policy", "ca_cert", "client_cert", "client_key", "tls_validation", "proxy_url", "proxy_username", "proxy_password", "username", "password", "max_retries", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "download_concurrency", "rate_limit"]
|
|
54
54
|
|
|
55
55
|
model_config = ConfigDict(
|
|
56
56
|
populate_by_name=True,
|
|
@@ -131,11 +131,6 @@ class PatchedansibleRoleRemote(BaseModel):
|
|
|
131
131
|
if self.password is None and "password" in self.model_fields_set:
|
|
132
132
|
_dict['password'] = None
|
|
133
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
134
|
# set to None if max_retries (nullable) is None
|
|
140
135
|
# and model_fields_set contains the field
|
|
141
136
|
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
@@ -161,6 +156,11 @@ class PatchedansibleRoleRemote(BaseModel):
|
|
|
161
156
|
if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
|
|
162
157
|
_dict['sock_read_timeout'] = None
|
|
163
158
|
|
|
159
|
+
# set to None if download_concurrency (nullable) is None
|
|
160
|
+
# and model_fields_set contains the field
|
|
161
|
+
if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
|
|
162
|
+
_dict['download_concurrency'] = None
|
|
163
|
+
|
|
164
164
|
# set to None if rate_limit (nullable) is None
|
|
165
165
|
# and model_fields_set contains the field
|
|
166
166
|
if self.rate_limit is None and "rate_limit" in self.model_fields_set:
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RemoteNetworkConfig(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Shared network configuration fields and validation logic used by both RemoteSerializer and UploadSerializerFieldsMixin.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
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.")
|
|
32
|
+
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
33
|
+
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
34
|
+
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
35
|
+
proxy_url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
|
|
36
|
+
proxy_username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to authenticte to the proxy.")
|
|
37
|
+
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.")
|
|
38
|
+
username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
|
|
39
|
+
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.")
|
|
40
|
+
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.")
|
|
41
|
+
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.")
|
|
42
|
+
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.")
|
|
43
|
+
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.")
|
|
44
|
+
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.")
|
|
45
|
+
headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
|
|
46
|
+
download_concurrency: Optional[StrictInt] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
47
|
+
rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
|
|
48
|
+
__properties: ClassVar[List[str]] = ["ca_cert", "client_cert", "client_key", "tls_validation", "proxy_url", "proxy_username", "proxy_password", "username", "password", "max_retries", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "download_concurrency", "rate_limit"]
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_str(self) -> str:
|
|
58
|
+
"""Returns the string representation of the model using alias"""
|
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
def to_json(self) -> str:
|
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
|
63
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
+
"""Create an instance of RemoteNetworkConfig from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
|
73
|
+
|
|
74
|
+
This has the following differences from calling pydantic's
|
|
75
|
+
`self.model_dump(by_alias=True)`:
|
|
76
|
+
|
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
|
78
|
+
were set at model initialization. Other fields with value `None`
|
|
79
|
+
are ignored.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
])
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
# set to None if ca_cert (nullable) is None
|
|
90
|
+
# and model_fields_set contains the field
|
|
91
|
+
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
92
|
+
_dict['ca_cert'] = None
|
|
93
|
+
|
|
94
|
+
# set to None if client_cert (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
97
|
+
_dict['client_cert'] = None
|
|
98
|
+
|
|
99
|
+
# set to None if client_key (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.client_key is None and "client_key" in self.model_fields_set:
|
|
102
|
+
_dict['client_key'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if proxy_url (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.proxy_url is None and "proxy_url" in self.model_fields_set:
|
|
107
|
+
_dict['proxy_url'] = None
|
|
108
|
+
|
|
109
|
+
# set to None if proxy_username (nullable) is None
|
|
110
|
+
# and model_fields_set contains the field
|
|
111
|
+
if self.proxy_username is None and "proxy_username" in self.model_fields_set:
|
|
112
|
+
_dict['proxy_username'] = None
|
|
113
|
+
|
|
114
|
+
# set to None if proxy_password (nullable) is None
|
|
115
|
+
# and model_fields_set contains the field
|
|
116
|
+
if self.proxy_password is None and "proxy_password" in self.model_fields_set:
|
|
117
|
+
_dict['proxy_password'] = None
|
|
118
|
+
|
|
119
|
+
# set to None if username (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.username is None and "username" in self.model_fields_set:
|
|
122
|
+
_dict['username'] = None
|
|
123
|
+
|
|
124
|
+
# set to None if password (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.password is None and "password" in self.model_fields_set:
|
|
127
|
+
_dict['password'] = None
|
|
128
|
+
|
|
129
|
+
# set to None if max_retries (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
132
|
+
_dict['max_retries'] = None
|
|
133
|
+
|
|
134
|
+
# set to None if total_timeout (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.total_timeout is None and "total_timeout" in self.model_fields_set:
|
|
137
|
+
_dict['total_timeout'] = None
|
|
138
|
+
|
|
139
|
+
# set to None if connect_timeout (nullable) is None
|
|
140
|
+
# and model_fields_set contains the field
|
|
141
|
+
if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
|
|
142
|
+
_dict['connect_timeout'] = None
|
|
143
|
+
|
|
144
|
+
# set to None if sock_connect_timeout (nullable) is None
|
|
145
|
+
# and model_fields_set contains the field
|
|
146
|
+
if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
|
|
147
|
+
_dict['sock_connect_timeout'] = None
|
|
148
|
+
|
|
149
|
+
# set to None if sock_read_timeout (nullable) is None
|
|
150
|
+
# and model_fields_set contains the field
|
|
151
|
+
if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
|
|
152
|
+
_dict['sock_read_timeout'] = None
|
|
153
|
+
|
|
154
|
+
# set to None if download_concurrency (nullable) is None
|
|
155
|
+
# and model_fields_set contains the field
|
|
156
|
+
if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
|
|
157
|
+
_dict['download_concurrency'] = None
|
|
158
|
+
|
|
159
|
+
# set to None if rate_limit (nullable) is None
|
|
160
|
+
# and model_fields_set contains the field
|
|
161
|
+
if self.rate_limit is None and "rate_limit" in self.model_fields_set:
|
|
162
|
+
_dict['rate_limit'] = None
|
|
163
|
+
|
|
164
|
+
return _dict
|
|
165
|
+
|
|
166
|
+
@classmethod
|
|
167
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
168
|
+
"""Create an instance of RemoteNetworkConfig from a dict"""
|
|
169
|
+
if obj is None:
|
|
170
|
+
return None
|
|
171
|
+
|
|
172
|
+
if not isinstance(obj, dict):
|
|
173
|
+
return cls.model_validate(obj)
|
|
174
|
+
|
|
175
|
+
_obj = cls.model_validate(obj)
|
|
176
|
+
return _obj
|
|
177
|
+
|
|
178
|
+
|
|
@@ -0,0 +1,148 @@
|
|
|
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 typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RemoteNetworkConfigResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Shared network configuration fields and validation logic used by both RemoteSerializer and UploadSerializerFieldsMixin.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
ca_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
|
|
32
|
+
client_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
33
|
+
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
34
|
+
proxy_url: Optional[StrictStr] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
|
|
35
|
+
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.")
|
|
36
|
+
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.")
|
|
37
|
+
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.")
|
|
38
|
+
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.")
|
|
39
|
+
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.")
|
|
40
|
+
headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
|
|
41
|
+
download_concurrency: Optional[StrictInt] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
42
|
+
rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
|
|
43
|
+
__properties: ClassVar[List[str]] = ["ca_cert", "client_cert", "tls_validation", "proxy_url", "max_retries", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "download_concurrency", "rate_limit"]
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of RemoteNetworkConfigResponse from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# set to None if ca_cert (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
87
|
+
_dict['ca_cert'] = None
|
|
88
|
+
|
|
89
|
+
# set to None if client_cert (nullable) is None
|
|
90
|
+
# and model_fields_set contains the field
|
|
91
|
+
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
92
|
+
_dict['client_cert'] = None
|
|
93
|
+
|
|
94
|
+
# set to None if proxy_url (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.proxy_url is None and "proxy_url" in self.model_fields_set:
|
|
97
|
+
_dict['proxy_url'] = None
|
|
98
|
+
|
|
99
|
+
# set to None if max_retries (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
102
|
+
_dict['max_retries'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if total_timeout (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.total_timeout is None and "total_timeout" in self.model_fields_set:
|
|
107
|
+
_dict['total_timeout'] = None
|
|
108
|
+
|
|
109
|
+
# set to None if connect_timeout (nullable) is None
|
|
110
|
+
# and model_fields_set contains the field
|
|
111
|
+
if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
|
|
112
|
+
_dict['connect_timeout'] = None
|
|
113
|
+
|
|
114
|
+
# set to None if sock_connect_timeout (nullable) is None
|
|
115
|
+
# and model_fields_set contains the field
|
|
116
|
+
if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
|
|
117
|
+
_dict['sock_connect_timeout'] = None
|
|
118
|
+
|
|
119
|
+
# set to None if sock_read_timeout (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
|
|
122
|
+
_dict['sock_read_timeout'] = None
|
|
123
|
+
|
|
124
|
+
# set to None if download_concurrency (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
|
|
127
|
+
_dict['download_concurrency'] = None
|
|
128
|
+
|
|
129
|
+
# set to None if rate_limit (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.rate_limit is None and "rate_limit" in self.model_fields_set:
|
|
132
|
+
_dict['rate_limit'] = None
|
|
133
|
+
|
|
134
|
+
return _dict
|
|
135
|
+
|
|
136
|
+
@classmethod
|
|
137
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
138
|
+
"""Create an instance of RemoteNetworkConfigResponse from a dict"""
|
|
139
|
+
if obj is None:
|
|
140
|
+
return None
|
|
141
|
+
|
|
142
|
+
if not isinstance(obj, dict):
|
|
143
|
+
return cls.model_validate(obj)
|
|
144
|
+
|
|
145
|
+
_obj = cls.model_validate(obj)
|
|
146
|
+
return _obj
|
|
147
|
+
|
|
148
|
+
|
|
File without changes
|
|
File without changes
|