Added a version handler and turned debugging off.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11698 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
cjhardee 2012-02-27 15:44:59 +00:00
parent 57e31a34d0
commit b1611e7311

View File

@ -14,7 +14,8 @@ use Data::Dumper;
#all data input will be done from the common structure
#turn on or off the debugging output
my $DEBUGGING = 1;
my $DEBUGGING = 0;
my $VERSION = "2.7";
my $q = CGI->new;
my $url = $q->url;
@ -120,7 +121,8 @@ my %resources = (
tables => \&tablesHandler,
accounts => \&accountsHandler,
objects => \&objectsHandler,
vms => \&vmsHandler);
vms => \&vmsHandler,
version => \&versionHandler);
#if no resource was specified
if ($pathInfo =~ /^\/$/ || $pathInfo =~ /^$/) {
@ -1526,6 +1528,12 @@ sub vmsHandler {
return @responses;
}
sub versionHandler{
addPageContent($q->p("API version is $VERSION"));
sendResponseMsg($STATUS_OK);
exit(0);
}
#for operations that take a 'long' time to finish, this will provide the interface to check their status
sub jobsHandler {