Skip to content

Commit

Permalink
Fixed a bug in Cumulus Linux prompt patterns.
Browse files Browse the repository at this point in the history
- Also disabled execution of `sudo vtysh` by default on Cumulus. It
  will now be left up to operators to do this for themselves.
- Updated the changelog to include a mention of the new support for
  Cumulus Linux.
  • Loading branch information
jathanism committed Dec 13, 2016
1 parent 5f4e563 commit 0028aad
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
7 changes: 3 additions & 4 deletions configs/trigger_settings.py
Expand Up @@ -215,7 +215,7 @@
'cisco': STARTUP_COMMANDS_DEFAULT,
'cisco_asa': ['terminal pager 0'],
'citrix': ['set cli mode page off'],
'cumulus': ['sudo vtysh'] + STARTUP_COMMANDS_DEFAULT,
'cumulus': [], # No startup commands for Cumulus by default!
'dell': ['terminal datadump'],
'f5': ['modify cli preference pager disabled'],
'force10': STARTUP_COMMANDS_DEFAULT,
Expand Down Expand Up @@ -344,10 +344,9 @@
#'aruba': r'\S+(?: \(\S+\))?\s?#\s$', # ArubaOS 6.2
'avocent': r'\S+[#\$]|->\s?$',
'citrix': r'\sDone\n$',
# 'cumulus': r'\S+(?:\$|#)\s?$', # Used to run 'sudo vtysh' only.
# This pattern is a regex "or" combination of the Cumulus bash login prompt
# and IOSLIKE_PROMPT_PAT
'cumulus': r'(?:\S+(\(config(-[a-z:1-9]+)?\))?[\r\s]*#[\s\b]*$)|(?:\S+(?:\$|#)\s?$)',
# and IOSLIKE_PROMPT_PAT (for vtysh support)
'cumulus': r'(?:\S+(\(config(-[a-z:1-9]+)?\))?[\r\s]*#[\s\b]*$)|(?:.*(?:\$|#)\s?$)',
'f5': r'.*\(tmos\).*?#\s{1,2}\r?$',
'juniper': r'(?:\S+\@)?\S+(?:\>|#)\s$',
'mrv': r'\r\n?.*(?:\:\d{1})?\s\>\>?$',
Expand Down
18 changes: 10 additions & 8 deletions docs/changelog.rst
Expand Up @@ -7,6 +7,16 @@ Changelog
1.6 (??)
========

Enhancements
------------
+ Remote execution on devices running Cumulus Linux is now officially
supported.
+ A new configuration setting :setting:`DEFAULT_ADMIN_STATUS` has been added
that defaults to ``PRODUCTION`` that is used to popoulate the ``adminStatus``
field on `~trigger.netdevices.NetDevice` objects that do not have that field
populated.
+ CLI-tool ``gnng`` now uses PTable instead of the old indent function.

Backwards-incompatible changes
------------------------------

Expand All @@ -26,14 +36,6 @@ Bug Fixes
+ Fixed a bug on Arista EOS devices that would sometimes cause the prompt to be
included in the results from commands with no output.

Enhancements
------------
+ A new configuration setting :setting:`DEFAULT_ADMIN_STATUS` has been added
that defaults to ``PRODUCTION`` that is used to popoulate the ``adminStatus``
field on `~trigger.netdevices.NetDevice` objects that do not have that field
populated.
+ CLI-tool ``gnng`` now uses PTable instead of the old indent function.

.. _v1.5.10:

1.5.10 (2016-04-18)
Expand Down
2 changes: 1 addition & 1 deletion trigger/__init__.py
@@ -1,4 +1,4 @@
__version__ = (1, 6, 'rc7')
__version__ = (1, 6, 'rc8')

full_version = '.'.join(str(x) for x in __version__[0:3]) + \
''.join(__version__[3:])
Expand Down
7 changes: 3 additions & 4 deletions trigger/conf/global_settings.py
Expand Up @@ -230,7 +230,7 @@
'cisco': STARTUP_COMMANDS_DEFAULT,
'cisco_asa': ['terminal pager 0'],
'citrix': ['set cli mode page off'],
'cumulus': ['sudo vtysh'] + STARTUP_COMMANDS_DEFAULT,
'cumulus': [], # No startup commands for Cumulus by default!
'dell': ['terminal datadump'],
'f5': ['modify cli preference pager disabled'],
'force10': STARTUP_COMMANDS_DEFAULT,
Expand Down Expand Up @@ -361,10 +361,9 @@
#'aruba': r'\S+(?: \(\S+\))?\s?#\s$', # ArubaOS 6.2
'avocent': r'\S+[#\$]|->\s?$',
'citrix': r'\sDone\n$',
# 'cumulus': r'\S+(?:\$|#)\s?$', # Used to run 'sudo vtysh' only.
# This pattern is a regex "or" combination of the Cumulus bash login prompt
# and IOSLIKE_PROMPT_PAT
'cumulus': r'(?:\S+(\(config(-[a-z:1-9]+)?\))?[\r\s]*#[\s\b]*$)|(?:\S+(?:\$|#)\s?$)',
# and IOSLIKE_PROMPT_PAT (for vtysh support)
'cumulus': r'(?:\S+(\(config(-[a-z:1-9]+)?\))?[\r\s]*#[\s\b]*$)|(?:.*(?:\$|#)\s?$)',
'f5': r'.*\(tmos\).*?#\s{1,2}\r?$',
'juniper': r'(?:\S+\@)?\S+(?:\>|#)\s$',
'mrv': r'\r\n?.*(?:\:\d{1})?\s\>\>?$',
Expand Down

0 comments on commit 0028aad

Please sign in to comment.