def do_show(self, context): ''' Display the corosync configuration. ''' cfg = corosync.conf() if not os.path.isfile(cfg): context.fatal_error("No corosync configuration found on this node.") utils.page_string(open(cfg).read())
def do_edit(self, context): ''' Edit the corosync configuration. ''' cfg = corosync.conf() try: utils.edit_file_ext(cfg, template='') except IOError, e: context.fatal_error(str(e))