mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #5278 from robertkeizer/reload-func-alias
Reload func alias
This commit is contained in:
commit
62be15c68c
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user