diff --git a/dcos/marathon.py b/dcos/marathon.py index 18946aa..9d035f5 100644 --- a/dcos/marathon.py +++ b/dcos/marathon.py @@ -1,4 +1,5 @@ import json +from distutils.version import LooseVersion from dcos import http, util from dcos.errors import DCOSException, DefaultError, Error @@ -69,6 +70,12 @@ class Client(object): self._host = host self._port = port + version = LooseVersion(self.get_about()["version"]) + if version < LooseVersion("0.8.0"): + msg = ("The configured Marathon with version {} is outdated. " + + "Please use version 0.8.0 or later.").format(version) + raise DCOSException(msg) + def _create_url(self, path): """Creates the url from the provided path.