Installation of NUTS¶
Installation Instructions¶
Nuts requires Python 3.8 or higher.
Installation via pip¶
NUTS is published on the Python Package Index (PyPI), therefore you can install nuts using pip
:
pip install nuts
Installation via poetry¶
Nuts uses poetry as a dependency manager.
Clone the nuts repository
Change into the cloned folder, then install all necessary dependencies:
$ poetry install
Install nuts:
$ pip install .
Installation via container¶
Nuts is also available in a dockerized version. It uses the GitHub registry.
docker pull ghcr.io/network-unit-testing-system/nuts:latest
docker run -it ghcr.io/network-unit-testing-system/nuts
Parsing with ntc-templates¶
In order to parse answers from network devices, some NUTS test classes use netmiko in combination with ntc-templates (ntc-templates: TextFSM Templates for Network Devices). These NUTS tests rely on ntc-templates:
TestNetmikoCdpNeighbors
TestNetmikoOspfNeighborsCount
TestNetmikoOspfNeighbors
If you run these test classes, please make sure to configure access to ntc-templates correctly:
Clone the ntc-templates repository into your project root, on the same hierarchical level as your
inventory
andtests
folder.Set environment variable:
$ export NET_TEXTFSM=/path/to/ntc-templates/templates/
Deinstallation¶
pip uninstall nuts
If you installed everything in a virtual environment, you can delete the folder that contains the virtual environment.