From b1611e731143afb8c1156a6cb4a28ec4a47cbca5 Mon Sep 17 00:00:00 2001 From: cjhardee Date: Mon, 27 Feb 2012 15:44:59 +0000 Subject: [PATCH] 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 --- xCAT-server/xCAT-wsapi/xcatws.cgi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xCAT-server/xCAT-wsapi/xcatws.cgi b/xCAT-server/xCAT-wsapi/xcatws.cgi index bf0b2cccc..c053cc557 100755 --- a/xCAT-server/xCAT-wsapi/xcatws.cgi +++ b/xCAT-server/xCAT-wsapi/xcatws.cgi @@ -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 {