You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/anatomy/overview.mdx
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
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.
These markers provide information about the topotato version, the test file, and the revision, aiding in managing compatibility and version control.
39
42
43
+
</hr>
44
+
40
45
### Topology Definition
41
46
42
47
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`:
@@ -54,11 +59,13 @@ The ASCII diagram visually represents the topology. The function's name `topo1`
54
59
55
60
<Info>But if complexity grows, it might be better to split the tests into separate files.</Info>
56
61
62
+
</hr>
63
+
57
64
### FRR Configurations
58
65
59
-
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:
66
+
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:
60
67
61
-
<Warning>Jinja2 template used has been customized a little bit.</Warning>
68
+
<Warning>This Jinja2 template used has been customzied. See [`frr configuration section`](/anatomy/frr-config)</Warning>
62
69
63
70
```python
64
71
classConfigs(FRRConfigs):
@@ -83,6 +90,8 @@ These configurations can reference dynamic variables, making them more maintaina
83
90
84
91
Each *daemon* can be configured for each routers by using their respective name and configuration.
85
92
93
+
</hr>
94
+
86
95
### Test Classes
87
96
88
97
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:
0 commit comments