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
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
def on_manager_created(self): utils.update_profile_context() self.start_events_printer()