1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
import socket
from threading import Lock
from ceph_node_proxy.util import Config, get_logger, BaseThread
from typing import Dict, Any
from ceph_node_proxy.baseclient import BaseClient
class BaseSystem(BaseThread):
def __init__(self, **kw: Any) -> None:
super().__init__()
self.lock: Lock = Lock()
self._system: Dict = {}
self.config: Config = kw.get('config', {})
self.client: BaseClient
self.log = get_logger(__name__)
def main(self) -> None:
raise NotImplementedError()
def get_system(self) -> Dict[str, Any]:
raise NotImplementedError()
def get_status(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_metadata(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_processors(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_memory(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_fans(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_power(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_network(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_storage(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_firmwares(self) -> Dict[str, Dict[str, Dict]]:
raise NotImplementedError()
def get_sn(self) -> str:
raise NotImplementedError()
def get_led(self) -> Dict[str, Any]:
raise NotImplementedError()
def set_led(self, data: Dict[str, str]) -> int:
raise NotImplementedError()
def get_chassis_led(self) -> Dict[str, Any]:
raise NotImplementedError()
def set_chassis_led(self, data: Dict[str, str]) -> int:
raise NotImplementedError()
def device_led_on(self, device: str) -> int:
raise NotImplementedError()
def device_led_off(self, device: str) -> int:
raise NotImplementedError()
def get_device_led(self, device: str) -> Dict[str, Any]:
raise NotImplementedError()
def set_device_led(self, device: str, data: Dict[str, bool]) -> int:
raise NotImplementedError()
def chassis_led_on(self) -> int:
raise NotImplementedError()
def chassis_led_off(self) -> int:
raise NotImplementedError()
def get_host(self) -> str:
return socket.gethostname()
def stop_update_loop(self) -> None:
raise NotImplementedError()
def flush(self) -> None:
raise NotImplementedError()
def shutdown_host(self, force: bool = False) -> int:
raise NotImplementedError()
def powercycle(self) -> int:
raise NotImplementedError()
|