Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct handling user prompt on Cisco Nexus OS (NXOS) #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ph20
Copy link
Contributor

@ph20 ph20 commented Sep 25, 2018

Example telnet connection with login prompt

username@home ~ % telnet X.X.X.X
Trying X.X.X.X...
Connected to X.X.X.X.
Escape character is '^]'.

User Access Verification
RackX_XXX login: admin
Password: 
Bad terminal type: "linux". Will assume vt100.
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2015, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their own
licenses, such as open source.  This software is provided "as is," and unless
otherwise stated, there is no warranty, express or implied, including but not
limited to warranties of merchantability and fitness for a particular purpose.
Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or 
GNU General Public License (GPL) version 3.0  or the GNU
Lesser General Public License (LGPL) Version 2.1 or 
Lesser General Public License (LGPL) Version 2.0. 
A copy of each such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://opensource.org/licenses/gpl-3.0.html and
http://www.opensource.org/licenses/lgpl-2.1.php and
http://www.gnu.org/licenses/old-licenses/library.txt.
RackX_XXX#

@@ -26,7 +26,7 @@
import re
from Exscript.protocols.drivers.driver import Driver

_user_re = [re.compile(r'user ?name: ?$', re.I)]
_user_re = [re.compile(r'user ?name: ?$', re.I), re.compile(r'[^:]* login: ?$', re.I)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (86 > 79 characters)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 76.673% when pulling 4e3d952 on ph20:correct_handling_nxos_user_prompt into faf38fc on knipknap:master.

@knipknap
Copy link
Owner

Ah, could you add the banner to tests/Exscript/protocols/banners/nxos.2, to make sure that there are no regressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants