forked from TrueCloudLab/frostfs-testlib
[#9] Implement hosting package
Package defines interface for host management and provides implementation for docker host (local or remote). Other hosts can be added via plugins. Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
This commit is contained in:
parent
834ddede36
commit
a750dfd148
15 changed files with 582 additions and 19 deletions
13
src/neofs_testlib/shell/command_inspectors.py
Normal file
13
src/neofs_testlib/shell/command_inspectors.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from neofs_testlib.shell.interfaces import CommandInspector
|
||||
|
||||
|
||||
class SudoInspector(CommandInspector):
|
||||
"""Prepends command with sudo.
|
||||
|
||||
If command is already prepended with sudo, then has no effect.
|
||||
"""
|
||||
|
||||
def inspect(self, command: str) -> str:
|
||||
if not command.startswith("sudo"):
|
||||
return f"sudo {command}"
|
||||
return command
|
Loading…
Add table
Add a link
Reference in a new issue