Skip to content

Commit 672e573

Browse files
committed
Merge pull request #232 from dbarrosop/master
Turning napalm into a metapackage
2 parents 5bd5144 + 4057915 commit 672e573

File tree

251 files changed

+118
-129308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+118
-129308
lines changed

Diff for: .travis.yml

+11-86
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,17 @@
11
language: python
2-
32
python:
4-
- 2.7
5-
3+
- 2.7
64
install:
75
- pip install -r requirements.txt
6+
- pip install -r test/unit/requirements.txt
87
- pip install .
9-
8+
deploy:
9+
provider: pypi
10+
user: dbarroso
11+
password:
12+
secure: kt2RgomUtrf5zXo3CyF8B7SkolvKgALAO0s72WuMd0wTGmgOvoBlt10Vfc+G+wuVAYvW/JKdsYRceancAFyWLFgjLtNxbV4cJF2RXN956sYFSJ2VrtUiB19WuKZjX6024gMs780hC/3bdK1SDg/NAAHSR7u2cma3QgRcW6O+UG4=
13+
on:
14+
tags: true
15+
branch: master
1016
script:
11-
- cd test/unit
12-
# testing junos getters
13-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_bgp_config
14-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_bgp_neighbors
15-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_bgp_neighbors_detail
16-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_environment
17-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_facts
18-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces
19-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces_counters
20-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_lldp_neighbors
21-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_lldp_neighbors_detail
22-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_arp_table
23-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_ntp_peers
24-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces_ip
25-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_mac_address_table
26-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_route_to
27-
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_snmp_information
28-
# testing eos getters
29-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_bgp_config
30-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_bgp_neighbors
31-
# not implemented on eos
32-
# - nosetests -v TestEOSDriver:TestGetterEOSDriver.test_bgp_neighbors_detail
33-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_environment
34-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_facts
35-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_interfaces
36-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_interfaces_counters
37-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_lldp_neighbors
38-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_lldp_neighbors_detail
39-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_arp_table
40-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_ntp_peers
41-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_interfaces_ip
42-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_mac_address_table
43-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_route_to
44-
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_snmp_information
45-
# testing iosxr getters
46-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_bgp_config
47-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_bgp_neighbors
48-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_bgp_neighbors_detail
49-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_environment
50-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_facts
51-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_interfaces
52-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_interfaces_counters
53-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_lldp_neighbors
54-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_lldp_neighbors_detail
55-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_arp_table
56-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_ntp_peers
57-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_interfaces_ip
58-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_mac_address_table
59-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_route_to
60-
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_snmp_information
61-
# testing nxos getters
62-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_facts
63-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_interfaces
64-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_lldp_neighbors
65-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_lldp_neighbors_detail
66-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_arp_table
67-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_ntp_peers
68-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_interfaces_ip
69-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_mac_address_table
70-
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_snmp_information
71-
# testing pluribus getters
72-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_facts
73-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_interfaces
74-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_lldp_neighbors
75-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_lldp_neighbors_detail
76-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_ntp_peers
77-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_mac_address_table
78-
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_snmp_information
79-
# testing ios getters
80-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_bgp_neighbors
81-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_environment
82-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_facts
83-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces
84-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces_counters
85-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces_ip
86-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_lldp_neighbors
87-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_lldp_neighbors_detail
88-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_arp_table
89-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_ntp_peers
90-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_mac_address_table
91-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_ios_only_bgp_time_conversion #IOS only test
92-
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_snmp_information
17+
- nosetests ./test/unit/TestGetNetworkDriver.py

Diff for: MANIFEST.in

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
include requirements.txt
2-
include napalm/utils/*.yml
3-
include napalm/templates/*/*.j2
4-
include napalm/utils/textfsm_templates/*/*.tpl

Diff for: README.md

+69-25
Original file line numberDiff line numberDiff line change
@@ -23,61 +23,105 @@ Before using the library, please read the documentation at: [Read the Docs](http
2323

2424
You can also watch a [live demo](https://youtu.be/93q-dHC0u0I) of NAPALM to see what it is and what it can do for you.
2525

26-
News
27-
----------
26+
Install
27+
=======
2828

29-
### Blog Posts
30-
* [NAPALM, Ansible, and Cisco IOS](https://pynet.twb-tech.com/blog/automation/napalm-ios.html) by Kirk Byers
31-
* [Adding Cisco IOS support to NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support)](https://projectme10.wordpress.com/2015/12/07/adding-cisco-ios-support-to-napalm-network-automation-and-programmability-abstraction-layer-with-multivendor-support/) by Gabriele Gerbino
29+
Full installation
30+
-----------------
3231

33-
### Presentations
34-
* [NANOG 64 Presentation & Demo](https://youtu.be/93q-dHC0u0I) by David Barroso and Elisa Jasinska
35-
* [Netnod Autumn Meeting 2015 Presentation](https://www.netnod.se/sites/default/files/NAPALM-david_barroso-Netnodautumnmeeting2015.pdf) by David Barroso
36-
* [Automating IXP Device Configurations with Ansible at the Euro-IX Forum](https://www.euro-ix.net/m/uploads/2015/10/26/euroix-berlin-v2.pdf) by Elisa Jasinska
32+
If you want to fully install NAPALM you can do it by executing:
3733

38-
### Podcasts
39-
* [NAPALM: Integrating Ansible with Network Devices on Software Gone Wild](http://blog.ipspace.net/2015/06/napalm-integrating-ansible-with-network.html) with David Barroso and Elisa Jasinska
34+
```
35+
pip install napalm
36+
```
4037

38+
That will install all the drivers currently available.
4139

4240

43-
Install
44-
=======
45-
To install, execute:
41+
Partial Installation
42+
--------------------
43+
44+
If you want to install just a subset of the available modules you can just pick them as follows:
45+
46+
```
47+
pip install napalm-eos napalm-junos
48+
```
49+
50+
That will install only the `eos` and the `junos` drivers. If you want to remove or add a module later on you can just use `pip` to do it:
51+
52+
```
53+
pip uninstall napalm-junos
54+
pip install napalm-ios
55+
```
56+
57+
Check the ['Supported Network Operating Systems'](#supported-network-operating-systems) section for more information about supported modules.
58+
59+
Upgrading
60+
=========
61+
62+
We plan to upgrade napalm as fast as possible. Adding new methods and bugfixes. To upgrade napalm it's a simple as repeating the steps you performed while installing but adding the `-U` flag. For example:
63+
64+
```
65+
pip install napalm -U
66+
```
4667

47-
``
48-
pip install napalm
49-
``
68+
or:
69+
70+
```
71+
pip install napalm-eos napalm-junos -U
72+
```
73+
74+
We will be posting news on our slack channel and on Twitter (more details soon).
5075

5176
Ansible
5277
=======
5378
Please ckeck [napalm-ansible](https://github.com/napalm-automation/napalm-ansible) for existing Ansible modules leveraging the NAPALM API. Make sure you read the documentation and you understand how it works before trying to use it.
5479

55-
Mailing List
80+
Contact
5681
=======
5782

83+
Mailing List
84+
------------
85+
5886
If you have any questions, join the users' mailing list at [[email protected]](mailto:[email protected]) and if you are developer and want to contribute to NAPALM feel free to join to the developers' mailing list at [[email protected]](mailto:[email protected])
5987

60-
IRC
61-
===
88+
Slack
89+
-----
6290

63-
You can find the homologous IRC channels on freenode #napalm-automation and #napalm-dev. Feel free to join if you prefer a more direct approach.
91+
Slack is probably the easiest way to get help with NAPALM. You can find us in the channel `napalm` on the [network.toCode()](https://networktocode.herokuapp.com/) team.
6492

65-
Slack
66-
=====
93+
News
94+
====
95+
96+
Blog Posts
97+
----------
6798

68-
If you prefer SLACK feel free to join the ``NAPALM`` channel on slack at [network.toCode()](https://networktocode.herokuapp.com/).
99+
* [NAPALM, Ansible, and Cisco IOS](https://pynet.twb-tech.com/blog/automation/napalm-ios.html) by Kirk Byers
100+
* [Adding Cisco IOS support to NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support)](https://projectme10.wordpress.com/2015/12/07/adding-cisco-ios-support-to-napalm-network-automation-and-programmability-abstraction-layer-with-multivendor-support/) by Gabriele Gerbino
101+
102+
Presentations
103+
-------------
104+
105+
* [NANOG 64 Presentation & Demo](https://youtu.be/93q-dHC0u0I) by David Barroso and Elisa Jasinska
106+
* [Netnod Autumn Meeting 2015 Presentation](https://www.netnod.se/sites/default/files/NAPALM-david_barroso-Netnodautumnmeeting2015.pdf) by David Barroso
107+
* [Automating IXP Device Configurations with Ansible at the Euro-IX Forum](https://www.euro-ix.net/m/uploads/2015/10/26/euroix-berlin-v2.pdf) by Elisa Jasinska
69108

109+
Podcasts
110+
--------
111+
112+
* [NAPALM: Integrating Ansible with Network Devices on Software Gone Wild](http://blog.ipspace.net/2015/06/napalm-integrating-ansible-with-network.html) with David Barroso and Elisa Jasinska
70113

71114
Authors
72115
=======
73116
* David Barroso ([[email protected]](mailto:[email protected]))
74117
* Elisa Jasinska ([[email protected]](mailto:[email protected]))
75118
* Many others, check the [contributors](https://github.com/napalm-automation/napalm/graphs/contributors) page for details.
76119

120+
77121
Thanks
78122
======
79123

80-
This project was founded by David Barroso as part of [Spotify][spotify] and Elisa Jasinska as part of [BigWave IT][bigwave]. Originally it was hosted by the [Spotify][spotify] organization but due to the many contributions received by third parties we agreed creating a dedicated organization for NAPALM and give a big thanks to [Spotify][spotify] for the support.
124+
This project was founded by David Barroso as part of [Spotify][spotify] and Elisa Jasinska as part of [BigWave IT][bigwave]. Originally it was hosted by the [Spotify][spotify] organization but due to the many contributions received by third parties we agreed creating a dedicated organization for NAPALM and give a big thanks to [Spotify][spotify] for the support.
81125

82126
[spotify]: http://www.spotify.com
83127
[bigwave]: http://bigwaveit.org/

Diff for: docs/support/index.rst

+9-10
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ General support matrix
55
----------------------
66

77

8-
===================== ========== ============= =========== ============== ============= ============ ============ =============
9-
_ EOS JunOS IOS-XR FortiOS IBM NXOS IOS Pluribus
10-
===================== ========== ============= =========== ============== ============= ============ ============ =============
11-
**Driver Name** eos junos iosxr fortios ibm nxos ios pluribus
12-
**Structured data** Yes Yes No No Yes Yes No No
13-
**Minimum version** 4.15.0F 12.1 5.1.0 5.2.0 ??? 6.1 12.4(20)T N/A
8+
===================== ========== ============= ============ ============== ============= ============ ============ ===============
9+
_ EOS JunOS IOS-XR FortiOS IBM NXOS IOS Pluribus
10+
===================== ========== ============= ============ ============== ============= ============ ============ ===============
11+
**Module Name** napalm-eos napalm-junos napalm-iosxr napalm-fortios napalm-ibm napalm-nxos napalm-ios napalm-pluribus
12+
**Driver Name** eos junos iosxr fortios ibm nxos ios pluribus
13+
**Structured data** Yes Yes No No Yes Yes No No
14+
**Minimum version** 4.15.0F 12.1 5.1.0 5.2.0 ??? 6.1 12.4(20)T N/A
1415
**Backend library** `pyeapi`_ `junos-eznc`_ `pyIOSXR`_ `pyFG`_ `bnclient`_ `pycsco`_ `netmiko`_ `pyPluribus`_
15-
**Caveats** :doc:`eos` :doc:`fortios` :doc:`ibm` :doc:`nxos` :doc:`ios`
16-
===================== ========== ============= =========== ============== ============= ============ ============ =============
16+
**Caveats** :doc:`eos` :doc:`fortios` :doc:`ibm` :doc:`nxos` :doc:`ios`
17+
===================== ========== ============= ============ ============== ============= ============ ============ ===============
1718

1819
.. _pyeapi: https://github.com/arista-eosplus/pyeapi
1920
.. _junos-eznc: https://github.com/Juniper/py-junos-eznc
@@ -119,5 +120,3 @@ If you are a developer and want to add an optional argument to a driver, please,
119120
argument; :code:`$driver_name-$usage` if the argument applies only to a particular driver. For example, the optional
120121
argument :code:`fortios_vdom` is used only by the FortiOS driver to select a particular vdom. Otherwise, just name it
121122
:code:`$driver_name-$usage`. For example the :code:`port` optional argument.
122-
123-

Diff for: napalm/__init__.py

+1-28
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,4 @@
1212
# License for the specific language governing permissions and limitations under
1313
# the License.
1414

15-
from eos import EOSDriver
16-
from iosxr import IOSXRDriver
17-
from junos import JunOSDriver
18-
from fortios import FortiOSDriver
19-
from nxos import NXOSDriver
20-
from ibm import IBMDriver
21-
from ios import IOSDriver
22-
from pluribus import PluribusDriver
23-
24-
def get_network_driver(vendor):
25-
driver_mapping = {
26-
'EOS': EOSDriver,
27-
'ARISTA': EOSDriver,
28-
'IOS-XR': IOSXRDriver,
29-
'IOSXR': IOSXRDriver,
30-
'JUNOS': JunOSDriver,
31-
'JUNIPER': JunOSDriver,
32-
'FORTIOS': FortiOSDriver,
33-
'NXOS': NXOSDriver,
34-
'IBM': IBMDriver,
35-
'IOS' : IOSDriver,
36-
'PLURIBUS': PluribusDriver
37-
}
38-
try:
39-
return driver_mapping[vendor.upper()]
40-
except KeyError:
41-
raise Exception('Vendor/OS not supported: %s' % vendor)
42-
15+
from napalm_base import get_network_driver

0 commit comments

Comments
 (0)