-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Description
MarathonClient().scale_group does not support the force parameter. However, the force parameter is supported by the Marathon REST API in a PUT to /v2/groups/
http://mesosphere.github.io/marathon/api-console/index.html
Happy to do the pull request. Here is my suggested fix to marathon.client.MarathonClient
def scale_group(self, group_id, scale_by, force=False):
"""Scale a group by a factor.
:param str group_id: group ID
:param int scale_by: factor to scale by
:param bool force: apply even if a deployment is in progress
:returns: a dict containing the deployment id and version
:rtype: dict
"""
data = {'scaleBy': scale_by}
params = {'force': force}
response = self._do_request(
'PUT', f'/v2/groups/{group_id}', data=json.dumps(data), params=params)
return response.json()
Metadata
Metadata
Assignees
Labels
No labels