sub config_discover_idrac6 { my $IN; my %walk; if (open ($IN, "<", $DISCOVER_CONFIG_WALK)) { while (my $line = <$IN>) { chomp $line; my ($ip, $mib, $obj, $idx, undef, $val) = split (" ", $line, 6); next if ($mib ne "DELL-RAC-MIB"); if (defined $cfg_oids{$mib}{$obj}) { $walk{$ip}{$mib}{$obj}{$idx} = $val; } } close $IN; } if (open ($IN, "<", $DISCOVER_DEVICES)) { while (my $line = <$IN>) { chomp $line; my ($ip4, $ip6, $device, $snmp_opt, $sysObjectID, $sysDescr) = split (",", $line, 6); if ($sysObjectID eq "DELL-RAC-MIB.drsOutofBandGroup") { my %dev = (); $dev{device} = $device; $dev{ip4addr} = $ip4; $dev{ip6addr} = $ip6; $dev{descr} = $sysDescr; if (config_add_ping_device (\%dev) == 1) { printf "Added %s\n", $device; # Add IDRAC6 objects my $mib = "DELL-RAC-MIB"; adb_send (sprintf ("add child %s idrac", $device)); for my $obj (keys %{$walk{$ip4}{$mib}}) { my $cfg_ref = $cfg_oids{$mib}{$obj}; my $type = $cfg_ref->{type}; my $value = $walk{$ip4}{$mib}{$obj}{"0"}; if ($type eq "text") { adb_send (sprintf ("add %s %s idrac %s.%s = \"%s\"", $type, $device, $mib, $obj, $value)); } } } } } close $IN; adb_flush (); } }