Example #1
0
File: pcs.py Project: naemono/pcs
            usage.full_usage()
            sys.exit()
        elif o == "--wait":
            utils.pcs_options[o] = waitsecs

    if len(argv) == 0:
        usage.main()
        sys.exit(1)

    command = argv.pop(0)
    if command == "-h" or command == "help":
        usage.main()
    elif command == "resource":
        resource.resource_cmd(argv)
    elif command == "cluster":
        cluster.cluster_cmd(argv)
    elif command == "stonith":
        stonith.stonith_cmd(argv)
    elif command == "property":
        prop.property_cmd(argv)
    elif command == "constraint":
        constraint.constraint_cmd(argv)
    elif command == "status":
        status.status_cmd(argv)
    elif command == "config":
        if "--help" in utils.pcs_options or "-h" in utils.pcs_options or (len(argv) > 0 and argv[0] == "help"):
            usage.main()
        else:
            cluster.print_config()
    else:
        usage.main()
Example #2
0
File: pcs.py Project: adrianlzt/pcs
            usage.full_usage()
            sys.exit()
        elif o == "--wait":
            utils.pcs_options[o] = waitsecs

    if len(argv) == 0:
        usage.main()
        sys.exit(1)

    command = argv.pop(0)
    if (command == "-h" or command == "help"):
        usage.main()
    elif (command == "resource"):
        resource.resource_cmd(argv)
    elif (command == "cluster"):
        cluster.cluster_cmd(argv)
    elif (command == "stonith"):
        stonith.stonith_cmd(argv)
    elif (command == "property"):
        prop.property_cmd(argv)
    elif (command == "constraint"):
        constraint.constraint_cmd(argv)
    elif (command == "status"):
        status.status_cmd(argv)
    elif (command == "config"):
        cluster.print_config()
    else:
        usage.main()
        sys.exit(1)