Merge pull request #5278 from robertkeizer/reload-func-alias

Reload func alias
This commit is contained in:
Thomas S Hatch 2013-05-27 22:54:53 -07:00
commit 62be15c68c
8 changed files with 35 additions and 8 deletions

View File

@ -11,6 +11,10 @@ service state via provider interface:
import os
import re
# Function alias to not shadow built-ins.
def __func_alias__ = {
'reload_': 'reload'
}
if os.path.exists('/service'):
SERVICE_DIR = "/service"
@ -66,7 +70,7 @@ def term(name):
#-- states.service compatible
def reload(name):
def reload_(name):
'''
Wrapper for term()

View File

@ -10,6 +10,9 @@ import re
# Import salt libs
from .systemd import _sd_booted
__func_alias__ = {
'reload_': 'reload'
}
def __virtual__():
'''
@ -108,7 +111,7 @@ def restart(name, **kwargs):
return not __salt__['cmd.retcode'](cmd)
def reload(name):
def reload_(name):
'''
Reload the named service

View File

@ -10,6 +10,9 @@ import os
import salt.utils
from salt.exceptions import CommandNotFoundError
__func_alias__ = {
'reload_': 'reload'
}
log = logging.getLogger(__name__)
@ -280,7 +283,7 @@ def restart(name, **kwargs):
return not __salt__['cmd.retcode'](cmd)
def reload(name):
def reload_(name):
'''
Restart the named service

View File

@ -6,6 +6,10 @@ The service module for NetBSD
import os
import glob
__func_alias__ = {
'reload_': 'reload'
}
def __virtual__():
'''
Only work on NetBSD
@ -51,7 +55,7 @@ def restart(name, **kwargs):
return not __salt__['cmd.retcode'](cmd)
def reload(name, **kwargs):
def reload_(name, **kwargs):
'''
Reload the named service

View File

@ -6,6 +6,9 @@ to this basic module
# Import python libs
import os
__func_alias__ = {
'reload_': 'reload'
}
GRAINMAP = {
'Arch': '/etc/rc.d',
@ -106,7 +109,7 @@ def status(name, sig=None):
return __salt__['status.pid'](sig if sig else name)
def reload(name):
def reload_(name):
'''
Restart the specified service

View File

@ -8,6 +8,9 @@ import re
log = logging.getLogger(__name__)
__func_alias__ = {
'reload_': 'reload'
}
LOCAL_CONFIG_PATH = '/etc/systemd/system'
VALID_UNIT_TYPES = ['service', 'socket', 'device', 'mount', 'automount',
@ -212,7 +215,7 @@ def restart(name):
return not __salt__['cmd.retcode'](_systemctl_cmd('restart', name))
def reload(name):
def reload_(name):
'''
Reload the specified service with systemd

View File

@ -50,6 +50,10 @@ import os
# Import Salt libs
import salt.utils
__func_alias__ = {
'reload_': 'reload'
}
# Private
def __virtual__():
'''
@ -280,7 +284,7 @@ def start(app, url='http://localhost:8080/manager', timeout=180):
return _simple_cmd('start', app, url, timeout=timeout)
def reload(app, url='http://localhost:8080/manager', timeout=180):
def reload_(app, url='http://localhost:8080/manager', timeout=180):
'''
Reload the webapp

View File

@ -40,6 +40,9 @@ import os
# Import salt libs
import salt.utils
__func_alias__ = {
'reload_': 'reload'
}
def __virtual__():
'''
@ -297,7 +300,7 @@ def full_restart(name, **kwargs):
return not __salt__['cmd.retcode'](cmd)
def reload(name):
def reload_(name):
'''
Reload the named service