From 8f0ed3fa8d7c95daf55bea1dcaaf412efdea13eb Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 28 Jan 2011 15:42:00 +0000 Subject: [PATCH] FSP/BPA redundancy: fix a mistake git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8766 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 31 +++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index e54a3fe6c..4ef4579c9 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -2690,23 +2690,24 @@ sub format_stanza { } elsif ( /^mgt$/ ) { $d = $mgt{$type}; } elsif ( /^id$/ ) { - if ( $type =~ /^fsp$/ ) { + if ( $type =~ /^(fsp|bpa|cec|frame)$/ ) { $d = $data[$i++]; - } elsif ( $type =~ /^bpa$/ ) { - $i++; } else { $i++; next; } $i++; - } elsif ( /^side$/ or /^parent$/ ) { + } elsif ( /^side$/ ) { if ( $type !~ /^(fsp|bpa)$/ ) { next; } - } elsif ( /^otherinterfaces$/ ) { - $d = $ip; + } elsif ( /^parent$/ ) { + if ( $type !~ /^(fsp|bpa|cec)$/ ) { + next; + } + } elsif ( /^otherinterfaces$/ ) { + next; } - if ( !defined($d) ) { next; } @@ -2768,21 +2769,23 @@ sub format_xml { } elsif ( /^mgt$/ ) { $d = $mgt{$type}; } elsif ( /^id$/ ) { - if ( $type =~ /^fsp$/ ) { + if ( $type =~ /^(fsp|bpa|frame|cec)$/ ) { $d = $data[$i++]; - } elsif ( $type =~ /^bpa$/ ) { - $i++; } else { $i++; next; } $i++; - } elsif ( /^side$/ or /^parent$/ ) { - if ( $type !~ /^(fsp|bpa)$/ ) { + } elsif ( /^side$/ ) { + if ( $type !~ /^(fsp|bpa|cec|frame)$/ ) { next; } - } elsif ( /^otherinterfaces$/ ) { - $d = $ip; + } elsif ( /^parent$/ ) { + if ( $type !~ /^(fsp|bpa|cec)$/ ) { + next; + } + } elsif ( /^otherinterfaces$/ ) { + next; } if ( !defined($d) ) {