Esempio n. 1
0
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))
Esempio n. 2
0
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()
Esempio n. 3
0
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()
Esempio n. 5
0
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))