From e4c549f4b8e532668d2e9554bce36b58d1d2ed1c Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 24 Jun 2011 09:24:13 +0000 Subject: [PATCH] modify --vpdtable output the stanza file format data. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9920 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 7d77da999..21411f567 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -3045,22 +3045,19 @@ sub format_table { my $outhash = shift; my $result; - $result = "\n#node,serial,mtm,side,asset,comments,disable\n"; ##################################### # Create XML formatted attributes ##################################### foreach my $name ( keys %$outhash ) { my @data = @{ $outhash->{$name}}; my $type = lc($data[0]); - my $mtm = $data[1]; - my $serial = $data[2]; - my $side = $data[3]; next if ($type =~ /^(fsp|bpa)$/); - if ( $side =~ /^N\/A$/ ) { - $result .= ",\"$serial\",\"$mtm\",,,\"$type\",\n"; - } else { - $result .= ",\"$serial\",\"$mtm\",\"$side\",,\"$type\",\n"; - } + $result .= "$name:\n"; + #$result .= "groups=frame,all\n"; + $result .= "\tobjtype=node\n"; + #$result .= "\tnodetype=$type\n"; + $result .= "\tmtm=$data[1]\n"; + $result .= "\tserial=$data[2]\n"; } return( $result );