(self)
return status
Returns a string identifier representing the current status of the container.
Returns a string identifier representing the current status of the container.
Returns a string identifier representing the current status of the container .
def status(self):
        """ Returns a string identifier representing the current status of the container. """
        default_status = 'undefined'  # Note: this status should not be displayed at all...
        container = self._get_container(create=False)
        if container is None:
            status = 'not-created'
        else:
            status = {
                constants.CONTAINER_RUNNING: 'running',
                constants.CONTAINER_STOPPED: 'stopped',
            }.get(container.status_code, default_status)
        return status
def status ( self ) : default_status = 'undefined' # Note: this status should not be displayed at all... container = self . _get_container ( create = False ) if container is None : status = 'not-created' else : status = { constants . CONTAINER_RUNNING : 'running' , constants . CONTAINER_STOPPED : 'stopped' , } . get ( container . status_code , default_status ) return status