Address PR #269/#270 doc review comments; enforce netflow_monitor with netflow - #383
Open
allenrobel wants to merge 1 commit into
Open
Address PR #269/#270 doc review comments; enforce netflow_monitor with netflow#383allenrobel wants to merge 1 commit into
allenrobel wants to merge 1 commit into
Conversation
allenrobel
requested review from
akinross,
anvitha-jain,
gmicol,
lhercot,
mikewiebe,
mtarking,
sajagana,
samiib and
shrsr
as code owners
July 2, 2026 03:05
There was a problem hiding this comment.
Pull request overview
This PR follows up on prior doc-review threads for the port-channel access/trunk host interface modules by clarifying how the policyType is referenced in module DOCUMENTATION and by enforcing a model-level constraint for Netflow configuration consistency.
Changes:
- Updates module DOCUMENTATION wording to parenthesize
policyTypereferences (e.g.,(accessPoHost),(trunkPoHost)) and removes “querying” from the access module description. - Documents that
netflow_monitoris required whennetflow=trueand enforces this with a Pydanticmodel_validatorin both policy models. - Adds unit tests covering the new
netflow/netflow_monitorvalidation behavior for both access and trunk host policy models.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/module_utils/models/test_port_channel_trunk_host_interface.py | Adds unit test asserting netflow_monitor is required when netflow=True. |
| tests/unit/module_utils/models/test_port_channel_access_interface.py | Adds unit test asserting netflow_monitor is required when netflow=True. |
| plugins/modules/nd_interface_port_channel_trunk_host.py | Updates DOCUMENTATION wording and documents netflow_monitor requirement when netflow=true. |
| plugins/modules/nd_interface_port_channel_access.py | Updates DOCUMENTATION wording, removes “querying” mention, and documents netflow_monitor requirement when netflow=true. |
| plugins/module_utils/models/interfaces/port_channel_trunk_host_interface.py | Adds model_validator to reject netflow=True without netflow_monitor; updates field description accordingly. |
| plugins/module_utils/models/interfaces/port_channel_access_interface.py | Adds model_validator to reject netflow=True without netflow_monitor; updates field description accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
akinross
approved these changes
Jul 2, 2026
allenrobel
force-pushed
the
docs_port_channel_review_nits
branch
from
July 3, 2026 01:34
65050d9 to
bfcdc77
Compare
allenrobel
force-pushed
the
docs_port_channel_review_nits
branch
3 times, most recently
from
July 16, 2026 00:46
bcb96cf to
80d266a
Compare
allenrobel
force-pushed
the
docs_port_channel_review_nits
branch
2 times, most recently
from
July 22, 2026 16:12
11240f0 to
0646232
Compare
…h netflow Follow-ups from @akinross's review of the port-channel modules: - Parenthesize the (accessPoHost)/(trunkPoHost) policyType references in DOCUMENTATION and drop "querying" from the access module description. - Document that netflow_monitor is required when netflow=true, and enforce it with the same model validator nd_interface_svi uses, so an incomplete netflow policy fails early instead of deferring the outcome to ND. - Unit tests for the new validator in both policy models. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
allenrobel
force-pushed
the
docs_port_channel_review_nits
branch
from
July 27, 2026 23:17
0646232 to
cb29610
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue(s)
None — follow-ups to review comments on merged PRs #269 and #270 (threads linked below).
Proposed Changes
(accessPoHost)/(trunkPoHost)— and drop "querying" from the access module description, per review suggestions:netflow_monitoris required whennetflow=truein both modules' DOCUMENTATION and model field descriptions, and enforce it with the samemodel_validatorthatnd_interface_sviuses (_validate_netflow_monitor_present), so an incomplete netflow policy fails early with a clear error instead of deferring the outcome to ND. Per nd_interface_port_channel_access #269 (comment).Test Notes
ndpytest tests/unit/module_utils/models/test_port_channel_access_interface.py tests/unit/module_utils/models/test_port_channel_trunk_host_interface.py— 302 passed (includes 2 new validator tests).ndlint(ansible-lint, production profile) passes on both modules.black,isort,pylint,mypyrun on all changed files — no new findings (remaining pylint/mypy messages are pre-existing import-resolution noise, identical on untouched files).Cisco Nexus Dashboard Version
4.2
Related ND API Resource Category
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6