2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-15 10:50:28 +00:00

add xmlapi test cases, they do not need to ship with rpm

This commit is contained in:
lissav
2014-09-22 10:28:08 -04:00
parent 25ffc91f0f
commit 547cbd4217
49 changed files with 921 additions and 0 deletions

55
xCAT-test/xmlapi/README Normal file
View File

@ -0,0 +1,55 @@
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>

View File

@ -0,0 +1,13 @@
sub setNodeAttribs
sub addNodeAttribs
sub setAttribs
sub setAttribsWhere
sub setNodesAttribs
sub getNodesAttribs
sub getNodeAttribs
sub getAllEntries
sub getAllAttribsWhere
sub getAllNodeAttribs
sub getAllAttribs
sub delEntries
sub getAttribs

View File

@ -0,0 +1,11 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>delEntries</command>
<table>
<name>nodelist</name>
<attr>
<groups>compute1,lissa</groups>
<status>down</status>
</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,17 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>delEntries</command>
<table>
<name>nodelist</name>
<attrs>
<groups>compute1,lissa</groups>
<status>down</status>
</attrs>
</table>
<table>
<name>nodelist</name>
<attrs>
<groups>compute2</groups>
</attrs>
</table>
</xcatrequest>

View File

@ -0,0 +1,7 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>delEntries</command>
<table>
<name>nodelist</name>
</table>
</xcatrequest>

View File

@ -0,0 +1,35 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>deltbl</command>
<table>tablename</table>
<key>key1</key>
<value>value1</value>
<node>noderange2</node>
.
.
.
or <node>ALL</node>
<attr>attribute1</attr>
<attr>attribute2</attr>
.
.
.
<attr>attributeN</attr>
</xcatrequest>
<xcatresponse>
<rows>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</rows>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,37 @@
# Reads all entries from the input Table
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAllEntries</command>
<table>tablename</table>
</xcatrequest>
<xcatresponse>
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
.
.
.
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
</xcatresponse>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,37 @@
# Reads all entries from the input Table
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAllEntries</command>
<table>tablename</table>
</xcatrequest>
<xcatresponse>
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
.
.
.
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
</xcatresponse>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,5 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAllEntries</command>
<table>switch</table>
</xcatrequest>

View File

@ -0,0 +1,5 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAllEntries</command>
<table>nodelist</table>
</xcatrequest>

View File

@ -0,0 +1,5 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAllEntries</command>
<table>nodelist</table>
</xcatrequest>

View File

@ -0,0 +1,10 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAttribs</command>
<table>site</table>
<keys>
<key>domain</key>
</keys>
<attrs>value</attrs>
<attrs>comments</attrs>
</xcatrequest>

View File

@ -0,0 +1,8 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAttribs</command>
<table>site</table>
<key>domain</key>
<attr>value</attr>
<attr>comments</attr>
</xcatrequest>

View File

@ -0,0 +1,11 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getAttribs</command>
<table>networks</table>
<keys>
<net>11.35.0.0</net>
<mask>255.255.0.0</mask>
</keys>
<attr>netname</attr>
<attr>dhcpserver</attr>
</xcatrequest>

View File

@ -0,0 +1,50 @@
# Reads the table input for the noderange and returns list of attributes
# requested
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getNodeAttribs</command>
<table>tablename</table>
<node>noderange</node>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</xcatrequest>
<xcatresponse>
<node>nodename1</node>
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
.
.
.
<node>nodenameN</node>
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
</xcatresponse>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,50 @@
# Reads the table input for the noderange and returns list of attributes
# requested
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getNodeAttribs</command>
<table>tablename</table>
<node>noderange</node>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</xcatrequest>
<xcatresponse>
<node>nodename1</node>
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
.
.
.
<node>nodenameN</node>
<row>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</row>
</xcatresponse>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,8 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getNodesAttribs</command>
<table>nodelist</table>
<noderange>blade01-blade02</noderange>
<attr>groups</attr>
<attr>status</attr>
</xcatrequest>

View File

@ -0,0 +1,7 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getNodesAttribs</command>
<table>nodelist</table>
<noderange>blade01-blade02</noderange>
<attr>ALL</attr>
</xcatrequest>

View File

@ -0,0 +1,7 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getNodesAttribs</command>
<table>nodelist</table>
<noderange>blade01-blade02</noderange>
<attr>ALL</attr>
</xcatrequest>

View File

@ -0,0 +1,9 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesAllNodeAttribs</command>
<table>
<tablename>nodelist</tablename>
<attr>groups</attr>
<attr>comments</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,14 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesAllNodeAttribs</command>
<table>
<tablename>nodetype</tablename>
<attr>os</attr>
<attr>nodetype</attr>
</table>
<table>
<tablename>nodelist</tablename>
<attr>groups</attr>
<attr>status</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,13 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesAllNodeAttribs</command>
<table>
<tablename>nodetype</tablename>
<attr>os</attr>
<attr>nodetype</attr>
</table>
<table>
<tablename>nodelist</tablename>
<attr>ALL</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,36 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesAllNodeAttribs</command>
<table>
<tablename>nodetype</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>nodelist</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>noderes</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>postscripts</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>mac</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>mp</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>nodehm</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>mpa</tablename>
<attr>ALL</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,12 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesAllRowAttribs</command>
<table>
<tablename>passwd</tablename>
<attr>username</attr>
</table>
<table>
<tablename>rack</tablename>
<attr>rackname</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,9 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesNodesAttribs</command>
<noderange>test</noderange>
<table>
<tablename>nodelist</tablename>
<attr>ALL</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,13 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesNodesAttribs</command>
<noderange>test</noderange>
<table>
<tablename>nodelist</tablename>
<attr>ALL</attr>
</table>
<table>
<tablename>nodetype</tablename>
<attr>nodetype</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,9 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>getTablesNodesAttribs</command>
<noderange>test</noderange>
<table>
<tablename>noderes</tablename>
<attr>ALL</attr>
</table>
</xcatrequest>

View File

@ -0,0 +1,14 @@
# Reads the table input for the noderange and returns list of attributes
# requested
<xcatrequest>
<clienttype>PCM</clienttype>
<command>NodeRange</command>
<node>compute1-compute2</node>
</xcatrequest>
<xcatresponse>
<node>node1</node>
.
.
.
<node>noden</node>
</xcatresponse>

View File

@ -0,0 +1,5 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>NodeRange</command>
<noderange>compute1-compute2</noderange>
</xcatrequest>

View File

@ -0,0 +1,5 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>NodeRange</command>
<noderange>compute1-compute2</noderange>
</xcatrequest>

View File

@ -0,0 +1,5 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>NodeRange</command>
<noderange>compute1-compute2</noderange>
</xcatrequest>

View File

@ -0,0 +1,34 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>readtbl</command>
<table>tablename</table>
<node>noderange1</node>
<node>noderange2</node>
.
.
.
or <node>ALL</node>
<attr>attribute1</attr>
<attr>attribute2</attr>
.
.
.
<attr>attributeN</attr>
</xcatrequest>
<xcatresponse>
<rows>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</rows>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,34 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>readtbl</command>
<table>tablename</table>
<node>noderange1</node>
<node>noderange2</node>
.
.
.
or <node>ALL</node>
<attr>attribute1</attr>
<attr>attribute2</attr>
.
.
.
<attr>attributeN</attr>
</xcatrequest>
<xcatresponse>
<rows>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</rows>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,17 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setAttribs</command>
<table>tablename</table>
<keys>
<keyname1>value1</keyname1>
<keyname2>value2</keyname2> For multiple key tables
</keys>
<attr>
<attrname1>value1</attrname1>
<attrname2>value2</attrname2>
</attr>
</xcatrequest>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,12 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setAttribs</command>
<table>site</table>
<keys>
<key>domain</key>
</keys>
<attr>
<value>pok.com</value>
<comments>This is a test</comments>
</attr>
</xcatrequest>

View File

@ -0,0 +1,13 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setAttribs</command>
<table>networks</table>
<keys>
<net>10.0.1.0</key>
<mask>255.255.255.0</mask>
</keys>
<attr>
<gateway>10.0.1.254</gateway>
</attr>
</xcatrequest>

View File

@ -0,0 +1,13 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setAttribs</command>
<table>networks</table>
<keys>
<net>10.0.1.0</net>
<mask>255.255.255.0</mask>
</keys>
<attr>
<netname>mynet</netname>
<gateway>10.0.1.254</gateway>
</attr>
</xcatrequest>

View File

@ -0,0 +1,19 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodeAttribs</command>
<table>tablename</table>
<node>noderange</node>
<attr>attribute1</attr>
<value>value1</value>
<attr>attribute2</attr>
<value>value2</value>
.
.
.
<attr>attributeN</attr>
<value>valueN</value>
</xcatrequest>
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>

View File

@ -0,0 +1,14 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodesAttribs</command>
<noderange>blade01-blade02</noderange>
<arg>
<table>
<name>nodelist</name>
<attr>
<groups>all,compute,lissa</groups>
<comments> This is a another test</comments>
</attr>
</table>
</arg>
</xcatrequest>

View File

@ -0,0 +1,14 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodesAttribs1</command>
<noderange>blade01-blade02</noderange>
<arg>
<table>
<name>nodelist</name>
<attr>
<groups>all,compute,lissa,newtest</groups>
<comments> This is a another testtest</comments>
</attr>
</table>
</arg>
</xcatrequest>

View File

@ -0,0 +1,21 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodesAttribs</command>
<noderange>blade01-blade02</noderange>
<arg>
<table>
<name>nodelist</name>
<attr>
<groups>lissa</groups>
<comments> This is a another testx</comments>
</attr>
</table>
<table>
<name>nodetype</name>
<attr>
<os>Redhat2</os>
<comments> This is a another testy</comments>
</attr>
</table>
</arg>
</xcatrequest>

View File

@ -0,0 +1,14 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodesAttribs1</command>
<noderange>blade01-blade02</noderange>
<arg>
<table>
<name>nodelist</name>
<attr>
<groups>all,compute</groups>
<comments> This is a test</comments>
</attr>
</table>
</arg>
</xcatrequest>

View File

@ -0,0 +1,17 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodesAttribs</command>
<arg>
<table>ppc</table>
<nodes>
<n1>
<hcp>fsp1</hcp>
<id>1</id>
</n1>
<n2>
<parent>cec1</parent>
</n1>
</nodes>
</arg>
</xcatrequest>

View File

@ -0,0 +1,19 @@
<xcatrequest>
<clienttype>PCM</clienttype>
<command>setNodesAttribs</command>
<noderange>compute2</noderange>
<arg>
<table>
<name>nodelist</name>
<attr>
<groups>allxxx</groups>
</attr>
</table>
<table>
<name>nodetype</name>
<attr>
<os>Redhat20</os>
</attr>
</table>
</arg>
</xcatrequest>

40
xCAT-test/xmlapi/xmldriver Executable file
View File

@ -0,0 +1,40 @@
#!/usr/bin/env perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
BEGIN
{
$::XCATROOT =
$ENV{'XCATROOT'} ? $ENV{'XCATROOT'}
: -d '/opt/xcat' ? '/opt/xcat'
: '/usr';
}
use lib "$::XCATROOT/lib/perl";
use strict;
use File::Basename;
use Cwd;
use Socket;
use XML::Simple;
require xCAT::MsgUtils;
use xCAT::Utils;
require xCAT::Client;
my $bname = basename($0);
#-----------------------------------------------------------------------------
=head1 pcmdriver - test XMLapi to Table.pm ( via tabutils.pm)
=cut
#-----------------------------------------------------------------------------
# Main
$ENV{'XCATXMLTRACE'}=1;
my $XML=`cat /root/lissa/xmlapi/getTablesAllRowAttribsreq`;
my $data=$XML;
$ENV{'XCATSHOWXML'}=1;
xCAT::Client::submit_request($data, \&xCAT::Client::handle_response);
exit $xCAT::Client::EXITCODE;

60
xCAT-test/xmlapi/xmldriver.old Executable file
View File

@ -0,0 +1,60 @@
#!/usr/bin/env perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
BEGIN
{
$::XCATROOT =
$ENV{'XCATROOT'} ? $ENV{'XCATROOT'}
: -d '/opt/xcat' ? '/opt/xcat'
: '/usr';
}
use lib "$::XCATROOT/lib/perl";
use strict;
use File::Basename;
use Cwd;
use Socket;
use XML::Simple;
require xCAT::MsgUtils;
use xCAT::Utils;
require xCAT::Client;
my $bname = basename($0);
#-----------------------------------------------------------------------------
=head1 pcmdriver - test XMLapi for PCM
=cut
#-----------------------------------------------------------------------------
# Main
$ENV{'XCATXMLTRACE'}=1;
my $XML=`cat /root/lissa/PCM/api/getTablesAllRowAttribsreq`;
#my $XML=`cat /root/lissa/PCM/api/getAllEntriesreq `;
#my $XML=`cat /root/lissa/PCM/api/setNodesAttribsreq `;
#y $XML=`cat /root/lissa/PCM/api/getTablesAllNodeAttribsreq `;
#my $XML=`cat /root/lissa/PCM/api/getTablesAllNodeAttribsreq1`;
#my $XML=`cat /root/lissa/PCM/api/getTablesAllNodeAttribsreq2`;
#my $XML=`cat /root/lissa/PCM/api/getTablesAllNodeAttribsreq3`;
#my $XML=`cat /root/lissa/PCM/api/getTablesNodesAttribsreq`;
#my $XML=`cat /root/lissa/PCM/api/getTablesNodesAttribsreq2`;
#my $XML=`cat /root/lissa/PCM/api/getTablesNodesAttribsreq1`;
#my $XML=`cat /root/lissa/PCM/api/setNodesAttribsreq1.1 `;
#my $XML=`cat /root/lissa/PCM/api/getNodesAttribsreq1 `;
#y $XML=`cat /root/lissa/PCM/api/getNodesAttribsreq `;
#my $XML=`cat /root/lissa/PCM/api/getNodesAttribsreq2 `;
#my $XML=`cat /root/lissa/PCM/api/setNodesAttribsreq3 `;
#my $XML=`cat /root/lissa/PCM/api/delEntriesreq `;
#my $XML=`cat /root/lissa/PCM/api/delEntriesreq3 `;
#my $XML=`cat /root/lissa/PCM/api/getAttribsreq `;
#my $XML=`cat /root/lissa/PCM/api/getAttribsreq2 `;
#my $XML=`cat /root/lissa/PCM/api/setAttribsreq `;
#my $XML=`cat /root/lissa/PCM/api/noderangereq `;
my $data=$XML;
$ENV{'XCATSHOWXML'}=1;
xCAT::Client::submit_request($data, \&xCAT::Client::handle_response);
exit $xCAT::Client::EXITCODE;

View File

@ -0,0 +1,43 @@
#!/usr/bin/env perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
BEGIN
{
$::XCATROOT =
$ENV{'XCATROOT'} ? $ENV{'XCATROOT'}
: -d '/opt/xcat' ? '/opt/xcat'
: '/usr';
}
use lib "$::XCATROOT/lib/perl";
use strict;
use File::Basename;
use Cwd;
use Socket;
#use Data::Dumper;
use Getopt::Long;
require xCAT::MsgUtils;
require xCAT::DSHCLI;
use xCAT::Utils;
use xCAT::RemoteShellExp;
require xCAT::PCMClient;
my $bname = basename($0);
#-----------------------------------------------------------------------------
=head1 pcmdriver - test XMLapi for PCM
=cut
#-----------------------------------------------------------------------------
# Main
my $XML=`cat /root/lissa/PCM/api/getAllEntriesreq `;
my $data=$XML;
xCAT::PCMClient::submit_request($data, \&xCAT::Client::handle_response);
exit $xCAT::Client::EXITCODE;

View File

@ -0,0 +1,6 @@
<xcatrequest>
<clienttype>cli</clienttype>
<command>nodels</command>
<cwd>/svn/xcat-core/2.6/perl-xCAT/xCAT</cwd>
<noderange>service</noderange>
</xcatrequest>

View File

@ -0,0 +1,9 @@
<xcatresponse>
<node>
<name>rhsn</name>
</node>
</xcatresponse>
rhsn
<xcatresponse>
<serverdone></serverdone>
</xcatresponse>