def list_property(argv): print_all = len(argv) == 0 if "--all" in utils.pcs_options and "--defaults" in utils.pcs_options: utils.err("you cannot specify both --all and --defaults") if "--all" in utils.pcs_options or "--defaults" in utils.pcs_options: if len(argv) != 0: utils.err("you cannot specify a property when using --all or --defaults") properties = get_default_properties() else: properties = {} if "--defaults" not in utils.pcs_options: properties = utils.get_set_properties( None if print_all else argv[0], properties ) print("Cluster Properties:") for prop,val in sorted(properties.items()): print(" " + prop + ": " + val) node_attributes = utils.get_node_attributes( filter_attr=(None if print_all else argv[0]) ) if node_attributes: print("Node Attributes:") node.attribute_print(node_attributes)
def list_property(argv): print_all = len(argv) == 0 if "--all" in utils.pcs_options and "--defaults" in utils.pcs_options: utils.err("you cannot specify both --all and --defaults") if "--all" in utils.pcs_options or "--defaults" in utils.pcs_options: if len(argv) != 0: utils.err("you cannot specify a property when using --all or --defaults") properties = get_default_properties() else: properties = {} if "--defaults" not in utils.pcs_options: properties = utils.get_set_properties( None if print_all else argv[0], properties ) print("Cluster Properties:") for prop,val in sorted(properties.items()): print(" {0}: {1}".format(prop, val)) node_attributes = utils.get_node_attributes( filter_attr=(None if print_all else argv[0]) ) if node_attributes: print("Node Attributes:") node.attribute_print(node_attributes)
def attribute_show_cmd(filter_node=None, filter_attr=None): node_attributes = utils.get_node_attributes( filter_node=filter_node, filter_attr=filter_attr ) print("Node Attributes:") attribute_print(node_attributes)
def attribute_show_cmd(filter_node=None, filter_attr=None): """ Commandline options: * -f - CIB file (in lib wrapper) """ node_attributes = utils.get_node_attributes(filter_node=filter_node, filter_attr=filter_attr) print("Node Attributes:") attribute_print(node_attributes)
def attribute_show_cmd(filter_node=None, filter_attr=None): """ Commandline options: * -f - CIB file (in lib wrapper) """ node_attributes = utils.get_node_attributes( filter_node=filter_node, filter_attr=filter_attr ) print("Node Attributes:") attribute_print(node_attributes)