allow restart-hosts to work when deploying this change
This commit is contained in:
parent
a86703319c
commit
ce6a88fa2a
2 changed files with 7 additions and 3 deletions
|
|
@ -8417,8 +8417,10 @@ class RootExports(object):
|
|||
def restartHosts(self, priority=5, options=None):
|
||||
context.session.assertPerm('admin')
|
||||
if options is None:
|
||||
options = {}
|
||||
return make_task('restartHosts', [options], priority=priority)
|
||||
args = []
|
||||
else:
|
||||
args = [options]
|
||||
return make_task('restartHosts', args, priority=priority)
|
||||
|
||||
def build(self, src, target, opts=None, priority=None, channel=None):
|
||||
"""Create a build task
|
||||
|
|
|
|||
|
|
@ -531,7 +531,9 @@ class RestartHostsTask(BaseTaskHandler):
|
|||
|
||||
Methods = ['restartHosts']
|
||||
_taskWeight = 0.1
|
||||
def handler(self, options):
|
||||
def handler(self, options=None):
|
||||
if options is None:
|
||||
options = {}
|
||||
# figure out which hosts we're restarting
|
||||
hostquery = {'enabled': True}
|
||||
if 'channel' in options:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue