PureFlex x nodes import& discovery supporting

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14704 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
leiaibj 2012-12-24 03:49:00 +00:00
parent b868089ba6
commit ae316495af
2 changed files with 24 additions and 5 deletions

View File

@ -91,11 +91,14 @@ sub process_request {
log_cmd_return($retref);
my $firstnode = (@$nodelist)[0];
my $profileref = xCAT::ProfiledNodeUtils->get_nodes_profiles([$firstnode]);
my %profilehash = %$profileref;
if (exists $profilehash{$firstnode}{"ImageProfile"}){
my $chaintab = xCAT::Table->new("chain");
my $chainref = $chaintab->getNodeAttribs($firstnode, ['chain']);
my $chainstr = $chainref->{'chain'};
my @chainarray = split(",", $chainstr);
if ($chainarray[0]){
setrsp_progress("Update nodes' boot settings");
$retref = xCAT::Utils->runxcmd({command=>["nodeset"], node=>$nodelist, arg=>['osimage='.$profilehash{$firstnode}{"ImageProfile"}]}, $request_command, 0, 2);
$retref = xCAT::Utils->runxcmd({command=>["nodeset"], node=>$nodelist, arg=>[$chainarray[0]]}, $request_command, 0, 2);
log_cmd_return($retref);
}

View File

@ -1232,7 +1232,10 @@ sub gen_new_hostinfo_string{
# Get node's provisioning method
my $provmethod = xCAT::ProfiledNodeUtils->get_imageprofile_prov_method($args_dict{'imageprofile'});
# Check whether this is Power env.
my $is_fsp = xCAT::ProfiledNodeUtils->is_fsp_node($args_dict{'networkprofile'});
# compose the stanza string for hostinfo file.
my $hostsinfostr = "";
foreach my $item (keys %hostinfo_dict){
@ -1272,6 +1275,19 @@ sub gen_new_hostinfo_string{
if (exists $args_dict{'imageprofile'}){$hostinfo_dict{$item}{"groups"} .= ",".$args_dict{'imageprofile'}}
if (exists $args_dict{'hardwareprofile'}){$hostinfo_dict{$item}{"groups"} .= ",".$args_dict{'hardwareprofile'}}
if (exists $args_dict{'groups'}){$hostinfo_dict{$item}{"groups"} .= ",".$args_dict{'groups'}}
# xCAT limitation: slotid attribute only for power, id is for x.
if ((exists $hostinfo_dict{$item}{"slotid"}) && (! $is_fsp) ){
$hostinfo_dict{$item}{"id"} = $hostinfo_dict{$item}{"slotid"};
delete($hostinfo_dict{$item}{"slotid"});
}
# generage mpa attribute for blades managed by CMM.
if (exists $hostinfo_dict{$item}{"chassis"}){
my $chassisname = $hostinfo_dict{$item}{"chassis"};
if(exists $allcmmchassis{$chassisname}){
$hostinfo_dict{$item}{"mpa"} = $chassisname;
}
}
$hostinfo_dict{$item}{"chain"} = 'osimage='.$provmethod;
if (exists $netprofileattr{"bmc"}){ # Update BMC records.