def status_cmd(argv): if len(argv) == 0: full_status() sys.exit(0) sub_cmd = argv.pop(0) if (sub_cmd == "help"): usage.status(argv) elif (sub_cmd == "resources"): resource.resource_show(argv) elif (sub_cmd == "groups"): resource.resource_group_list(argv) elif (sub_cmd == "cluster"): cluster_status(argv) elif (sub_cmd == "nodes"): nodes_status(argv) elif (sub_cmd == "pcsd"): cluster.cluster_gui_status(argv) elif (sub_cmd == "xml"): xml_status() elif (sub_cmd == "corosync"): corosync_status() else: usage.status() sys.exit(1)
def status_cmd(argv): if len(argv) == 0: cluster_status([]) print resources_status([]) print nodes_status([]) sys.exit(0) sub_cmd = argv.pop(0) if (sub_cmd == "help"): usage.status() elif (sub_cmd == "resources"): resources_status(argv) elif (sub_cmd == "cluster"): cluster_status(argv) elif (sub_cmd == "nodes"): nodes_status(argv) elif (sub_cmd == "actions"): actions_status(argv) elif (sub_cmd == "token"): token_status(argv) elif (sub_cmd == "xml"): xml_status() elif (sub_cmd == "corosync"): corosync_status() else: usage.status() sys.exit(1)
def status_cmd(argv): #print("rrr 02000 status_cmd(argv): ", argv) #with open("/python.out", "a") as myfile: # myfile.write("rrr 02000 status_cmd(argv): " + '#'.join([argv])) if len(argv) == 0: full_status() sys.exit(0) #print("rrr 02001 after status_cmd") with open("/python.out", "a") as myfile: myfile.write("rrr 02001 after status_cmd") sub_cmd = argv.pop(0) if (sub_cmd == "help"): usage.status(argv) elif (sub_cmd == "resources"): resource.resource_show(argv) elif (sub_cmd == "groups"): resource.resource_group_list(argv) elif (sub_cmd == "cluster"): cluster_status(argv) elif (sub_cmd == "nodes"): nodes_status(argv) elif (sub_cmd == "pcsd"): cluster.cluster_gui_status(argv) elif (sub_cmd == "xml"): xml_status() elif (sub_cmd == "corosync"): corosync_status() else: usage.status() sys.exit(1)