-
Notifications
You must be signed in to change notification settings - Fork 118
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-3 #325
Open
Danishkhan7864
wants to merge
13
commits into
develop
Choose a base branch
from
netdevice_drivers
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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-3 #325
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
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-3