diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-26 00:32:07 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-26 00:32:07 +0300 |
| commit | e7bca9eea9b4e987f04eee3e7ad4fe08b483ec2a (patch) | |
| tree | 1f683e45c8d888fa75d9ee5da22ac2a3e61d9339 | |
| parent | 8e0163ea5c579b694b6811671e288b38bb2ec5c8 (diff) | |
| download | vyos.vyos-e7bca9eea9b4e987f04eee3e7ad4fe08b483ec2a.tar.gz vyos.vyos-e7bca9eea9b4e987f04eee3e7ad4fe08b483ec2a.zip | |
T8517: revert unrelated .coderabbit.yaml and AGENTS.md drift
These two files were modified by automated review tooling on this
branch (quote-style normalization in .coderabbit.yaml; blank-line
insertions in AGENTS.md). They are out of scope for the LLDP
unit-tests PR — restore both to match origin/main.
🤖 Generated by [robots](https://vyos.io)
| -rw-r--r-- | .coderabbit.yaml | 30 | ||||
| -rw-r--r-- | AGENTS.md | 7 |
2 files changed, 15 insertions, 22 deletions
diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 2b343aa6..c14e52eb 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -33,7 +33,7 @@ reviews: path_instructions: # ── Global PR hygiene ────────────────────────────────────────────── - - path: "**" + - path: '**' instructions: | This is the vyos.vyos Ansible network collection (namespace=vyos, name=vyos, version=6.0.0). PR titles must follow the format `T{id}: description` referencing @@ -46,7 +46,7 @@ reviews: 88-char wrapping. # ── Module entry points ──────────────────────────────────────────── - - path: "plugins/modules/vyos_*.py" + - path: 'plugins/modules/vyos_*.py' instructions: | Module entry points. Each file must contain three YAML triple-string blocks: DOCUMENTATION, EXAMPLES, and RETURN — this is Ansible's documentation contract, @@ -63,7 +63,7 @@ reviews: are the canonical documentation. # ── Argspec (auto-generated) ─────────────────────────────────────── - - path: "plugins/module_utils/network/vyos/argspec/**" + - path: 'plugins/module_utils/network/vyos/argspec/**' instructions: | Auto-generated by the Ansible resource module builder. These files carry a "DO NOT EDIT" warning header. Do not suggest modifications to auto-generated @@ -73,7 +73,7 @@ reviews: that would cause runtime failures. # ── Config classes ───────────────────────────────────────────────── - - path: "plugins/module_utils/network/vyos/config/**" + - path: 'plugins/module_utils/network/vyos/config/**' instructions: | Config builders extending ansible.netcommon ConfigBase or ResourceModule. These generate VyOS CLI commands from desired state. Verify: @@ -87,7 +87,7 @@ reviews: Some older config files have auto-generated headers — do not restructure those. # ── Facts classes ────────────────────────────────────────────────── - - path: "plugins/module_utils/network/vyos/facts/**" + - path: 'plugins/module_utils/network/vyos/facts/**' instructions: | Facts classes parse raw VyOS CLI output into structured dicts. Verify: - Regex patterns handle edge cases (missing fields, empty values, quoted strings). @@ -99,7 +99,7 @@ reviews: get_resource_connection(). # ── RM Templates ─────────────────────────────────────────────────── - - path: "plugins/module_utils/network/vyos/rm_templates/*.py" + - path: 'plugins/module_utils/network/vyos/rm_templates/*.py' instructions: | Parser templates mapping structured data to VyOS CLI commands and vice versa. Files with a `_14` suffix target VyOS 1.4+ behavior — do not suggest merging @@ -111,7 +111,7 @@ reviews: - compval/getval paths match the argspec structure. # ── Cliconf plugin ───────────────────────────────────────────────── - - path: "plugins/cliconf/vyos.py" + - path: 'plugins/cliconf/vyos.py' instructions: | Low-level CLI abstraction for VyOS. Handles configure mode, commit, diff, command execution. Changes here affect all modules. Verify: @@ -122,7 +122,7 @@ reviews: - __rpc__ list matches actually implemented methods. # ── Terminal plugin ──────────────────────────────────────────────── - - path: "plugins/terminal/vyos.py" + - path: 'plugins/terminal/vyos.py' instructions: | Terminal prompt detection and initialization. Changes affect connection reliability. Verify regex patterns against actual VyOS prompt formats @@ -130,14 +130,14 @@ reviews: remove existing patterns without testing against all supported VyOS versions. # ── Action plugin ────────────────────────────────────────────────── - - path: "plugins/action/vyos.py" + - path: 'plugins/action/vyos.py' instructions: | Auto-proxies all modules to the device. Must validate network_cli connection type. Symlinks from each module name point here. Keep minimal — logic belongs in config classes, not the action plugin. # ── Changelog fragments ──────────────────────────────────────────── - - path: "changelogs/fragments/*.{yaml,yml}" + - path: 'changelogs/fragments/*.{yaml,yml}' instructions: | Changelog fragments for ansible-changelog. Valid top-level keys: major_changes, minor_changes, breaking_changes, deprecated_features, @@ -147,7 +147,7 @@ reviews: Use `trivial` for tooling/housekeeping. Entries should be complete sentences. # ── CI workflows ─────────────────────────────────────────────────── - - path: ".github/workflows/**" + - path: '.github/workflows/**' instructions: | CI pipeline: tests.yml (main CI with changelog, build, lint, sanity, unit jobs), codecoverage.yml, release.yml (Galaxy + Automation Hub publish), check_label.yaml, @@ -156,7 +156,7 @@ reviews: job from tests.yml. # ── Unit tests ───────────────────────────────────────────────────── - - path: "tests/unit/**" + - path: 'tests/unit/**' instructions: | Unit tests use pytest + unittest.TestCase via TestVyosModule base class. Key patterns: @@ -171,7 +171,7 @@ reviews: execute_module kwargs. pytest-xdist runs tests in parallel (-n 2). # ── Test fixtures ────────────────────────────────────────────────── - - path: "tests/unit/modules/network/vyos/fixtures/**" + - path: 'tests/unit/modules/network/vyos/fixtures/**' instructions: | Raw VyOS CLI output files (.cfg). These are loaded by load_fixture() and cached in memory. Format is VyOS `set ...` configuration syntax or show @@ -181,13 +181,13 @@ reviews: unless the test explicitly requires JSON parsing. # ── Collection metadata ──────────────────────────────────────────── - - path: "galaxy.yml" + - path: 'galaxy.yml' instructions: | Collection metadata. namespace=vyos, name=vyos. Version bumps must be coordinated with release process. Dependency on ansible.netcommon>=2.5.1 is required. Do not add unnecessary dependencies. - - path: "meta/runtime.yml" + - path: 'meta/runtime.yml' instructions: | Module redirects and tombstones. Adding a new module requires a redirect entry (short name → FQCN). Tombstoned modules (logging, vyos_logging) must @@ -1,24 +1,20 @@ # AGENTS.md ## Project purpose - The official Ansible Collection for managing VyOS network appliances (`vyos.vyos` namespace). Provides modules, plugins, action handlers, terminal plugins, and resource modules for BGP, OSPF, firewall, interfaces, NTP, etc. ## Tech stack - - Ansible Collection (Galaxy). Python control-plane code under `plugins/`. - `galaxy.yml` declares `namespace: vyos`, `name: vyos`, `version: 6.0.0`, dep `ansible.netcommon >= 2.5.1`, license_file `LICENSE` (GPL-3.0). - Test stack: `pytest` + `tox-ansible.ini`; lint via flake8, isort, black (line-length 100), pre-commit, ansible-lint. - Runtime deps: `paramiko`, `scp` (`requirements.txt`); `bindep.txt` for system deps. ## Build / test / run - - Build: `ansible-galaxy collection build` produces a `vyos-vyos-<version>.tar.gz`. - Install local dev: `ansible-galaxy collection install . --force`. - Test (unit): `ansible-test units` (matches `unit-galaxy` CI job; requires collection installed under `~/.ansible/collections/`). Fast local alternative: `source .venv/bin/activate && PYTHONPATH=".collections" python -m pytest tests/unit` (matches `unit-source` CI path; config in `pyproject.toml`). CI (`.github/workflows/tests.yml`) runs the changelog / build-import / ansible-lint / sanity / unit-galaxy / unit-source jobs; integration tests live under `tests/integration/` but are not yet wired into CI. Per `README.md`, the collection targets VyOS 1.3.8 / 1.4.1 / 1.5-rolling (no version matrix in the workflow itself). ## Repository layout - - `plugins/{action,cliconf,doc_fragments,filter,inventory,module_utils,modules,terminal}/` — collection content. - `tests/` — sanity, unit, integration directories. CI (`.github/workflows/tests.yml`) runs sanity + unit-galaxy + unit-source (plus changelog / build-import / ansible-lint); integration is not yet wired into CI. - `docs/` — generated module docs. @@ -27,12 +23,10 @@ The official Ansible Collection for managing VyOS network appliances (`vyos.vyos - `.github/workflows/` — `tests.yml`, `release.yml`, `codecoverage.yml`, `cla-check.yml`, `ah_token_refresh.yml`, `check_label.yaml`. ## Cross-repo context - - Consumed by Ansible users running playbooks against VyOS routers built by `vyos/vyos-build`. - The `vyos.vyos` collection talks to VyOS via `network_cli` connections; supports the same train branches (`current`, `circinus`, `sagitta`, `equuleus`). ## Conventions - - Commit headline: `T12345: description` (Phorge ID at https://vyos.dev mandatory). No workflow enforces PR title format in this repo. - Every PR must include exactly one changelog fragment under `changelogs/fragments/`; use `doc_changes` for documentation-only updates, or `trivial` for tooling / housekeeping changes. - Default branch `main` (not `current` — this repo predates the rename convention). @@ -40,7 +34,6 @@ The official Ansible Collection for managing VyOS network appliances (`vyos.vyos - Codecov + CodeRabbit configured (`codecov.yml`, `.coderabbit.yaml`). ## Notes for future contributors - - Galaxy versioning is independent of VyOS train versioning — bump in `galaxy.yml` per release. - Tested matrix is in README; expand only after smoketesting against real images. - `PR408_README.md` plus `pr408-diagram.png` document a non-trivial historical refactor; read before touching resource-module structure. |
