diff options
| author | omnom62 <75066712+omnom62@users.noreply.github.com> | 2026-05-07 06:14:10 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-07 06:14:10 +1000 |
| commit | a7982d9e2d0962041578ffc4e8c71ec4f8038411 (patch) | |
| tree | fd5b6a1b9a890be64c36c6a71a13411b8fe9f49c | |
| parent | c2f82fb9009202d68c997a161b6a1488db15e76a (diff) | |
| parent | 769660598d0f336eb259337f1c6f1f3fd67fa50f (diff) | |
| download | rest.vyos-a7982d9e2d0962041578ffc4e8c71ec4f8038411.tar.gz rest.vyos-a7982d9e2d0962041578ffc4e8c71ec4f8038411.zip | |
Merge pull request #1 from vyos/T8595-add-claude-md
general: T8595: add CLAUDE.md
| l--------- | .github/copilot-instructions.md | 1 | ||||
| l--------- | AGENTS.md | 1 | ||||
| -rw-r--r-- | CLAUDE.md | 49 |
3 files changed, 51 insertions, 0 deletions
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 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 diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..ab95d5a --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,49 @@ +# 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. |
