Skip to content

VPC Pair 4.x Implementation#197

Open
sivakasi-cisco wants to merge 41 commits intoCiscoDevNet:developfrom
sivakasi-cisco:vpc_pair_4x_nd
Open

VPC Pair 4.x Implementation#197
sivakasi-cisco wants to merge 41 commits intoCiscoDevNet:developfrom
sivakasi-cisco:vpc_pair_4x_nd

Conversation

@sivakasi-cisco
Copy link
Copy Markdown
Collaborator

@sivakasi-cisco sivakasi-cisco commented Mar 9, 2026

#230

vPC Pair support for ND 4.x

  • nd_manage_vpc_pair can create, update, delete, override, and gather vPC pairs.

  • The big module logic was split into focused helper files (query, validation, actions, deploy, etc.)

  • We added dedicated vPC Pair endpoints/models/schemas and connected them through the orchestrator + state machine flow.

  • Integration tests were added across all main scenarios (merge/replace/override/delete/gather).

@sivakasi-cisco
Copy link
Copy Markdown
Collaborator Author

Continuation of sivakasi-cisco#1

- VpcPairResourceService handles NDStateMachine orchestration
- Custom actions use RestSend (NDModuleV2) for HTTP with retry logic
"""
argument_spec = dict(
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.

We decided that it would be better to include this as part of our pydantic models and update argument_spec from the model.

Here is an example:

https://github.com/CiscoDevNet/ansible-nd/pull/207/changes#diff-e8e57d176067341e720b4349c4569795b5155338208dd655a3d4ad739e462be4R1368

https://github.com/CiscoDevNet/ansible-nd/pull/207/changes#diff-e8e57d176067341e720b4349c4569795b5155338208dd655a3d4ad739e462be4R1283

This should be added to the pydantic model that represents your playbook configuration. I did not see one for your playbook configuration so for now you could add it to the vpc_pair_models.py file but we should discuss adding a pydantic model the represents the playbook config the user would provide.

)

# State-specific parameter validations
state = module.params.get("state", "merged")
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.

Curious why you default to merged here since the argument spec above already defaults state to merged?

deploy = module.params.get("deploy")
dry_run = module.params.get("dry_run")

if state == "gathered" and deploy:
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.

We need to discuss this more for this module but state: gathered must adhere to the playbook ansible argument spec so that it can be cut an pasted into a playbook

This should follow the Ansible argspec and if used in a playbook with state overridden would result in no changes to the controller

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.

Let's discuss alternatives to what you are doing since I believe you are using your current version of state: gathered for testing

@sivakasi-cisco sivakasi-cisco changed the title VPC Pair 4.x Implementation [WIP] VPC Pair 4.x Implementation Mar 18, 2026
@sivakasi-cisco sivakasi-cisco changed the title [WIP] VPC Pair 4.x Implementation VPC Pair 4.x Implementation Mar 24, 2026
@sivakasi-cisco sivakasi-cisco force-pushed the vpc_pair_4x_nd branch 2 times, most recently from 47f5bb0 to ea2e89c Compare March 25, 2026 17:56
1. Fix deploy timeout in merge\
2. Check modules gathered output for ebgp vpc pair list
3. Remove delete in bulk as its not required for vpc\
4. cleanups from the review comments expected
5. Fine tuning IT
…se by default and

Correcting the IT accordingly
- resuse existing mixins without more duplicates\
- Adding type annotations to method signatures
- revisited the required imports and removed others
 - run time inputs for verify instead of suppress_verification
 - verify_option/query timers changed as config_action with retries
 - config_action validation
 - config_save knob along with deploy
 - limited external fabric checks for gathered calls
 - explicit field comparison readded in merge
 - vpc_pair details check extended
 - sanity checks, UT additions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants