From 53683cf3c3754daa8dcaf8d4ab8423fc1ad99204 Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 9 Aug 2010 05:47:05 +0000 Subject: [PATCH] improvement for scaling tests git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7000 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/cons/fsp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/xCAT-server/share/xcat/cons/fsp b/xCAT-server/share/xcat/cons/fsp index ab2769a09..9a80b7326 100755 --- a/xCAT-server/share/xcat/cons/fsp +++ b/xCAT-server/share/xcat/cons/fsp @@ -186,15 +186,7 @@ sub invoke_cmd { my $fsp_name = $att->{hcp}; my $id = $att->{id}; - my %objhash = (); - $objhash{$fsp_name} = "node"; - my %myhash = xCAT::DBobjUtils->getobjdefs(\%objhash); - my $password = $myhash{$fsp_name}{"passwd.HMC"}; - if(!$password ) { - return "The password.HMC of $fsp_name in ppcdirect table is empty"; - } - - my $username = "hscroot"; + # my $fsp_api ="/opt/xcat/sbin/fsp-api"; my $fsp_api = ($::XCATROOT) ? "$::XCATROOT/sbin/fsp-api" : "/opt/xcat/sbin/fsp-api"; my $action = "console"; @@ -202,20 +194,12 @@ sub invoke_cmd { my $fsp_ip = (); my $Rc = 0; - my $hosttab = xCAT::Table->new( 'hosts' ); - if ( $hosttab) { - my $node_ip_hash = $hosttab->getNodeAttribs( $fsp_name,[qw(ip)]); - $fsp_ip = $node_ip_hash->{ip}; - } - if (!$fsp_ip) { - my $ip_tmp_res = xCAT::Utils::toIP($fsp_name); - ($Rc, $fsp_ip) = @$ip_tmp_res; - if ( $Rc ) { - return "Failed to get the $fsp_name\'s ip"; - } + $fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name ); + if(!defined($fsp_ip)) { + return "Failed to get the $fsp_name\'s ip"; } - my $cmd = "$fsp_api -a $action -u $username -p $password -t $type:$fsp_ip:$id:$node:\r"; + my $cmd = "$fsp_api -a $action -t $type:$fsp_ip:$id:$node:\r"; # print "cmd: $cmd\n"; my $running_failed_code = "Reason code: 0x1000000"; my $fsp_standby_msg = "Reason code: 0x1300";