Skip to content

Commit

Permalink
no more usage for SNMP dictionary and models
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Mar 17, 2014
1 parent e09bd48 commit 552c991
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 421 deletions.
20 changes: 1 addition & 19 deletions bin/fusioninventory-netdiscovery
Expand Up @@ -11,7 +11,6 @@ use Pod::Usage;
use FusionInventory::Agent;
use FusionInventory::Agent::Recipient;
use FusionInventory::Agent::Task::NetDiscovery;
use FusionInventory::Agent::Task::NetDiscovery::Dictionary;

my %setup = (
confdir => './etc',
Expand All @@ -26,7 +25,6 @@ my $options = {

GetOptions(
$options,
'dictionary=s',
'community=s@',
'credential=s@',
'entity=s',
Expand Down Expand Up @@ -68,15 +66,6 @@ foreach my $arg (@ARGV) {
push @blocks, $block;
}

my $dictionary;
if ($options->{dictionary}) {
die "no such file $options->{dictionary}"
unless -f $options->{dictionary};
$dictionary = FusionInventory::Agent::Task::NetDiscovery::Dictionary->new(
file => $options->{dictionary}
);
}

my $credentials_id = 1;
my @credentials;
if ($options->{community}) {
Expand Down Expand Up @@ -111,7 +100,6 @@ $task->configure(
timeout => $options->{timeout},
blocks => \@blocks,
credentials => \@credentials,
dictionary => $dictionary
);

my $recipient = FusionInventory::Agent::Recipient->create(
Expand All @@ -136,7 +124,7 @@ fusioninventory-netdiscovery - Standalone network discovery
=head1 SYNOPSIS
B<fusioninventory-netdiscovery> S<[B<--dictionary> I<file>]>
B<fusioninventory-netdiscovery>
S<[B<--credential> I<string>]> S<[B<--timeout> I<integer>]>
S<[B<--threads> I<integer>]> S<[B<--entity> I<string>]>
S<[B<--recipient> I<string>]> S<[B<--verbose>]> S<[B<--debug>]>
Expand All @@ -146,10 +134,6 @@ I<block_spec> ...
=over
=item B<--dictionary> I<file>
dictionary file
=item B<--credential> I<string>
SNMP credentials (default: version:1,community:public)
Expand Down Expand Up @@ -187,8 +171,6 @@ debug output (execution traces)
--recipient /tmp
$> fusioninventory-netdiscovery 192.168.1.0/24
--recipient http://glpi.domain.com/plugins/fusioninventory
$> fusioninventory-netdiscovery 192.168.1.0/24
--dictionary dictionary.xml
$> fusioninventory-netdiscovery 192.168.1.0/24
--credential version:1,community:public
--credential version:3,username:foo,authprotocol:sha1,authpassword:bar
Expand Down
18 changes: 1 addition & 17 deletions bin/fusioninventory-netinventory
Expand Up @@ -29,7 +29,6 @@ my $options = {

GetOptions(
$options,
'model=s',
'community=s',
'credential=s',
'entity=s',
Expand Down Expand Up @@ -75,16 +74,6 @@ foreach my $arg (@ARGV) {
push @devices, $device;
}

my @models;

if ($options->{model}) {
pod2usage(
-message => "invalid file '$options->{model}', aborting\n",
-verbose => 0
) unless -f $options->{model};
push @models, loadModel($options->{model});
}

my $credentials_id = 1;
my @credentials;
if ($options->{community}) {
Expand Down Expand Up @@ -118,7 +107,6 @@ $task->configure(
threads => $options->{threads},
timeout => $options->{timeout},
devices => \@devices,
models => \@models,
credentials => \@credentials
);

Expand All @@ -144,7 +132,7 @@ fusioninventory-netinventory - Standalone network inventory
=head1 SYNOPSIS
B<fusioninventory-netinventory> S<[B<--model> I<file>]>
B<fusioninventory-netinventory>
S<[B<--credential> I<string>]> S<[B<--timeout> I<integer>]>
S<[B<--threads> I<integer>]> S<[B<--entity> I<string>]>
S<[B<--recipient> I<string>]> S<[B<--verbose>]> S<[B<--debug>]>
Expand All @@ -154,10 +142,6 @@ I<host_spec> ...
=over
=item B<--model> I<file>
model file
=item B<--credential> I<string>
SNMP credentials (default: version:1,community:public)
Expand Down

0 comments on commit 552c991

Please sign in to comment.