Metadata-Version: 2.3
Name: wemulate
Version: 2.0.5
Summary: A modern WAN Emulator
License: GNU General Public License v3.0
Author: Julian Klaiber
Author-email: julian.klaiber@ost.ch
Requires-Python: >=3.8,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: SQLAlchemy (==1.4.3)
Requires-Dist: colorlog (==6.6.0)
Requires-Dist: jinja2 (==3.1.2)
Requires-Dist: mkdocs (>=1.4.2,<2.0.0)
Requires-Dist: mkdocs-material (>=9.0.5,<10.0.0)
Requires-Dist: mkdocstrings[python] (>=0.19.1,<0.20.0)
Requires-Dist: netifaces (==0.11.0)
Requires-Dist: pymdown-extensions (>=9.9.1,<10.0.0)
Requires-Dist: pyroute2 (==0.7.1)
Requires-Dist: pyyaml (==6.0.1)
Requires-Dist: rich (>=12.5.1,<13.0.0)
Requires-Dist: tcconfig (==0.27.1)
Requires-Dist: typer (==0.6.1)
Project-URL: Documentation, https://wemulate.github.io/wemulate
Project-URL: Homepage, https://wemulate.github.io/wemulate
Project-URL: Repository, https://github.io/wemulate/wemulate
Description-Content-Type: text/markdown

[![CI](https://github.com/wemulate/wemulate/actions/workflows/test-python.yml/badge.svg)](https://github.com/wemulate/wemulate/actions/workflows/test-python.yml)
[![codecov](https://codecov.io/github/wemulate/wemulate/branch/main/graph/badge.svg?token=PCERPBMLFY)](https://codecov.io/github/wemulate/wemulate)
**A modern WAN Emulator developed by the Institute for Networked Solutions**
# WEmulate

Have a look at the [documentation](https://wemulate.github.io/wemulate) for detailed information.

## Installation

### Requirements
* At least two network interfaces for ``LAN-A`` and ``LAN-B``
* A third management interface if you would like to use the api and frontend module
* Ubuntu installed
* Root permissions

### Getting Started
To install only the WEmulate cli with bash, simply run this command in your terminal of choice:
```
bash -c "$(curl -fsSL https://raw.githubusercontent.com/wemulate/wemulate/main/install/install.sh)"
```
There are different arguments available in order to enhance the installation experience:
```
-h               Prints the help message
-f               Skip the confirmation prompt during installation
-i <int1,int2>   List of interfaces which should be used as management interfaces
-a               Install the api module
-v               Install the frontend module
```
You can for example install the cli, api and frontend module together with one management interface with the following command:
```
curl -fsSL https://raw.githubusercontent.com/wemulate/wemulate/main/install/install.sh | bash -s -- -a -v -i ens2 -f
```

## Usage
![WEmulate CLI Commands](/docs/img/animation-wemulate-cli.gif)

```bash
# Add a new connection
$ wemulate add connection -n connectionname -i LAN-A LAN-B

# Delete a connection
$ wemulate delete connection -n connectionname

# Add parameters bidirectional
$ wemulate add parameter -n connectionname -j 20 -d 40

# Add parameters in specific direction
$ wemulate add parameter -n connectionname -j 20 -d 40 -src LAN-A -dst LAN-B

```

## Development
Configure poetry to create the environment inside the project path, in order that VSCode can recognize the virtual environment.
```
$ poetry config virtualenvs.in-project true
```
Install the virtualenv.
```
$ poetry install
```

### Testing
In order to test WEmulate and to use an in-memory sqlite database, the following environment variable has to be set:
```
export WEMULATE_TESTING=true
```
Install the dev dependencies:
```
poetry install --with dev
```
The tests can then be executed with pytest.
```
poetry run pytest
```
