Have remoteimmsetup cope with the concept of distinct web/cli password versus ipmi password
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14544 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -119,6 +119,18 @@ sub process_request  { | ||||
|     $bmc=$tmphash->{$node}->[0]->{bmc}; | ||||
|   } | ||||
|   $username = $authmap->{$node}->{username}; | ||||
|   my $cliusername; | ||||
|   if ($authmap->{$node}->{cliusername}) { | ||||
| 	$cliusername = $authmap->{$node}->{cliusername}; | ||||
|   } else { | ||||
| 	$cliusername = $username; | ||||
|   } | ||||
|   my $clipassword; | ||||
|   if ($authmap->{$node}->{clipassword}) { | ||||
| 	$clipassword = $authmap->{$node}->{clipassword}; | ||||
|   } else { | ||||
| 	$clipassword = $password; | ||||
|   } | ||||
|   unless (defined $bmc) { | ||||
|      xCAT::MsgUtils->message('S',"Unable to identify bmc for $node, refusing to give config data"); | ||||
|      $callback->({error=>["Invalid table configuration for bmcconfig"],errorcode=>[1]}); | ||||
| @@ -132,7 +144,7 @@ sub process_request  { | ||||
| 	     return 1; | ||||
| 	  } | ||||
| 	  if ($request->{command}->[0] eq 'remoteimmsetup') { | ||||
| 	     xCAT::IMMUtils::setupIMM($node,cliusername=>$username,clipassword=>$password,callback=>$callback); | ||||
| 	     xCAT::IMMUtils::setupIMM($node,cliusername=>$cliusername,clipassword=>$clipassword,username=>$username,password=>$password,callback=>$callback); | ||||
|              return; | ||||
| 	  } | ||||
| 	  my $response={bmcip=>$ip,netmask=>$mask,gateway=>$gw,username=>$username,password=>$password}; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user