Changed output for getting network names.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7409 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2010-09-10 16:17:23 +00:00
parent 29d420545e
commit 86fbb95970

View File

@ -185,14 +185,23 @@ sub getNetworkNames {
my @parms;
my $names;
foreach (@lines) {
# Trim output
$_ = xCAT::zvmUtils->trimStr($_);
@parms = split( ' ', $_ );
# Get the network name
if ( $parms[0] eq "LAN" || $parms[0] eq "VSWITCH" ) {
$names .= $parms[0] . " " . $parms[2] . "\n";
if ( $parms[0] eq "LAN" ) {
# Determine if this network is a hipersocket
# Only hipersocket guest LANs are supported
if ( $_ =~ m/Type: HIPERS/i ) {
$names .= $parms[0] . ":HIPERS " . $parms[1] . " " . $parms[2] . "\n";
} else {
$names .= $parms[0] . ":QDIO " . $parms[1] . " " . $parms[2] . "\n";
}
} elsif ( $parms[0] eq "VSWITCH" ) {
$names .= $parms[0] . " " . $parms[1] . " " . $parms[2] . "\n";
}
}