Example #1
0
File: prop.py Project: ckesselh/pcs
def unset_property(argv):
    if len(argv) < 1:
        usage.property()
        sys.exit(1)

    for arg in argv:
        utils.set_cib_property(arg, "")
Example #2
0
File: prop.py Project: jnpkrn/pcs
def unset_property(argv):
    if len(argv) < 1:
        usage.property()
        sys.exit(1)

    for arg in argv:
        utils.set_cib_property(arg, "")
Example #3
0
File: prop.py Project: tradej/pcs
def unset_property(argv):
    if len(argv) < 1:
        usage.property()
        sys.exit(1)

    if "--node" in utils.pcs_options:
        for arg in argv:
            utils.set_node_attribute(arg, "",utils.pcs_options["--node"])
    else:
        for arg in argv:
            utils.set_cib_property(arg, "")
Example #4
0
def unset_property(argv):
    if len(argv) < 1:
        usage.property()
        sys.exit(1)

    if "--node" in utils.pcs_options:
        for arg in argv:
            utils.set_node_attribute(arg, "",utils.pcs_options["--node"])
    else:
        cib_dom = utils.get_cib_dom()
        for arg in argv:
            utils.set_cib_property(arg, "", cib_dom)
        utils.replace_cib_configuration(cib_dom)
Example #5
0
def property_cmd(argv):
    if len(argv) == 0:
        argv = ["list"]

    sub_cmd = argv.pop(0)
    if (sub_cmd == "help"):
        usage.property()
    elif (sub_cmd == "set"):
        set_property(argv)
    elif (sub_cmd == "list" or sub_cmd == "show"):
        list_property(argv)
    else:
        usage.property()
        sys.exit(1)
Example #6
0
File: prop.py Project: tradej/pcs
def property_cmd(argv):
    if len(argv) == 0:
        argv = ["list"]

    sub_cmd = argv.pop(0)
    if (sub_cmd == "help"):
        usage.property(argv)
    elif (sub_cmd == "set"):
        set_property(argv)
    elif (sub_cmd == "unset"):
        unset_property(argv)
    elif (sub_cmd == "list" or sub_cmd == "show"):
        list_property(argv)
    else:
        usage.property()
        sys.exit(1)
Example #7
0
def property_cmd(argv):
    if len(argv) == 0:
        argv = ["list"]

    sub_cmd = argv.pop(0)
    if sub_cmd == "help":
        usage.property(argv)
    elif sub_cmd == "set":
        set_property(argv)
    elif sub_cmd == "unset":
        unset_property(argv)
    elif sub_cmd == "list" or sub_cmd == "show":
        list_property(argv)
    elif sub_cmd == "get_cluster_properties_definition":
        print(json.dumps(utils.get_cluster_properties_definition()))
    else:
        usage.property()
        sys.exit(1)
Example #8
0
def property_cmd(argv):
    if len(argv) == 0:
        usage.property()
        exit(1)

    sub_cmd = argv.pop(0)
    if sub_cmd == "help":
        usage.property()
    elif sub_cmd == "set":
        set_property(argv)
    elif sub_cmd == "list":
        list_property(argv)
    else:
        usage.property()
        sys.exit(1)