crc-pulp-service-client 20250917.1__py3-none-any.whl → 20250918.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-service-client might be problematic. Click here for more details.
- {crc_pulp_service_client-20250917.1.dist-info → crc_pulp_service_client-20250918.1.dist-info}/METADATA +1 -1
- {crc_pulp_service_client-20250917.1.dist-info → crc_pulp_service_client-20250918.1.dist-info}/RECORD +16 -9
- pulpcore/client/pulp_service/__init__.py +8 -1
- pulpcore/client/pulp_service/api/__init__.py +1 -0
- pulpcore/client/pulp_service/api/content_rpmpackages_api.py +1899 -0
- pulpcore/client/pulp_service/api_client.py +1 -1
- pulpcore/client/pulp_service/configuration.py +3 -3
- pulpcore/client/pulp_service/models/__init__.py +6 -0
- pulpcore/client/pulp_service/models/paginatedrpm_package_response_list.py +102 -0
- pulpcore/client/pulp_service/models/rpm_package_response.py +309 -0
- pulpcore/client/pulp_service/models/set_label.py +103 -0
- pulpcore/client/pulp_service/models/set_label_response.py +103 -0
- pulpcore/client/pulp_service/models/unset_label.py +96 -0
- pulpcore/client/pulp_service/models/unset_label_response.py +100 -0
- {crc_pulp_service_client-20250917.1.dist-info → crc_pulp_service_client-20250918.1.dist-info}/WHEEL +0 -0
- {crc_pulp_service_client-20250917.1.dist-info → crc_pulp_service_client-20250918.1.dist-info}/top_level.txt +0 -0
|
@@ -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/
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/20250918.1/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -225,7 +225,7 @@ conf = pulpcore.client.pulp_service.Configuration(
|
|
|
225
225
|
) -> None:
|
|
226
226
|
"""Constructor
|
|
227
227
|
"""
|
|
228
|
-
self._base_path = "https://env-ephemeral-
|
|
228
|
+
self._base_path = "https://env-ephemeral-rqmobx.apps.crc-eph.r9lp.p1.openshiftapps.com" if host is None else host
|
|
229
229
|
"""Default Base url
|
|
230
230
|
"""
|
|
231
231
|
self.server_index = 0 if server_index is None and host is None else server_index
|
|
@@ -557,7 +557,7 @@ conf = pulpcore.client.pulp_service.Configuration(
|
|
|
557
557
|
"OS: {env}\n"\
|
|
558
558
|
"Python Version: {pyversion}\n"\
|
|
559
559
|
"Version of the API: v3\n"\
|
|
560
|
-
"SDK Package Version:
|
|
560
|
+
"SDK Package Version: 20250918.1".\
|
|
561
561
|
format(env=sys.platform, pyversion=sys.version)
|
|
562
562
|
|
|
563
563
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -567,7 +567,7 @@ conf = pulpcore.client.pulp_service.Configuration(
|
|
|
567
567
|
"""
|
|
568
568
|
return [
|
|
569
569
|
{
|
|
570
|
-
'url': "https://env-ephemeral-
|
|
570
|
+
'url': "https://env-ephemeral-rqmobx.apps.crc-eph.r9lp.p1.openshiftapps.com",
|
|
571
571
|
'description': "No description provided",
|
|
572
572
|
}
|
|
573
573
|
]
|
|
@@ -23,12 +23,18 @@ from pulpcore.client.pulp_service.models.nested_role import NestedRole
|
|
|
23
23
|
from pulpcore.client.pulp_service.models.nested_role_response import NestedRoleResponse
|
|
24
24
|
from pulpcore.client.pulp_service.models.object_roles_response import ObjectRolesResponse
|
|
25
25
|
from pulpcore.client.pulp_service.models.paginated_task_response_list import PaginatedTaskResponseList
|
|
26
|
+
from pulpcore.client.pulp_service.models.paginatedrpm_package_response_list import PaginatedrpmPackageResponseList
|
|
26
27
|
from pulpcore.client.pulp_service.models.paginatedservice_feature_content_guard_response_list import PaginatedserviceFeatureContentGuardResponseList
|
|
27
28
|
from pulpcore.client.pulp_service.models.paginatedservice_vulnerability_report_response_list import PaginatedserviceVulnerabilityReportResponseList
|
|
28
29
|
from pulpcore.client.pulp_service.models.patchedservice_feature_content_guard import PatchedserviceFeatureContentGuard
|
|
29
30
|
from pulpcore.client.pulp_service.models.progress_report_response import ProgressReportResponse
|
|
31
|
+
from pulpcore.client.pulp_service.models.rpm_package_response import RpmPackageResponse
|
|
30
32
|
from pulpcore.client.pulp_service.models.service_feature_content_guard import ServiceFeatureContentGuard
|
|
31
33
|
from pulpcore.client.pulp_service.models.service_feature_content_guard_response import ServiceFeatureContentGuardResponse
|
|
32
34
|
from pulpcore.client.pulp_service.models.service_vulnerability_report_response import ServiceVulnerabilityReportResponse
|
|
35
|
+
from pulpcore.client.pulp_service.models.set_label import SetLabel
|
|
36
|
+
from pulpcore.client.pulp_service.models.set_label_response import SetLabelResponse
|
|
33
37
|
from pulpcore.client.pulp_service.models.storage_class_enum import StorageClassEnum
|
|
34
38
|
from pulpcore.client.pulp_service.models.task_response import TaskResponse
|
|
39
|
+
from pulpcore.client.pulp_service.models.unset_label import UnsetLabel
|
|
40
|
+
from pulpcore.client.pulp_service.models.unset_label_response import UnsetLabelResponse
|
|
@@ -0,0 +1,102 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_service.models.rpm_package_response import RpmPackageResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedrpmPackageResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedrpmPackageResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[RpmPackageResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedrpmPackageResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of PaginatedrpmPackageResponseList from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"count": obj.get("count"),
|
|
96
|
+
"next": obj.get("next"),
|
|
97
|
+
"previous": obj.get("previous"),
|
|
98
|
+
"results": [RpmPackageResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,309 @@
|
|
|
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, StrictBool, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RpmPackageResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A Serializer for Package. Add serializers for the new fields defined in Package and add those fields to the Meta class keeping fields from the parent class as well. Provide help_text.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
pulp_href: Optional[StrictStr] = None
|
|
32
|
+
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
33
|
+
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
34
|
+
pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
|
|
35
|
+
md5: Optional[StrictStr] = Field(default=None, description="The MD5 checksum if available.")
|
|
36
|
+
sha1: Optional[StrictStr] = Field(default=None, description="The SHA-1 checksum if available.")
|
|
37
|
+
sha224: Optional[StrictStr] = Field(default=None, description="The SHA-224 checksum if available.")
|
|
38
|
+
sha256: Optional[StrictStr] = Field(default=None, description="The SHA-256 checksum if available.")
|
|
39
|
+
sha384: Optional[StrictStr] = Field(default=None, description="The SHA-384 checksum if available.")
|
|
40
|
+
sha512: Optional[StrictStr] = Field(default=None, description="The SHA-512 checksum if available.")
|
|
41
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
42
|
+
vuln_report: Optional[StrictStr] = None
|
|
43
|
+
artifact: Optional[StrictStr] = Field(default=None, description="Artifact file representing the physical content")
|
|
44
|
+
name: Optional[StrictStr] = Field(default=None, description="Name of the package")
|
|
45
|
+
epoch: Optional[StrictStr] = Field(default=None, description="The package's epoch")
|
|
46
|
+
version: Optional[StrictStr] = Field(default=None, description="The version of the package. For example, '2.8.0'")
|
|
47
|
+
release: Optional[StrictStr] = Field(default=None, description="The release of a particular version of the package. e.g. '1.el7' or '3.f24'")
|
|
48
|
+
arch: Optional[StrictStr] = Field(default=None, description="The target architecture for a package.For example, 'x86_64', 'i686', or 'noarch'")
|
|
49
|
+
pkg_id: Optional[StrictStr] = Field(default=None, description="Checksum of the package file", alias="pkgId")
|
|
50
|
+
checksum_type: Optional[StrictStr] = Field(default=None, description="Type of checksum, e.g. 'sha256', 'md5'")
|
|
51
|
+
summary: Optional[StrictStr] = Field(default=None, description="Short description of the packaged software")
|
|
52
|
+
description: Optional[StrictStr] = Field(default=None, description="In-depth description of the packaged software")
|
|
53
|
+
url: Optional[StrictStr] = Field(default=None, description="URL with more information about the packaged software")
|
|
54
|
+
changelogs: Optional[Any] = None
|
|
55
|
+
files: Optional[Any] = None
|
|
56
|
+
requires: Optional[Any] = None
|
|
57
|
+
provides: Optional[Any] = None
|
|
58
|
+
conflicts: Optional[Any] = None
|
|
59
|
+
obsoletes: Optional[Any] = None
|
|
60
|
+
suggests: Optional[Any] = None
|
|
61
|
+
enhances: Optional[Any] = None
|
|
62
|
+
recommends: Optional[Any] = None
|
|
63
|
+
supplements: Optional[Any] = None
|
|
64
|
+
location_base: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Base location of this package. This field will be removed in a future release of pulp_rpm.")
|
|
65
|
+
location_href: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Relative location of package to the repodata. This field will be removed in a future release of pulp_rpm.")
|
|
66
|
+
rpm_buildhost: Optional[StrictStr] = Field(default=None, description="Hostname of the system that built the package")
|
|
67
|
+
rpm_group: Optional[StrictStr] = Field(default=None, description="RPM group (See: http://fedoraproject.org/wiki/RPMGroups)")
|
|
68
|
+
rpm_license: Optional[StrictStr] = Field(default=None, description="License term applicable to the package software (GPLv2, etc.)")
|
|
69
|
+
rpm_packager: Optional[StrictStr] = Field(default=None, description="Person or persons responsible for creating the package")
|
|
70
|
+
rpm_sourcerpm: Optional[StrictStr] = Field(default=None, description="Name of the source package (srpm) the package was built from")
|
|
71
|
+
rpm_vendor: Optional[StrictStr] = Field(default=None, description="Name of the organization that produced the package")
|
|
72
|
+
rpm_header_start: Optional[StrictInt] = Field(default=None, description="First byte of the header")
|
|
73
|
+
rpm_header_end: Optional[StrictInt] = Field(default=None, description="Last byte of the header")
|
|
74
|
+
is_modular: Optional[StrictBool] = Field(default=None, description="Flag to identify if the package is modular")
|
|
75
|
+
size_archive: Optional[StrictInt] = Field(default=None, description="Size, in bytes, of the archive portion of the original package file")
|
|
76
|
+
size_installed: Optional[StrictInt] = Field(default=None, description="Total size, in bytes, of every file installed by this package")
|
|
77
|
+
size_package: Optional[StrictInt] = Field(default=None, description="Size, in bytes, of the package")
|
|
78
|
+
time_build: Optional[StrictInt] = Field(default=None, description="Time the package was built in seconds since the epoch")
|
|
79
|
+
time_file: Optional[StrictInt] = Field(default=None, description="The 'file' time attribute in the primary XML - file mtime in seconds since the epoch.")
|
|
80
|
+
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "md5", "sha1", "sha224", "sha256", "sha384", "sha512", "pulp_labels", "vuln_report", "artifact", "name", "epoch", "version", "release", "arch", "pkgId", "checksum_type", "summary", "description", "url", "changelogs", "files", "requires", "provides", "conflicts", "obsoletes", "suggests", "enhances", "recommends", "supplements", "location_base", "location_href", "rpm_buildhost", "rpm_group", "rpm_license", "rpm_packager", "rpm_sourcerpm", "rpm_vendor", "rpm_header_start", "rpm_header_end", "is_modular", "size_archive", "size_installed", "size_package", "time_build", "time_file"]
|
|
81
|
+
|
|
82
|
+
model_config = ConfigDict(
|
|
83
|
+
populate_by_name=True,
|
|
84
|
+
validate_assignment=True,
|
|
85
|
+
protected_namespaces=(),
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def to_str(self) -> str:
|
|
90
|
+
"""Returns the string representation of the model using alias"""
|
|
91
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
92
|
+
|
|
93
|
+
def to_json(self) -> str:
|
|
94
|
+
"""Returns the JSON representation of the model using alias"""
|
|
95
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
96
|
+
return json.dumps(self.to_dict())
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
100
|
+
"""Create an instance of RpmPackageResponse from a JSON string"""
|
|
101
|
+
return cls.from_dict(json.loads(json_str))
|
|
102
|
+
|
|
103
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
104
|
+
"""Return the dictionary representation of the model using alias.
|
|
105
|
+
|
|
106
|
+
This has the following differences from calling pydantic's
|
|
107
|
+
`self.model_dump(by_alias=True)`:
|
|
108
|
+
|
|
109
|
+
* `None` is only added to the output dict for nullable fields that
|
|
110
|
+
were set at model initialization. Other fields with value `None`
|
|
111
|
+
are ignored.
|
|
112
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
113
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
114
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
115
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
116
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
117
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
118
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
119
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
120
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
121
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
122
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
123
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
124
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
125
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
126
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
127
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
128
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
129
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
130
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
131
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
132
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
133
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
134
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
135
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
136
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
137
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
138
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
139
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
140
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
141
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
142
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
143
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
144
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
145
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
146
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
147
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
148
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
149
|
+
"""
|
|
150
|
+
excluded_fields: Set[str] = set([
|
|
151
|
+
"pulp_href",
|
|
152
|
+
"prn",
|
|
153
|
+
"pulp_created",
|
|
154
|
+
"pulp_last_updated",
|
|
155
|
+
"md5",
|
|
156
|
+
"sha1",
|
|
157
|
+
"sha224",
|
|
158
|
+
"sha256",
|
|
159
|
+
"sha384",
|
|
160
|
+
"sha512",
|
|
161
|
+
"vuln_report",
|
|
162
|
+
"name",
|
|
163
|
+
"epoch",
|
|
164
|
+
"version",
|
|
165
|
+
"release",
|
|
166
|
+
"arch",
|
|
167
|
+
"pkg_id",
|
|
168
|
+
"checksum_type",
|
|
169
|
+
"summary",
|
|
170
|
+
"description",
|
|
171
|
+
"url",
|
|
172
|
+
"location_base",
|
|
173
|
+
"location_href",
|
|
174
|
+
"rpm_buildhost",
|
|
175
|
+
"rpm_group",
|
|
176
|
+
"rpm_license",
|
|
177
|
+
"rpm_packager",
|
|
178
|
+
"rpm_sourcerpm",
|
|
179
|
+
"rpm_vendor",
|
|
180
|
+
"rpm_header_start",
|
|
181
|
+
"rpm_header_end",
|
|
182
|
+
"is_modular",
|
|
183
|
+
"size_archive",
|
|
184
|
+
"size_installed",
|
|
185
|
+
"size_package",
|
|
186
|
+
"time_build",
|
|
187
|
+
"time_file",
|
|
188
|
+
])
|
|
189
|
+
|
|
190
|
+
_dict = self.model_dump(
|
|
191
|
+
by_alias=True,
|
|
192
|
+
exclude=excluded_fields,
|
|
193
|
+
exclude_none=True,
|
|
194
|
+
)
|
|
195
|
+
# set to None if changelogs (nullable) is None
|
|
196
|
+
# and model_fields_set contains the field
|
|
197
|
+
if self.changelogs is None and "changelogs" in self.model_fields_set:
|
|
198
|
+
_dict['changelogs'] = None
|
|
199
|
+
|
|
200
|
+
# set to None if files (nullable) is None
|
|
201
|
+
# and model_fields_set contains the field
|
|
202
|
+
if self.files is None and "files" in self.model_fields_set:
|
|
203
|
+
_dict['files'] = None
|
|
204
|
+
|
|
205
|
+
# set to None if requires (nullable) is None
|
|
206
|
+
# and model_fields_set contains the field
|
|
207
|
+
if self.requires is None and "requires" in self.model_fields_set:
|
|
208
|
+
_dict['requires'] = None
|
|
209
|
+
|
|
210
|
+
# set to None if provides (nullable) is None
|
|
211
|
+
# and model_fields_set contains the field
|
|
212
|
+
if self.provides is None and "provides" in self.model_fields_set:
|
|
213
|
+
_dict['provides'] = None
|
|
214
|
+
|
|
215
|
+
# set to None if conflicts (nullable) is None
|
|
216
|
+
# and model_fields_set contains the field
|
|
217
|
+
if self.conflicts is None and "conflicts" in self.model_fields_set:
|
|
218
|
+
_dict['conflicts'] = None
|
|
219
|
+
|
|
220
|
+
# set to None if obsoletes (nullable) is None
|
|
221
|
+
# and model_fields_set contains the field
|
|
222
|
+
if self.obsoletes is None and "obsoletes" in self.model_fields_set:
|
|
223
|
+
_dict['obsoletes'] = None
|
|
224
|
+
|
|
225
|
+
# set to None if suggests (nullable) is None
|
|
226
|
+
# and model_fields_set contains the field
|
|
227
|
+
if self.suggests is None and "suggests" in self.model_fields_set:
|
|
228
|
+
_dict['suggests'] = None
|
|
229
|
+
|
|
230
|
+
# set to None if enhances (nullable) is None
|
|
231
|
+
# and model_fields_set contains the field
|
|
232
|
+
if self.enhances is None and "enhances" in self.model_fields_set:
|
|
233
|
+
_dict['enhances'] = None
|
|
234
|
+
|
|
235
|
+
# set to None if recommends (nullable) is None
|
|
236
|
+
# and model_fields_set contains the field
|
|
237
|
+
if self.recommends is None and "recommends" in self.model_fields_set:
|
|
238
|
+
_dict['recommends'] = None
|
|
239
|
+
|
|
240
|
+
# set to None if supplements (nullable) is None
|
|
241
|
+
# and model_fields_set contains the field
|
|
242
|
+
if self.supplements is None and "supplements" in self.model_fields_set:
|
|
243
|
+
_dict['supplements'] = None
|
|
244
|
+
|
|
245
|
+
return _dict
|
|
246
|
+
|
|
247
|
+
@classmethod
|
|
248
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
249
|
+
"""Create an instance of RpmPackageResponse from a dict"""
|
|
250
|
+
if obj is None:
|
|
251
|
+
return None
|
|
252
|
+
|
|
253
|
+
if not isinstance(obj, dict):
|
|
254
|
+
return cls.model_validate(obj)
|
|
255
|
+
|
|
256
|
+
_obj = cls.model_validate({
|
|
257
|
+
"pulp_href": obj.get("pulp_href"),
|
|
258
|
+
"prn": obj.get("prn"),
|
|
259
|
+
"pulp_created": obj.get("pulp_created"),
|
|
260
|
+
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
261
|
+
"md5": obj.get("md5"),
|
|
262
|
+
"sha1": obj.get("sha1"),
|
|
263
|
+
"sha224": obj.get("sha224"),
|
|
264
|
+
"sha256": obj.get("sha256"),
|
|
265
|
+
"sha384": obj.get("sha384"),
|
|
266
|
+
"sha512": obj.get("sha512"),
|
|
267
|
+
"pulp_labels": obj.get("pulp_labels"),
|
|
268
|
+
"vuln_report": obj.get("vuln_report"),
|
|
269
|
+
"artifact": obj.get("artifact"),
|
|
270
|
+
"name": obj.get("name"),
|
|
271
|
+
"epoch": obj.get("epoch"),
|
|
272
|
+
"version": obj.get("version"),
|
|
273
|
+
"release": obj.get("release"),
|
|
274
|
+
"arch": obj.get("arch"),
|
|
275
|
+
"pkgId": obj.get("pkgId"),
|
|
276
|
+
"checksum_type": obj.get("checksum_type"),
|
|
277
|
+
"summary": obj.get("summary"),
|
|
278
|
+
"description": obj.get("description"),
|
|
279
|
+
"url": obj.get("url"),
|
|
280
|
+
"changelogs": obj.get("changelogs"),
|
|
281
|
+
"files": obj.get("files"),
|
|
282
|
+
"requires": obj.get("requires"),
|
|
283
|
+
"provides": obj.get("provides"),
|
|
284
|
+
"conflicts": obj.get("conflicts"),
|
|
285
|
+
"obsoletes": obj.get("obsoletes"),
|
|
286
|
+
"suggests": obj.get("suggests"),
|
|
287
|
+
"enhances": obj.get("enhances"),
|
|
288
|
+
"recommends": obj.get("recommends"),
|
|
289
|
+
"supplements": obj.get("supplements"),
|
|
290
|
+
"location_base": obj.get("location_base"),
|
|
291
|
+
"location_href": obj.get("location_href"),
|
|
292
|
+
"rpm_buildhost": obj.get("rpm_buildhost"),
|
|
293
|
+
"rpm_group": obj.get("rpm_group"),
|
|
294
|
+
"rpm_license": obj.get("rpm_license"),
|
|
295
|
+
"rpm_packager": obj.get("rpm_packager"),
|
|
296
|
+
"rpm_sourcerpm": obj.get("rpm_sourcerpm"),
|
|
297
|
+
"rpm_vendor": obj.get("rpm_vendor"),
|
|
298
|
+
"rpm_header_start": obj.get("rpm_header_start"),
|
|
299
|
+
"rpm_header_end": obj.get("rpm_header_end"),
|
|
300
|
+
"is_modular": obj.get("is_modular"),
|
|
301
|
+
"size_archive": obj.get("size_archive"),
|
|
302
|
+
"size_installed": obj.get("size_installed"),
|
|
303
|
+
"size_package": obj.get("size_package"),
|
|
304
|
+
"time_build": obj.get("time_build"),
|
|
305
|
+
"time_file": obj.get("time_file")
|
|
306
|
+
})
|
|
307
|
+
return _obj
|
|
308
|
+
|
|
309
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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, StrictStr, field_validator
|
|
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 SetLabel(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for synchronously setting a label.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
key: Annotated[str, Field(min_length=1, strict=True)]
|
|
32
|
+
value: Optional[StrictStr]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["key", "value"]
|
|
34
|
+
|
|
35
|
+
@field_validator('key')
|
|
36
|
+
def key_validate_regular_expression(cls, value):
|
|
37
|
+
"""Validates the regular expression"""
|
|
38
|
+
if not re.match(r"^[-a-zA-Z0-9_]+$", value):
|
|
39
|
+
raise ValueError(r"must validate the regular expression /^[-a-zA-Z0-9_]+$/")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of SetLabel from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# set to None if value (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.value is None and "value" in self.model_fields_set:
|
|
84
|
+
_dict['value'] = None
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of SetLabel from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"key": obj.get("key"),
|
|
99
|
+
"value": obj.get("value")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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, StrictStr, field_validator
|
|
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 SetLabelResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for synchronously setting a label.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
key: Annotated[str, Field(strict=True)]
|
|
32
|
+
value: Optional[StrictStr]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["key", "value"]
|
|
34
|
+
|
|
35
|
+
@field_validator('key')
|
|
36
|
+
def key_validate_regular_expression(cls, value):
|
|
37
|
+
"""Validates the regular expression"""
|
|
38
|
+
if not re.match(r"^[-a-zA-Z0-9_]+$", value):
|
|
39
|
+
raise ValueError(r"must validate the regular expression /^[-a-zA-Z0-9_]+$/")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of SetLabelResponse from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# set to None if value (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.value is None and "value" in self.model_fields_set:
|
|
84
|
+
_dict['value'] = None
|
|
85
|
+
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of SetLabelResponse from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"key": obj.get("key"),
|
|
99
|
+
"value": obj.get("value")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|