Skip to main content

Napalm driver for ArubaOS Switches

Project description

PyPI PyPI Building Status

Napalm-arubaoss

Driver implementation for Aruba OS Switch. Tested in AOS > WC.16.09.0004, some modules may not work properly in older versions.

Currently supported Napalm methods

* cli()                           ✅
* close()                         ✅
* commit_config()                 ✅
* compare_config()                ✅
* compliance_report()             ✅
* confirm_commit()                ✅
* discard_config()                ✅  
* get_arp_table()                 ✅
* get_bgp_config()                ❌*
* get_bgp_neighbors()             ❌*
* get_bgp_neighbors_detail()      ❌*
* get_config()                    ✅
* get_environment()               ❌  - Planned
* get_facts()                     ✅
* get_firewall_policies()         ❌*
* get_interfaces_counters()       ❌***
* get_interfaces()                ✅
* get_interfaces_ip()             ✅
* get_ipv6_neighbors_table()      ❌*
* get_lldp_neighbors()            ✅
* get_lldp_neighbors_detail()     ✅
* get_network_instances()         ❌*
* get_mac_address_table()         ✅
* get_ntp_peers()                 ✅
* get_ntp_servers()               ✅
* get_ntp_stats()                 ✅
* get_optics()                    ❌  - Planned
* get_probes_*()                  ❌*
* get_route_to()                  ✅
* get_snmp_information()          ❌  - Planned
* get_users()                     ❌  - Planned
* has_pending_commit()            ✅
* is_alive()                      ✅
* load_merge_candidate()          ✅**
* load_replace_candidate()        ✅
* load_template()                 ✅
* open()                          ✅
* ping()                          ✅
* rollback()                      ✅
* traceroute()                    ✅

* N/A - not supported on the tested ArubaOS devices

** Incomplete support for load merge, configuration is directly pushed to the running config. Not recommended, use with precaution !!!

*** No easy way to get this. API does not support it and there's no single command to display it for all ports

Getting Started

Prerequisites

The following software is required:

  • Python3
  • Pip
  • Python modules specified in requirements.txt

Installing

To install simply run:

pip3 install napalm-arubaos-switch

Switch configuration

This driver relies exclusively on the REST API of Aruba Switches, and it needs to be enabled beforehand. To enable the REST API in the switch, just run:

web-management ssl
rest-interface
rest-interface session-idle-timeout 120 #optional

optional_args

optional_args can be set during initialization like this:

from napalm import get_network_driver

d = get_network_driver("arubaoss")

with d('1.2.3.4', 'username', 'password', optional_args={'ssl_verify': False, "debugging": True}) as aruba:
   print(aruba.get_config())

The following values can be set in optional_args:

  • ssl_verify: bool/str = defaults to True - will be passed to the requests object (description can be found here)
  • keepalive: bool = defaults to False - sets the underlying TCP connection to either keep the connection or not and is a workaround for an issue with ArubaOS devices (discussed here)
  • keep_alive: bool = same as keepalive, just shadows it to be able to use the same keyword as in older Python requests versions
  • debugging: bool = defaults to False - sets the level of the logging handler to logging.DEBUG
  • disable_ssl_warnings: bool = defaults to False - disables ssl warnings from urllib3
  • api: string = defaults to v6 - defines the API version
  • ssl: bool = defaults to True, sets http or https

Saltstack

To use the driver with Saltstack, you would typically need a proxy minion.

Proxy minion configuration:

Example pillar's config:

proxy:
  proxytype: napalm
  driver: arubaoss
  host: 192.0.2.1
  username: manager
  password: manager

Proxy /etc/salt/proxy

master: lab-salt-master
mine_enabled: true # not required, but nice to have

Supported Salt execution modules

More details in Saltstack examples

Ansible

How to get it running with ansible and some examples are in the Ansible docs

Running the tests

TBD: Explain how to run the automated tests for this system

Contributing

Please read CONTRIBUTING for details on our process for submitting pull requests to us, and please ensure you follow the CODE_OF_CONDUCT.

Versioning

TBD

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napalm-arubaos-switch-0.2.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

napalm_arubaos_switch-0.2.0-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file napalm-arubaos-switch-0.2.0.tar.gz.

File metadata

  • Download URL: napalm-arubaos-switch-0.2.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for napalm-arubaos-switch-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7d78cd96213f7f53f9dc31f4dde9185966b94db124d4445f98d6bc01c47162e8
MD5 f06a5094438936311b50b0bdfca26896
BLAKE2b-256 231af5c397981e37b6a97e3a1d224f87fb285527a4c3c1dc5280c1227f26e93f

See more details on using hashes here.

File details

Details for the file napalm_arubaos_switch-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: napalm_arubaos_switch-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for napalm_arubaos_switch-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66e9c0074f2076afb0c96fc170902820163346248e56842fc86c1e022a10dc19
MD5 53683f5757fcf2cc94309e752863280b
BLAKE2b-256 637877d744e7c692de785c3941498a94aa4a890dcbe34623751ddaaa3f78c8da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page