xcat-core/xCAT-test/xmlapi
2014-09-22 10:28:08 -04:00
..
delEntriesreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
delEntriesreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
delEntriesreq3 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
deltblreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAllEntries add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAllEntries.save1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAllEntriesreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAllEntriesreq.save add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAllEntriesreq.save1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAttribsreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getAttribsreq.old add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getNodeAttribs add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getNodeAttribs1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getNodesAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getNodesAttribsreq1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getNodesAttribsreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesAllNodeAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesAllNodeAttribsreq1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesAllNodeAttribsreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesAllNodeAttribsreq3 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesAllRowAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesNodesAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesNodesAttribsreq1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
getTablesNodesAttribsreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
noderange add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
noderangereq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
noderangereq.save add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
noderangereq.save1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
README add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
readtblreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
readtblreq.node add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setAttribs add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setAttribsreq1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setAttribsreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodeAttribs add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodesAttribsreq add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodesAttribsreq1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodesAttribsreq1.1 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodesAttribsreq1.new add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodesAttribsreq2 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
setNodesAttribsreq3 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
Table.pm.routines add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
xmldriver add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
xmldriver.old add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
xmldriver.org add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
xmlrequest.org add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
xmlresponse add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00

xCAT has an XML input interface to the xCAT tables.  The routines are in tabutils.pm and map to the
Table.pm routines by the same name. These routines were written for PCM but are also used in the restapi.  They are not a documented api.  
For the restapi, check the following for how and which routines are used.
xCAT-server/xCAT-wsapi/xcatws.cgi at all the functions between tablenodehdl() and tablerowdelhdl().

            getAllEntries    => "tabutils",
            getNodesAttribs  => "tabutils",
            getTablesAllNodeAttribs  => "tabutils",
            getTablesNodesAttribs  => "tabutils",
            getTablesAllRowAttribs  => "tabutils",
            setNodesAttribs  => "tabutils",
            delEntries       => "tabutils",
            getAttribs       => "tabutils",
            setAttribs       => "tabutils",
            NodeRange       => "tabutils",

If you vi /opt/xcat/lib/perl/xCAT_plugin/tabutils.pm,  and search for example "sub getAllEntries", you will see documented in the routines comments to  input XML format requried and the output XML sent.

To test these routines,  I put together a driver program pcmdriver, that generates the test XML and sends it  and displays the returned output. 


For example:
vi xmldriver in this directory

You will see 

 $ENV{'XCATXMLTRACE'}=1;
my $XML=`cat /.../xmlapi/getTablesAllRowAttribsreq`;
my $data=$XML;

$ENV{'XCATSHOWXML'}=1;

xCAT::Client::submit_request($data, \&xCAT::Client::handle_response);
exit $xCAT::Client::EXITCODE;

If you vi getTablesAllRowAttribsreq, you will see the following. This is an XML request to get the all rows from the passwd table the attributes username and rack. These is one of these  XML request files for all
possible input to the routines in the directory. 

XCATXMLTRACE is exported to show the XML that is being sent to xcatd. XCATSHOWXML is exported  to display the XML returned to the client. 

To get the XML request you must not be running in XCATBYPASS mode,  you can get the reponse in XCATBYPASS mode. 

<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesAllRowAttribs</command>
<table>
<tablename>passwd</tablename>
<attr>username</attr>
</table>
<table>
<tablename>rack</tablename>
<attr>rackname</attr>
</table>
</xcatrequest>