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

Add support for F5 Big/IP devices #79

Merged
merged 1 commit into from Oct 1, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion conf/trigger_settings.py
Expand Up @@ -54,6 +54,7 @@
'cisco',
'citrix',
'dell',
'f5',
'force10',
'foundry',
'juniper',
Expand All @@ -76,6 +77,7 @@
'CISCO SYSTEMS': 'cisco',
'CITRIX': 'citrix',
'DELL': 'dell',
'F5 NETWORKS': 'f5',
'FORCE10': 'force10',
'FOUNDRY': 'foundry',
'JUNIPER': 'juniper',
Expand All @@ -92,6 +94,7 @@
'cisco': ['ROUTER', 'SWITCH'],
'citrix': ['SWITCH'], # Assumed to be NetScalers
'dell': ['SWITCH'],
'f5': ['LOAD BALANCING', 'SWITCH'],
'force10': ['ROUTER', 'SWITCH'],
'foundry': ['ROUTER', 'SWITCH'],
'juniper': ['FIREWALL', 'ROUTER', 'SWITCH'], # Any devices running Junos
Expand All @@ -101,7 +104,7 @@
}

# The tuple of support device types
SUPPORTED_TYPES = ('CONSOLE SERVER', 'FIREWALL', 'DWDM', 'LOAD BALANCER',
SUPPORTED_TYPES = ('CONSOLE SERVER', 'FIREWALL', 'DWDM', 'LOAD BALANCING',
'ROUTER', 'SWITCH')

# A mapping of of vendor names to the default device type for each in the
Expand All @@ -114,6 +117,7 @@
'citrix': 'SWITCH',
'cisco': 'ROUTER',
'dell': 'SWITCH',
'f5': 'LOAD BALANCING',
'force10': 'ROUTER',
'foundry': 'SWITCH',
'juniper': 'ROUTER',
Expand Down Expand Up @@ -250,6 +254,7 @@
PROMPT_PATTERNS = {
'aruba': r'\(\S+\)(?: \(\S+\))?\s?#',
'citrix': r'\sDone\n$',
'f5': r'(?:\S+\@)?\S+(?:\(.*\))\(tmos\)#\s{1,2}\r?$',
'juniper': r'\S+\@\S+(?:\>|#)\s$',
'mrv': r'\r\n?.*(?:\:\d{1})?\s\>\>?$',
'netscreen': r'(\w+?:|)[\w().-]*\(?([\w.-])?\)?\s*->\s*$',
Expand Down
2 changes: 1 addition & 1 deletion trigger/__init__.py
@@ -1,4 +1,4 @@
__version__ = (1, 4, 1, 'b1')
__version__ = (1, 4, 1, 'b2')

full_version = '.'.join(map(str, __version__[0:3])) + ''.join(__version__[3:])
release = full_version
Expand Down
7 changes: 6 additions & 1 deletion trigger/conf/global_settings.py
Expand Up @@ -67,6 +67,7 @@
'cisco',
'citrix',
'dell',
'f5',
'force10',
'foundry',
'juniper',
Expand All @@ -90,6 +91,7 @@
'CISCO SYSTEMS': 'cisco',
'CITRIX': 'citrix',
'DELL': 'dell',
'F5 NETWORKS': 'f5',
'FORCE10': 'force10',
'FOUNDRY': 'foundry',
'JUNIPER': 'juniper',
Expand All @@ -107,6 +109,7 @@
'cisco': ['ROUTER', 'SWITCH'],
'citrix': ['SWITCH'], # Assumed to be NetScalers
'dell': ['SWITCH'],
'f5': ['LOAD BALANCING', 'SWITCH'],
'force10': ['ROUTER', 'SWITCH'],
'foundry': ['ROUTER', 'SWITCH'],
'juniper': ['FIREWALL', 'ROUTER', 'SWITCH'], # Any devices running Junos
Expand All @@ -116,7 +119,8 @@
}

# The tuple of support device types
SUPPORTED_TYPES = ('CONSOLE SERVER', 'FIREWALL', 'DWDM', 'LOAD BALANCER', 'ROUTER', 'SWITCH')
SUPPORTED_TYPES = ('CONSOLE SERVER', 'FIREWALL', 'DWDM', 'LOAD BALANCING',
'ROUTER', 'SWITCH')

# A mapping of of vendor names to the default device type for each in the
# event that a device object is created and the deviceType attribute isn't set
Expand Down Expand Up @@ -267,6 +271,7 @@
PROMPT_PATTERNS = {
'aruba': r'\(\S+\)(?: \(\S+\))?\s?#',
'citrix': r'\sDone\n$',
'f5': r'(?:\S+\@)?\S+(?:\(.*\))\(tmos\)#\s{1,2}\r?$',
'juniper': r'\S+\@\S+(?:\>|#)\s$',
'mrv': r'\r\n?.*(?:\:\d{1})?\s\>\>?$',
'netscreen': r'(\w+?:|)[\w().-]*\(?([\w.-])?\)?\s*->\s*$',
Expand Down
3 changes: 3 additions & 0 deletions trigger/netdevices/__init__.py
Expand Up @@ -306,6 +306,7 @@ def disable_paging_brocade():
'brocade': disable_paging_brocade(), # See comments above
'cisco': default,
'dell': ['terminal datadump\n'],
'f5': ['modify cli preference pager disabled\n'],
'force10': default,
'foundry': ['skip-page-display\n'],
'juniper': ['set cli screen-length 0\n'],
Expand Down Expand Up @@ -333,6 +334,8 @@ def _set_commit_commands(self):
return ['commit']
elif self.vendor == 'mrv':
return ['save configuration flash']
elif self.vendor == 'f5':
return ['save sys config']
else:
return []

Expand Down
2 changes: 1 addition & 1 deletion trigger/twister.py
Expand Up @@ -75,7 +75,7 @@ def has_ioslike_error(s):
tests = (
s.startswith('%'), # Cisco, Arista
'\n%' in s, # A10, Aruba, Foundry
'syntax error: ' in s, # Brocade VDX
'syntax error: ' in s.lower(), # Brocade VDX, F5 BIGIP
s.startswith('Invalid input -> '), # Brocade MLX
s.endswith('Syntax Error'), # MRV
)
Expand Down