forked from TrueCloudLab/frostfs-testlib
[#103] Add host_status method to Host
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
b1a3d740e9
commit
f4111a1374
4 changed files with 33 additions and 4 deletions
|
@ -4,6 +4,13 @@ from typing import Optional
|
|||
|
||||
from frostfs_testlib.hosting.config import CLIConfig, HostConfig, ServiceConfig
|
||||
from frostfs_testlib.shell.interfaces import Shell
|
||||
from frostfs_testlib.testing.readable import HumanReadableEnum
|
||||
|
||||
|
||||
class HostStatus(HumanReadableEnum):
|
||||
ONLINE = "Online"
|
||||
OFFLINE = "Offline"
|
||||
UNKNOWN = "Unknown"
|
||||
|
||||
|
||||
class DiskInfo(dict):
|
||||
|
@ -79,6 +86,10 @@ class Host(ABC):
|
|||
def start_host(self) -> None:
|
||||
"""Starts the host machine."""
|
||||
|
||||
@abstractmethod
|
||||
def get_host_status(self) -> HostStatus:
|
||||
"""Check host status."""
|
||||
|
||||
@abstractmethod
|
||||
def stop_host(self, mode: str) -> None:
|
||||
"""Stops the host machine.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue