Skip to content

Address PR #269/#270 doc review comments; enforce netflow_monitor with netflow - #383

Open
allenrobel wants to merge 1 commit into
developfrom
docs_port_channel_review_nits
Open

Address PR #269/#270 doc review comments; enforce netflow_monitor with netflow#383
allenrobel wants to merge 1 commit into
developfrom
docs_port_channel_review_nits

Conversation

@allenrobel

Copy link
Copy Markdown
Collaborator

Related Issue(s)

None — follow-ups to review comments on merged PRs #269 and #270 (threads linked below).

Proposed Changes

Test Notes

  • Unit tests pass: 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, mypy run on all changed files — no new findings (remaining pylint/mypy messages are pre-existing import-resolution noise, identical on untouched files).
  • DOCUMENTATION blocks re-parsed as YAML to verify the doc edits.

Cisco Nexus Dashboard Version

4.2

Related ND API Resource Category

  • analyze
  • infra
  • manage
  • onemanage
  • other

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 policyType references (e.g., (accessPoHost), (trunkPoHost)) and removes “querying” from the access module description.
  • Documents that netflow_monitor is required when netflow=true and enforces this with a Pydantic model_validator in both policy models.
  • Adds unit tests covering the new netflow/netflow_monitor validation 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.

@allenrobel allenrobel self-assigned this Jul 2, 2026
@allenrobel allenrobel added 2.0.0 Release 2.0.0 ready for review Submitter is requesting a PR review labels Jul 2, 2026
@allenrobel
allenrobel force-pushed the docs_port_channel_review_nits branch from 65050d9 to bfcdc77 Compare July 3, 2026 01:34

@gmicol gmicol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@allenrobel
allenrobel force-pushed the docs_port_channel_review_nits branch 3 times, most recently from bcb96cf to 80d266a Compare July 16, 2026 00:46
@allenrobel
allenrobel force-pushed the docs_port_channel_review_nits branch 2 times, most recently from 11240f0 to 0646232 Compare July 22, 2026 16:12
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0.0 Release 2.0.0 ready for review Submitter is requesting a PR review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants