forked from TrueCloudLab/frostfs-testlib
[#130] Add service healthcheck and allow to skip version check for some binaries
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
d1ba7eb661
commit
c17f0f6173
5 changed files with 69 additions and 24 deletions
|
@ -116,8 +116,24 @@ class ClusterNode:
|
|||
self.host,
|
||||
)
|
||||
|
||||
def get_list_of_services(self) -> list[str]:
|
||||
return [config.attributes[ConfigAttributes.SERVICE_NAME] for config in self.host.config.services]
|
||||
@property
|
||||
def services(self) -> list[NodeBase]:
|
||||
svcs: list[NodeBase] = []
|
||||
svcs_names_on_node = [svc.name for svc in self.host.config.services]
|
||||
for entry in self.class_registry._class_mapping.values():
|
||||
hosting_svc_name = entry["hosting_service_name"]
|
||||
pattern = f"{hosting_svc_name}{self.id:02}"
|
||||
if pattern in svcs_names_on_node:
|
||||
config = self.host.get_service_config(pattern)
|
||||
svcs.append(
|
||||
entry["cls"](
|
||||
self.id,
|
||||
config.name,
|
||||
self.host,
|
||||
)
|
||||
)
|
||||
|
||||
return svcs
|
||||
|
||||
def get_all_interfaces(self) -> dict[str, str]:
|
||||
return self.host.config.interfaces
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue