Fix bug 2877233 lshwconn does not show HMC connected to;2837517 rspconfig should not result to Perl syntax error

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4391 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhanx 2009-10-15 07:49:19 +00:00
parent a693594278
commit ca8cfb3ff7
2 changed files with 25 additions and 0 deletions

View File

@ -469,6 +469,14 @@ sub lshwconn
$node_vpd_hash{"$vpdent->{mtm}*$vpdent->{serial}"} = $vpdent->{node};
}
}
my %node_ppc_hash;
my $ppctab = xCAT::Table->new('ppc');
for my $node ( values %node_vpd_hash)
{
my $node_parent_hash = $ppctab->getNodeAttribs( $node, [qw(parent)]);
$node_ppc_hash{$node} = $node_parent_hash->{parent};
}
for my $r ( @$res)
{
$r =~ s/type_model_serial_num=([^,]*),//;
@ -480,10 +488,12 @@ sub lshwconn
if ( exists $node_vpd_hash{$mtms})
{
$node_name = $node_vpd_hash{$mtms};
$r = "hcp=$exp->[3],parent=$node_ppc_hash{$node_name}," . $r;
}
else
{
$node_name = $mtms;
$r = "hcp=$exp->[3],parent=," . $r;
}
push @value, [ $node_name, $r, $Rc];
}

View File

@ -1833,6 +1833,21 @@ sub set_netcfg
}
#Go to the confirm page
if ( $res->content !~ /\Q<input type=\'submit\'\E/) #If there is no submit button,get the error message and return
{
my @page_lines = split /\n/, $res->content;
my @lines_to_print;
for my $page_line (@page_lines)
{
chomp $page_line;
if ( $page_line =~ s/<br>$//)
{
push @lines_to_print, $page_line;
}
}
return ( [RC_ERROR,join "\n", @lines_to_print]);
}
$form = HTML::Form->parse( $res->content, $res->base );
$data = $form->click('submit');
#xCAT::MsgUtils->message("I", "Updating network configuration for node " . $exp->[1] . "...");