-
Notifications
You must be signed in to change notification settings - Fork 1
Module System
sat edited this page Jan 3, 2026
·
23 revisions
This page explains how modules extend dot2net with platform-specific functionality.
Modules provide integration with container orchestration platforms. They:
- Define output files - Platform-specific topology files (e.g., topo.yaml)
- Provide internal templates - Platform-specific formatting
- Require specific config blocks - User-provided configuration elements
User Configuration Module (e.g., containerlab)
───────────────── ─────────────────────────────
nodeclass: Defines: topo.yaml file
- name: router Provides: node entry template
config: Requires: "startup" config block
- name: startup ──────────────────────────────────► Uses in exec section
template: [...]
Modules establish a contract with user configurations:
| Module Provides | User Provides |
|---|---|
| File definitions (e.g., topo.yaml) | Required config blocks (e.g., startup) |
| Platform-specific templates | Node parameters (e.g., image, kind) |
| Automatic bind mount generation |
File definitions with path
|
Modules automatically generate bind mounts for files that:
- Have a
pathfield defined in FileDefinition - Are actually generated by the node (based on class configuration)
This ensures nodes only mount files they actually produce.
module:
- containerlab
file:
- name: frr.conf
path: /etc/frr/frr.conf # Bind mount target
nodeclass:
- name: router
values:
image: quay.io/frrouting/frr:8.5.0
kind: linux
config:
- file: frr.conf
template:
- "hostname {{ .name }}"
# This "startup" block is used by containerlab module
- name: startup
template:
- "vtysh -b"name: mylab
topology:
nodes:
r1:
kind: linux
image: quay.io/frrouting/frr:8.5.0
binds:
- r1/frr.conf:/etc/frr/frr.conf
exec:
- vtysh -b
links:
- endpoints: [r1:net0, r2:net0]| Module | Output File | Required Parameters | Optional Blocks |
|---|---|---|---|
| containerlab | topo.yaml | image, kind | startup |
| tinet | spec.yaml | image | startup |
| frr | (none) | - | - |
For detailed documentation on each module:
- Module: Containerlab - Containerlab topo.yaml generation
- Module: TiNet - TiNet spec.yaml generation
- Module: FRR - FRR FormatStyle helpers
- File Output - File definition and output control
- YAML Configuration - Module Configuration
- Architecture Overview - Module System