Modify spconfig output to be more consistent between Blade and IPMI systems

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@918 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-03-27 20:17:49 +00:00
parent 02cac71e54
commit 7c16eec19d
2 changed files with 20 additions and 13 deletions

View File

@ -426,7 +426,7 @@ sub mpaconfig {
setoid("1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.".(2+$dstindex).".1",1,$value,'OCTET');
}
my $data = $session->get(["1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.".(2+$dstindex).".1.1"]);
push @cfgtext,"AMM SNMP Destination $1: $data";
push @cfgtext,"SP SNMP Destination $1: $data";
next;
}
if ($parameter =~ /^community/i) {
@ -434,7 +434,7 @@ sub mpaconfig {
setoid("1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.2.1.1",0,$value,'OCTET');
}
my $data = $session->get(["1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.2.1.1"]);
push @cfgtext,"AMM SNMP Community: $data";
push @cfgtext,"SP SNMP Community: $data";
next;
}
if ($parameter =~ /^alert/i) {
@ -452,10 +452,10 @@ sub mpaconfig {
}
my $data = $session->get(['1.3.6.1.4.1.2.3.51.2.4.1.3.1.1.2.12']);
if ($data == 2) {
push @cfgtext,"Alerting: Enabled";
push @cfgtext,"SP Alerting: enabled";
next;
} else {
push @cfgtext,"Alerting: Disabled";
push @cfgtext,"SP Alerting: disabled";
next;
}
}

View File

@ -424,6 +424,7 @@ sub ipmicmd {
my $command = shift;
my $subcommand = shift;
my @leftovers = @_;
my $rc=0;
my $text="";
@ -679,8 +680,9 @@ sub ipmicmd {
}
}
elsif($command eq "rgetnetinfo") {
my @subcommands = ($subcommand);
if($subcommand eq "all") {
my @subcommands = (
@subcommands = (
"ip",
"netmask",
"gateway",
@ -691,6 +693,7 @@ sub ipmicmd {
"snmpdest4",
"community",
);
my @coutput;
foreach(@subcommands) {
@ -706,10 +709,14 @@ sub ipmicmd {
}
}
elsif($command eq "rspconfig") {
($rc,@output) = setnetinfo($subcommand,@_);
if($rc == 0) {
($rc,@output) = getnetinfo($subcommand);
}
foreach ($subcommand,@_) {
my @coutput;
($rc,@coutput) = setnetinfo($_);
if($rc == 0) {
($rc,@coutput) = getnetinfo($_);
}
push(@output,@coutput);
}
}
elsif($command eq "sete325cli") {
($rc,@output) = sete325cli($subcommand);
@ -954,14 +961,14 @@ sub getnetinfo {
}
elsif($subcommand eq "alert") {
if ($returnd[39] & 0x8) {
$text = "Alerts: enabled";
$text = "SP Alerting: enabled";
} else {
$text = "Alerts: disabled";
$text = "SP Alerting: disabled";
}
}
elsif($subcommand =~ m/^snmpdest(\d+)/ ) {
$text = sprintf("$format %d.%d.%d.%d",
"BMC SNMP Destination $1:",
"SP SNMP Destination $1:",
$returnd[41],
$returnd[42],
$returnd[43],
@ -1000,7 +1007,7 @@ sub getnetinfo {
$returnd[41]);
}
elsif ($subcommand eq "community") {
$text = sprintf("$format ","BMC SNMP Community:");
$text = sprintf("$format ","SP SNMP Community:");
my $l = 38;
while ($returnd[$l] ne 0) {
$l = $l + 1;