Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In addition to installing the requirements for running the Python code for CNaaS-NMS  you might also want a test environment so you can run integration tests for your newly developed code. For this you will need docker to run all the components of CNaaS, and a virtualization software to run some virtual switches. In this example we will use VirtualBox and Arista vEOS switches.

switch topologyImage Added

Create VMs

Download the VMDK for Arista vEOS (tested with vEOS-lab-4.22.3M.vmdk , possibly issues with early 4.23 releases?). Copy this file into three new VMDK files that we will use to create the actual VMs:

...

Note: Don't forget to save configuration with write!The

Mappings between VirtualBox and eosdist1 interfaces should be:

  • Adapter1/NIC1 in Virtualbox should correspond to the interface called Management1 inside the VM.

...

  • Adapter2/NIC2(vboxnet1)Ethernet1 in the VM

...

  • .
  • Adapter3/NIC3 (link_d1a1) → Ethernet2 in the VM

...

  • .
  • Adapter4/NIC4 (link_d1d2) → Ethernet3 in the VM.

Eosdist2 only needs a hostname of "eosdist2" for the current tests to run, but you could also configure it in a similar way to eosdist1.

...

If the first command doesn't work something with the interface configuration might be wrong. If the second command doesn't work, it might be "ip route add" commands in the previous section is missing.

If you can not ping, the problem can be the firewall on your machine. The network is created by VirtualBox is on the host machine. The following commands show how to allow the communication for ping and ssh with nft:

sudo nft add rule inet filter input ip saddr { 10.100.2.101/24 } tcp dport 22 counter accept comment "allow-ssh-fr-vbox-eth"
sudo nft add rule inet filter input ip saddr { 10.100.2.101/24 } icmp type echo-request accept comment "allow-ping-fr-vbox-eth"

sudo nft add rule inet filter input ip saddr { 192.168.0.1/24 } tcp dport 22 counter accept comment "allow-ssh-fr-vbox-vl1"
sudo nft add rule inet filter input ip saddr { 192.168.0.1/24 } icmp type echo-request accept comment "allow-ping-fr-vbox-vl1"

Run integrationtests.sh

Git clone cnaas-nms and go to the directory test/ , there you will find a script called integrationtest.sh . This script will start the necessary docker containers and then begin running some tests for ZTP and so on. Before starting the docker containers we need to create a few volumes:

...