fix bug 3409072 and 3409150: rscan -w write ip or mac attribute to cec/lpar defination

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10530 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2011-09-15 07:08:56 +00:00
parent a045ccea8f
commit 273b81ee0e

View File

@ -23,9 +23,10 @@ my @header = (
["name", "placeholder" ],
["id", "%-8s" ],
["type-model", "%-12s" ],
["serial-number", "%-15s" ],
["side", "%-8s" ],
["address", "%-20s\n" ]);
["serial-number", "%-15s\n" ]);
#,
# ["side", "%-8s" ],
# ["address", "%-20s\n" ]);
my @attribs = qw(nodetype node id mtm serial side hcp pprofile parent groups mgt cons hwtype);
my %globalnodetype = (
@ -152,15 +153,15 @@ sub enumerate {
my $ip_s = $8;
if(! defined( $ips)) {
if( $ip_s =~ /unavailable/ ) {
$ips ="$ip;";
$ips ="$ip";
} else {
$ips ="$ip;$ip_s;";
$ips ="$ip;$ip_s";
}
} else {
if( $ip_s =~ /unavailable/ ) {
$ips .="$ip";
$ips .=";$ip";
} else {
$ips .="$ip;$ip_s";
$ips .=";$ip;$ip_s";
}
}
}
@ -173,7 +174,8 @@ sub enumerate {
$side="";
}
push @values, join( ",",
$$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $ips, $$d[4]);
$$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname);
#$$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $ips, $$d[4]);
# $$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $7);
# "fsp",$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $7);
#"fsp",$fsp,$cageid,$model,$serial,$side,$server,$prof,$fname,$ips );
@ -204,14 +206,15 @@ sub enumerate {
my $server = $fsp;
my $ips = "";
my $port = "";
$name =~ s/\-//g;
$name =~ tr/A-Z/a-z/;
# $name =~ s/\-//g;
# $name =~ tr/A-Z/a-z/;
#####################################
# Save LPAR information
#####################################
push @values, join( ",",
"lpar",$name,$lparid,$model,$serial,$port,$server,$prof,$fsp,$ips,"lpar" );
"lpar",$name,$lparid,$model,$serial,$port,$server,$prof,$fsp );
#"lpar",$name,$lparid,$model,$serial,$port,$server,$prof,$fsp,$ips,"lpar" );
}