Skip to content
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
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

TEST-3 #325

wants to merge 13 commits into from

Conversation

Danishkhan7864
Copy link

TEST-3

jathanism and others added 13 commits March 8, 2017 10:35
- 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants