# budkane/eve-ng_lab-as-code-plat architecture

> Architecture diagram of the GitHub repository budkane/eve-ng_lab-as-code-plat, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/budkane/eve-ng_lab-as-code-plat
- Repository: https://github.com/budkane/eve-ng_lab-as-code-plat

## Overview

This repository generates network-device configurations from YAML definitions and can parse lab topology definitions and render the devices they reference. A separate EVE-NG client exposes API operations for creating labs, nodes, links, and applying configurations, although the excerpts do not show the lab CLI invoking that client. The README is empty, so capabilities and relationships are limited to the tree and sampled source; the lab’s deployment integration is not established.

Main entry points: [`lab.py`](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/lab.py) (Lab CLI), [`render.py`](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/render.py) (Configuration renderer), [`devices/R1.yml`](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/devices/R1.yml) (Device definitions), [`eve_ng.py`](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/eve_ng.py) (EVE-NG API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_config["Configuration rendering"]
  node_device_yaml["Device definitions<br/>[R1.yml]"]
  node_renderer["Configuration renderer<br/>[render.py]"]
  node_templates["Platform templates"]
  node_config_output["Generated configurations<br/>[R1.cfg]"]
end

subgraph group_lab["Lab definitions"]
  node_lab_cli["Lab CLI<br/>[lab.py]"]
  node_lab_yaml["Lab definitions<br/>[lab.yml]"]
  node_lab_topology["Topology parser<br/>[lab.py]"]
end

subgraph group_eve["EVE-NG management"]
  node_eve_client["EVE-NG API client<br/>[eve_ng.py]"]
  node_eve_service{{"EVE-NG service"}}
end

node_operator(("Operator"))

node_operator -->|"runs"| node_lab_cli
node_lab_cli -->|"loads"| node_lab_yaml
node_lab_cli -->|"parses links"| node_lab_topology
node_lab_cli -->|"loads"| node_device_yaml
node_lab_cli -->|"calls"| node_renderer
node_operator -->|"runs"| node_renderer
node_renderer -->|"reads"| node_device_yaml
node_renderer -->|"renders"| node_templates
node_renderer -->|"writes"| node_config_output
node_eve_client -->|"API requests"| node_eve_service

click node_lab_cli "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/lab.py"
click node_lab_yaml "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/labs/ospf-basic/lab.yml"
click node_device_yaml "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/devices/R1.yml"
click node_lab_topology "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/lab.py"
click node_renderer "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/render.py"
click node_templates "https://github.com/budkane/eve-ng_lab-as-code-plat/tree/main/templates/cisco-ios"
click node_config_output "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/build/R1.cfg"
click node_eve_client "https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/eve_ng.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_device_yaml,node_renderer,node_templates,node_config_output toneBlue
class node_lab_cli,node_lab_yaml,node_lab_topology toneAmber
class node_eve_client,node_eve_service toneMint
class node_operator toneIndigo
```

## Components

### Configuration rendering

- [Device definitions](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/devices/R1.yml): `devices/R1.yml`
- [Configuration renderer](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/render.py): `render.py`
- [Platform templates](https://github.com/budkane/eve-ng_lab-as-code-plat/tree/main/templates/cisco-ios): `templates/cisco-ios`
- [Generated configurations](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/build/R1.cfg): `build/R1.cfg`

### Lab definitions

- [Lab CLI](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/lab.py): `lab.py`
- [Lab definitions](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/labs/ospf-basic/lab.yml): `labs/ospf-basic/lab.yml`
- [Topology parser](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/lab.py): `lab.py`

### EVE-NG management

- [EVE-NG API client](https://github.com/budkane/eve-ng_lab-as-code-plat/blob/main/eve_ng.py): `eve_ng.py`
- **EVE-NG service**

### Other components

- **Operator**

## Connections

- Operator → Lab CLI: runs (evidence: `lab.py`)
- Lab CLI → Lab definitions: loads (evidence: `lab.py`)
- Lab CLI → Topology parser: parses links (evidence: `lab.py`)
- Lab CLI → Device definitions: loads (evidence: `lab.py`)
- Lab CLI → Configuration renderer: calls (evidence: `lab.py`)
- Operator → Configuration renderer: runs (evidence: `render.py`)
- Configuration renderer → Device definitions: reads (evidence: `render.py`)
- Configuration renderer → Platform templates: renders (evidence: `render.py`)
- Configuration renderer → Generated configurations: writes (evidence: `render.py`)
- EVE-NG API client → EVE-NG service: API requests (evidence: `eve_ng.py`)
