Skip to content

Commit

Permalink
Merge pull request #232 from dbarrosop/master
Browse files Browse the repository at this point in the history
Turning napalm into a metapackage
  • Loading branch information
dbarrosop committed Apr 15, 2016
2 parents 5bd5144 + 4057915 commit 672e573
Show file tree
Hide file tree
Showing 251 changed files with 118 additions and 129,308 deletions.
97 changes: 11 additions & 86 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,17 @@
language: python

python:
- 2.7

- 2.7
install:
- pip install -r requirements.txt
- pip install -r test/unit/requirements.txt
- pip install .

deploy:
provider: pypi
user: dbarroso
password:
secure: kt2RgomUtrf5zXo3CyF8B7SkolvKgALAO0s72WuMd0wTGmgOvoBlt10Vfc+G+wuVAYvW/JKdsYRceancAFyWLFgjLtNxbV4cJF2RXN956sYFSJ2VrtUiB19WuKZjX6024gMs780hC/3bdK1SDg/NAAHSR7u2cma3QgRcW6O+UG4=
on:
tags: true
branch: master
script:
- cd test/unit
# testing junos getters
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_bgp_config
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_bgp_neighbors
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_bgp_neighbors_detail
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_environment
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_facts
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces_counters
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_lldp_neighbors
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_lldp_neighbors_detail
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_arp_table
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_ntp_peers
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_interfaces_ip
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_mac_address_table
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_route_to
- nosetests -v TestJunOSDriver:TestGetterJunOSDriver.test_get_snmp_information
# testing eos getters
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_bgp_config
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_bgp_neighbors
# not implemented on eos
# - nosetests -v TestEOSDriver:TestGetterEOSDriver.test_bgp_neighbors_detail
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_environment
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_facts
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_interfaces
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_interfaces_counters
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_lldp_neighbors
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_lldp_neighbors_detail
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_arp_table
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_ntp_peers
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_interfaces_ip
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_mac_address_table
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_route_to
- nosetests -v TestEOSDriver:TestGetterEOSDriver.test_get_snmp_information
# testing iosxr getters
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_bgp_config
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_bgp_neighbors
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_bgp_neighbors_detail
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_environment
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_facts
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_interfaces
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_interfaces_counters
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_lldp_neighbors
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_lldp_neighbors_detail
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_arp_table
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_ntp_peers
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_interfaces_ip
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_mac_address_table
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_route_to
- nosetests -v TestIOSXRDriver:TestGetterIOSXRDriver.test_get_snmp_information
# testing nxos getters
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_facts
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_interfaces
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_lldp_neighbors
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_lldp_neighbors_detail
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_arp_table
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_ntp_peers
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_interfaces_ip
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_mac_address_table
- nosetests -v TestNXOSDriver:TestGetterNXOSDriver.test_get_snmp_information
# testing pluribus getters
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_facts
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_interfaces
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_lldp_neighbors
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_lldp_neighbors_detail
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_ntp_peers
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_mac_address_table
- nosetests -v TestPluribusDriver:TestGetterPluribusDriver.test_get_snmp_information
# testing ios getters
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_bgp_neighbors
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_environment
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_facts
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces_counters
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_interfaces_ip
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_lldp_neighbors
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_lldp_neighbors_detail
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_arp_table
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_ntp_peers
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_mac_address_table
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_ios_only_bgp_time_conversion #IOS only test
- nosetests -v TestIOSDriver:TestGetterIOSDriver.test_get_snmp_information
- nosetests ./test/unit/TestGetNetworkDriver.py
3 changes: 0 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
include requirements.txt
include napalm/utils/*.yml
include napalm/templates/*/*.j2
include napalm/utils/textfsm_templates/*/*.tpl
94 changes: 69 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,61 +23,105 @@ Before using the library, please read the documentation at: [Read the Docs](http

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.

News
----------
Install
=======

### Blog Posts
* [NAPALM, Ansible, and Cisco IOS](https://pynet.twb-tech.com/blog/automation/napalm-ios.html) by Kirk Byers
* [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
Full installation
-----------------

### Presentations
* [NANOG 64 Presentation & Demo](https://youtu.be/93q-dHC0u0I) by David Barroso and Elisa Jasinska
* [Netnod Autumn Meeting 2015 Presentation](https://www.netnod.se/sites/default/files/NAPALM-david_barroso-Netnodautumnmeeting2015.pdf) by David Barroso
* [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
If you want to fully install NAPALM you can do it by executing:

### Podcasts
* [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
```
pip install napalm
```

That will install all the drivers currently available.


Install
=======
To install, execute:
Partial Installation
--------------------

If you want to install just a subset of the available modules you can just pick them as follows:

```
pip install napalm-eos napalm-junos
```

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:

```
pip uninstall napalm-junos
pip install napalm-ios
```

Check the ['Supported Network Operating Systems'](#supported-network-operating-systems) section for more information about supported modules.

Upgrading
=========

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:

```
pip install napalm -U
```

``
pip install napalm
``
or:

```
pip install napalm-eos napalm-junos -U
```

We will be posting news on our slack channel and on Twitter (more details soon).

Ansible
=======
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.

Mailing List
Contact
=======

Mailing List
------------

If you have any questions, join the users' mailing list at [napalm-automation@googlegroups.com](mailto:napalm-automation@googlegroups.com) and if you are developer and want to contribute to NAPALM feel free to join to the developers' mailing list at [napalm-dev@googlegroups.com](mailto:napalm-dev@googlegroups.com)

IRC
===
Slack
-----

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.
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.

Slack
=====
News
====

Blog Posts
----------

If you prefer SLACK feel free to join the ``NAPALM`` channel on slack at [network.toCode()](https://networktocode.herokuapp.com/).
* [NAPALM, Ansible, and Cisco IOS](https://pynet.twb-tech.com/blog/automation/napalm-ios.html) by Kirk Byers
* [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

Presentations
-------------

* [NANOG 64 Presentation & Demo](https://youtu.be/93q-dHC0u0I) by David Barroso and Elisa Jasinska
* [Netnod Autumn Meeting 2015 Presentation](https://www.netnod.se/sites/default/files/NAPALM-david_barroso-Netnodautumnmeeting2015.pdf) by David Barroso
* [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

Podcasts
--------

* [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

Authors
=======
* David Barroso ([dbarrosop@dravetech.com](mailto:dbarroso@dravetech.com))
* Elisa Jasinska ([elisa@bigwaveit.org](mailto:elisa@bigwaveit.org))
* Many others, check the [contributors](https://github.com/napalm-automation/napalm/graphs/contributors) page for details.


Thanks
======

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.
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.

[spotify]: http://www.spotify.com
[bigwave]: http://bigwaveit.org/
19 changes: 9 additions & 10 deletions docs/support/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ General support matrix
----------------------


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

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


29 changes: 1 addition & 28 deletions napalm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,4 @@
# License for the specific language governing permissions and limitations under
# the License.

from eos import EOSDriver
from iosxr import IOSXRDriver
from junos import JunOSDriver
from fortios import FortiOSDriver
from nxos import NXOSDriver
from ibm import IBMDriver
from ios import IOSDriver
from pluribus import PluribusDriver

def get_network_driver(vendor):
driver_mapping = {
'EOS': EOSDriver,
'ARISTA': EOSDriver,
'IOS-XR': IOSXRDriver,
'IOSXR': IOSXRDriver,
'JUNOS': JunOSDriver,
'JUNIPER': JunOSDriver,
'FORTIOS': FortiOSDriver,
'NXOS': NXOSDriver,
'IBM': IBMDriver,
'IOS' : IOSDriver,
'PLURIBUS': PluribusDriver
}
try:
return driver_mapping[vendor.upper()]
except KeyError:
raise Exception('Vendor/OS not supported: %s' % vendor)

from napalm_base import get_network_driver
Loading

0 comments on commit 672e573

Please sign in to comment.