コード例 #1
0
ファイル: docker_application.py プロジェクト: bbferka/docker
def start_application():
    application_container = session['application_container']
    if application_container is None: return
    
    docker_interface.start_user_container(application_container, session['user_container_name'])
    
    return True
コード例 #2
0
ファイル: docker_application.py プロジェクト: asilx/docker
def start_application():
    if not 'application_container' in session: return False
    if not 'user_container_name' in session: return False
    application_container = session['application_container']
    
    docker_interface.start_user_container(application_container, session['user_container_name'], ROS_DISTRIBUTION)
    
    return True
コード例 #3
0
def start_application():
    application_container = session['application_container']
    if application_container is None: return

    docker_interface.start_user_container(application_container,
                                          session['user_container_name'])

    return True
コード例 #4
0
def start_application():
    if not 'application_container' in session: return False
    if not 'user_container_name' in session: return False
    application_container = session['application_container']
    
    docker_interface.start_user_container(application_container, session['user_container_name'])
    
    return True
コード例 #5
0
def start_by_session():
    """
    Starts the container for the currently logged in user.
    """
    if 'user_container_name' not in session:
        return False
    image_name = generate_user_image_name()
    container_name = session['user_container_name']
    docker_interface.start_user_container(image_name, container_name,
                                          ROS_DISTRIBUTION)
コード例 #6
0
ファイル: api.py プロジェクト: daniel86/docker
def start_container(token):
    """
    Starts the container of the user assigned to the given API token. The WebSocket url to the users rosbridge instance
    will be returned on success.
    """
    user = user_by_token(token)
    if user is None:
        return jsonify({'error': 'wrong api token'})
    
    docker_interface.start_user_container('openease/'+ROS_DISTRIBUTION+'-knowrob-daemon', user.username, ROS_DISTRIBUTION)
    host_url = urlparse(request.host_url).hostname
    return jsonify({'result': 'success',
                    'url': '//'+host_url+'/ws/'+user.username+'/'})
コード例 #7
0
ファイル: api.py プロジェクト: bbferka/docker
def start_container(token):
    """
    Starts the container of the user assigned to the given API token. The WebSocket url to the users rosbridge instance
    will be returned on success.
    """
    user = user_by_token(token)
    if user is None:
        return jsonify({'error': 'wrong api token'})

    ros_distro = os.getenv('OPENEASE_DOCKER_ROS_DISTRO', 'hydro')
    docker_interface.start_user_container('knowrob/'+ros_distro+'-knowrob-base', user.username)
    host_url = urlparse(request.host_url).hostname
    return jsonify({'result': 'success',
                    'url': '//'+host_url+'/ws/'+user.username+'/'})
コード例 #8
0
ファイル: api.py プロジェクト: winnerus/docker
def start_container(token):
    """
    Starts the container of the user assigned to the given API token. The WebSocket url to the users rosbridge instance
    will be returned on success.
    """
    user = user_by_token(token)
    if user is None:
        return jsonify({'error': 'wrong api token'})

    docker_interface.start_user_container('knowrob/hydro-knowrob-base',
                                          user.username)
    host_url = urlparse(request.host_url).hostname
    return jsonify({
        'result': 'success',
        'url': '//' + host_url + '/ws/' + user.username + '/'
    })
コード例 #9
0
ファイル: api.py プロジェクト: AbhijitVyas/openease_flask
def start_container(token):
    """
    Starts the container of the user assigned to the given API token. The WebSocket url to the users rosbridge instance
    will be returned on success.
    """
    user = _user_by_token(token)
    if user is None:
        return jsonify({'error': 'wrong api token'})

    docker_interface.start_user_container(_generate_user_image_name(),
                                          user.username, ROS_DISTRIBUTION)
    host_url = urlparse(request.host_url).hostname
    return jsonify({
        'result': 'success',
        'url': '//' + host_url + '/ws/' + user.username + '/'
    })