Release 1.3 - OMG WTF have we done!!

+ General changes

  - All references to psyco have been removed as it doesn't support
    64-bit and was causing problems in Python 2.7.3.
  - A new document, :doc:`new_vendors`, has been added to use as
    checklist for adding new vendor support to Trigger.
  - Added `Allan Feid <https://github.com/crazed>`_ as contributor for
    his *crazed* ideas.

+ :feature:`10` The following changes have been made within
  `~trigger.changemgmt`, which provides Trigger's support for bounce
  windows and timezones, to move the bounce window settings into
  configurable data vs. static module.

  - The Bounce window API totally overhauled. Bounce windows are no
    longer hard-coded in `~trigger.changemgmt` and are now configured
    using ``bounce.py`` and specified using :setting:`BOUNCE_FILE`.
    The interface for creating `~trigger.changemgmt.BounceWindow`
    objects was greatly simplified to improve readability and usage.
   - Added sample ``bounce.py`` to ``conf/bounce.py`` in source
     distribution
   - New setting variables in ``settings.py``:

     - :setting:`BOUNCE_FILE` - The location of the bounce window
       mapping definitions. Defaults to ``/etc/trigger/bounce.py``.
     - :setting:`BOUNCE_DEFAULT_TZ` - Default timezone for bounce
       windows. Defaults to ``'US/Eastern'``.
     - :setting:`BOUNCE_DEFAULT_COLOR` - The default bounce risk-level
       status color. Defaults to ``'red'``.

+ :feature:`55` The following changes have been made within
  `~trigger.netdevices` to make it easier to populate
  `~trigger.netdevices.NetDevices` from arbitrary sources by
  implementing pluggable loaders.

  - The module has been converted into a package.
  - All hard-coded metadata parsing functions and associated imports
    have been replaced with loader plugin classes. Filesystem loaders
    provided by default for JSON, XML, Sqlite, Rancid, and *new*:
    CSV!). The bare minimum config for CSV is a newline-separated CSV
    file populated with "hostname,vendor" - New configuration setting:
    :setting:`NETDEVICES_LOADERS` used to define a list of custom
    loader classes to try in turn. The first one to return data wins.
  - The configuration settings :setting:`SUPPORTED_FORMATS` and
    :setting:`NETDEVICES_FORMAT`  have been deprecated.
  - The configuration setting :setting:`NETDEVICES_SOURCE` has
    replaced :setting:`NETDEVICES_FILE`.
  - The sample ``settings.py`` (found at ``conf/trigger_settings.py``
    in the source distribution) is illustrates how one may use
    :setting:`NETDEVICES_SOURCE` and :setting:`NETDEVICES_LOADERS` to
    replace the deprecated settings :setting:`NETDEVICES_FORMAT` and
    :setting:`NETDEVICES_FILE`.

+ The following changes have been made within `~trigger.twister`,
  which provides Trigger's remote execution functionality:

  - :feature:`22` Add Aruba wireless controller and Brocade ADX/VDX
    support for execute/pty in trigger.twister and any device that
    requires pty-req and shell without actualling using a pty. The
    channel class for this functionality is called
    `~trigger.twister.TriggerSSHAsyncPtyChannel` - Added a new
    ``requires_async_pty`` attribute to
    `~trigger.netdevices.NetDevice` objects to help identify devices
    that require such channels.
  - Added a ``force_cli`` flag to `~trigger.twister.execute()` to
    force CLI execution on Juniper devices instead of Junoscript.
  - The default client factory
    (`~trigger.twister.TriggerClientFactory`) now calls
    `~trigger.tacacsrc.validate_credentials()` instead of directly
    instantiating `~tacacsrc.Tacacsrc` anytime credentials are
    populated automatically, resulting in only a single call to
    `~tacacsrc.Tacacsrc()`, when creds aren't provided.
  - Added error-detection for Brocade MLX.

+ The following changes have been made within `~trigger.cmds`, which
  provides an extensible, developer-friendly interface to writing
  command exeuction adapters.

  - Added a ``force_cli`` flag to `~trigger.cmds.Commando` constructor
    to force CLI execution on Juniper devices instead of Junoscript.
  - The ``timeout`` value may now be  to be set as a class variable in
    `~trigger.cmds.Commando` subclasses.
  - `~trigger.cmds.Commando` now step through ``commands`` as
    iterables instead of assuming they are lists. The iterable is also
    now explicitly cast to a list when we need them it be one.
  - A minor bugfix in ~trigger.cmds.Commando` causing results from
    multiple Commando instances to collide with each other because
    they were inheriting an empty results ``{}`` from the class
    object.
  - `~trigger.cmds.Commando` now accepts ``creds`` as an optional
    argument. If not set, it will default to reading user credentials
    from ``.tacacsrc``.

+ The following changes have been madw within `~trigger.acl.parser`,
  which provides Trigger's support for parsing network access control
  lists (ACLs) and firewall policies.

  - :feature:`12` Support has been added for parsing IPv6 addresses in
    Juniper firewall filters.
  - :bug:`26` Parsing of "{ip} except;" in Junos ACLs doesn't seem to
    be functioning. Parser modifications to support negation of
    address in Junos ACLs.
  - Always display the prefix on /32 and /128 IPs in Juniper ACLs.

+ The following changes have been made within `~trigger.tacacsrc`,
  which provides functionality to cache and retrieve user credentials:

  - Added a new function `~trigger.tacacsrc.validate_credentials()`
    validate credentials in the form of supports 2-tuples (username,
    password), 3-tuples (username, password, realm), and dictionaries
    of the same and returns a `~trigger.tacacsrc.Credentials` object.

+ The following changes have been made to Trigger's command-line
utilities:

  - :feature:`60` ``bin/load_acl`` will now shutdown gracefully if
    initial MySQL connection doesn't work, using a try..except to
    display some information about the connection failure without a
    traceback. For other MySQL issues, we will leave as is (dumping
    the traceback) because they would represent coding or transient
    issues, and we should present as much information as we have.
  - :feature:`20` ``bin/gnng`` (get_nets) now supports not only
    support Juniper 'sp' interfaces, but we've added flags to include
    un-numbered (``-u``) or disabled (``-d``) interfaces.
Updated README.rst to reflect branching model.
Reorder the README
Release 1.3.1 - Palo Alto support, and more better SSH!

+ General changes

  - New contrib package for optional extensions to core Trigger
    features, `~trigger.contrib.commando.CommandoApplication` being
    the first.
  - Remove legacy mtsync check from bin/fe.
  - Conditionally import MySQLdb so we can still do testing without
    it.

+ The following changes have been madw within `~trigger.acl.parser`,
  which provides Trigger's support for parsing network access control
  lists (ACLs) and firewall policies:

  - :bug:`72` Bugfix in `~trigger.acl.parser.TIP` where an invalid
    network preifx (e.g. '1.2.3.1/31' would throw an
    ``AttributeError`` when checking the ``negated`` attribute and
    shadowing the original ``ValueError``.

+ The following changes have been made within `~trigger.cmds`, which
  provides an extensible, developer-friendly interface to writing
  command exeuction adapters:

  - Added ``with_errors`` argument to `~trigger.cmds.Commando`
    constructor to toggle whether errors are raised as exceptions or
    returned as strings.
  - Allow timeout to be set as a class variable in
    `~trigger.cmds.Commando` subclasses, preferrring timeout passed to
    constructor in `~trigger.cmds.Commando` subclasses.

+  The following changes have been made within `~trigger.netdevices`:

  - Refactor how we id Brocade switches for startup/commit (fix #75)

    * It's assumed that all Brocade devices all act the same;
    * Except in the case of the VDX, which is treated specially.

  - Simplified how ``startup_commands`` are calculated
  - Disable SQLite loader if sqlite3 isn't available for some reason.
  - Prompt patterns are now bound to `~trigger.netdevices.Vendor`
    objects object when `~trigger.netdevices.NetDevices` is populated.
  - `~trigger.netdevices.Vendor` objects now have a ``prompt_pattern``
    attribute.
  - All prompt patterns are now defined in ``settings.py``:

    * Vendor-specific: :setting:`PROMPT_PATTERNS`
    * IOS-like: :setting:`IOSLIKE_PROMPT_PAT`
    * Fallback: :setting:`DEFAULT_PROMPT_PAT`

+ The following changes have been made within `~trigger.twister`,
  which provides Trigger's remote execution functionality:

  - Added CLI support for Palo Alto Networks firewalls!
  - SSH Async now enabled by default for Arista, Brocade.
  - :feature:`54` Moved static definition of commands permitted to be
    executed when specified in a users' ``~/.gorc`` file into a new
    configuration setting :setting:`GORC_ALLOWED_COMMANDS`. The file
    location may now also be customized using :setting:`GORC_FILE`.
  - :bug:`68` Fix host lookup bug in `~trigger.twister.TriggerTelnet`
    causing telnet channels to crash.
  - :bug:`74` Fix error-detection for NetScaler devices.
  - Enhanced logging within `~trigger.twister` to include the device
    name where applicable and useful (such as in SSH channel
    debugging).
  - All ``execute_`` functions have been simplified to eliminate
    hard-coding of vendor checking wherever possible.
  - Beginnings of reworking of Generic vs. AsyncPTY SSH channels:

    * Most vendors support async/pty with little problems.
    * This will become the new default.
    * New execute helper: `~trigger.twister.execute_async_pty_ssh`
    * New error helper: `~trigger.twister.has_juniper_error`
    * Arista now uses `~trigger.twister.execute_async_pty_ssh`
    * A ``NetScalerCommandFailure`` will now just be a
      `~trigger.exceptions.CommandFailure`

+ Documentation

  - Updated README to callout CSV support.
  - Updated README to reflect branching model.
  - Updated supported vendors, and no longer promising NETCONF
    support.
Minor syntax error fix in tools/tacacsrc2gpg.py
Release 1.4

Trigger has a new home at https://github.com/trigger/trigger!

New Features
------------

+ Support for new vendors and platforms!!

  - Aruba wireless controllers
  - Cisco Nexus switches running NX-OS
  - Force10 routers and switches

+ Trigger now has a `~trigger.contrib` package for optional extensions
  to core Trigger features.

  - A pluggable XMLRPC `~trigger.contrib.xmlrpc.server` that can be
    used as a long-running event loop.
  - Plugins for use w/ the XMLRPC server

+ Task `~trigger.acl.queue` now supports MySQL, PostgreSQL, or SQLite.
  See the :ref:`db-settings` for more information!

  - There's a new :setting:`DATABASE_ENGINE` that allows you to
    specify.
  - New tool to initialize your database w/ ease: ``init_task_db``

+ All legacy unit tests have been fixed and Trigger is now fully
  integrated with `Travis CI <http://traviw-ci.org>`_. All new
  functionality will be fully tested, and the existing unit testing
  suite will be continually improved.
+ You may now globally disable ACL support by toggling
  :setting:`WITH_ACLS` in ``settings.py``.

  - All `~trigger.twister.execute()` methods and
    `~trigger.cmds.Commando` objects now support a ``with_acls``
    argument to toggle this at runtime.
  - We also turned off ACLs for scripts that will never use them.

+ All `~trigger.twister.execute()` methods and
  `~trigger.cmds.Commando` objects now support a ``force_cli``
  argument to force commands to be sent as CLI commands and return
  human-readable output instead of structured output. Currently this
  is only relevant for Juniper devices, which return XML by default.

+ :feature:`54` Commands allowed in ``.gorc`` can now be customized in
  ``settings.py`` (See :setting:`GORC_ALLOWED_COMMANDS` for more
  information)
+ Vastly expanded debug logging to include device hostname whenever
  possible. (You're welcome!)

Bug fixes
---------

+ Fix AttributeError when trying to connect interactively causing
  logins to fail.
+ :bug:`74` - Bugfix in error-detection for NetScaler devices
+ Bugfix in host lookup bug in `~trigger.twister.TriggerTelnet`
  causing telnet channels to crash.
+ Fix typo that was causing Cisco ACL parsing to generate an unhandled
  exception.
+ Fix typos in ``tools/tacacsrc2gpg.py`` that were causing it to
  crash.
+ :bug:`119` - Get custom importlib from trigger.utils vs. native (for
  supporting Python < 2.6).
+ Replace all calls to ``os.getlogin()`` causing "Invalid argument"
  during unit tests where the value ``$USER`` is not set.
+ Various bugfixes and improvements to the handling of async SSH
  execution.
+ :bug:`33` Console paging is now disabled by default for SSH
  Channels.
+ :bug:`49` Bugfix in ACL `~trigger.acl.parser` to omit src/dst ports
  if range is 0-65535.
+ Bugfix in ACL parser showing useless error when address fails to
  parse.
+ Bugfix in `~trigger.acl.RangeList` objects causing numeric
  collapsing/expanding to fail
+ Bugfix in `~trigger.cmds.Commando` causing results from multiple
  Commando instances to collide with each other because they were
  inheriting an empty dictionary from the class object.

CLI Tools
---------

+ ``bin/gnng`` - Added flags to include un-numbered (-u) or disabled
  (-d) interfaces.

trigger.acl
-----------

+ Minimal changes to support writing Dell ACLs
+ Parser modifications to support negation of address objects in Junos
  ACLs. (Note that this relies on marking up ACLs with 'trigger: make
  discard' in term comments. This is undocmented functionality,
  currently used internally within AOL, and this code will only be
  used for Junos output.)
+ :feature:`47` Add parsing of ranges for ``fragment-offset`` in
  Juniper ACLs.

trigger.changemgmt
------------------

+ Refactored `~trigger.changemgt.BounceWindow` definition syntax to be
  truly usable by humans.

trigger.cmds
------------

+ `~trigger.cmds.NetACLInfo` and ``bin/gnng`` can now include disabled
  or un-addressed interfaces in their results.
+ Added ``pyparsing`` as a hard requirement until further notice so
  that `~trigger.cmds.NetACLInfo` and ``bin/gnng`` will behave as
  expected without confusing developers and users alike.
+ You may now pass login credentials to `~trigger.cmds.Commando` using
  the ``creds`` argument.

trigger.netdevices
------------------

+ `~trigger.netdevices.NetDevices` loaders are now pluggable, with
  built-in support for JSON, SQLite, XML, CSV, and RANCID!
+ Network device metadata may now be loaded from any URI-based file
  path (especially URLs).
+ `~trigger.netdevices.NetDevice` objects now have the commands that
  are best to execute to disable paging or commit changes determined
  dynmically to ease utility for Trigger developers.
+ Prompt patterns are now bound to `~trigger.netdevices.Vendor`
  objects.

trigger.tacacsrc
----------------

+ Added a utility function `~trigger.tacacsrc.validate_credentials()`
  to ... validate credentials ... and return a
  `~trigger.tacacsrc.Credentials` object.

trigger.twister
---------------

+ The new default operating mode for SSH channels is to use shell +
  pty emulation.
+ :feature:`56` You may now optionally run "commit full" on Juniper
  devices. (See :setting:`JUNIPER_FULL_COMMIT_FIELDS` for more
  information)
+ Added support for sending an enable password to IOS-like devices
  when an enable prompt is detected.

  - This can either be provided in your netdevices metadata by
    populating the ``enablePW`` attribute, or by setting the
    environment variable ``TRIGGER_ENABLEPW`` to the value of the
    enable password.

+ Added error-detection for Brocade MLX routers.
+ `~trigger.tacacsrc.Tacacrc()` is now only called once when creds
  aren't provided upon creation of new clients.

trigger.utils
-------------

+ New utility module `~trigger.utils.xmltodict` for convert XML into
  dictionaries, primarily so such objects can be serialized into JSON.
Release 1.4.1

New Features
------------

+ Support for new vendors and platforms!!

  - F5 BIG-IP application delivery controllers and server
    load-balancers
  - MRV LX-series console servers

+ New tool ``bin/run_cmds`` to run commands from the CLI!

Documentation Enhancements
--------------------------

+ API documentation fixes for trigger.contrib and some logging
  fixes

Bug Fixes
---------

+ :bug:`97` Bugfix that was causing NameError crash in
  ``bin/optimizer``.
+ :bug:`124` Bugfix in `~trigger.utils.cli.pretty_time` where
  global timezone was hard-coded.
+ :bug:`127` Bugfix to handle SSH protocol errors as if they are
  login failures instead of exiting with a cryptic error.
+ Bugfix in Tacacsrc when updating credentials for a user.
+ Tacacsrc will now truly enforce file permissions on the
  .tacacsrc when reading or writing the file
Release 1.4.3

New Features
------------

+ Added a new ``bin/check_syntax`` tool to determine if an ACL passes a
  syntax check.
+ Acceptance tests can now be run standalone from within a clone of the
  Trigger repo.
+ :feature:`142` ``bin/gong`` now enables on login if the enable
  password is provided by way of :setting:`TRIGGER_ENABLEPW`.

Enhancements
------------

+ Improvements to user-experience within ``bin/acl``

  - Help text greatly improved and expanded to be more helpful

    * ``-l`` and ``-m`` args now print a message when load queue is
      empty
    * Clarified help text for ``-a`` and ``-r`` args

  - It now requires users to explicitly ask for associations
    instead of it being default.
  - The wording on the status output has been improved for clarity
    and conciseness.

+ ``bin/load_acl`` will now validate ``.tacacsrc`` before work begins

Bug Fixes
---------

+ Bugfix in `~trigger.tacacs.Tacacsrc` in which saving a password
  longer than a certain lengthw could cause the encrypted password hash
  to contain newlines and therefore become unreadable.
+ :bug:`163` Bugfix to copy startup commands from a device when creating
  a channel base, otherwise they will get consumed directly from the
  device, and connections after the first will not send any startup
  commands.
+ :bug:`157` Bugfix in which
  `~trigger.twister.TriggerTelnetClientFactory` was missing the
  ``device`` attribute.
+ Fix a bug causing a crash when using ``gnng --dotty``
+ Bugfix in `~trigger.twister.pty_connect()` to check for telnet
  fallback before attempting to telnet over pty that would cause a race
  condition resulting in a crash if neither telnet or SSH are available.
+ Catch invalid hostnames before they bleed through in stderr output
  when using `~trigger.utils.network.ping`
+ Bugfix to catch exceptions for bad netdevices data in ``bin/netdev``.
+ Fix bugs in auto-enable and remote execution on certain devices

  - The correct delimiter is now mapped out by vendor/platform and
    attached to the NetDevice object at runtime.
  - Fixed a bug when executing commands remotely on NetScreen
    devices running ScreenOS that was causing them to be treated
    as Juniper routers/switches if the NetDevice attributes
    vendor=juniper and deviceType=netscreen.

+ :bug:`151` Gong now uses chosen dev. from multiple when updating
  ``.tacacsrc``.
+ :bug:`90` Bugfix causing
  `~trigger.netdevices.loaders.filesystem.CSVLoader` for netdevices to
  always succeed.
Release 1.4.4

+ Fix a minor bug causing ``bin/gong`` to send the enable password when
  it shouldn't.
+ Client connectings (such as those made by ``bin/load_acl``, for
  example) will now raise an error when it is detected that an enable
  password is required and one is not provided.
+ Added SSH support for confirmation prompts

  - Added ``'[confirm]'`` as one of those prompts

+ Added ability to specify remote port for NetDevice objects

  - Add defaults in settings.py for SSH (SSH_PORT) and Telnet (SSH_TELNET) ports
  - Added documentation for SSH_PORT and TELNET_PORT in settings.py

+ Bugfix when passwords are passed in to make sure they are not unicode
+ Gong will now mark a device as enabled when auto-enable is detected.
+ Fix prompt patterns to include optional space and hard line-endings
+ Pin pytz<=2014.2 to fix unit tests for time being (no pun intended)
Merge branch 'master' into develop