Merge "Add systemd stop unit command"
This commit is contained in:
commit
2bb81c93d1
|
@ -116,6 +116,7 @@ SSHShellProcessFixture = _ssh.SSHShellProcessFixture
|
|||
SystemdUnit = _systemctl.SystemdUnit
|
||||
match_unit_state = _systemctl.match_unit_state
|
||||
list_systemd_units = _systemctl.list_systemd_units
|
||||
stop_systemd_unit = _systemctl.stop_systemd_unit
|
||||
wait_for_active_systemd_units = _systemctl.wait_for_active_systemd_units
|
||||
wait_for_systemd_units_state = _systemctl.wait_for_systemd_units_state
|
||||
|
||||
|
|
|
@ -116,6 +116,13 @@ def list_systemd_units(*pattern: str,
|
|||
return units
|
||||
|
||||
|
||||
def stop_systemd_unit(unit,
|
||||
ssh_client: ssh.SSHClientType = None,
|
||||
sudo: bool = None):
|
||||
command = systemctl_command('stop', unit)
|
||||
return _execute.execute(command, ssh_client=ssh_client, sudo=sudo)
|
||||
|
||||
|
||||
def wait_for_active_systemd_units(*pattern: str,
|
||||
state: str = None,
|
||||
type: str = None,
|
||||
|
|
Loading…
Reference in New Issue