This commit is contained in:
C. R. Oldham 2015-09-23 18:20:25 -06:00
parent e3ebff9bce
commit 39df44b841
3 changed files with 4 additions and 1 deletions

View file

@ -10,6 +10,7 @@ __virtualname__ = 'rest_sample'
log = logging.getLogger(__file__)
def __virtual__():
log.debug('In RestExample grains virtual-------------------------------')
if 'proxy' not in __opts__:

View file

@ -2518,7 +2518,7 @@ class ProxyMinion(Minion):
if ('{0}.init'.format(fq_proxyname) not in self.opts['proxymodule']
or '{0}.shutdown'.format(fq_proxyname) not in self.opts['proxymodule']):
log.error('Proxymodule {0} is missing an init() or a shutdown() or both.'.format(fq_proxyname));
log.error('Proxymodule {0} is missing an init() or a shutdown() or both.'.format(fq_proxyname))
log.error('Check your proxymodule. Salt-proxy aborted.')
self._running = False
raise SaltSystemExit(code=-1)

View file

@ -104,12 +104,14 @@ def status(name, sig=None):
if resp['comment'] == 'running':
return True
def running(name, sig=None):
'''
Return whether this service is running.
'''
return status(name).get(name, False)
def enabled(name, sig=None):
'''
Only the 'redbull' service is 'enabled' in the test