Exemplo n.º 1
0
def main():
    parser = argparse.ArgumentParser(description='cstar_perf_server', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('--get-credentials', dest='gen_credentials',
                        action='store_true', help='Get and/or create ECDSA key for signing requests.')

    args = parser.parse_args()

    if args.gen_credentials:
        generate_server_keys()
        return

    create_app_config()
    run_server()
Exemplo n.º 2
0
def main():
    parser = argparse.ArgumentParser(
        description='cstar_perf_server',
        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument(
        '--get-credentials',
        dest='gen_credentials',
        action='store_true',
        help='Get and/or create ECDSA key for signing requests.')

    args = parser.parse_args()

    if args.gen_credentials:
        generate_server_keys()
        return

    create_app_config()
    run_server()
Exemplo n.º 3
0
def main():
    parser = argparse.ArgumentParser(description='cstar_perf_server')
    parser.add_argument('--get-credentials', dest='get_credentials',
                        action='store_true', help='Get and/or create ECDSA key for signing requests.')

    args = parser.parse_args()

    if not os.path.exists(SERVER_KEY_PATH):
        get_or_generate_server_keys()
        create_app_config()
        # keys are already printed, return
        if args.get_credentials:
            return

    if args.get_credentials:
        get_or_generate_server_keys()
        return

    run_server()
Exemplo n.º 4
0
def main():
    parser = argparse.ArgumentParser(description='cstar_perf_server')
    parser.add_argument('--get-credentials', dest='get_credentials',
                        action='store_true', help='Get and/or create ECDSA key for signing requests.')

    args = parser.parse_args()

    if not os.path.exists(SERVER_KEY_PATH):
        get_or_generate_server_keys()
        create_app_config()
        # keys are already printed, return
        if args.get_credentials:
            return

    if args.get_credentials:
        get_or_generate_server_keys()
        return

    run_server()