Logo Search packages:      
Sourcecode: fence-agents version File versions  Download package

static void print_xml_metadata ( char *  pname ) [static]

Print XML metadata of fence agent

Definition at line 864 of file ipmilan.c.

Referenced by main().

                                            {
  int i;

  printf("%s\n","<?xml version=\"1.0\" ?>");
  printf("%s%s%s\n","<resource-agent name=\"",pname,"\" shortdesc=\"Fence agent for IPMI over LAN\">");
  printf("<longdesc>\n");
  printf("fence_ipmilan is an I/O Fencing agent which can be used with "
         "machines controlled by IPMI. This agent calls support software "
         "using ipmitool (http://ipmitool.sf.net/).\n\n"
         "To use fence_ipmilan with HP iLO 3 you have to enable lanplus "
         "option (lanplus / -P) and increase wait after operation to "
         "4 seconds (power_wait=4 / -T 4)");
  printf("</longdesc>\n");
  printf("%s\n","<parameters>");

  for (i=0;i<(sizeof(xml_parameters)/sizeof(struct xml_parameter_s));i++) {
    printf("\t<parameter name=\"%s\" unique=\"1\">\n",xml_parameters[i].name);

    printf("\t\t<getopt mixed=\"%s\" />\n",xml_parameters[i].getopt);
    if (xml_parameters[i].default_value == NULL) {
      printf("\t\t<content type=\"%s\" />\n",xml_parameters[i].content_type);
    } else {
      printf("\t\t<content type=\"%s\" default=\"%s\"/>\n", \
          xml_parameters[i].content_type, \
          xml_parameters[i].default_value );
    }

    printf("\t\t<shortdesc lang=\"en\">");
    printf("%s",xml_parameters[i].description);
    printf("</shortdesc>\n");
    printf("\t</parameter>\n");
  }
  printf("%s\n","</parameters>");
  printf("%s\n","<actions>");
  printf("\t<action name=\"%s\" />\n", "on");
  printf("\t<action name=\"%s\" />\n", "off");
  printf("\t<action name=\"%s\" />\n", "reboot");
  printf("\t<action name=\"%s\" />\n", "status");
  printf("\t<action name=\"%s\" />\n", "diag");
  printf("\t<action name=\"%s\" />\n", "list");
  printf("\t<action name=\"%s\" />\n", "monitor");
  printf("\t<action name=\"%s\" />\n", "metadata");
  printf("%s\n","</actions>");
  printf("%s\n","</resource-agent>");
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index