def __obtainDockerHostInfo__(endpoint): # Obtain information about docker daemon listening on endpoint info = None try: dk = docker.dockerClient(base_url=endpoint, cert_path=settings.DK_DEFAULT_MASTER_CLIENT_CERTS) info = docker.dockerInfo(dk) except Exception, e: raise errors.ControllerError("Error while connecting with provided docker host. Endpoint: '"+str(endpoint)+"' exception:"+str(e))
def getDockerInfo(dockerClient): ''' Retrieve docker system information ''' try: return docker.dockerInfo(dockerClient) except Exception, e: aux = errors.ControllerError("Unknown error: "+ e.message) return aux.getResponse()
def getDockerInfo(dockerClient): ''' Retrieve docker system information ''' try: return docker.dockerInfo(dockerClient) except Exception, e: aux = errors.ControllerError("Unknown error: " + e.message) return aux.getResponse()
def getDockerInfo(endpoint): ''' Retrieve docker system information ''' try: dk = docker.dockerClient(base_url=endpoint, cert_path=settings.DK_DEFAULT_MASTER_CLIENT_CERTS) return docker.dockerInfo(dk) except Exception, e: aux = errors.ControllerError("Unknown error: "+ e.message) return aux.getResponse()
def __obtainDockerHostInfo__(endpoint): # Obtain information about docker daemon listening on endpoint info = None try: dk = docker.dockerClient( base_url=endpoint, cert_path=settings.DK_DEFAULT_MASTER_CLIENT_CERTS) info = docker.dockerInfo(dk) except Exception, e: raise errors.ControllerError( "Error while connecting with provided docker host. Endpoint: '" + str(endpoint) + "' exception:" + str(e))