Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #109 from napalm-automation/develop
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
mirceaulinic authored Jan 31, 2017
2 parents 54c4c33 + 77e837f commit 8271cb9
Show file tree
Hide file tree
Showing 17 changed files with 412 additions and 61 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ env

test/unit/test_devices.py
test/unit/TestIOSDriverKB.py
test/unit/TestIOSDriverKB.py_safe
#test/unit/ios/*.conf
#test/unit/ios/*.diff
test/unit/ios/cleanup.sh
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ python:
- 3.4
- 3.5
install:
- pip install -r requirements-dev.txt
- pip install .
- pip install tox-travis
- pip install coveralls
deploy:
provider: pypi
user: dbarroso
Expand All @@ -15,8 +15,8 @@ deploy:
tags: true
branch: master
script:
- py.test --cov-report= --cov=napalm_ios test/
- pylama .
- tox

after_success:
- coveralls
- if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi
244 changes: 191 additions & 53 deletions napalm_ios/ios.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
napalm_base>=0.20.4
netmiko>=1.0.0
napalm_base>=0.21.0
netmiko>=1.2.7
6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ skip = build/*,.tox/*
max_line_length = 100

[tool:pytest]
addopts = --cov=./ -vs
addopts = --cov=napalm_ios --cov-report term-missing -vs --pylama
json_report = report.json
jsonapi = true

[coverage:run]
source = napalm_ios

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="napalm-ios",
version="0.5.1",
version="0.6.0",
packages=find_packages(),
author="Kirk Byers",
author_email="[email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"GigabitEthernet1": [
{
"parent_interface": "N/A",
"remote_chassis_id": "2cc2.603e.363b",
"remote_port": "Management1",
"remote_port_description": "not advertised",
"remote_system_capab": "B,R",
"remote_system_description": "Arista Networks EOS version 4.15.2F running on an Arista Networks vEOS",
"remote_system_enable_capab": "B,R",
"remote_system_name": "eos-spine1.ntc.com"
},
{
"parent_interface": "N/A",
"remote_chassis_id": "0005.8671.58c0",
"remote_port": "fxp0",
"remote_port_description": "fxp0",
"remote_system_capab": "B,R",
"remote_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.",
"remote_system_enable_capab": "B,R",
"remote_system_name": "vmx1"
}
]
}
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 2cc2.603f.437a (bia 2cc2.603f.437a)
Internet address is 10.0.0.51/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 198/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:00:07, output 00:00:18, 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 0 bits/sec, 0 packets/sec
3815699 packets input, 275467675 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
2610907 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
5249863 packets output, 384472234 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
11192 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,10 @@
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID Local Intf Hold-time Capability Port ID
eos-spine1.ntc.com Gi1 120 B,R Management1
vmx1 Gi1 120 B,R fxp0

Total entries displayed: 2

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 @@
[{"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0100.0ccc.cccc", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0100.0ccc.cccd", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0000", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0001", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0002", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0003", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0004", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0005", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0006", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0007", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0008", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0009", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.000a", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.000b", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.000c", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.000d", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.000e", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.000f", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "0180.c200.0010", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "ffff.ffff.ffff", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "000a.b82d.10e0", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/3", "last_move": -1.0, "active": true, "mac": "0012.80b6.4cd8", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0012.80b6.4cd9", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0014.6915.4100", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b921.9200", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/1", "last_move": -1.0, "active": true, "mac": "0018.b921.9278", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b974.528f", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/13", "last_move": -1.0, "active": true, "mac": "0019.0617.660f", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/14", "last_move": -1.0, "active": true, "mac": "0019.0617.6610", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/15", "last_move": -1.0, "active": true, "mac": "0019.0617.6611", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/19", "last_move": -1.0, "active": true, "mac": "001b.d450.970f", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/20", "last_move": -1.0, "active": true, "mac": "001b.d450.9710", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/21", "last_move": -1.0, "active": true, "mac": "001b.d450.9711", "moves": -1}, {"vlan": 4, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b974.528f", "moves": -1}, {"vlan": 45, "static": false, "interface": "Fa0/19", "last_move": -1.0, "active": true, "mac": "0018.b945.d5a9", "moves": -1}, {"vlan": 45, "static": false, "interface": "Fa0/5", "last_move": -1.0, "active": true, "mac": "0018.b945.f780", "moves": -1}, {"vlan": 45, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b974.528f", "moves": -1}, {"vlan": 56, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b945.f781", "moves": -1}, {"vlan": 56, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b974.528f", "moves": -1}, {"vlan": 56, "static": false, "interface": "Fa0/19", "last_move": -1.0, "active": true, "mac": "0019.069c.80e1", "moves": -1}, {"vlan": 6, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "0018.b974.528f", "moves": -1}, {"vlan": 6, "static": false, "interface": "Fa0/13", "last_move": -1.0, "active": true, "mac": "0019.069c.80e0", "moves": -1}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Mac Address Table
-------------------------------------------

Vlan Mac Address Type Ports
---- ----------- -------- -----
All 0100.0ccc.cccc STATIC CPU
All 0100.0ccc.cccd STATIC CPU
All 0180.c200.0000 STATIC CPU
All 0180.c200.0001 STATIC CPU
All 0180.c200.0002 STATIC CPU
All 0180.c200.0003 STATIC CPU
All 0180.c200.0004 STATIC CPU
All 0180.c200.0005 STATIC CPU
All 0180.c200.0006 STATIC CPU
All 0180.c200.0007 STATIC CPU
All 0180.c200.0008 STATIC CPU
All 0180.c200.0009 STATIC CPU
All 0180.c200.000a STATIC CPU
All 0180.c200.000b STATIC CPU
All 0180.c200.000c STATIC CPU
All 0180.c200.000d STATIC CPU
All 0180.c200.000e STATIC CPU
All 0180.c200.000f STATIC CPU
All 0180.c200.0010 STATIC CPU
All ffff.ffff.ffff STATIC CPU
1 000a.b82d.10e0 DYNAMIC Fa0/16
1 0012.80b6.4cd8 DYNAMIC Fa0/3
1 0012.80b6.4cd9 DYNAMIC Fa0/16
1 0014.6915.4100 DYNAMIC Fa0/16
1 0018.b921.9200 DYNAMIC Fa0/16
1 0018.b921.9278 DYNAMIC Fa0/1
1 0018.b974.528f DYNAMIC Fa0/16
1 0019.0617.660f DYNAMIC Fa0/13
1 0019.0617.6610 DYNAMIC Fa0/14
1 0019.0617.6611 DYNAMIC Fa0/15
1 001b.d450.970f DYNAMIC Fa0/19
1 001b.d450.9710 DYNAMIC Fa0/20
1 001b.d450.9711 DYNAMIC Fa0/21
4 0018.b974.528f DYNAMIC Fa0/16
45 0018.b945.d5a9 DYNAMIC Fa0/19
45 0018.b945.f780 DYNAMIC Fa0/5
45 0018.b974.528f DYNAMIC Fa0/16
56 0018.b945.f781 DYNAMIC Fa0/16
56 0018.b974.528f DYNAMIC Fa0/16
56 0019.069c.80e1 DYNAMIC Fa0/19
6 0018.b974.528f DYNAMIC Fa0/16
6 0019.069c.80e0 DYNAMIC Fa0/13
Total Mac Addresses for this criterion: 42
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"moves": -1, "interface": "Port-channel1", "vlan": 1, "static": false, "mac": "30a3.30a3.a1c3", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1c4", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1c5", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1c6", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1c7", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1c8", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1c9", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Port-channel1", "vlan": 99, "static": false, "mac": "30a3.30a3.a1ca", "active": true, "last_move": -1.0}, {"moves": -1, "interface": "Po1", "vlan": 1, "static": true, "mac": "0100.0ccc.ccce", "active": false, "last_move": -1.0}, {"moves": -1, "interface": "Po1", "vlan": 1, "static": true, "mac": "ffff.ffff.ffff", "active": false, "last_move": -1.0}, {"moves": -1, "interface": "", "vlan": 39, "static": true, "mac": "ffff.ffff.ffff", "active": false, "last_move": -1.0}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Unicast Entries
vlan mac address type protocols port
---------+---------------+--------+---------------------+-------------------------
1 30a3.30a3.a1c3 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c4 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c5 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c6 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c7 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c8 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c9 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1ca dynamic ip,ipx,assigned,other Port-channel1

Multicast Entries
vlan mac address type ports
---------+---------------+-------+--------------------------------------------
1 0100.0ccc.ccce system Po1
1 ffff.ffff.ffff system Po1
39 ffff.ffff.ffff system Gi10/31,Gi10/32,Switch,Po1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"last_move": -1.0, "vlan": 666, "moves": -1, "mac": "30a3.30a3.a1c3", "static": false, "interface": "Te1/30", "active": true}, {"last_move": -1.0, "vlan": 666, "moves": -1, "mac": "30a3.30a3.5ab8", "static": false, "interface": "Po3", "active": true}, {"last_move": -1.0, "vlan": 60, "moves": -1, "mac": "30a3.30a3.4d54", "static": false, "interface": "Te1/21", "active": true}, {"last_move": -1.0, "vlan": 777, "moves": -1, "mac": "0000.30a3.0167", "static": true, "interface": "", "active": false}, {"last_move": -1.0, "vlan": 664, "moves": -1, "mac": "30a3.30a3.58b5", "static": false, "interface": "Po6", "active": true}, {"last_move": -1.0, "vlan": 667, "moves": -1, "mac": "30a3.30a3.daf5", "static": false, "interface": "Te3/20", "active": true}, {"last_move": -1.0, "vlan": 668, "moves": -1, "mac": "30a3.30a3.e401", "static": false, "interface": "Po6", "active": true}, {"last_move": -1.0, "vlan": 669, "moves": -1, "mac": "30a3.30a3.5a22", "static": false, "interface": "Te3/20", "active": true}, {"last_move": -1.0, "vlan": 0, "moves": -1, "mac": "0000.0000.0000", "static": true, "interface": "", "active": false}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Legend: * - primary entry
age - seconds since last seen
n/a - not available

vlan mac address type learn age ports
------+----------------+--------+-----+----------+--------------------------
666 30a3.30a3.a1c3 dynamic Yes 1200 Te1/30
666 30a3.30a3.5ab8 dynamic Yes 0 Po3
60 30a3.30a3.4d54 dynamic Yes 3600 Te1/21
* 777 0000.30a3.0167 static No - Router
664 30a3.30a3.58b5 dynamic Yes 180 Po6
667 30a3.30a3.daf5 dynamic Yes 0 Te3/20
668 30a3.30a3.e401 dynamic Yes 600 Po6
669 30a3.30a3.5a22 dynamic Yes 300 Te3/20
* --- 0000.0000.0000 static No - Router
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tox]
envlist = py27,py34,py35

[testenv]
deps =
-rrequirements-dev.txt

commands=
py.test

0 comments on commit 8271cb9

Please sign in to comment.