forked from TrueCloudLab/frostfs-testlib
[#104] Add mask/unmask for services
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
f4111a1374
commit
8a360683ae
5 changed files with 45 additions and 69 deletions
|
@ -57,6 +57,9 @@ class NodeBase(HumanReadableABC):
|
|||
return self._process_name
|
||||
|
||||
def start_service(self):
|
||||
with reporter.step(f"Unmask {self.name} service on {self.host.config.address}"):
|
||||
self.host.unmask_service(self.name)
|
||||
|
||||
with reporter.step(f"Start {self.name} service on {self.host.config.address}"):
|
||||
self.host.start_service(self.name)
|
||||
|
||||
|
@ -67,7 +70,11 @@ class NodeBase(HumanReadableABC):
|
|||
def get_metrics_endpoint(self) -> str:
|
||||
return self._get_attribute(ConfigAttributes.ENDPOINT_PROMETHEUS)
|
||||
|
||||
def stop_service(self):
|
||||
def stop_service(self, mask: bool = True):
|
||||
if mask:
|
||||
with reporter.step(f"Mask {self.name} service on {self.host.config.address}"):
|
||||
self.host.mask_service(self.name)
|
||||
|
||||
with reporter.step(f"Stop {self.name} service on {self.host.config.address}"):
|
||||
self.host.stop_service(self.name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue