MCPcopy Create free account
hub / github.com/ceph/ceph / BaseRedfishSystem

Class BaseRedfishSystem

src/ceph-node-proxy/ceph_node_proxy/baseredfishsystem.py:18–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class BaseRedfishSystem(BaseSystem):
19 NETWORK_FIELDS: List[str] = ["Description", "Name", "SpeedMbps", "Status"]
20 PROCESSORS_FIELDS: List[str] = [
21 "Description",
22 "TotalCores",
23 "TotalThreads",
24 "ProcessorType",
25 "Model",
26 "Status",
27 "Manufacturer",
28 ]
29 MEMORY_FIELDS: List[str] = [
30 "Description",
31 "MemoryDeviceType",
32 "CapacityMiB",
33 "Status",
34 ]
35 POWER_FIELDS: List[str] = ["Name", "Model", "Manufacturer", "Status"]
36 FANS_FIELDS: List[str] = ["Name", "PhysicalContext", "Status"]
37 FIRMWARES_FIELDS: List[str] = [
38 "Name",
39 "Description",
40 "ReleaseDate",
41 "Version",
42 "Updateable",
43 "Status",
44 ]
45
46 COMPONENT_SPECS: Dict[str, List[ComponentUpdateSpec]] = {
47 "network": [
48 ComponentUpdateSpec("systems", "EthernetInterfaces", NETWORK_FIELDS, None),
49 ComponentUpdateSpec("systems", "NetworkInterfaces", NETWORK_FIELDS, None),
50 ],
51 "processors": [
52 ComponentUpdateSpec("systems", "Processors", PROCESSORS_FIELDS, None),
53 ],
54 "memory": [
55 ComponentUpdateSpec("systems", "Memory", MEMORY_FIELDS, None),
56 ],
57 # Power supplies: Chassis/.../PowerSubsystem/PowerSupplies (not like other components: like Systems/.../Memory)
58 "power": [
59 ComponentUpdateSpec(
60 "chassis", "PowerSubsystem/PowerSupplies", POWER_FIELDS, None
61 ),
62 ],
63 "fans": [
64 ComponentUpdateSpec("chassis", "Thermal", FANS_FIELDS, "Fans"),
65 ],
66 "firmwares": [
67 ComponentUpdateSpec(
68 "update_service", "FirmwareInventory", FIRMWARES_FIELDS, None
69 ),
70 ],
71 }
72
73 def __init__(self, **kw: Any) -> None:
74 super().__init__(**kw)
75 self.log = get_logger(__name__)

Callers 2

systemFunction · 0.90

Calls 1

ComponentUpdateSpecClass · 0.90

Tested by 2

systemFunction · 0.72