Merge pull request #161 from mesosphere/version
dcos-568 verify that Marathon 0.8.0 or later is installed
This commit is contained in:
		@@ -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.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user