Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kathará 3.5.1 #187

Merged
merged 65 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
23f93f6
More generic env regex (fix #168)
Skazza94 May 17, 2022
3f26501
Merge branch '168-env-regex-match-failure' into develop
Skazza94 May 17, 2022
d441b4e
Lab hash is computed on Lab name if present (#163)
Skazza94 May 30, 2022
a26d5df
Merge branch '163-compute-labhash-from-labname-if-it-is-present' into…
Skazza94 May 30, 2022
a90c16c
Link object has list of connected machines
Skazza94 May 30, 2022
1474ccd
Merge branch 'main' into develop
Skazza94 Jun 5, 2022
6b2561a
Add more Kubernetes Manager tests
Skazza94 Jun 5, 2022
4019538
Update Machine.py (#174)
whatever4711 Jul 6, 2022
cf3195b
Check that specified Docker Images are compatible with host arch (#178)
Skazza94 Jul 22, 2022
4046fda
Merge branch '178-add-architecture-compatibility-check-for-docker-ima…
Skazza94 Jul 22, 2022
1e78263
Add the possibility to specify device in lrestart (#177)
tcaiazzi Jul 22, 2022
fb7e43d
Handle exception in case binaryornot heuristics fail
Skazza94 Jul 22, 2022
0552dae
Test fix
Skazza94 Jul 22, 2022
aa48d86
add lab tests
tcaiazzi Jul 22, 2022
9e8b657
Add unit tests for deploy_lab method of managers
tcaiazzi Jul 26, 2022
3a98e6f
Add deploy_machine and deploy_link methods (#173)
Skazza94 Jul 26, 2022
6db8d03
Add localhost IPv6 mapping in default /etc/hosts
Skazza94 Aug 2, 2022
bbb94d7
Add undeploy_machine and undeploy_link methods (#173)
Skazza94 Aug 3, 2022
13465af
Replace update_lab method with connect_machine_to_link (#173)
Skazza94 Aug 4, 2022
ee3b84d
Merge branch '177-add-to-lrestart-the-possibilty-to-specify-devices' …
tcaiazzi Aug 24, 2022
8b703dd
Add change_link to manager and add unit tests
tcaiazzi Aug 25, 2022
de84915
Fix change_link (#173)
Skazza94 Aug 25, 2022
98f0e52
Add disconnect_from_link (#173)
Skazza94 Aug 26, 2022
1afe5f2
Remove swap + Add --rm to vconfig (#173)
Skazza94 Aug 26, 2022
467ad18
Add method to DockerManager to build a lab from api (#173)
tcaiazzi Aug 31, 2022
f363523
Minor polish (#173)
Skazza94 Sep 1, 2022
581bdd0
get_lab_from_api in KubernetesManager (#173)
Skazza94 Sep 1, 2022
fc11d5c
Add the possibility to disconnect devices in lconfig
tcaiazzi Sep 1, 2022
688ec6f
Fix + add unit tests for get_lab_from_api and update_lab_from_api (#173)
tcaiazzi Sep 1, 2022
a37d14f
Change 'lab' string to 'network scenario'
Skazza94 Sep 1, 2022
aed191c
Fix doc (#173)
tcaiazzi Sep 1, 2022
242161d
fix docstyle
tcaiazzi Sep 1, 2022
6907dad
Fix k8s tests
tcaiazzi Sep 1, 2022
21ddf8c
Merge branch '173-methods-to-manager' into develop
tcaiazzi Sep 1, 2022
96d1191
minor fixes
tcaiazzi Sep 1, 2022
a77ad19
Minor fixes + Polish
Skazza94 Sep 2, 2022
fb3c86f
Add k8s tests for get_lab_from_api
Skazza94 Sep 2, 2022
9004f67
Add custom exceptions (#179)
tcaiazzi Sep 2, 2022
a394295
fix (#179)
tcaiazzi Sep 2, 2022
f028926
Update pydoc with exceptions (#179)
tcaiazzi Sep 2, 2022
b8f3297
Add custom exceptions to unit tests + fix pydocs (#179)
tcaiazzi Sep 5, 2022
36c6f74
Skip k8s ConfigMap deletion if not present
Skazza94 Sep 5, 2022
21e26eb
fix option parser tests
tcaiazzi Sep 5, 2022
2fce681
Merge branch '179-add-custom-exceptions' into develop
tcaiazzi Sep 5, 2022
e1cef32
add get/new machine methods + unit tests (#181)
tcaiazzi Sep 5, 2022
1e86d73
Add get/new link method to Lab + unit tests (#181)
tcaiazzi Sep 5, 2022
e0a3152
fix test (#181)
tcaiazzi Sep 5, 2022
d864b97
Exceptions polish
Skazza94 Sep 5, 2022
f4be5b3
Merge branch '181-add-lab-methods-to-manage-links-and-machines' into …
tcaiazzi Sep 6, 2022
ac9fb87
Change pyuv to point to py3.10 compatible version on git (closes #182)
Skazza94 Sep 6, 2022
67e54fa
Merge branch '182-pyuv-broken-with-python-310x' into develop
Skazza94 Sep 6, 2022
e3506a1
Polish exceptions strings
Skazza94 Sep 6, 2022
ff920c3
Bump version + Changelog (ready to merge)
Skazza94 Sep 6, 2022
c50d76e
Docs update
Skazza94 Sep 6, 2022
cb1eddd
Update README
Skazza94 Sep 6, 2022
8734bf2
Remove Ubuntu Impish build
Skazza94 Sep 8, 2022
63b74f9
Add better error handling for kathara np exceptions (#183)
tcaiazzi Sep 9, 2022
7551574
add unit tests (#183)
tcaiazzi Sep 9, 2022
560641e
Merge branch '183-better-error-handling-kathara-np' into develop
tcaiazzi Sep 9, 2022
0482b3c
Fix cleaning with custom shell (#186)
tcaiazzi Sep 27, 2022
1ac4a18
Merge branch '186-bug-in-cleaning-devices-with-custom-shell' into dev…
tcaiazzi Sep 28, 2022
52dd468
Switch windows 10 build to Python3.10
Skazza94 Sep 29, 2022
e47b965
Fix Dockerfile for Linux-Pkg
tcaiazzi Sep 29, 2022
c26b66f
Fix Dockerfile for Debian releases
tcaiazzi Sep 29, 2022
2477d16
fix AUR dependencies
tcaiazzi Sep 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/kathara-connect.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Open a shell in device DEVICE_NAME.
Show an help message and exit.

* `-d` <DIRECTORY>, `--directory` <DIRECTORY>:
Specify the folder containing the lab.
Specify the folder containing the network scenario.

Connect to a Kathara device belonging to a lab that is located inside DIRECTORY.
If no `-d` option is provided, assume the lab is located in the current directory.
Connect to a Kathara device belonging to a network scenario that is located inside DIRECTORY.
If no `-d` option is provided, assume the network scenario is located in the current directory.
This option cannot be used in conjuction with `-v` or `--vdevice`.

* `-v`, `--vdevice`:
Expand Down Expand Up @@ -51,7 +51,7 @@ Connects to a device called `pc1`, started with `kathara-vstart`(1).

kathara connect as1r1

Connects to a device called `as1r1` belonging to a lab located in current folder and started with `kathara-lstart`(1).
Connects to a device called `as1r1` belonging to a network scenario located in current folder and started with `kathara-lstart`(1).

m4_include(footer.txt)

Expand Down
8 changes: 4 additions & 4 deletions docs/kathara-exec.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Execute a command in the Kathara device DEVICE_NAME.
Show an help message and exit.

* `-d` <DIRECTORY>, `--directory` <DIRECTORY>:
Specify the folder containing the lab.
Specify the folder containing the network scenario.

Execute the specified command in a Kathara device belonging to a lab that is located inside DIRECTORY.
If no `-d` option is provided, assume the lab is located in the current directory.
Execute the specified command in a Kathara device belonging to a network scenario that is located inside DIRECTORY.
If no `-d` option is provided, assume the network scenario is located in the current directory.
This option cannot be used in conjuction with `-v` or `--vmachine`.

* `-v`, `--vmachine`:
Expand Down Expand Up @@ -49,7 +49,7 @@ Execute the command ping into a device called `pc1`, started with `kathara-vstar

kathara exec as1r1 "ping 127.0.0.1"

Execute the command ping into a device called `as1r1` belonging to a lab located in current folder and started with `kathara-lstart`(1).
Execute the command ping into a device called `as1r1` belonging to a network scenario located in current folder and started with `kathara-lstart`(1).

m4_include(footer.txt)

Expand Down
8 changes: 4 additions & 4 deletions docs/kathara-lab-dirs.7.ronn
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
m4_changequote()
kathara-lab-dirs(7) -- Lab directory structure
kathara-lab-dirs(7) -- Network scenario directory structure
=============================================

## DESCRIPTION

A generic lab directory `lab-path` should have the following structure.
A generic network scenario directory `lab-path` should have the following structure.

* `lab-path/lab.conf`:
See `kathara-lab.conf`(5)
Expand All @@ -31,7 +31,7 @@ A generic lab directory `lab-path` should have the following structure.
Note that this script is executed by using the `device_shell` value specified in `kathara.conf`(5) as interpreter. If you would like to use a different interpreter, change it inside `kathara.conf`(5) or with `kathara-settings`(1).

* `lab-path/shared/`:
This is a shared folder between the host and all the lab devices. This could be useful to transfer files between the host and a device or viceversa.
This is a shared folder between the host and all the network scenario devices. This could be useful to transfer files between the host and a device or viceversa.

* `lab-path/shared.startup`
This is a shell script that will be run on every device just before `lab-path/device.startup`. It is not required to assign this script the executable permission.
Expand All @@ -44,7 +44,7 @@ A generic lab directory `lab-path` should have the following structure.
Note that this script is executed by using the `device_shell` value specified in `kathara.conf`(5) as interpreter. If you would like to use a different interpreter, change it inside `kathara.conf`(5) or with `kathara-settings`(1).

* `lab-path/_test/`
This subdirectory contains information for performing a test of the lab. It may be automatically created by `kathara-ltest`(1) or may contain user created files describing customized tests. For more information about this directory, see `kathara-ltest`(1).
This subdirectory contains information for performing a test of the network scenario. It may be automatically created by `kathara-ltest`(1) or may contain user created files describing customized tests. For more information about this directory, see `kathara-ltest`(1).

m4_include(footer.txt)

Expand Down
20 changes: 10 additions & 10 deletions docs/kathara-lab.conf.5.ronn
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
m4_changequote()
kathara-lab.conf(5) -- Lab configuration file
kathara-lab.conf(5) -- Network scenario configuration file
=============================================

## DESCRIPTION

The main lab configuration file. In this file you can specify the names of devices to be started, any option that should be used when launching them, and the topology of the network that connects them. Optionally, you can also provide some descriptive information for the lab, which will be displayed upon its startup. This file is not explicitly required, but running a lab without a lab.conf file is kind of useless...
The main network scenario configuration file. In this file you can specify the names of devices to be started, any option that should be used when launching them, and the topology of the network that connects them. Optionally, you can also provide some descriptive information for the network scenario, which will be displayed upon its startup. This file is not explicitly required, but running a network scenario without a lab.conf file is kind of useless...

This file is a list of `device[arg]=value` assignments, where `arg` can be an integer value or the name of an option (described below).

Expand Down Expand Up @@ -55,16 +55,16 @@ In order to establish a uniform convention, comment lines should always start wi
* `num_terms` (integer):
Choose the number of terminals to open for this device.

## LAB META INFORMATION
## NETWORK SCENARIO META INFORMATION

It is also possible to provide descriptive information about a lab by using one of the following special assignments:
It is also possible to provide descriptive information about a network scenario by using one of the following special assignments:

+ LAB_NAME=string (a word as identifier for the lab)
+ LAB_DESCRIPTION=string (a brief description of the purpose of the lab)
+ LAB_VERSION=string (the version of the lab)
+ LAB_AUTHOR=string (people who have written the lab)
+ LAB_EMAIL=string (contacts of lab authors)
+ LAB_WEB=string (useful web resources related to the lab)
+ LAB_NAME=string (a word as identifier for the network scenario)
+ LAB_DESCRIPTION=string (a brief description of the purpose of the network scenario)
+ LAB_VERSION=string (the version of the network scenario)
+ LAB_AUTHOR=string (people who have written the network scenario)
+ LAB_EMAIL=string (contacts of network scenario authors)
+ LAB_WEB=string (useful web resources related to the network scenario)

## EXAMPLE

Expand Down
2 changes: 1 addition & 1 deletion docs/kathara-lab.dep.5.ronn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_changequote()
kathara-lab.dep(5) -- Lab dependencies file
kathara-lab.dep(5) -- Network scenario dependencies file
=============================================

## DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion docs/kathara-lab.ext.5.ronn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_changequote()
kathara-lab.ext(5) -- Lab external networks file
kathara-lab.ext(5) -- Network scenario external networks file
=============================================

## DESCRIPTION
Expand Down
14 changes: 7 additions & 7 deletions docs/kathara-lclean.1.ronn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_changequote()
kathara-lclean(1) -- Stop a Kathara lab
kathara-lclean(1) -- Stop a Kathara network scenario
=============================================

## SYNOPSIS
Expand All @@ -8,22 +8,22 @@ kathara-lclean(1) -- Stop a Kathara lab

## DESCRIPTION

Gracefully shut down a running lab.
By default, stops all the devices of the lab. If a list of <DEVICE_NAME>s is provided, then only devices with a matching name and that are part of the lab will be halted.
Gracefully shut down a running network scenario.
By default, stops all the devices of the network scenario. If a list of <DEVICE_NAME>s is provided, then only devices with a matching name and that are part of the network scenario will be halted.

## OPTIONS

* `-h`, `--help`:
Show an help message and exit.

* `-d` <DIRECTORY>, `--directory` <DIRECTORY>:
Specify the folder containing the lab.
Specify the folder containing the network scenario.

Cleans the Kathara lab that is located inside <DIRECTORY>.
If no `-d` option is provided, assume the lab is located in the current directory.
Cleans the Kathara network scenario that is located inside <DIRECTORY>.
If no `-d` option is provided, assume the network scenario is located in the current directory.

* `DEVICE_NAME`:
A list of device names. Instead of shutting down the whole lab, only specified devices are stopped.
A list of device names. Instead of shutting down the whole network scenario, only specified devices are stopped.

m4_include(footer.txt)

Expand Down
33 changes: 21 additions & 12 deletions docs/kathara-lconfig.1.ronn
Original file line number Diff line number Diff line change
@@ -1,39 +1,48 @@
m4_changequote()
kathara-lconfig(1) -- Attach network interfaces to a running Kathara device of a Kathara lab
kathara-lconfig(1) -- Attach network interfaces to a running Kathara device of a Kathara network scenario
=============================================

## SYNOPSIS

`kathara lconfig` [`-h`] [`-d` <DIRECTORY>] `-n` <DEVICE_NAME> `--eth` <CD> [<CD> ...]
`kathara lconfig` [`-h`] [`-d` <DIRECTORY>] `-n` <DEVICE_NAME> (`--add` <CD> [<CD> ...] \| `--rm` <CD> [<CD> ...])

## DESCRIPTION

Attach network interfaces to running devices of a Kathara lab "on the fly". The affected device is identified by <DEVICE_NAME>, which is the name of a running device.
Manage the network interfaces of a running Kathara device in a network scenario. The affected device is identified by <DEVICE_NAME>, which is the name of the running device in the network scenario.

## OPTIONS

* `-h`, `--help`:
Show a help message and exit.

* `-d` <DIRECTORY>, `--directory` <DIRECTORY>:
Specify the folder containing the lab.
Specify the folder containing the network scenario.

Attach network interfaces to running devices of the Kathara lab that is located inside <DIRECTORY>.
If no `-d` option is provided, assume the lab is located in the current directory.
Manage the network interfaces of running devices in a Kathara network scenario that is located inside <DIRECTORY>.
If no `-d` option is provided, assume the network scenario is located in the current directory.

* `-n` <DEVICE_NAME>, `--name` <DEVICE_NAME>:
Name of the device to be connected on desired collision domains.
Name of the device to manage.

* `--eth` <CD> [<CD> ...]:
Specify the collision domain for an interface.
* `--add` <CD> [<CD> ...]:
Specify the collision domain to add.

Equip the device with an additional network interface attached to a (virtual) collision domain whose name is <CD>. The number of the resulting network interface is generated incrementing the number of the last network interface of the device.
Equip the device with an additional network interface attached to a (virtual) collision domain whose name is <CD>. The number of the resulting network interface is generated incrementing the number of the last network interface used by the device.

* `--rm` <CD> [<CD> ...]:
Specify the collision domain to remove.

Disconnect the device from the collision domain whose name is <CD> and remove the corresponding interface.

## EXAMPLES

kathara lconfig -d path/to/lab -n pc1 --eth X Y
kathara lconfig -d path/to/network_scenario -n pc1 --add X Y

Two new interfaces will be added to the device pc1 in the network scenario located in "path/to/network_scenario": the first one will be attached to the collision domain named X, while the other one to the collision domain named Y. Both the interfaces will have to be configured by hand inside the device (for example, by using ifconfig).

kathara vconfig -n pc1 --rm X

Two new interfaces will be added to the device pc1 of the lab: the first one will be attached to the collision domain named X, while the other one to the collision domain named Y. Both the interfaces will have to be configured by hand inside the device (for example, by using ifconfig).
pc1, in the network scenario located in "path/to/network_scenario", will be disconnected from the collision domain named X and the corresponding network interface will be removed.

m4_include(footer.txt)

Expand Down
16 changes: 8 additions & 8 deletions docs/kathara-linfo.1.ronn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
m4_changequote()
kathara-linfo(1) -- Show information about a Kathara lab
kathara-linfo(1) -- Show information about a Kathara network scenario
=============================================

## SYNOPSIS
Expand All @@ -9,11 +9,11 @@ kathara-linfo(1) -- Show information about a Kathara lab

## DESCRIPTION

Show exhaustive status of each device of the current lab. Can only be used when after the lab is started.
Show exhaustive status of each device of the current network scenario. Can only be used when after the network scenario is started.

The following information are displayed:

+ `LAB_HASH`: autogenerated hash associated with a lab
+ `LAB_HASH`: autogenerated hash associated with a network scenario
+ `DEVICE_NAME`: name of the device
+ `STATUS`: status of the device
+ `CPU %`: the percentage of the host's CPU the device is using
Expand All @@ -27,21 +27,21 @@ The following information are displayed:
Show an help message and exit.

* `-d` <DIRECTORY>, `--directory` <DIRECTORY>:
Specify the folder containing the lab.
Specify the folder containing the network scenario.

If no `-d` option is provided, assume the lab is located in the current directory.
If no `-d` option is provided, assume the network scenario is located in the current directory.

* `-l`, `--live`:
Live update of lab status.
Live update of network scenario status.

To quit the live screen, pass the `SIGINT` `signal`(7) to the process (usually CTRL+C).

* `-c`, `--conf`
Read information from lab.conf and display the following:

* Descriptive information (retrieved from `kathara-lab.conf`(5))
* Number of devices that make up the lab
* Number of networks that make up the lab
* Number of devices that make up the network scenario
* Number of networks that make up the network scenario

* `-n` <DEVICE_NAME>, `--name` <DEVICE_NAME>:
Show only info about a specified device.
Expand Down
8 changes: 4 additions & 4 deletions docs/kathara-list.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Display a variety of information for all the devices of the current user.

The following information are displayed:

* `LAB_HASH`: autogenerated hash associated with a lab
* `LAB_HASH`: autogenerated hash associated with a network scenario
* `DEVICE_NAME`: name of the device
* `STATUS`: status of the device
* `CPU %`: the percentage of the host's CPU the device is using
Expand All @@ -32,13 +32,13 @@ The following information are displayed:
This option can be run only by `root` user.

* `-l`, `--live`:
Live mode, can be used only when a lab is launched.
Live mode, can be used only when a network scenario is launched.

Show exhaustive live status of each device of the current lab. Can only be used when after the lab is started. This overrides the default behavior of the command described above.
Show exhaustive live status of each device of the current network scenario. Can only be used when after the network scenario is started. This overrides the default behavior of the command described above.

The following information are displayed:

+ `LAB_HASH`: autogenerated hash associated with a lab
+ `LAB_HASH`: autogenerated hash associated with a network scenario
+ `DEVICE_NAME`: name of the device
+ `STATUS`: status of the device
+ `CPU %`: the percentage of the host's CPU the device is using
Expand Down
Loading