From ae81e14bed77668bdbcc3f2876e0510920e36328 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 2 Nov 2012 01:18:33 +0000 Subject: [PATCH] Actually put out the adapter WWN and MAC addresses with Flex ITE nodes git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14215 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 916440afb..4f19b26c7 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1570,6 +1570,7 @@ sub add_textual_fru { my $subcategory = shift; my $types = shift; my $sessdata = shift; + my %args = @_; if ($parsedfru->{$category} and $parsedfru->{$category}->{$subcategory}) { my $fru; @@ -1580,10 +1581,16 @@ sub add_textual_fru { } else { @subfrus = ($parsedfru->{$category}->{$subcategory}) } + my $index=0; foreach (@subfrus) { + $index++; $fru = FRU->new(); $fru->rec_type($types); + if ($args{addnumber}) { + $fru->desc($description." ".$index); + } else { $fru->desc($description); + } if (not ref $_) { $fru->value($_); } else { @@ -1611,6 +1618,8 @@ sub add_textual_frus { add_textual_fru($parsedfru,$desc." ".$categorydesc."Manufacturer",$category,"manufacturer",$type,$sessdata); add_textual_fru($parsedfru,$desc." ".$categorydesc."Serial Number",$category,"serialnumber",$type,$sessdata); add_textual_fru($parsedfru,$desc." ".$categorydesc."Version",$category,"version",$type,$sessdata); + add_textual_fru($parsedfru,$desc." ".$categorydesc."MAC Address",$category,"macaddrs","mac",$sessdata,addnumber=>1); + add_textual_fru($parsedfru,$desc." ".$categorydesc."WWN",$category,"wwns","wwn",$sessdata,addnumber=>1); add_textual_fru($parsedfru,$desc." ".$categorydesc."",$category,"name",$type,$sessdata); if ($parsedfru->{$category}->{builddate}) { add_textual_fru($parsedfru,$desc." ".$categorydesc."Manufacture Date",$category,"builddate",$type,$sessdata);