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