commit 44f59b0698a3d82d3362da4c68a0d188f14f97da Author: Marek 'marx' Grac Date: Thu Oct 10 10:57:19 2013 +0200 fencing: Add schema for fence agents metadata (relax ng) Add a metadata schema which reflects current state. In order to simplify it few minor changes were done to fence agents. diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c index 3561456..83029e3 100644 --- a/fence/agents/ipmilan/ipmilan.c +++ b/fence/agents/ipmilan/ipmilan.c @@ -915,10 +915,11 @@ static void print_xml_metadata(char *pname) { "option (lanplus / -P) and increase wait after operation to " "4 seconds (power_wait=4 / -T 4)"); printf("\n"); + printf("http://www.intel.com\n"); printf("%s\n",""); for (i=0;i<(sizeof(xml_parameters)/sizeof(struct xml_parameter_s));i++) { - printf("\t\n",xml_parameters[i].name); + printf("\t\n",xml_parameters[i].name, xml_parameters[i].required); printf("\t\t\n",xml_parameters[i].getopt); if (xml_parameters[i].default_value == NULL) { diff --git a/fence/agents/lib/metadata.rng b/fence/agents/lib/metadata.rng new file mode 100644 index 0000000..2566fee --- /dev/null +++ b/fence/agents/lib/metadata.rng @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + boolean + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 1 + + + + diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py index 9dc3e4d..6d2c649 100644 --- a/fence/agents/lpar/fence_lpar.py +++ b/fence/agents/lpar/fence_lpar.py @@ -133,6 +133,7 @@ def main(): docs = { } docs["shortdesc"] = "Fence agent for IBM LPAR" docs["longdesc"] = "" + docs["vendorurl"] = "http://www.ibm.com" show_docs(options, docs) if 0 == options.has_key("--managed"): diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl index 2585f9e..c959417 100644 --- a/fence/agents/scsi/fence_scsi.pl +++ b/fence/agents/scsi/fence_scsi.pl @@ -705,6 +705,7 @@ sub print_metadata () print "\n"; print "fence_scsi\n"; + print "http://www.t10.org\n"; print "\n"; print "\t\n"; print "\t\t\n"; diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py index ccbd6e2..ac8dc7b 100644 --- a/fence/agents/virsh/fence_virsh.py +++ b/fence/agents/virsh/fence_virsh.py @@ -78,6 +78,7 @@ all work. \ \n.P\n\ By default, virsh needs root account to do properly work. So you \ must allow ssh login in your sshd_config." + docs["vendorurl"] = "http://libvirt.org" show_docs(options, docs) ## Operate the fencing device diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py index 7ba8533..064624a 100644 --- a/fence/agents/xenapi/fence_xenapi.py +++ b/fence/agents/xenapi/fence_xenapi.py @@ -214,6 +214,7 @@ It uses the XenAPI, supplied by Citrix, to establish an XML-RPC sesssion \ to a XenServer host. Once the session is established, further XML-RPC \ commands are issued in order to switch on, switch off, restart and query \ the status of virtual machines running on the host." + docs["vendorurl"] = "http://www.xenproject.org" show_docs(options, docs) xenSession = connect_and_login(options) diff --git a/make/fenceman.mk b/make/fenceman.mk index e6df9f0..d4f3b4e 100644 --- a/make/fenceman.mk +++ b/make/fenceman.mk @@ -2,6 +2,7 @@ set -e && \ PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib \ python $^ -o metadata > .$@.tmp && \ + xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ clean-man: diff --git a/make/fencemanc.mk b/make/fencemanc.mk index 9c904b6..27e1aae 100644 --- a/make/fencemanc.mk +++ b/make/fencemanc.mk @@ -1,6 +1,7 @@ %.8: $(TARGET) $(top_srcdir)/fence/agents/lib/fence2man.xsl set -e && \ ./$^ -o metadata > .$@.tmp && \ + xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ clean-man: diff --git a/make/fencemanperl.mk b/make/fencemanperl.mk index 74c1508..ed7c9cc 100644 --- a/make/fencemanperl.mk +++ b/make/fencemanperl.mk @@ -1,6 +1,7 @@ %.8: $(TARGET) $(top_srcdir)/fence/agents/lib/fence2man.xsl set -e && \ perl $(TARGET) -o metadata > .$@.tmp && \ + xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \ xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@ clean-man: