Permalink
Browse files

Fixed issue 7

- Updated trigger.twister.has_ioslike_error to support Brocade VDX errors.
  (fixes #7)
  • Loading branch information...
1 parent 8e30569 commit 000dcd9c294d1403e7349daa3fb6cac989aff2a7 jathanism committed Apr 6, 2012
Showing with 11 additions and 2 deletions.
  1. +3 −0 docs/changelog.rst
  2. +8 −2 trigger/twister.py
View
@@ -22,6 +22,9 @@ Changelog
hostnames using :func:`~trigger.netdevices.device_match`.
- :bug:`6` The `get_firewall_db_conn()` function was moved out of `settings.py`
and into `~trigger.acl.queue.Queue` where it belongs.
+- :feature:`7` Updated :func:`~trigger.twister.has_ioslike_error` to support
+ Brocade VDX errors.
+
1.0.0.90
========
View
@@ -83,8 +83,14 @@ def has_junoscript_error(tag):
return False
def has_ioslike_error(s):
- """Test whether a string seems to contain an IOS error."""
- return s.startswith('%') or '\n%' in s
+ """Test whether a string seems to contain an IOS-like error."""
+ tests = (
+ s.startswith('%'), # Cisco, Arista
+ '\n%' in s, # Foundry
+ 'syntax error: ' in s, # Brocade VDX
+ )
+
+ return any(tests)
def has_netscaler_error(s):
"""Test whether a string seems to contain a NetScaler error."""

0 comments on commit 000dcd9

Please sign in to comment.