From 5b364fb068ad5996c6336b9ff8d81a634dc3b278 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Tue, 28 Apr 2026 23:23:45 +0300 Subject: general: T8595: add CLAUDE.md --- CLAUDE.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..067c788 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,53 @@ +# CLAUDE.md + +## Project purpose + +Ansible Galaxy collection `vyos.rest` — modules and an httpapi plugin to manage VyOS devices via the **HTTP/REST API** (as opposed to SSH/CLI, which is what the sister `vyos.vyos` collection uses). Modules cover hostname, banner, and similar object-level resources; the httpapi plugin (`vyos.rest.vyos`) wraps the VyOS HTTP API endpoint exposed by `vyos-1x`'s `services` layer. + +## Tech stack + +- Python (Ansible collection, no setup.py). +- `pyproject.toml` configures `black` (line-length 100) and `pytest` (with `xdist -n 2`). +- `requirements.txt` / `test-requirements.txt` for runtime/test deps. +- `galaxy.yml` for collection metadata. + +## Build / test / run + +```sh +ansible-galaxy collection build # produces vyos-rest-.tar.gz +ansible-galaxy collection install vyos-rest-.tar.gz +pytest # runs collection tests +black . # format +``` + +## Repository layout + +- `plugins/` — Ansible plugins; `plugins/httpapi/vyos.py` is the REST-API httpapi shim, `plugins/modules/*.py` the resource modules. +- `meta/` — Ansible meta (`runtime.yml`, redirects). +- `docs/` — generated module docs. +- `changelogs/` — `antsibull-changelog` fragments. +- `galaxy.yml`, `pyproject.toml`, `requirements.txt`, `test-requirements.txt`. + +## Cross-repo context + +Companion to `vyos/vyos.vyos` (the SSH-based Ansible collection). Both target VyOS, but `rest.vyos` requires the VyOS HTTP API — provided at runtime by `vyos-1x`'s `src/services/` plus the runtime-deps Debian wrapper `vyos/vyos-http-api-tools` (FastAPI/uvicorn/ariadne). When the API surface in `vyos-1x` changes, the httpapi plugin and modules here are what consumers feel. + +## Conventions + +- Default branch `current`. +- Commit / PR title format: `component: T12345: description` (Phorge task ID at https://vyos.dev). +- Format: `black` (line length 100). Test runner: `pytest` with `pytest-xdist`. +- Has `CODEOWNERS` (audit baseline). Public, GPL-licensed. + +## Mirror relationship + +No mirror twin (no `VyOS-Networks/rest.vyos`). Sole home is here. + +## Notes for future contributors + +- Treat the VyOS HTTP API as the contract: changes in `vyos-1x/src/services/` may require synchronized updates here. There is no CI-enforced contract test today. +- Old name "rest.vyos" reflects the Galaxy-collection naming (`vyos.rest`); don't rename to `vyos-rest` casually — it's a Galaxy identifier. + +--- + +This file is mirrored on Confluence: [`vyos/rest.vyos`](https://internal.confluence.vyos.com/wiki/spaces/VYOS/pages/818479438). The Confluence page also carries the per-repo audit data (settings, workflows, secret counts, hygiene) that complements this CLAUDE.md. Edit either side; resync via the documentation pipeline. -- cgit v1.2.3 From 19e55fa982978f5f46a8f4178ae11851764af22f Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Wed, 29 Apr 2026 18:59:56 +0300 Subject: general: T8595: drop internal Confluence link footer from CLAUDE.md --- CLAUDE.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 067c788..ab95d5a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,3 @@ No mirror twin (no `VyOS-Networks/rest.vyos`). Sole home is here. - Treat the VyOS HTTP API as the contract: changes in `vyos-1x/src/services/` may require synchronized updates here. There is no CI-enforced contract test today. - Old name "rest.vyos" reflects the Galaxy-collection naming (`vyos.rest`); don't rename to `vyos-rest` casually — it's a Galaxy identifier. - ---- - -This file is mirrored on Confluence: [`vyos/rest.vyos`](https://internal.confluence.vyos.com/wiki/spaces/VYOS/pages/818479438). The Confluence page also carries the per-repo audit data (settings, workflows, secret counts, hygiene) that complements this CLAUDE.md. Edit either side; resync via the documentation pipeline. -- cgit v1.2.3 From da51df9c12493a8ba89989f54b4f2bc601cbd9a6 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Tue, 5 May 2026 00:27:26 +0300 Subject: general: T8595: add AGENTS.md and .cursorrules symlinks to CLAUDE.md --- .cursorrules | 1 + AGENTS.md | 1 + 2 files changed, 2 insertions(+) create mode 120000 .cursorrules create mode 120000 AGENTS.md diff --git a/.cursorrules b/.cursorrules new file mode 120000 index 0000000..681311e --- /dev/null +++ b/.cursorrules @@ -0,0 +1 @@ +CLAUDE.md \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 120000 index 0000000..681311e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1 @@ +CLAUDE.md \ No newline at end of file -- cgit v1.2.3 From 9d9650450c3117b14871c12eb050451d08b723c7 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Tue, 5 May 2026 20:24:44 +0300 Subject: general: T8595: add .github/copilot-instructions.md symlink to CLAUDE.md --- .github/copilot-instructions.md | 1 + 1 file changed, 1 insertion(+) create mode 120000 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 120000 index 0000000..949a29f --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +../CLAUDE.md \ No newline at end of file -- cgit v1.2.3 From 769660598d0f336eb259337f1c6f1f3fd67fa50f Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Wed, 6 May 2026 10:10:57 +0300 Subject: general: T8595: drop .cursorrules symlink --- .cursorrules | 1 - 1 file changed, 1 deletion(-) delete mode 120000 .cursorrules diff --git a/.cursorrules b/.cursorrules deleted file mode 120000 index 681311e..0000000 --- a/.cursorrules +++ /dev/null @@ -1 +0,0 @@ -CLAUDE.md \ No newline at end of file -- cgit v1.2.3