Skip to content
Connyko65 edited this page Sep 25, 2020 · 2 revisions

Network Equipment Simulator (NESi)

(former Softboxen)

GitHub license GitHub build

Welcome to the NESi wiki!This wiki is a collection of our doc files.

The NESi project which originated from softboxen, a project originally created by our co-developer Ilya Etingof, aims to support different network devices of various vendors like Alcatel or Huawei.

The goal of the project is to simulate the presence of a large number of network devices (such as switches, routers, modems etc) on the network. These simulated devices expose their management interfaces and support command-line dialogues in a reasonably convincing way. The main use-case for the software is to create a testing environment for network management and automation.

For more information on softboxen or NESi please refer to our local documentation.

Features

GitHub build GitHub build GitHub build GitHub build GitHub build GitHub build

Supported Vendors

  • Alcatel (nearly feature complete)
  • Huawei (nearly feature complete)
  • Edgecore (not implemented yet)
  • Keymile (work in progress)
  • Pbn (not implemented yet)
  • Zhone (not implemented yet)

Supported network components

  • Subracks
  • Cards
  • Ports
  • ONTs
  • CPEs
  • Vlans

Download

The NESi package is distributed under terms and conditions of 2-clause BSD license.

Furthermore the previous softboxen project is freely available as a GitHub repository or can be downloaded from PyPI.

Installation

Either clone the repository with the following command:

$ git clone [email protected]:inexio/NESi.git

After that, make sure you have installed the required python packages found in the requirements.txt. An easy way to do this is with the following command:

$ pip install -r requirements.txt

How to use NESi

The easiest way to play with the example CLI is to run two terminals on the NESi repo - one that starts up the REST API server and populates the example model in the underlying DB, and another that simulates the devices Command Line Interface and runs against the REST API server.

REST API terminal:

$ ./bootup/restapi.sh --keep-running [--recreate-db]

CLI terminal:

First we collect the uuid´s of all boxes

% ./bootup/box.sh --list-boxen

Vendor Alcatel, model 7360, version FX-4, uuid d8da2c00-ed28-11ea-9cc7-8c8590d3240c

Second we connect to one box with the specific uuid

% ./bootup/box.sh --box-uuid d8da2c00-ed28-11ea-9cc7-8c8590d3240c

      _   _ ______  _____ _ 
     | \ | |  ____|/ ____(_)
     |  \| | |__  | (___  _ 
     | . ` |  __|  \___ \| |
     | |\  | |____ ____) | |
     |_| \_|______|_____/|_|


Hint: login credentials: admin/secret

login:admin
Password:secret
Last login on 01.03.2020

Interactive menus will guide you through the implemented commands.

How to use debug mode

First we configure a debugger in our IDE. Therefore we add a Python Debug Server with pydevd_pycharm.

Host name   : localhost
Port        : 3001

After that we first start our debuger and add the argument '--debug' in our CLI terminal:

% ./bootup/box.sh --box-uuid <box-uuid> --debug

How to start tests

Tests can be started with the following command structure:

% ./bootup/restapi.sh --test-alcatel-commands 

For other vendors replace 'alcatel' with your desired vendor, or use:

% ./bootup/restapi.sh --help

For more information see test_structure.rst

How to add new simulated CLI

For more information on this matter, please refer to the developer's documentation.

Issues

If you find any bug or a feature you think should be implemented, you can open up an issue. We will take care of the problem as fast as we can!

Contributing

Contributions to the project are welcome.

We are looking forward to your pull requests, suggestions and fixes.

Happy Coding!


Copyright (c) 2020

Original Software Design by Ilya Etingof.

Software adapted by inexio.


All rights reserved.