Fix scenario example telnet

This commit is contained in:
garnier-quentin 2019-04-19 11:53:32 +02:00
parent 713f778bbe
commit 5d24497369

View File

@ -34,14 +34,13 @@ sub new {
bless $self, $class; bless $self, $class;
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ "scenario:s" => { name => 'scenario' },
"scenario:s" => { name => 'scenario' }, "warning:s" => { name => 'warning' },
"warning:s" => { name => 'warning' }, "critical:s" => { name => 'critical' },
"critical:s" => { name => 'critical' }, "hostname:s" => { name => 'hostname' },
"hostname:s" => { name => 'hostname' }, "port:s" => { name => 'port', default => 23 },
"port:s" => { name => 'port', default => 23 }, });
});
return $self; return $self;
} }
@ -55,7 +54,7 @@ sub check_options {
# {"cmd": "open", "options": { "Host": "10.0.0.1", "Port": "23", "Timeout": "30" } }, # {"cmd": "open", "options": { "Host": "10.0.0.1", "Port": "23", "Timeout": "30" } },
# {"cmd": "login", "options": { "Name": "admin", "Password": "pass", "Timeout": "5" } }, # {"cmd": "login", "options": { "Name": "admin", "Password": "pass", "Timeout": "5" } },
# {"cmd": "waitfor", "options": { "Match": "/string/", "Timeout": "5" } }, # {"cmd": "waitfor", "options": { "Match": "/string/", "Timeout": "5" } },
# {"cmd": "put", "options": { "String": "/mystring/", "Timeout": "5" } }, # {"cmd": "put", "options": { "String": "mystring", "Timeout": "5" } },
# {"cmd": "close" } # {"cmd": "close" }
#] #]
if (!defined($self->{option_results}->{scenario})) { if (!defined($self->{option_results}->{scenario})) {