Add systemd 'start unit' method
This patch adds 'start systemd unit' method for the tobiko systemd module. Change-Id: Icd537120c13438ee1134e40ba89d40d1d5bc430e
This commit is contained in:
parent
89b6198fc5
commit
9076a69eb4
|
@ -117,6 +117,7 @@ SystemdUnit = _systemctl.SystemdUnit
|
|||
match_unit_state = _systemctl.match_unit_state
|
||||
list_systemd_units = _systemctl.list_systemd_units
|
||||
stop_systemd_unit = _systemctl.stop_systemd_unit
|
||||
start_systemd_unit = _systemctl.start_systemd_unit
|
||||
wait_for_active_systemd_units = _systemctl.wait_for_active_systemd_units
|
||||
wait_for_systemd_units_state = _systemctl.wait_for_systemd_units_state
|
||||
|
||||
|
|
|
@ -123,6 +123,13 @@ def stop_systemd_unit(unit,
|
|||
return _execute.execute(command, ssh_client=ssh_client, sudo=sudo)
|
||||
|
||||
|
||||
def start_systemd_unit(unit,
|
||||
ssh_client: ssh.SSHClientType = None,
|
||||
sudo: bool = None):
|
||||
command = systemctl_command('start', 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