diff --git a/perl-xCAT-2.0/xCAT/PPC.pm b/perl-xCAT-2.0/xCAT/PPC.pm index 1c7d34f05..30997a586 100644 --- a/perl-xCAT-2.0/xCAT/PPC.pm +++ b/perl-xCAT-2.0/xCAT/PPC.pm @@ -436,7 +436,7 @@ sub resolve { my $request = shift; my $node = shift; my $tabs = shift; - my @attribs = qw(id profile parent hcp); + my @attribs = qw(id pprofile parent hcp); my @values = (); ################################# @@ -516,22 +516,22 @@ sub resolve { # Optional and N/A fields ################################# elsif ( $type =~ /^$::NODETYPE_FSP$/ ) { - $att->{profile} = 0; - $att->{id} = 0; - $att->{fsp} = 0; - $att->{node} = $node; - $att->{type} = $type; - $att->{parent} = exists($att->{parent}) ? $att->{parent} : 0; - $att->{bpa} = $att->{parent}; + $att->{pprofile} = 0; + $att->{id} = 0; + $att->{fsp} = 0; + $att->{node} = $node; + $att->{type} = $type; + $att->{parent} = exists($att->{parent}) ? $att->{parent} : 0; + $att->{bpa} = $att->{parent}; } elsif ( $type =~ /^$::NODETYPE_BPA$/ ) { - $att->{profile} = 0; - $att->{id} = 0; - $att->{bpa} = 0; - $att->{parent} = 0; - $att->{fsp} = 0; - $att->{node} = $node; - $att->{type} = $type; + $att->{pprofile} = 0; + $att->{id} = 0; + $att->{bpa} = 0; + $att->{parent} = 0; + $att->{fsp} = 0; + $att->{node} = $node; + $att->{type} = $type; } ################################# # Find MTMS in vpd database @@ -563,7 +563,7 @@ sub resolve { ################################# # Build array of data ################################# - foreach ( qw(id profile fsp hcp type bpa) ) { + foreach ( qw(id pprofile fsp hcp type bpa) ) { push @values, $att->{$_}; } return( \@values ); @@ -847,3 +847,4 @@ sub process_request { + diff --git a/perl-xCAT-2.0/xCAT/PPCboot.pm b/perl-xCAT-2.0/xCAT/PPCboot.pm index c6b28c73b..f30e9fa7e 100644 --- a/perl-xCAT-2.0/xCAT/PPCboot.pm +++ b/perl-xCAT-2.0/xCAT/PPCboot.pm @@ -100,10 +100,10 @@ sub ivm_rnetboot { ####################################### # Get node data ####################################### - my $id = @$d[0]; - my $profile = @$d[1]; - my $fsp = @$d[2]; - my $hcp = @$d[3]; + my $id = @$d[0]; + my $pprofile = @$d[1]; + my $fsp = @$d[2]; + my $hcp = @$d[3]; ####################################### # Find Expect script @@ -144,7 +144,7 @@ sub ivm_rnetboot { ####################################### # Add command options ####################################### - $cmd.= " -t ent -f \"$name\" \"$profile\" \"$fsp\" $id $hcp $fname"; + $cmd.= " -t ent -f \"$name\" \"$pprofile\" \"$fsp\" $id $hcp $fname"; ####################################### # Execute command @@ -338,3 +338,4 @@ sub rnetboot { + diff --git a/perl-xCAT-2.0/xCAT/PPCdb.pm b/perl-xCAT-2.0/xCAT/PPCdb.pm index dd9aedd82..e85a52318 100644 --- a/perl-xCAT-2.0/xCAT/PPCdb.pm +++ b/perl-xCAT-2.0/xCAT/PPCdb.pm @@ -36,7 +36,7 @@ sub add_ppc { $model, $serial, $server, - $profile, + $pprofile, $parent, $ips ) = split /,/; @@ -45,11 +45,11 @@ sub add_ppc { ############################### if ( $type =~ /^fsp|bpa|lpar$/ ) { my ($k,$u); - $k->{node} = $name; - $u->{hcp} = $server; - $u->{id} = $id; - $u->{profile} = $profile; - $u->{parent} = $parent; + $k->{node} = $name; + $u->{hcp} = $server; + $u->{id} = $id; + $u->{pprofile} = $pprofile; + $u->{parent} = $parent; $db{ppc}->setAttribs( $k, $u ); $db{ppc}{commit} = 1; @@ -62,27 +62,27 @@ sub add_ppc { $db{nodelist}->setAttribs( $k1,$u1 ); $db{nodelist}{commit} = 1; - ########################### + ########################### # Update nodetype table ########################### - my ($k3,$u3); - my %nodetype = ( + my ($k2,$u2); + my %nodetype = ( fsp => $::NODETYPE_FSP, bpa => $::NODETYPE_BPA, lpar =>"$::NODETYPE_LPAR,$::NODETYPE_OSI" ); - $k3->{node} = $name; - $u3->{nodetype} = $nodetype{$type}; - $db{nodetype}->setAttribs( $k3,$u3 ); + $k2->{node} = $name; + $u2->{nodetype} = $nodetype{$type}; + $db{nodetype}->setAttribs( $k2,$u2 ); $db{nodetype}{commit} = 1; ########################### # Update nodehm table ########################### - my ($k2,$u2); - $k2->{node} = $name; - $u2->{mgt} = $hwtype; - $db{nodehm}->setAttribs( $k2,$u2 ); + my ($k3,$u3); + $k3->{node} = $name; + $u3->{mgt} = $hwtype; + $db{nodehm}->setAttribs( $k3,$u3 ); $db{nodehm}{commit} = 1; } ############################### @@ -285,3 +285,4 @@ sub credentials { + diff --git a/perl-xCAT-2.0/xCAT/PPCmac.pm b/perl-xCAT-2.0/xCAT/PPCmac.pm index 5517e94ca..5b256773d 100644 --- a/perl-xCAT-2.0/xCAT/PPCmac.pm +++ b/perl-xCAT-2.0/xCAT/PPCmac.pm @@ -136,18 +136,14 @@ sub validate_ip { ########################################################################## sub ivm_getmacs { - my $request = shift; - my $d = shift; - my $exp = shift; - my $name = shift; - my $opt = $request->{opt}; - my $id = @$d[0]; - my $profile = @$d[1]; - my $fsp = @$d[2]; - my $hcp = @$d[3]; - my $ssh = @$exp[0]; - my $userid = @$exp[4]; - my $pw = @$exp[5]; + my $request = shift; + my $d = shift; + my $exp = shift; + my $name = shift; + my $opt = $request->{opt}; + my $ssh = @$exp[0]; + my $userid = @$exp[4]; + my $pw = @$exp[5]; my $cmd; my $result; @@ -156,6 +152,14 @@ sub ivm_getmacs { ####################################### xCAT::PPCcli::disconnect( $exp ); + ####################################### + # Get node data + ####################################### + my $id = @$d[0]; + my $pprofile = @$d[1]; + my $fsp = @$d[2]; + my $hcp = @$d[3]; + ####################################### # Find Expect script ####################################### @@ -202,7 +206,7 @@ sub ivm_getmacs { ####################################### # Add command options ####################################### - $cmd.= " -t ent -f -M -A -n \"$name\" \"$profile\" \"$fsp\" $id $hcp $fname"; + $cmd.= " -t ent -f -M -A -n \"$name\" \"$pprofile\" \"$fsp\" $id $hcp $fname"; ####################################### # Execute command @@ -414,3 +418,6 @@ sub writemac { + + + diff --git a/perl-xCAT-2.0/xCAT/PPCscan.pm b/perl-xCAT-2.0/xCAT/PPCscan.pm index 76662ca71..78783474a 100644 --- a/perl-xCAT-2.0/xCAT/PPCscan.pm +++ b/perl-xCAT-2.0/xCAT/PPCscan.pm @@ -21,7 +21,7 @@ my @header = ( ["serial-number", "%-15s" ], ["address", "%s\n" ]); -my @attribs = qw(nodetype node id model serial hcp profile parent groups mgt); +my @attribs = qw(nodetype node id model serial hcp pprofile parent groups mgt); my %nodetype = ( fsp => $::NODETYPE_FSP, bpa => $::NODETYPE_BPA, @@ -599,3 +599,4 @@ sub rscan { + diff --git a/perl-xCAT-2.0/xCAT/PPCvm.pm b/perl-xCAT-2.0/xCAT/PPCvm.pm index e12d6a6ec..df00e5861 100644 --- a/perl-xCAT-2.0/xCAT/PPCvm.pm +++ b/perl-xCAT-2.0/xCAT/PPCvm.pm @@ -725,7 +725,7 @@ sub list { my $lparid = @$d[0]; my $mtms = @$d[2]; my $type = @$d[4]; - my $profile; + my $pprofile; #################################### # Must be CEC or LPAR @@ -792,9 +792,9 @@ sub list { ################################# # List LPAR profile ################################# - $profile .= "@$prof[0]\n\n"; + $pprofile .= "@$prof[0]\n\n"; } - push @values, [$lpar, $profile, SUCCESS]; + push @values, [$lpar, $pprofile, SUCCESS]; } } return( \@values ); @@ -966,9 +966,9 @@ sub xCATdB { ####################################### else { my ($model,$serial) = split /\*/,@$d[2]; - my $profile = $name; - my $server = @$d[3]; - my $fsp = @$d[2]; + my $pprofile = $name; + my $server = @$d[3]; + my $fsp = @$d[2]; ################################### # Find FSP name in ppc database @@ -1002,7 +1002,7 @@ sub xCATdB { $model, $serial, $server, - $profile, + $pprofile, $ent->{parent} ); return( xCAT::PPCdb::add_ppc( $hwtype, [$values] )); @@ -1046,3 +1046,4 @@ sub lsvm { 1; +