From c29e210e0d990174e89ec4de611aa75ec03274f3 Mon Sep 17 00:00:00 2001 From: Greg Hill Date: Wed, 15 Jun 2016 14:56:38 -0500 Subject: [PATCH] Add 'persistent' volume option This is required for supporting persistent local volumes: https://mesosphere.github.io/marathon/docs/persistent-volumes.html --- marathon/models/container.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/marathon/models/container.py b/marathon/models/container.py index efa586a..b11cf98 100644 --- a/marathon/models/container.py +++ b/marathon/models/container.py @@ -104,13 +104,15 @@ class MarathonContainerVolume(MarathonObject): :param str container_path: container path :param str host_path: host path :param str mode: one of ['RO', 'RW'] + :param object persistent: persistent volume options, should be of the form {'size': 1000} """ MODES = ['RO', 'RW'] - def __init__(self, container_path=None, host_path=None, mode='RW'): + def __init__(self, container_path=None, host_path=None, mode='RW', persistent=None): self.container_path = container_path self.host_path = host_path if mode not in self.MODES: raise InvalidChoiceError('mode', mode, self.MODES) self.mode = mode + self.persistent = persistent