diff --git a/conf/netdevices.csv b/conf/netdevices.csv index 49eb346..d827030 100644 --- a/conf/netdevices.csv +++ b/conf/netdevices.csv @@ -1,4 +1,4 @@ -test1-abc.net.aol.com,juniper,router -test2-abc.net.aol.com,juniper,router -fw1-xyz.net.aol.com,netscreen,firewall -lab1-switch.net.aol.com,foundry,switch +test1-abc.net.aol.com,juniper,up,router +test2-abc.net.aol.com,juniper,up,router +fw1-xyz.net.aol.com,netscreen,up,firewall +lab1-switch.net.aol.com,foundry,up,switch diff --git a/conf/trigger_settings.py b/conf/trigger_settings.py index fd5933d..0befb6f 100644 --- a/conf/trigger_settings.py +++ b/conf/trigger_settings.py @@ -84,6 +84,7 @@ 'JUNIPER': 'juniper', 'MRV': 'mrv', 'NETSCREEN TECHNOLOGIES': 'netscreen', + 'PALO ALTO NETWORKS': 'paloalto', } # A dictionary keyed by manufacturer name containing a list of the device types diff --git a/docs/conf.py b/docs/conf.py index fd60b30..00a0c94 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. +# Use the new RTD theme +RTD_NEW_THEME = True + import os import re import sys @@ -161,7 +164,7 @@ def release_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. html_theme = 'default' -html_style = 'rtd.css' +#html_style = 'rtd.css' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/docs/usage/netdevices.rst b/docs/usage/netdevices.rst index 16a2bba..bfb9722 100644 --- a/docs/usage/netdevices.rst +++ b/docs/usage/netdevices.rst @@ -103,10 +103,10 @@ The most fields you may populate are the same as with the RANCID support. Please see the explanation of the fields populated by the :ref:`RANCID format `. A "fully-populated" CSV file would look more like this:: - test1-abc.net.aol.com,juniper,router - test2-abc.net.aol.com,juniper,router - fw1-xyz.net.aol.com,netscreen,firewall - lab1-switch.net.aol.com,foundry,switch + test1-abc.net.aol.com,juniper,up,router + test2-abc.net.aol.com,juniper,up,router + fw1-xyz.net.aol.com,netscreen,up,firewall + lab1-switch.net.aol.com,foundry,up,switch .. _xml-format: diff --git a/trigger/__init__.py b/trigger/__init__.py index c9894bc..9989fd3 100644 --- a/trigger/__init__.py +++ b/trigger/__init__.py @@ -1,4 +1,4 @@ -__version__ = (1, 4, 2, 'b8') +__version__ = (1, 4, 2, 'b9') full_version = '.'.join(map(str, __version__[0:3])) + ''.join(__version__[3:]) release = full_version diff --git a/trigger/netdevices/__init__.py b/trigger/netdevices/__init__.py index df3206d..0e8dd21 100644 --- a/trigger/netdevices/__init__.py +++ b/trigger/netdevices/__init__.py @@ -257,6 +257,9 @@ def _cleanup_attributes(self): if self.nodeName is not None: self.nodeName = self.nodeName.lower() + if self.deviceType is not None: + self.deviceType = self.deviceType.upper() + # Cleanup whitespace from owning team if self.owningTeam is not None: self.owningTeam = self.owningTeam.strip() diff --git a/trigger/rancid.py b/trigger/rancid.py index 898911a..430cc19 100644 --- a/trigger/rancid.py +++ b/trigger/rancid.py @@ -29,8 +29,8 @@ __author__ = 'Jathan McCollum' __maintainer__ = 'Jathan McCollum' __email__ = 'jathan.mccollum@teamaol.com' -__copyright__ = 'Copyright 2012-2012, AOL Inc.' -__version__ = '0.1' +__copyright__ = 'Copyright 2012-2012, AOL Inc.; 2013 Salesforce.com' +__version__ = '0.1.1' import collections import copy @@ -94,6 +94,8 @@ def parse_rancid_file(rancid_root, filename=RANCID_DB_FILE, fields=None, (Optional) Field delimiter """ device_data = _parse_delimited_file(rancid_root, filename, delimiter) + if not device_data: + return None # Always return None if there are no results # Make sure fields is not null and is some kind of iterable if not fields: