summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-07-03 15:47:29 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-07-03 15:47:29 +0300
commit13ee057a0229a3e0a35a6ddfb6450e69c7fe9aac (patch)
treeb6844d84499ded67f5a7cc530220e4c575eec628
parentdc3b2a6cb4fb960fc6c04087700cd757a417584e (diff)
downloadvyos.vyos-test/l3-interfaces-unit-tests.tar.gz
vyos.vyos-test/l3-interfaces-unit-tests.zip
T8516: drop out-of-scope config and generated-docs changestest/l3-interfaces-unit-tests
Reviewer request (gaige): top-level instruction files (.coderabbit.yaml, AGENTS.md) belong in separate PRs. Also revert unrelated generated-docs drift in vyos_config / vyos_bgp_global rst files. All four files are now identical to main.
-rw-r--r--.coderabbit.yaml35
-rw-r--r--AGENTS.md7
-rw-r--r--docs/vyos.vyos.vyos_bgp_global_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_config_module.rst21
4 files changed, 19 insertions, 46 deletions
diff --git a/.coderabbit.yaml b/.coderabbit.yaml
index 2b9a02a4..c14e52eb 100644
--- a/.coderabbit.yaml
+++ b/.coderabbit.yaml
@@ -28,12 +28,12 @@ reviews:
# central already filters `!**/__pycache__/**`, `!**/*.pyc`,
# `!**/*.egg-info/**`, `!**/.venv/**`, `!**/.worktrees/**` — so they
# are not repeated here.
- - "!changelogs/changelog.yaml"
- - "!.collections/**"
+ - '!changelogs/changelog.yaml'
+ - '!.collections/**'
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,19 +181,20 @@ 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
not be un-tombstoned. requires_ansible must stay >=2.15.0 unless explicitly
bumping minimum version.
+
knowledge_base:
jira:
# `auto` activates Jira context lookups when this repo lives on an
diff --git a/AGENTS.md b/AGENTS.md
index b3a16f79..f14e1246 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -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 (`rolling`, `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.
diff --git a/docs/vyos.vyos.vyos_bgp_global_module.rst b/docs/vyos.vyos.vyos_bgp_global_module.rst
index e83a147d..ecf44968 100644
--- a/docs/vyos.vyos.vyos_bgp_global_module.rst
+++ b/docs/vyos.vyos.vyos_bgp_global_module.rst
@@ -888,7 +888,7 @@ Parameters
<td>
</td>
<td>
- <div>Allow this EBGP neighbor to not be on a directly connected network. Specify the number of hops.</div>
+ <div>Allow this EBGP neighbor to not be on a directly connected network. Specify the number hops.</div>
</td>
</tr>
<tr>
diff --git a/docs/vyos.vyos.vyos_config_module.rst b/docs/vyos.vyos.vyos_config_module.rst
index b5b9f8b9..e2be25b9 100644
--- a/docs/vyos.vyos.vyos_config_module.rst
+++ b/docs/vyos.vyos.vyos_config_module.rst
@@ -36,27 +36,6 @@ Parameters
<tr>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
- <b>allow_password_change</b>
- <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
- <div style="font-size: small">
- <span style="color: purple">string</span>
- </div>
- </td>
- <td>
- <ul style="margin: 0; padding: 0"><b>Choices:</b>
- <li>all</li>
- <li><div style="color: blue"><b>plaintext</b>&nbsp;&larr;</div></li>
- <li>encrypted</li>
- <li>none</li>
- </ul>
- </td>
- <td>
- <div>The <code>allow_password_change</code> argument specifies whether any configuration lines which would change a user&#x27;s password should be filtered out. By default only plaintext password changes are allowed and any encrypted-password keys are filtered out. In order to allow all password updates, both plaintext and encrypted, set this argument to <code>all</code>.</div>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <div class="ansibleOptionAnchor" id="parameter-"></div>
<b>backup</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">