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)