From ca8cfb3ff7757270857d918e2cb98005b14a4842 Mon Sep 17 00:00:00 2001 From: zhanx Date: Thu, 15 Oct 2009 07:49:19 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/PPCconn.pm | 10 ++++++++++ perl-xCAT/xCAT/PPCfsp.pm | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/perl-xCAT/xCAT/PPCconn.pm b/perl-xCAT/xCAT/PPCconn.pm index 0361ca4c6..f0bd548f5 100644 --- a/perl-xCAT/xCAT/PPCconn.pm +++ b/perl-xCAT/xCAT/PPCconn.pm @@ -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]; } diff --git a/perl-xCAT/xCAT/PPCfsp.pm b/perl-xCAT/xCAT/PPCfsp.pm index a9287fe3a..73695d043 100644 --- a/perl-xCAT/xCAT/PPCfsp.pm +++ b/perl-xCAT/xCAT/PPCfsp.pm @@ -1833,6 +1833,21 @@ sub set_netcfg } #Go to the confirm page + if ( $res->content !~ /\Qcontent; + my @lines_to_print; + for my $page_line (@page_lines) + { + chomp $page_line; + if ( $page_line =~ s/
$//) + { + 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] . "...");