redfish-python-sdk 1.0.0__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.
- redfish_python_sdk-1.0.0.dist-info/METADATA +164 -0
- redfish_python_sdk-1.0.0.dist-info/RECORD +56 -0
- redfish_python_sdk-1.0.0.dist-info/WHEEL +5 -0
- redfish_python_sdk-1.0.0.dist-info/licenses/LICENSE +29 -0
- redfish_python_sdk-1.0.0.dist-info/top_level.txt +1 -0
- redfish_sdk/__init__.py +63 -0
- redfish_sdk/client.py +1894 -0
- redfish_sdk/exceptions.py +56 -0
- redfish_sdk/http_client.py +452 -0
- redfish_sdk/managers/__init__.py +21 -0
- redfish_sdk/managers/_log_helpers.py +144 -0
- redfish_sdk/managers/account.py +96 -0
- redfish_sdk/managers/chassis.py +327 -0
- redfish_sdk/managers/event.py +264 -0
- redfish_sdk/managers/managers.py +120 -0
- redfish_sdk/managers/registries.py +48 -0
- redfish_sdk/managers/session.py +130 -0
- redfish_sdk/managers/systems.py +630 -0
- redfish_sdk/managers/task.py +89 -0
- redfish_sdk/managers/update.py +99 -0
- redfish_sdk/managers/update_strategies/__init__.py +51 -0
- redfish_sdk/managers/update_strategies/base.py +101 -0
- redfish_sdk/managers/update_strategies/h3c.py +140 -0
- redfish_sdk/managers/update_strategies/inspur.py +89 -0
- redfish_sdk/managers/update_strategies/lenovo.py +59 -0
- redfish_sdk/managers/update_strategies/nettrix.py +56 -0
- redfish_sdk/managers/update_strategies/registry.py +72 -0
- redfish_sdk/managers/update_strategies/vendor_detect.py +111 -0
- redfish_sdk/managers/update_strategies/xfusion.py +60 -0
- redfish_sdk/managers/update_strategies/zte.py +68 -0
- redfish_sdk/models/__init__.py +55 -0
- redfish_sdk/models/account.py +60 -0
- redfish_sdk/models/chassis.py +86 -0
- redfish_sdk/models/check.py +231 -0
- redfish_sdk/models/common.py +102 -0
- redfish_sdk/models/drive.py +53 -0
- redfish_sdk/models/event.py +64 -0
- redfish_sdk/models/fru.py +59 -0
- redfish_sdk/models/gpu.py +33 -0
- redfish_sdk/models/logs.py +56 -0
- redfish_sdk/models/managers.py +153 -0
- redfish_sdk/models/memory.py +50 -0
- redfish_sdk/models/network_adapter.py +76 -0
- redfish_sdk/models/oem.py +173 -0
- redfish_sdk/models/pcie_device.py +89 -0
- redfish_sdk/models/power.py +92 -0
- redfish_sdk/models/processor.py +50 -0
- redfish_sdk/models/registry.py +34 -0
- redfish_sdk/models/resource_key.py +70 -0
- redfish_sdk/models/root.py +50 -0
- redfish_sdk/models/session.py +42 -0
- redfish_sdk/models/storage.py +77 -0
- redfish_sdk/models/systems.py +194 -0
- redfish_sdk/models/task.py +54 -0
- redfish_sdk/models/thermal.py +111 -0
- redfish_sdk/models/update.py +55 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Thermal component models (Fan, Temperature, Redundancy).
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
|
|
9
|
+
from pydantic import BaseModel, ConfigDict
|
|
10
|
+
|
|
11
|
+
from .check import Field
|
|
12
|
+
from .common import Entity, Link, Status
|
|
13
|
+
from .oem import Oem
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Fan(Entity):
|
|
17
|
+
"""
|
|
18
|
+
Represents a cooling fan sensor reading.
|
|
19
|
+
Embedded in Thermal resource.
|
|
20
|
+
"""
|
|
21
|
+
lower_threshold_critical: Optional[int] = Field(None, alias="LowerThresholdCritical")
|
|
22
|
+
lower_threshold_fatal: Optional[int] = Field(None, alias="LowerThresholdFatal")
|
|
23
|
+
lower_threshold_non_critical: Optional[int] = Field(None, alias="LowerThresholdNonCritical")
|
|
24
|
+
max_reading_range: Optional[int] = Field(None, alias="MaxReadingRange", validate="type=int,ge=0")
|
|
25
|
+
member_id: Optional[str] = Field(None, alias="MemberId")
|
|
26
|
+
min_reading_range: Optional[int] = Field(None, alias="MinReadingRange", validate="type=int,ge=0")
|
|
27
|
+
physical_context: Optional[str] = Field(None, alias="PhysicalContext")
|
|
28
|
+
reading: Optional[int] = Field(None, alias="Reading", validate="type=int,ge=0")
|
|
29
|
+
reading_units: Optional[str] = Field(None, alias="ReadingUnits", validate="type=str")
|
|
30
|
+
related_item: Optional[List[Link]] = Field(None, alias="RelatedItem")
|
|
31
|
+
redundancy: Optional[List[Link]] = Field(None, alias="Redundancy")
|
|
32
|
+
status: Optional[Status] = Field(None, alias="Status", validate="status")
|
|
33
|
+
upper_threshold_critical: Optional[int] = Field(None, alias="UpperThresholdCritical")
|
|
34
|
+
upper_threshold_fatal: Optional[int] = Field(None, alias="UpperThresholdFatal")
|
|
35
|
+
upper_threshold_non_critical: Optional[int] = Field(None, alias="UpperThresholdNonCritical")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Temperature(Entity):
|
|
39
|
+
"""
|
|
40
|
+
Represents a temperature sensor reading.
|
|
41
|
+
Embedded in Thermal resource.
|
|
42
|
+
"""
|
|
43
|
+
max_reading_range_temp: Optional[int] = Field(None, alias="MaxReadingRangeTemp")
|
|
44
|
+
member_id: Optional[str] = Field(None, alias="MemberId")
|
|
45
|
+
min_reading_range_temp: Optional[int] = Field(None, alias="MinReadingRangeTemp")
|
|
46
|
+
physical_context: Optional[str] = Field(None, alias="PhysicalContext", validate="type=str")
|
|
47
|
+
reading_celsius: Optional[float] = Field(None, alias="ReadingCelsius", validate="type=float")
|
|
48
|
+
sensor_number: Optional[int] = Field(None, alias="SensorNumber")
|
|
49
|
+
related_item: Optional[List[Link]] = Field(None, alias="RelatedItem")
|
|
50
|
+
status: Optional[Status] = Field(None, alias="Status", validate="status")
|
|
51
|
+
upper_threshold_critical: Optional[int] = Field(None, alias="UpperThresholdCritical")
|
|
52
|
+
upper_threshold_fatal: Optional[int] = Field(None, alias="UpperThresholdFatal")
|
|
53
|
+
upper_threshold_non_critical: Optional[int] = Field(None, alias="UpperThresholdNonCritical")
|
|
54
|
+
lower_threshold_critical: Optional[int] = Field(None, alias="LowerThresholdCritical")
|
|
55
|
+
lower_threshold_fatal: Optional[int] = Field(None, alias="LowerThresholdFatal")
|
|
56
|
+
lower_threshold_non_critical: Optional[int] = Field(None, alias="LowerThresholdNonCritical")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class Redundancy(BaseModel):
|
|
60
|
+
"""Redundancy configuration info."""
|
|
61
|
+
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
62
|
+
|
|
63
|
+
member_id: Optional[str] = Field(None, alias="MemberId")
|
|
64
|
+
mode: Optional[str] = Field(None, alias="Mode")
|
|
65
|
+
name: Optional[str] = Field(None, alias="Name")
|
|
66
|
+
status: Optional[Status] = Field(None, alias="Status")
|
|
67
|
+
redundancy_set: Optional[List[Link]] = Field(None, alias="RedundancySet")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class HistoricalInletTempEntry(BaseModel):
|
|
71
|
+
"""
|
|
72
|
+
A single historical inlet temperature sample.
|
|
73
|
+
Embedded in InletHistoryTemperature.HistoricalInletTemp.
|
|
74
|
+
|
|
75
|
+
Note: BMC returns ``avg`` / ``max`` / ``min`` / ``time`` as lower-case keys,
|
|
76
|
+
while ``Description`` follows PascalCase. Aliases preserve the original
|
|
77
|
+
casing for round-trip fidelity.
|
|
78
|
+
"""
|
|
79
|
+
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
80
|
+
|
|
81
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
82
|
+
avg: Optional[float] = Field(None, alias="avg", validate="type=float")
|
|
83
|
+
max: Optional[float] = Field(None, alias="max", validate="type=float")
|
|
84
|
+
min: Optional[float] = Field(None, alias="min", validate="type=float")
|
|
85
|
+
time: Optional[str] = Field(None, alias="time")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class InletHistoryTemperature(Entity):
|
|
89
|
+
"""
|
|
90
|
+
Air inlet historical temperature samples for a chassis.
|
|
91
|
+
Endpoint: /redfish/v1/Chassis/{chassisId}/Thermal/InletHistoryTemperature
|
|
92
|
+
|
|
93
|
+
Vendor-specific sub-resource (e.g., 华为 / xFusion iBMC) referenced from
|
|
94
|
+
the Thermal resource via the ``InletHistoryTemperature`` odata link.
|
|
95
|
+
"""
|
|
96
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
97
|
+
historical_inlet_temp: Optional[List[HistoricalInletTempEntry]] = Field(
|
|
98
|
+
None, alias="HistoricalInletTemp"
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class Thermal(Entity):
|
|
103
|
+
"""
|
|
104
|
+
Thermal data (fans and temperatures) for a chassis.
|
|
105
|
+
Endpoint: /redfish/v1/Chassis/{chassisId}/Thermal
|
|
106
|
+
"""
|
|
107
|
+
fans: Optional[List[Fan]] = Field(None, alias="Fans")
|
|
108
|
+
temperatures: Optional[List[Temperature]] = Field(None, alias="Temperatures")
|
|
109
|
+
redundancy: Optional[List[Redundancy]] = Field(None, alias="Redundancy")
|
|
110
|
+
inlet_history_temperature: Optional[Link] = Field(None, alias="InletHistoryTemperature")
|
|
111
|
+
oem: Optional[Oem] = Field(None, alias="Oem")
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Update service models.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
|
|
9
|
+
from pydantic import Field
|
|
10
|
+
|
|
11
|
+
from .common import Entity, Link, Status
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class UpdateService(Entity):
|
|
15
|
+
"""
|
|
16
|
+
The Update service provides firmware update capabilities.
|
|
17
|
+
Endpoint: /redfish/v1/UpdateService
|
|
18
|
+
"""
|
|
19
|
+
firmware_inventory: Optional[Link] = Field(None, alias="FirmwareInventory")
|
|
20
|
+
software_inventory: Optional[Link] = Field(None, alias="SoftwareInventory")
|
|
21
|
+
client_certificates: Optional[Link] = Field(None, alias="ClientCertificates")
|
|
22
|
+
http_push_uri: Optional[str] = Field(None, alias="HttpPushUri")
|
|
23
|
+
multi_part_http_push_uri: Optional[str] = Field(None, alias="MultiPartHttpPushUri")
|
|
24
|
+
service_enabled: Optional[bool] = Field(None, alias="ServiceEnabled")
|
|
25
|
+
status: Optional[Status] = Field(None, alias="Status")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class FirmwareInventory(Entity):
|
|
29
|
+
"""
|
|
30
|
+
Represents a firmware component in the inventory.
|
|
31
|
+
Endpoint: /redfish/v1/UpdateService/FirmwareInventory/{inventoryId}
|
|
32
|
+
|
|
33
|
+
"""
|
|
34
|
+
description: Optional[str] = Field(None, alias="Description")
|
|
35
|
+
lowest_supported_version: Optional[str] = Field(None, alias="LowestSupportedVersion")
|
|
36
|
+
manufacturer: Optional[str] = Field(None, alias="Manufacturer")
|
|
37
|
+
related_item: Optional[List[Link]] = Field(None, alias="RelatedItem")
|
|
38
|
+
release_date: Optional[str] = Field(None, alias="ReleaseDate")
|
|
39
|
+
software_id: Optional[str] = Field(None, alias="SoftwareId")
|
|
40
|
+
status: Optional[Status] = Field(None, alias="Status")
|
|
41
|
+
updateable: Optional[bool] = Field(None, alias="Updateable")
|
|
42
|
+
version: Optional[str] = Field(None, alias="Version")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class ClientCertificate(Entity):
|
|
46
|
+
"""
|
|
47
|
+
Represents a client certificate for firmware update authentication.
|
|
48
|
+
Endpoint: /redfish/v1/UpdateService/ClientCertificates/{certId}
|
|
49
|
+
"""
|
|
50
|
+
certificate_string: Optional[str] = Field(None, alias="CertificateString")
|
|
51
|
+
certificate_type: Optional[str] = Field(None, alias="CertificateType")
|
|
52
|
+
issuer: Optional[dict] = Field(None, alias="Issuer")
|
|
53
|
+
subject: Optional[dict] = Field(None, alias="Subject")
|
|
54
|
+
valid_not_after: Optional[str] = Field(None, alias="ValidNotAfter")
|
|
55
|
+
valid_not_before: Optional[str] = Field(None, alias="ValidNotBefore")
|