line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::SecurityCenter::API::DeviceInfo; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
23
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use parent 'Net::SecurityCenter::Base'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
62
|
use Net::SecurityCenter::Utils qw(:all); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
269
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.300'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
13
|
|
|
|
|
|
|
# METHODS |
14
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub get_info { |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $tmpl = { |
21
|
|
|
|
|
|
|
fields => {}, |
22
|
|
|
|
|
|
|
ip => {}, |
23
|
|
|
|
|
|
|
uuid => {}, |
24
|
|
|
|
|
|
|
dns_name => { |
25
|
|
|
|
|
|
|
remap => 'dnsName', |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $params = sc_check_params( $tmpl, \%args ); |
30
|
0
|
|
|
|
|
|
my $device_info = $self->client->get( "/deviceInfo", $params ); |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
return if ( !$device_info ); |
33
|
0
|
|
|
|
|
|
return sc_normalize_hash $device_info; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |