Added sudo parameter for getting shell with elevated rights or not

This commit is contained in:
d.anurin 2023-07-12 09:41:17 +03:00 committed by anurindm
parent 917dc6f6d8
commit 59b4157991
2 changed files with 6 additions and 3 deletions

View file

@ -65,9 +65,12 @@ class Host(ABC):
return cli_config
@abstractmethod
def get_shell(self) -> Shell:
def get_shell(self, sudo: bool = True) -> Shell:
"""Returns shell to this host.
Args:
sudo: if True, run all commands in shell with elevated rights
Returns:
Shell that executes commands on this host.
"""