line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::AIX::Controllers; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
100030961
|
use strict; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
93
|
|
4
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
18
|
|
|
2
|
|
|
|
|
103
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
652
|
use FusionInventory::Agent::Tools; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
398
|
|
7
|
2
|
|
|
2
|
|
1239
|
use FusionInventory::Agent::Tools::AIX; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
560
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub isEnabled { |
10
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
11
|
0
|
0
|
|
|
|
0
|
return 0 if $params{no_category}->{controller}; |
12
|
0
|
|
|
|
|
0
|
return canRun('lsdev'); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub doInventory { |
16
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
0
|
my $inventory = $params{inventory}; |
19
|
0
|
|
|
|
|
0
|
my $logger = $params{logger}; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
0
|
foreach my $controller (_getControllers( |
22
|
|
|
|
|
|
|
logger => $logger, |
23
|
|
|
|
|
|
|
)) { |
24
|
0
|
|
|
|
|
0
|
$inventory->addEntry( |
25
|
|
|
|
|
|
|
section => 'CONTROLLERS', |
26
|
|
|
|
|
|
|
entry => $controller |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _getControllers { |
32
|
5
|
|
|
5
|
|
1236
|
my @adapters = getAdaptersFromLsdev(@_); |
33
|
|
|
|
|
|
|
|
34
|
5
|
|
|
|
|
48
|
my @controllers; |
35
|
5
|
|
|
|
|
11
|
foreach my $adapter (@adapters) { |
36
|
|
|
|
|
|
|
push @controllers, { |
37
|
|
|
|
|
|
|
NAME => $adapter->{NAME}, |
38
|
53
|
|
|
|
|
126
|
}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
5
|
|
|
|
|
22
|
return @controllers; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |