示例#1
0
def run_manager(label=None, tag=None):
    start = time.time()
    label = label or []
    args = ['--mount']
    if tag:
        args += ['--tag', tag]
    for l in label:
        args += ['--label', l]
    with tempfile.NamedTemporaryFile() as f:
        args += ['--details-path', f.name]
        _docl.run(*args)
        with open(f.name) as f2:
            container_details = yaml.safe_load(f2)
    _set_container_id_and_ip(container_details)
    utils.update_profile_context()
    _wait_for_services()
    logger.info('Container start took {0} seconds'.format(time.time() - start))
    return container_details
示例#2
0
def run_manager(label=None, tag=None):
    start = time.time()
    label = label or []
    args = ['--mount']
    if tag:
        args += ['--tag', tag]
    for l in label:
        args += ['--label', l]
    with tempfile.NamedTemporaryFile() as f:
        args += ['--details-path', f.name]
        _docl.run(*args)
        with open(f.name) as f2:
            container_details = yaml.safe_load(f2)
    _set_container_id_and_ip(container_details)
    utils.update_profile_context()
    upload_mock_license()
    _wait_for_services()
    logger.info(
        'Container start took {0} seconds'.format(time.time() - start))
    return container_details
示例#3
0
 def on_manager_created(self):
     utils.update_profile_context()
     self.start_events_printer()