r4510 bugfix: ignore errors while making deploy to Nexus swithes through telnet.
authorAlexey Andriyanov <alan@al-an.info>
Wed, 18 May 2011 04:25:05 +0000 (04:25 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Wed, 18 May 2011 04:25:05 +0000 (04:25 +0000)
Error after the 'switchport trunk encapsulation' command was leading to inability to change 802.1q config on Nexus.

gateways/deviceconfig/nxos4.connector

index 3f90c13..c05d9c2 100755 (executable)
@@ -43,6 +43,7 @@ if (!defined($username)) {
 my $session = Net::Telnet::Cisco->new('Host' => $endpoint, 
   Prompt => ' /(?:^|[\x0a\x0d0\0]+)[\w.-]+\s?(?:\(config[^\)]*\))?\s?[\$#>]\s?(?:\(enable\))?\s*$/',
 );
+$session->ignore_warnings(1);
 $session->more_prompt('/(?:^|[\x0a\x0d\0]+)\s*(?:\x1b\S{1,3})?\s*--More--/');
 $session->login($username, $password);
 if ($enable_password ne "-") {