line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Ferenc Erki , adjust GmbH |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Interface::Shell::Idrac; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
14
|
use v5.12.5; |
|
1
|
|
|
|
|
4
|
|
8
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
46
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.3'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
8
|
use Rex::Interface::Shell::Default; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
13
|
1
|
|
|
1
|
|
27
|
use base qw(Rex::Interface::Shell::Default); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
313
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
17
|
0
|
|
0
|
|
|
|
my $proto = ref($class) || $class; |
18
|
0
|
|
|
|
|
|
my $self = $proto->SUPER::new(@_); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
bless( $self, $class ); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub detect { |
26
|
0
|
|
|
0
|
0
|
|
my ( $self, $con ) = @_; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my ($output); |
29
|
0
|
|
|
|
|
|
eval { |
30
|
0
|
|
|
|
|
|
($output) = $con->direct_exec('version'); |
31
|
0
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
}; |
33
|
0
|
0
|
0
|
|
|
|
if ( $output && $output =~ m/SM CLP Version: / ) { |
34
|
0
|
|
|
|
|
|
return 1; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return 0; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub exec { |
41
|
0
|
|
|
0
|
0
|
|
my ( $self, $cmd, $option ) = @_; |
42
|
0
|
|
|
|
|
|
return $cmd; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |