Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 1.72 KB

README.md

File metadata and controls

75 lines (49 loc) · 1.72 KB

nuts-containerlab-demo

Tests Successful

Requirements

Lab

The lab is heavily based on the 5-stage Clos fabric from ContainerLab (https://containerlab.dev/lab-examples/min-5clos/).

The client1 is replaced with a Python container image and NUTS will be installed on it. Clients 2 to 4 are running a Linux container with an SSH service.

The router images are Nokia SR Linux. To be able to use NAPALM, the community driver (https://github.com/napalm-automation-community/napalm-srlinux) is used.

Nuts installation

The installation for NUTS can be found in ./configs/client1.sh

Start

sudo containerlab deploy -t setup.clos02.clab.yml
chmod +x ./setup.sh
./setup.sh

Connect to client1 and run network tests:

docker exec -it clab-clos02-client1 bash

root@client1:/# cd /workspace/
root@client1:/workspace# ls -l
total 12
drwxr-xr-x 2 1000 1000 4096 Aug  8 22:10 inventory
-rw-r--r-- 1 1000 1000  225 Aug  8 20:55 nr-config.yaml
drwxr-xr-x 2 1000 1000 4096 Aug  9 08:12 tests

root@client1:/workspace# pytest -vv

Stop

sudo containerlab destroy

Running Tests

In the best case, all tests will be successful (passed) or skipped. When the setup is executed, no test should fail.

Tests Successful

When we change tests we can see that tests fail now:

--- a/nuts_data/tests/test_Interfaces.yaml
+++ b/nuts_data/tests/test_Interfaces.yaml
     - groups:
         - spine
       name: ethernet-1/3
       is_enabled: true
       is_up: true
       mtu: 9232
-      speed: 100.0
+      speed: 10.0

Tests Failed