forked from TrueCloudLab/frostfs-testlib
Added sudo parameter for getting shell with elevated rights or not
This commit is contained in:
parent
917dc6f6d8
commit
59b4157991
2 changed files with 6 additions and 3 deletions
|
@ -61,10 +61,10 @@ class ServiceAttributes(ParsedAttributes):
|
|||
class DockerHost(Host):
|
||||
"""Manages services hosted in Docker containers running on a local or remote machine."""
|
||||
|
||||
def get_shell(self) -> Shell:
|
||||
def get_shell(self, sudo: bool = True) -> Shell:
|
||||
host_attributes = HostAttributes.parse(self._config.attributes)
|
||||
command_inspectors = []
|
||||
if host_attributes.sudo_shell:
|
||||
if sudo:
|
||||
command_inspectors.append(SudoInspector())
|
||||
|
||||
if not host_attributes.ssh_login:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue