NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support) is a Python library that implements a set of functions to interact with different router vendor devices using a unified API.
NAPALM supports several methods to connect to the devices, to manipulate configurations or to retrieve data.
NAPALM driver for Ekinops OneAccess devices (OneAccess was acquired by Ekinops in 2017)
Connection to the device is done through a SSH or telnet connection using the netmiko librairy.
All OneAccess devices running OneOS v5.x or OneOS v6.x (CLI commands are mostly indentical between OS5 and OS6)
On your device you can check your OneOS version with the command "show version"
- ✅ is_alive()
- ✅ get_facts()
- ✅ get_interfaces()
- ✅ get_interfaces_ip()
- ✅ get_environment()
- ✅ get_arp_table()
- ✅ get_config()
- ✅ get_users()
- ✅ cli()
Functions definition can be found here
You can install the driver using pip:
pip install napalm-oneaccess-oneos
You can use this driver like this:
from napalm import get_network_driver
oneos_driver = get_network_driver("oneaccess_oneos")
device = oneos_driver("192.168.2.1", "admin", "password")
device.open()
print(device.get_facts())
If you want to custom some connection parameter, for example the transport protocol or the port connected to the device, you should use the optional_args
argument (its attributes derivate from netmiko)
from napalm import get_network_driver
oneos_driver = get_network_driver("oneaccess_oneos")
conn_args = {
"port": 2333,
"transport": "telnet"
}
device = oneos_driver("192.168.10.2", "admin", "password",optional_args=conn_args)
device.open()
print(device.get_interfaces_ip())
You can execute the unit tests using Pytest:
pytest
pytest -sk test_get_environment[os6]
Notes: Tests only supported with NAPALM >= 4.0.0
If you would like to contribute to this project please contact Robin Guillat ([email protected])