Installation of NUTS¶
Installation Instructions¶
Nuts requires Python 3.9 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 uv¶
Nuts uses uv as a dependency manager.
Clone the nuts repository
Change into the cloned folder, then install all necessary dependencies:
$ uv sync
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
Bootstrap NUTS¶
After installing NUTS, you can bootstrap the project. nuts-init will create the necessary folder structure and files.
nuts-init
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
inventoryandtestsfolder.Set environment variable:
$ export NET_TEXTFSM=/path/to/ntc-templates/templates/
Uninstallation¶
pip uninstall nuts
If you installed everything in a virtual environment, you can delete the folder that contains the virtual environment.