-
Notifications
You must be signed in to change notification settings - Fork 120
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
TEST-5- Trigger test #326
Open
Danishkhan7864
wants to merge
245
commits into
fe-plugins
Choose a base branch
from
netdevice_drivers
base: fe-plugins
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
TEST-5- Trigger test #326
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixed pica8 prompt. bin/run_cmds now works with Pica8 for output that does not page.
…-more' to show commands.
self-explanatory
Added comments and rearranged support.py
License updated to include attribution to Salesforce.com
Parser refactor
New Features ------------ + There is now a MongoDB loader for `~trigger.netdevices.NetDevices`. + :feature:`140` There is a new `~trigger.cmds.ReactorlessCommando` that allows for running multiple `~trigger.cmds.Commando` instances in the same program under the same reactor by preventing the instances from doing it themselves. + :feature:`182` ``bin/run_cmds`` will now log all activity to a logfile in ``/tmp`` + :feature:`195` The `~trigger.acl` library has been refactored to be more modular, breaking out vendor-specific grammar details into their own modules (`~trigger.acl.ios`, `~trigger.acl.junos`). Documentation ------------- + Improved the documentation for :doc:`usage/tacacsrc`. + The :doc:`installation` page now includes instructions for using ``bounce.py`` to configure maintenance windows. Bug Fixes --------- + Make sure Juniper SRX devices are not categorized as being NetScreen devices + Bugfix in `~trigger.netdevices.NetDevice.is_netscreen()` to account for when ``.make`` is ``None`` + Minor bugfix in ``start_xmlrpc.sh`` example script
Fix hanging SSH connections to Cisco equipment
Bug Fixes --------- + Fix hanging SSH connections to Cisco equipment due to client sending key exchange messages before remote device. + Minor bugfix in default setting for stage_tftp affecting bin/load_acl.
fix #144 + Also allow .tacacsrc passphrase to be stored in settings.py
- Implemented initial support for devices running Cumulus Linux with a few caveats: 1. It is expected that the user logs into a bash shell 2. `sudo vtysh` is immediately executed 3. The driver is categorized as IOS-like to facilitate ease of interaction with the `vtysh` session. - Added a device identity check for Cumulus: `trigger.netdevices.NetDevice.is_cumulus()` - Fixed a bug in which `trigger.cmds.Commando` instances would never stop running because of changes made to support persistent channels using crochet. - Added a `stop_reactor` argument that defaults to `True` to `trigger.cmds.Commando` so that it will stop the reactory loop by default. Setting `stop_reactor=False` will make `Commando` instances now behave like `ReactorlessCommando` instances. - Fixed a bug in which enable prompt would sometimes be erroneously detected on Cumulus devices in `vtysh` output because of lines ending in ">\n". - Moved startup command definitions into a new setting called `settings.STARTUP_COMMANDS_MAP`. This is not quite complete but is an interim step to moving hard-coded device identification logic out of `trigger.netdevices` and into drivers. - Vendor platforms with differing startup commands based on their device type are now mapped with an underscore separation (e.g. 'Cisco ASA' becomes 'cisco_asa'). - Added "Celestica" as a known white-label vendor for the purpose of mapping to the vendor "cumulus" for driver selection. - The setting SUPPORTED_VENDORS is now derived from SUPPORTED_PLATFORMS as a step to unify the two settings. This is because platforms (dict) has the same keys as vendors (list).
#300) - Bugfix in NetDevice.connected never returning the correct connection status when using the twister2 .open() and .close() methods. - Bumped requirements to allow any version of Twisted 16.x
…thods. (#301) - A new `NetDevices.add_device()` method has been added to provide a cleaner interface to adding new NetDevice objects to a NetDevices instance. - A new `NetDevices.reload()` method has been added to quickly and easily reset the state of a NetDevices instance. - The `BaseLoader` plugin instance is now stored on the NetDevices instance so that it can provide the overloaded behaviors. - `NetDevices.set_loader()` is used to attach the BaseLoader object - On population, if an incoming object is already a NetDevice, the processing phase is skipped (implying that because you passed in a NetDevice you're declaring the object's state). - The following `NetDevices` methods can now be customized by `BaseLoader` plugins: - `NetDevices.find()` to customize single device lookup - `NetDevices.match()` to customize keyword-argument lookup of devices - If `skip_loader=True` is passed, the built-in method will be called instead. - `NetDevices.all()` to customize retrieval of all device objects - `NetDevices._dict` to deeply customize the behavior of how NetDevice objects are stored internally. Not included (yet): - Unit tests for pluggable behavior. - Documentation
* Initial pass at docstrings for new endpoint code. * Updated Doco with experimental feature section and detailed how to use experimental endpoint code. * Update experimental.rst Tweaked some of the words and fixed some spacing issues * Update experimental.rst * Change openFailed's docstring to triple quotes * Added change description for endpoint doco
- XMLRPC service includes new options for generation and storage of the SSH host key for the SSH manhole - Bugfix in `trigger.twister` preventing SSH connections to devices running Cisco Nexus with FIPS mode disabled. This also addresses the case in which a device sends any other text prior to sending the SSH version banner. - Enhancement to `trigger.utils.network.test_ssh` to support extra SSH banners in the event that a Cisco Nexus w/ FIPS mode disabled is encountered that would otherwise cause an SSH connection test to fail.
This fixes a bug in the textfsm results binding command where given multiple devices in a Commando device_list, the parsed results clobber the parsed_results variable instead of the expected behaviour of a list of dicts keyed by the devices' hostname containing the parsed results.
* Fixup of rc5 bugs * TextFSM processor bug which made it so only one set of parsed commands made it into the results. * Twister bug which regressed support for less than average ssh server implementations by not initialising keyexchange * Made some modifications after observing a different kind of failure with the last revision. Looks like kexinit is for the server side of things. * Applied fix to twister2 which is also affected * Fix import bug. * Update changelog and version control
- Also disabled execution of `sudo vtysh` by default on Cumulus. It will now be left up to operators to do this for themselves. - Updated the changelog to include a mention of the new support for Cumulus Linux.
Escape the backslash in '\n' so that it renders as expected.
I've preserved Twisted's default of 0.0.0.0, but now if you supply -a to twistd you can have it listen on a different address.
methods to drivers.
- What was drivers are now "handlers" (e.g. trigger vs. napalm) - Handlers are bound to NetDevice objects - Drivers are now bound to handlers and include all the variable bits - name - prompt_pattern - startup_commands - commit_commands - delimiter (line-ending)
- Renamed all "handlers" to "dispatchers" - All Trigger drivers now inherity from TriggerDriver (Wow!) - Added a TriggerDriver for 'juniper' - NetDevice object now has 3 new methods that interact w/ the dispatcher: - .open() -> Establishes a dispatcher (trigger or napalm) and connects - .close() -> Disconnects and tears down dispatcher - .dispatch() -> Dispatches a method on the driver - NetDevice.connected returns the connected state from the driver's session - The BaseDispatcher is greatly simplified and only really cares about how to get a driver, how to dispatch from the driver, and whether the driver is connected - Credentials are still stored on the dispatcher, but will soon be moved to be stored directly on the NetDevice (per-device creds) - Device is still stored directly on the TriggerDriver instance, but that will also go away once we replace the twister functionality w/ a streamlined client factory. - The NapalmDispatcher is currently hard-coded to dispatch in a reactor thread using Crochet, but may be modified to return a naked deferred instead.
* The idea behind the new endpoint code is so all sessions make use of a single channel pty protocol. This reduces the amount of redundant code needed in twister.py. * New streamlined IosLike endpoint code that runs within the crochet reactor thread. * Replaces the existing endpoint code. * Running commands over a multiplexed session is no longer supported.
- Update TriggerEndpointDispatcher.driver_connected() for twister3 - Creds are now directly stored on the TriggerDriver but are still taken in at the constructor as username, password. We might swap this out. - Driver.has_error is a driver-level callback to check results for errors (Evolved from trigger.twister.has_{vendor}_error() functions. - Added .has_error methods to IOS-like and Juniper drivers. - Driver.delimiter and Driver.has_error are now sent to the client factory.
- Moved keyexchange stuff from ClientTransport.connectionMade to custom CiscoClientTransport which is now provided by the Cisco driver - Transport_class can now optionally be sent to twister3.connect() and to twister3.ClientFactory
- Trying to make Commando2 work / twister3 - Still "some kind" of issue w/ calling _send_next (try running 'show ntp status' on a Juniper device)
- Apparently NetDevice.open() *does* block, such as if a device is unreachable. We need to make this not block!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TEST-5- Trigger test