Skip to content

Commit

Permalink
minor docs fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bernard <[email protected]>
  • Loading branch information
eznix86 committed Aug 28, 2023
1 parent 0e719aa commit 4ddc5cb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
17 changes: 17 additions & 0 deletions docs/anatomy/assets/anatomy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions docs/anatomy/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Tests in the topotato framework are structured into different sections that collectively define the test's behavior, topology, and configurations. This document provides an overview of these sections and their components.

<Image src="/anatomy/assets/anatomy.svg" caption="Topotato structure" />



### Header

Expand Down Expand Up @@ -37,6 +40,8 @@ __topotests_rev__ = 'a770da1b1c6290f53cc69218a30360accd6a0068'

These markers provide information about the topotato version, the test file, and the revision, aiding in managing compatibility and version control.

</hr>

### Topology Definition

In topotato, a test topology is defined using ASCII diagrams enclosed within a function marked with the `topology_fixture` decorator. Here's an example of defining a topology named `topo1`:
Expand All @@ -54,11 +59,13 @@ The ASCII diagram visually represents the topology. The function's name `topo1`

<Info>But if complexity grows, it might be better to split the tests into separate files.</Info>

</hr>

### FRR Configurations

Topotato generates FRR configurations using [jinja2](https://palletsprojects.com/p/jinja/) templates embedded within the test script. Configuration templates define various aspects of router behavior. Here's an example of defining FRR configurations:
Topotato generates FRR configurations using [Jinja2](https://palletsprojects.com/p/jinja/) templates embedded within the test script. Configuration templates define various aspects of router behavior. Here's an example of defining FRR configurations:

<Warning>Jinja2 template used has been customized a little bit.</Warning>
<Warning>This Jinja2 template used has been customzied. See [`frr configuration section`](/anatomy/frr-config)</Warning>

```python
class Configs(FRRConfigs):
Expand All @@ -83,6 +90,8 @@ These configurations can reference dynamic variables, making them more maintaina

Each *daemon* can be configured for each routers by using their respective name and configuration.

</hr>

### Test Classes

All topotato tests are organized within classes that inherit from the `TestBase` class. The class definition binds together the test content, topology, and configurations. Here's an example:
Expand Down

0 comments on commit 4ddc5cb

Please sign in to comment.