line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::HPUX::MP; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
95313999
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
143
|
|
4
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
157
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
1713
|
use FusionInventory::Agent::Tools; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
459
|
|
7
|
2
|
|
|
2
|
|
1291
|
use FusionInventory::Agent::Tools::Network; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
938
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#TODO driver pcislot virtualdev |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub isEnabled { |
12
|
|
|
|
|
|
|
return |
13
|
0
|
|
0
|
0
|
0
|
0
|
canRun('/opt/hpsmh/data/htdocs/comppage/getMPInfo.cgi') || |
14
|
|
|
|
|
|
|
canRun('/opt/sfm/bin/CIMUtil'); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub doInventory { |
18
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
0
|
my $inventory = $params{inventory}; |
21
|
0
|
|
|
|
|
0
|
my $logger = $params{logger}; |
22
|
|
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
0
|
my $ipaddress = canRun('/opt/hpsmh/data/htdocs/comppage/getMPInfo.cgi') ? |
24
|
|
|
|
|
|
|
_parseGetMPInfo(logger => $logger) : _parseCIMUtil(logger => $logger); |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
0
|
$inventory->addEntry( |
27
|
|
|
|
|
|
|
section => 'NETWORKS', |
28
|
|
|
|
|
|
|
entry => { |
29
|
|
|
|
|
|
|
DESCRIPTION => 'Management Interface - HP MP', |
30
|
|
|
|
|
|
|
TYPE => 'Ethernet', |
31
|
|
|
|
|
|
|
MANAGEMENT => 'MP', |
32
|
|
|
|
|
|
|
IPADDRESS => $ipaddress, |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _parseGetMPInfo { |
39
|
1
|
|
|
1
|
|
229
|
return getFirstMatch( |
40
|
|
|
|
|
|
|
command => '/opt/hpsmh/data/htdocs/comppage/getMPInfo.cgi', |
41
|
|
|
|
|
|
|
pattern => qr{RIBLink = "https?://($ip_address_pattern)";}, |
42
|
|
|
|
|
|
|
@_ |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _parseCIMUtil { |
47
|
1
|
|
|
1
|
|
544
|
return getFirstMatch( |
48
|
|
|
|
|
|
|
command => '/opt/sfm/bin/CIMUtil -e root/cimv2 HP_ManagementProcessor', |
49
|
|
|
|
|
|
|
pattern => qr{^IPAddress\s+:\s+($ip_address_pattern)}, |
50
|
|
|
|
|
|
|
@_ |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |