From 2ea6192c9af4607fde23817e3143da1352820b5d Mon Sep 17 00:00:00 2001 From: xq2005 Date: Tue, 21 Feb 2012 05:30:56 +0000 Subject: [PATCH] get network object git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11648 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/xCAT-wsapi/xcatws.cgi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/xCAT-server/xCAT-wsapi/xcatws.cgi b/xCAT-server/xCAT-wsapi/xcatws.cgi index e010324a7..c45515fc3 100755 --- a/xCAT-server/xCAT-wsapi/xcatws.cgi +++ b/xCAT-server/xCAT-wsapi/xcatws.cgi @@ -14,7 +14,7 @@ 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 $q = CGI->new; my $url = $q->url; @@ -598,7 +598,14 @@ sub networksHandler { $request->{command} = 'lsdef'; push @{$request->{arg}}, '-t', 'network'; if (defined($path[1])) { - push @{$request->{arg}}, $path[1]; + push @{$request->{arg}}, '-o', $path[1]; + } + my @temparray = $q->param('field'); + + #add the field name to get + if (scalar(@temparray) > 0) { + push @{$request->{arg}}, '-i'; + push @{$request->{arg}}, join(',', @temparray),; } } elsif (isPut() || isPost()) { @@ -634,9 +641,6 @@ sub networksHandler { addPageContent("No Field and Value map was supplied."); sendResponseMsg($STATUS_BAD_REQUEST); } - } - elsif (isPost()) { - } elsif (isDelete()) { $request->{command} = 'rmdef';