line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Solaris::Slots; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
90155956
|
use strict; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
74
|
|
4
|
1
|
|
|
1
|
|
14
|
use warnings; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
93
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
606
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
211
|
|
7
|
1
|
|
|
1
|
|
685
|
use FusionInventory::Agent::Tools::Solaris; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
263
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub isEnabled { |
10
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
11
|
0
|
0
|
|
|
|
|
return 0 if $params{no_category}->{slot}; |
12
|
0
|
|
|
|
|
|
return canRun('prtdiag'); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub doInventory { |
16
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
19
|
0
|
|
|
|
|
|
my $logger = $params{logger}; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
foreach my $slot (_getSlots(logger => $logger)) { |
22
|
0
|
|
|
|
|
|
$inventory->addEntry( |
23
|
|
|
|
|
|
|
section => 'SLOTS', |
24
|
|
|
|
|
|
|
entry => $slot |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _getSlots { |
30
|
0
|
|
|
0
|
|
|
my $info = getPrtdiagInfos(@_); |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
return $info->{slots} ? @{$info->{slots}} : (); |
|
0
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |