Ejemplo n.º 1
0
def main(params, cmd_flags=None):
    global server

    args = paiv_cli_utils.get_valid_input(usage_stmt, operation_map, id="--dsid", argv=params, cmd_flags=cmd_flags)
    if args is not None:
        server = paiv.connect_to_server(paiv_cli_utils.host_name, paiv_cli_utils.token)
        args.operation(args.op_params)
Ejemplo n.º 2
0
def main(params):
    global server

    args = get_valid_input(params)
    if args is not None:
        paiv_cli_utils.show_httpdetail = args.httpdetail
        server = paiv.connect_to_server()

        globals()[args.cmd.replace("-", "_")](args)
Ejemplo n.º 3
0
def main(params, cmd_flags=None):
    global server

    args = paiv_cli_utils.get_valid_input(usage_stmt, operation_map, argv=params, cmd_flags=cmd_flags)
    if args is not None:
        # When requesting a token, we need to ignore any existing token info
        if args.cmd_params["<operation>"] == "token":
            paiv_cli_utils.token = ""
        server = paiv.connect_to_server(paiv_cli_utils.host_name, paiv_cli_utils.token)
        args.operation(args.op_params)