Skip to content

Commit

Permalink
Release 2.2.0 (napalm-automation#560)
Browse files Browse the repository at this point in the history
* Canonical interfaces fix dictionary update behavior.

* Fixing argument reference.

* Fixing NXOS file write issue Python3

* Added mocking method for nxos

* add tests for and fix canonical name

* add optional arg, and re-order optional args

* create extend driver docs

* clean up docs, add to index

* update doc strings

* fix pylama

* fix rev update dict

* add section headers

* spelling

* more consitent test, fix st

* Fix nxos_ssh mac table processing bug

* adding optional arguments for load_replace_candidate  (napalm-automation#508)

* adding optional arguments for load_replace_candidate and load_merge_candidate

* adding optional argument 'autoComplete'

* adding optional argument 'autoComplete' changing failed tests

* making required changes as discussed

* changing the if condition

* correcting the typo

* Handle multiple spaces in device_id from show lldp neighbors

* Add test to get_lldp_neighbors with hostname with spaces

* Loop through loaded config to convert HEREDOC commands.  Fixes napalm-automation#519 (napalm-automation#520)

(eos) loop through loaded config to convert HEREDOC commands.  Fixes napalm-automation#519

* Add code to build documentation for napalm-ansible (napalm-automation#535)

* Add code to build documentation for napalm-ansible

* pep8

* Change placement in documentation tree

* Change formatting

* Fix formatting for return values

* Sort parameters alphabetically

* Text changes

* Add script to clone napalm-ansible repo

* remove partial install (napalm-automation#554)

* Update documentation to corrrect driver ref (napalm-automation#559)

* [docs] Add "-c /dev/null" arguments to py.test command (napalm-automation#561) (napalm-automation#562)

* Add "-c /dev/null" arguments to py.test command (napalm-automation#561)

Before the NAPALM tests were picked up when running from RTD.

* fix requirements filepaths

* LLDP code with space in the device id (napalm-automation#549)

* LLDP code with space in the device id

* LLDP fixed width for device_id field
  • Loading branch information
dbarrosop authored and cspeidel committed Nov 11, 2018
1 parent 3bf1227 commit eabb752
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ tags
docs/integrations/ansible/modules/napalm_*/
docs/integrations/ansible/modules/source/*.json
docs/napalm_ansible_repo/

6 changes: 6 additions & 0 deletions docs/support/eos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ EOS configuration is loaded via ``pyeapi.eapilib.Node.run_commands()``, which by
such as ``banner motd``. The helper function ``EOSDriver._load_config()`` will attempt to detect HEREDOC commands in the
input configuration and convert them into a dictionary that eAPI understands

Multi-line/HEREDOC
~~~~~~~~~~~~~~~~~~
EOS configuration is loaded via ``pyeapi.eapilib.Node.run_commands()``, which by itself cannot handle multi-line commands
such as ``banner motd``. The helper function ``EOSDriver._load_config()`` will attempt to detect HEREDOC commands in the
input configuration and convert them into a dictionary that eAPI understands

Rollback
~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions napalm/eos/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None)

self.eos_autoComplete = optional_args.get('eos_autoComplete', None)

self.eos_autoComplete = optional_args.get('eos_autoComplete', None)

def open(self):
"""Implementation of NAPALM method open."""
try:
Expand Down
12 changes: 12 additions & 0 deletions napalm/ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,18 @@ def get_optics(self):

def get_lldp_neighbors(self):
"""IOS implementation of get_lldp_neighbors."""

def _device_id_expand(device_id, local_int_brief):
"""Device id might be abbreviated: try to obtain the full device id."""
lldp_tmp = self._lldp_detail_parser(local_int_brief)
device_id_new = lldp_tmp[3][0]
# Verify abbreviated and full name are consistent
if device_id_new[:20] == device_id:
return device_id_new
else:
# Else return the original device_id
return device_id

lldp = {}
neighbors_detail = self.get_lldp_neighbors_detail()
for intf_name, entries in neighbors_detail.items():
Expand Down
22 changes: 10 additions & 12 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
coveralls==1.3.0
ddt==1.2.0
flake8-import-order==0.18
pytest==3.6.4
pytest-cov==2.5.1
pytest-json==0.4.0
pytest-pythonpath==0.7.2
pylama==7.4.3
mock==2.0.0
# For travis-ci and PY34 for some reason. tox > 3.0.0 requires packaging >= 17.1
# which fails in travis-ci using PY34
tox==3.0.0
coveralls
ddt
flake8-import-order
pytest
pytest-cov
pytest-json
pytest-pythonpath
pylama
mock
tox
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
"""setup.py file."""
import uuid

from setuptools import setup, find_packages

with open("requirements.txt", "r") as fs:
reqs = [r for r in fs.read().splitlines() if (len(r) > 0 and not r.startswith("#"))]


install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
reqs = [str(ir.req) for ir in install_reqs]

__author__ = 'David Barroso <[email protected]>'

setup(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
GigabitEthernet1 is up, line protocol is up
Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842)
Internet address is 10.0.2.15/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full Duplex, 1000Mbps, link type is auto, media type is RJ45
output flow-control is unsupported, input flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:42:01, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1000 bits/sec, 1 packets/sec
5 minute output rate 1000 bits/sec, 1 packets/sec
14028 packets input, 1766902 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
9446 packets output, 1379617 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
------------------------------------------------
Local Intf: Gi1
Chassis id: 2cc2.603e.363b
Port id: Management1
Port Description - not advertised
System Name: eos-spine1.ntc.com

System Description:
Arista Networks EOS version 4.15.2F running on an Arista Networks vEOS

Time remaining: 95 seconds
System Capabilities: B,R
Enabled Capabilities: B,R
Management Addresses:
Other: 2C FF 60 3E 36 3B 00
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

------------------------------------------------
Local Intf: Gi1
Chassis id: 0005.8671.58c0
Port id: fxp0
Port Description: fxp0
System Name: vmx1

System Description:
Juniper Networks, Inc. vmx internet router, kernel JUNOS 15.1F4.15, Build date: 2015-12-23 19:22:55 UTC Copyright (c) 1996-2015 Juniper Networks, Inc.

Time remaining: 116 seconds
System Capabilities: B,R
Enabled Capabilities: B,R
Management Addresses:
IP: 10.0.0.31
OID:
0.1.3.6.1.2.1.31.1.1.1.1.1.
Auto Negotiation - supported, disabled
Physical media capabilities:
1000baseT(FD)
1000baseX(FD)
1000baseX(HD)
Symm, Asym Pause(FD)
100base-TX(FD)
100base-TX(HD)
10base-T(FD)
10base-T(HD)
Media Attachment Unit type - not advertised
Vlan ID: - not advertised


Total entries displayed: 2

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
------------------------------------------------
Chassis id: 0018.fe1e.b020
Port id: 17
Port Description: 17
System Name: twb-sf-hpsw1

System Description:
ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp))

Time remaining: 93 seconds
System Capabilities: B
Enabled Capabilities: B
Management Addresses:
IP: 10.220.88.10
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised


Total entries displayed: 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
------------------------------------------------
Chassis id: 0018.fe1e.b020
Port id: 18
Port Description: 18
System Name: twb-sf-hpsw2

System Description:
ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp))

Time remaining: 93 seconds
System Capabilities: B
Enabled Capabilities: B
Management Addresses:
IP: 10.220.88.11
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised


Total entries displayed: 1

0 comments on commit eabb752

Please sign in to comment.