From d3e1ab3cd49db9e0dcda4848b0aa9c5b698293a8 Mon Sep 17 00:00:00 2001 From: bybai Date: Tue, 11 Aug 2015 02:45:24 -0400 Subject: [PATCH] update bmcdiscover related rest api --- xCAT-server/xCAT-wsapi/xcatws.cgi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/xCAT-server/xCAT-wsapi/xcatws.cgi b/xCAT-server/xCAT-wsapi/xcatws.cgi index 3c28c4a51..ab59091a3 100755 --- a/xCAT-server/xCAT-wsapi/xcatws.cgi +++ b/xCAT-server/xCAT-wsapi/xcatws.cgi @@ -2357,10 +2357,15 @@ sub bmccheckhdl { if ($params->{'resourcename'} eq "checkbmcauth") { if (isGET()) { + push @args, "-i"; push @args, $bmc_ip; - push @args, "-u"; - push @args, $bmc_user; + if ( defined($bmc_user) && $bmc_user ne "none") + { + push @args, "-u"; + push @args, $bmc_user; + + } push @args, "-p"; push @args, $bmc_pw; push @args, "-c"; @@ -2371,11 +2376,14 @@ sub bmccheckhdl { if (isGET()) { push @args, "-i"; push @args, $bmc_ip; - push @args, "-u"; - push @args, $bmc_user; + if ( defined($bmc_user) && $bmc_user ne "none" ) + { + push @args, "-u"; + push @args, $bmc_user; + } push @args, "-p"; push @args, $bmc_pw; - push @args, "-s"; + push @args, "--ipsource"; } }