From 217dee12449b44a2ff0fa358594b29f910752e0c Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 9 Apr 2014 07:20:53 -0400 Subject: [PATCH] removed the unused require of table.pm; fix the issue to handle the servicedone key in the xcat xml output --- xCAT-server/xCAT-wsapi/restapi.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xCAT-server/xCAT-wsapi/restapi.pl b/xCAT-server/xCAT-wsapi/restapi.pl index 6ae20a564..ccfded2f3 100755 --- a/xCAT-server/xCAT-wsapi/restapi.pl +++ b/xCAT-server/xCAT-wsapi/restapi.pl @@ -9,8 +9,8 @@ use Data::Dumper; use Socket; use IO::Socket::INET; use IO::Socket::SSL; -use lib "/opt/xcat/lib/perl"; -use xCAT::Table; +#use lib "/opt/xcat/lib/perl"; +#use xCAT::Table; # The hash %URIdef defines all the xCAT resources which can be access from Web Service. # This script will be called when a https request with the URI started with /xcatws/ is sent to xCAT Web Service @@ -2122,8 +2122,12 @@ sub filterData { #} else { #otherwise, ignore the 'servicedone' data # next; + } else { + delete ($_->{serverdone}); + if (scalar(keys %{$_}) > 0) { + push @{$outputdata}, $_; + } } - push @{$outputdata}, $_; } else { if (defined ($_->{data}) && ref($_->{data}->[0]) ne "HASH") { # to get the message in data for the case that errorcode is set but no 'error' attr