public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE3 - fence: Make fence agent metadata valid XML Date: Mon, 09 Mar 2009 17:02:00 -0000 [thread overview] Message-ID: <20090309170213.D263A120289@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f2c67b07b3ef399c276adf1b9bf7c2b81769bc61 Commit: f2c67b07b3ef399c276adf1b9bf7c2b81769bc61 Parent: 6d79b0bbb45ad167e75aae57ab2b0a4fe90fb514 Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Mon Mar 9 12:58:00 2009 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Mon Mar 9 13:01:42 2009 -0400 fence: Make fence agent metadata valid XML This is needed by XSLT programs to transform the metadata to other formats (i.e. man pages, RelaxNG blobs, etc.) --- fence/agents/lib/fencing.py.py | 3 +++ fence/agents/xvm/options.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index bdf7da2..c6a5a33 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -329,6 +329,8 @@ def metadata(avail_opt): sorted_list = [ (key, all_opt[key]) for key in avail_opt ] sorted_list.sort(lambda x, y: cmp(x[1]["order"], y[1]["order"])) + print "<?xml version=\"1.0\" ?>" + print "<resource-agent name=\"" + os.path.basename(sys.argv[0]) + "\" >" print "<parameters>" for option, value in sorted_list: if all_opt[option].has_key("shortdesc"): @@ -345,6 +347,7 @@ def metadata(avail_opt): print "\t\t<shortdesc lang=\"en\">" + all_opt[option]["shortdesc"] + "</shortdesc>" print "\t</parameter>" print "</parameters>" + print "</resource-agent>" def process_input(avail_opt): global all_opt diff --git a/fence/agents/xvm/options.c b/fence/agents/xvm/options.c index 1d04cb6..5dd6781 100644 --- a/fence/agents/xvm/options.c +++ b/fence/agents/xvm/options.c @@ -537,6 +537,8 @@ args_metadata(char *progname, char *optstr) int x; struct arg_info *arg; + printf("<?xml version=\"1.0\" ?>\n"); + printf("<resource-agent name=\"%s\" >\n", basename(progname)); printf("<parameters>\n"); for (x = 0; x < strlen(optstr); x++) { @@ -554,6 +556,7 @@ args_metadata(char *progname, char *optstr) } printf("</parameters>\n"); + printf("</resource-agent>\n"); }
reply other threads:[~2009-03-09 17:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090309170213.D263A120289@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).