Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions marathon/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,18 @@ def list_endpoints(self):
"""
return MarathonEndpoint.from_tasks(self.list_tasks())

def create_app(self, app_id, app):
def create_app(self, app_id, app, minimal=True):
"""Create and start an app.

:param str app_id: application ID
:param :class:`marathon.models.app.MarathonApp` app: the application to create
:param bool minimal: ignore nulls and empty collections

:returns: the created app (on success)
:rtype: :class:`marathon.models.app.MarathonApp` or False
"""
app.id = app_id
data = app.to_json()
data = app.to_json(minimal=minimal)
response = self._do_request('POST', '/v2/apps', data=data)
if response.status_code == 201:
return self._parse_response(response, MarathonApp)
Expand Down