def run_tsm_command()

in assets/scripts/SilentInstaller.py [0:0]


def run_tsm_command(tsm_path, secrets, args, port=8850, return_tsm_result=False):
    ''' Runs the tsm command to perform setup actions '''
    if port != 8850:
        args.extend(['--server', str.format('https://{}:{}',socket.gethostname(),port)])
    user_and_pass = ['-u', secrets['local_admin_user'], '-p', secrets['local_admin_pass']]
    try:
        return run_command(tsm_path, args + user_and_pass, return_result=return_tsm_result)
    except ExitCodeError as ex:
        print_error('Tabadmin exited with code %d' % ex.exit_code)
        raise ex