mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add a missing call for the service provider
This commit is contained in:
parent
93a930615e
commit
92d712a54b
1 changed files with 17 additions and 4 deletions
|
@ -51,7 +51,7 @@ def init(opts):
|
|||
return False
|
||||
|
||||
|
||||
def ping(opts):
|
||||
def ping():
|
||||
'''
|
||||
Required.
|
||||
Ping the device on the other end of the connection
|
||||
|
@ -113,9 +113,7 @@ def package_install(name, **kwargs):
|
|||
'''
|
||||
cmd = 'pkg_install ' + name
|
||||
if 'version' in kwargs:
|
||||
cmd += '/'+kwargs['version']
|
||||
else:
|
||||
cmd += '/1.0'
|
||||
pkg_install += kwargs['version']
|
||||
|
||||
# Send the command to execute
|
||||
out, err = DETAILS['server'].sendline(cmd)
|
||||
|
@ -137,6 +135,21 @@ def package_remove(name):
|
|||
return parse(out)
|
||||
|
||||
|
||||
def service_list():
|
||||
'''
|
||||
Start a "service" on the ssh server
|
||||
|
||||
.. versionadded:: 2015.8.2
|
||||
'''
|
||||
cmd = 'ps'
|
||||
|
||||
# Send the command to execute
|
||||
out, err = DETAILS['server'].sendline(cmd)
|
||||
|
||||
# "scrape" the output and return the right fields as a dict
|
||||
return parse(out)
|
||||
|
||||
|
||||
def service_start(name):
|
||||
'''
|
||||
Start a "service" on the ssh server
|
||||
|
|
Loading…
Add table
Reference in a new issue