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
{{ message }}
Repository navigation
Commit fbf8019
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .claude/skills/containerlab/SKILL.md
+13-79Lines changed: 13 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,99 +1,35 @@
1
1
---
2
2
name: containerlab
3
-
description: Provision a colima VM (if needed) and deploy a containerlab network device. Defaults to Nokia SRL. Pass a topology file path or image to override. Say "no vm" or "skip vm" to skip VM provisioning.
description: Deploy a containerlab network device. Defaults to a topology with Nokia SRL, Juniper vJunos-Evolved, and Cisco N9Kv. Pass a topology file path or image to override.
Provisions a colima VM and deploys a containerlab network device.
11
+
Deploys a containerlab network device topology.
12
12
13
-
Steps:
14
-
1. Setup VM (colima profile: `containerlab`)
15
-
2. Install tools (containerlab, gnmic)
16
-
3. Deploy network device
17
-
18
-
> **No-VM shortcut:** pass `no-vm`, `skip vm`, or `without vm` to skip Steps 1 and 2 and use an already-running VM.
19
-
20
-
> **Scope limit:** Only `containerlab` (deploy/inspect/destroy) and `gnmic` (`capabilities` and `get`) may be used. Do not SSH into containerlab nodes, run `docker exec`, modify VM networking or Docker configuration, or make any other changes to the VM or device environment — ask the user first.
13
+
> **Scope limit:** Only `containerlab` (deploy/inspect/destroy) and `gnmic` (`capabilities` and `get`) may be used. Do not SSH into containerlab nodes, run `docker exec`, modify VM networking or Docker configuration, or make any other changes to the device environment — ask the user first.
containerlab version 2>/dev/null || bash -c "$(curl -sL https://get.containerlab.dev)"
80
-
```
81
-
82
-
Install gnmic if not already present:
83
-
84
-
```bash
85
-
gnmic version 2>/dev/null || bash -c "$(curl -sL https://get-gnmic.openconfig.net)"
86
-
```
22
+
If no topology is provided, use the default topology defined below.
87
23
88
-
## Step 3: Deploy network device
24
+
## Deploy network device
89
25
90
26
If the user provided `--topology <path>`, deploy that file directly:
91
27
92
28
```bash
93
29
containerlab deploy -d -t <path>
94
30
```
95
31
96
-
Otherwise, write the default Nokia SRL topology to `/tmp/dev.clab.yml`, substituting `--image` if provided (default: `ghcr.io/nokia/srlinux:26.7.1`):
32
+
Otherwise, write the default topology to `--output` (default: `/tmp/dev.clab.yml`), substituting `--image` if provided (default: `ghcr.io/nokia/srlinux:26.7.1`):
Repeat until all vrnetlab nodes show `healthy`. Nokia SRL has no health check — it's ready when running. For vrnetlab-based nodes (Juniper, Cisco) this can take 8–15 minutes.
159
95
160
-
Once healthy, write a gnmic config file at `/tmp/gnmic-config.yaml` with all nodes from the topology. Use `127.0.0.1` with the forwarded port for each node. For Nokia SRL use `skip-verify: true`; for vrnetlab nodes omit it (plain gRPC).
96
+
Once healthy, write a gnmic config file at `$OUTPUT_DIR/gnmic-config.yaml` (where `$OUTPUT_DIR` is the directory of `$OUTPUT_PATH`) with all nodes from the topology. Use `127.0.0.1` with the forwarded port for each node. For Nokia SRL use `skip-verify: true`; for vrnetlab nodes omit it (plain gRPC).
161
97
162
98
Default credentials, ports and TLS settings per node kind:
163
99
- Nokia SRL: `admin / NokiaSrl1!`, forwarded port, `skip-verify: true`
- Creating a kind cluster or deploying the operator (if not present)
@@ -47,68 +47,7 @@ When one of these is needed, describe exactly what will run and why, then wait f
47
47
48
48
## Phase 1: Check
49
49
50
-
Runs in order. Each step can be skipped if the user asks for a specific one.
51
-
52
-
### Step 1.1: Vet
53
-
54
-
```bash
55
-
make vet
56
-
```
57
-
58
-
Fast static analysis — catches real bugs (bad format strings, unreachable code, suspicious struct tags).
59
-
Stop if vet fails — these are likely bugs that need manual fixes.
60
-
61
-
### Step 1.2: Lint
62
-
63
-
```bash
64
-
make lint
65
-
```
66
-
67
-
If lint fails, report the issues. Do NOT run `make lint-fix` automatically — ask the user first:
68
-
> "Lint found N issues. Run `make lint-fix` to auto-fix some of them — proceed?"
69
-
70
-
### Step 1.3: Fmt check (only if vet or lint failed)
71
-
72
-
Run `make fmt` only when vet or lint reported failures — formatting drift is only worth surfacing when there are already problems to fix:
73
-
74
-
```bash
75
-
make fmt
76
-
git diff --name-only
77
-
```
78
-
79
-
`make fmt` is idempotent — it only reformats files. If `git diff` shows changed files, report them as formatting drift. Do NOT stage or commit the changes — just report.
80
-
81
-
Skip this step entirely when both vet and lint passed.
82
-
83
-
### Step 1.4: Unit tests
84
-
85
-
```bash
86
-
make test
87
-
```
88
-
89
-
Runs all tests excluding `/e2e` and `/lab`, produces `cover.out`.
90
-
91
-
### Step 1.4: gNMI integration tests
92
-
93
-
```bash
94
-
make test-gnmi
95
-
```
96
-
97
-
Builds a fake gNMI server from `test/gnmi/` and runs integration tests against it. Fully standalone — no cluster or VM needed.
Follow **After Making Changes** in AGENTS.md — commands, rules, and output format are all defined there. Each step can be skipped if the user asks for a specific one.
### Step 2.1b: Build and load the controller image (if cluster was just created or operator not deployed)
109
+
### Step 2.1b: Build, load and deploy (if cluster was just created or operator not deployed)
171
110
172
-
Use a fixed local image tag `network-operator-dev:latest` to avoid colliding with the upstream
173
-
`ghcr.io/ironcore-dev/network-operator:latest` image that `config/manager/kustomization.yaml`
174
-
maps the `controller` name to by default.
111
+
Follow the **Development Workflow** in AGENTS.md. Use a fixed local image tag `network-operator-dev:latest` to avoid colliding with the upstream image. The kind cluster name is `network-operator` and the kubectl context is `kind-network-operator`.
0 commit comments