diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-05-08 14:32:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-08 14:32:18 +0100 |
| commit | 6276e9afd7b2aba709733a19bf5ce0221d42070d (patch) | |
| tree | c0c75e6aa736510f8554e0ff01d28c09358fa876 | |
| parent | a7982d9e2d0962041578ffc4e8c71ec4f8038411 (diff) | |
| parent | 94b6cfed230f319263ed0cc815efd593933e8d15 (diff) | |
| download | rest.vyos-6276e9afd7b2aba709733a19bf5ce0221d42070d.tar.gz rest.vyos-6276e9afd7b2aba709733a19bf5ce0221d42070d.zip | |
Merge pull request #2 from vyos/T8595-add-agents-md
general: T8595: switch CLAUDE.md to AGENTS.md (+ Copilot symlink)
| l--------- | .github/copilot-instructions.md | 2 | ||||
| -rw-r--r--[l---------] | AGENTS.md | 46 | ||||
| -rw-r--r-- | CLAUDE.md | 49 |
3 files changed, 46 insertions, 51 deletions
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 949a29f..be77ac8 120000 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1 +1 @@ -../CLAUDE.md
\ No newline at end of file +../AGENTS.md
\ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 681311e..da673bf 120000..100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1 +1,45 @@ -CLAUDE.md
\ No newline at end of file +# AGENTS.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-<ver>.tar.gz +ansible-galaxy collection install vyos-rest-<ver>.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. + +## 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. diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index ab95d5a..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,49 +0,0 @@ -# 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-<ver>.tar.gz -ansible-galaxy collection install vyos-rest-<ver>.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. |
