Пример #1
0
def config_show_cib():
    lib = utils.get_library_wrapper()
    modifiers = utils.get_modifiers()

    print("Resources:")
    utils.pcs_options["--all"] = 1
    utils.pcs_options["--full"] = 1
    resource.resource_show([])

    print()
    print("Stonith Devices:")
    resource.resource_show([], True)
    print("Fencing Levels:")
    levels = stonith.stonith_level_config_to_str(
        lib.fencing_topology.get_config())
    if levels:
        print("\n".join(indent(levels, 2)))

    print()
    constraint.location_show([])
    order_command.show(lib, [], modifiers)
    colocation_command.show(lib, [], modifiers)
    ticket_command.show(lib, [], modifiers)

    print()
    alert.print_alert_config(lib, [], modifiers)

    print()
    del utils.pcs_options["--all"]
    print("Resources Defaults:")
    resource.show_defaults("rsc_defaults", indent=" ")
    print("Operations Defaults:")
    resource.show_defaults("op_defaults", indent=" ")
    print()
    prop.list_property([])
Пример #2
0
def config_show_cib():
    print("Resources:")
    utils.pcs_options["--all"] = 1
    utils.pcs_options["--full"] = 1
    resource.resource_show([])
    print()
    print("Stonith Devices:")
    resource.resource_show([], True)
    print("Fencing Levels:")
    stonith.stonith_level_show()
    print()

    lib = utils.get_library_wrapper()
    constraint.location_show([])
    modificators = utils.get_modificators()
    order_command.show(lib, [], modificators)
    colocation_command.show(lib, [], modificators)
    ticket_command.show(lib, [], modificators)

    print()
    alert.print_alert_config(lib, [], modificators)

    print()
    del utils.pcs_options["--all"]
    print("Resources Defaults:")
    resource.show_defaults("rsc_defaults", indent=" ")
    print("Operations Defaults:")
    resource.show_defaults("op_defaults", indent=" ")
    print()
    prop.list_property([])
Пример #3
0
def config_show_cib(lib):
    """
    Commandline options:
      * -f - CIB file
    """
    print("Resources:")
    # update of pcs_options will change output of constraint show
    utils.pcs_options["--full"] = 1
    # get latest modifiers object after updating pcs_options
    modifiers = utils.get_input_modifiers()
    resource.resource_config(lib, [], modifiers.get_subset("-f"))

    print()
    print("Stonith Devices:")
    resource.resource_config(
        lib,
        [],
        modifiers.get_subset("-f"),
        stonith=True,
    )
    print("Fencing Levels:")
    levels = stonith.stonith_level_config_to_str(
        lib.fencing_topology.get_config())
    if levels:
        print("\n".join(indent(levels, 2)))

    print()
    constraint.location_show(lib, [], modifiers.get_subset("-f", "--full"))
    order_command.show(lib, [], modifiers.get_subset("-f", "--full"))
    colocation_command.show(lib, [], modifiers.get_subset("-f", "--full"))
    ticket_command.show(lib, [], modifiers.get_subset("-f", "--full"))

    print()
    alert.print_alert_config(lib, [], modifiers.get_subset("-f"))

    print()
    print("Resources Defaults:")
    resource.show_defaults("rsc_defaults", indent=" ")
    print("Operations Defaults:")
    resource.show_defaults("op_defaults", indent=" ")
    print()
    prop.list_property(lib, [],
                       modifiers.get_subset("--defaults", "--all", "-f"))
Пример #4
0
def config_show_cib():
    print("Resources:")
    utils.pcs_options["--all"] = 1
    utils.pcs_options["--full"] = 1
    resource.resource_show([])
    print()
    print("Stonith Devices:")
    resource.resource_show([], True)
    print("Fencing Levels:")
    print()
    stonith.stonith_level_show()
    constraint.location_show([])
    constraint.order_show([])
    constraint.colocation_show([])
    print()
    del utils.pcs_options["--all"]
    print("Resources Defaults:")
    resource.show_defaults("rsc_defaults", indent=" ")
    print("Operations Defaults:")
    resource.show_defaults("op_defaults", indent=" ")
    print()
    prop.list_property([])