Skip to content

Conversation

@vitthalmagadum
Copy link
Contributor

Change Summary

Added VerifyOSPFMaxLSA, VerifyOSPFNeighborState ospf tests

Related Issue(s)

Fixes #5757

Component(s) name

arista.avd.anta_runner

Proposed changes

Added VerifyOSPFMaxLSA, VerifyOSPFNeighborState ospf tests

How to test

Run molecule

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@github-actions
Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-6057
# Activate the virtual environment
source test-avd-pr-6057/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/vitthalmagadum/avd.git@anta_runner/ospf#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/vitthalmagadum/avd.git#/ansible_collections/arista/avd/,anta_runner/ospf --force
# Optional: Install AVD examples
cd test-avd-pr-6057
ansible-playbook arista.avd.install_examples

@vitthalmagadum vitthalmagadum marked this pull request as draft October 27, 2025 07:33
@@ -0,0 +1,10 @@
# Custom router ospf structured_config to test
custom_structured_configuration_router_ospf:
Copy link
Contributor

Choose a reason for hiding this comment

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

This works but if possible if we can add proper underlay config with ospf routing between two devices would be good to have it. You can take the example molecule for the inputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated underlay_routing_protocol as ospf for DC2.
Thanks!!

Copy link
Contributor

@MaheshGSLAB MaheshGSLAB left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment

@MaheshGSLAB MaheshGSLAB marked this pull request as ready for review October 27, 2025 09:05
| [**VerifyMlagInterfaces**](https://anta.arista.com/stable/api/tests/mlag/#anta.tests.mlag.VerifyMlagInterfaces){:target="_blank"} | Verifies there are no inactive or active-partial MLAG ports. | `mlag_configuration` |
| [**VerifyMlagStatus**](https://anta.arista.com/stable/api/tests/mlag/#anta.tests.mlag.VerifyMlagStatus){:target="_blank"} | Verifies the global MLAG state is 'active' and other parameters are consistent. | `mlag_configuration` |
| [**VerifyNTP**](https://anta.arista.com/stable/api/tests/system/#anta.tests.system.VerifyNTP){:target="_blank"} | Verifies that the device's NTP service is synchronized with a time source. | *None* |
| [**VerifyOSPFMaxLSA**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFMaxLSA){:target="_blank"} | Verifies all OSPF instances did not cross the maximum LSA threshold. | *None* |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [**VerifyOSPFMaxLSA**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFMaxLSA){:target="_blank"} | Verifies all OSPF instances did not cross the maximum LSA threshold. | *None* |
| [**VerifyOSPFMaxLSA**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFMaxLSA){:target="_blank"} | Verifies that all OSPF instances did not cross the maximum LSA threshold. | `router_ospf` |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Thanks!!

| [**VerifyMlagStatus**](https://anta.arista.com/stable/api/tests/mlag/#anta.tests.mlag.VerifyMlagStatus){:target="_blank"} | Verifies the global MLAG state is 'active' and other parameters are consistent. | `mlag_configuration` |
| [**VerifyNTP**](https://anta.arista.com/stable/api/tests/system/#anta.tests.system.VerifyNTP){:target="_blank"} | Verifies that the device's NTP service is synchronized with a time source. | *None* |
| [**VerifyOSPFMaxLSA**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFMaxLSA){:target="_blank"} | Verifies all OSPF instances did not cross the maximum LSA threshold. | *None* |
| [**VerifyOSPFNeighborState**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFNeighborState){:target="_blank"} | Verifies all OSPF neighbors are in FULL state. | *Checks all neighbors to be in `Full` state, `2Ways` is not accepted. `VerifyOSPFSpecificNeighbors` can be used in a user-defined catalog instead for the device with a neighbor that is expected to be in `2Ways`.* |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [**VerifyOSPFNeighborState**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFNeighborState){:target="_blank"} | Verifies all OSPF neighbors are in FULL state. | *Checks all neighbors to be in `Full` state, `2Ways` is not accepted. `VerifyOSPFSpecificNeighbors` can be used in a user-defined catalog instead for the device with a neighbor that is expected to be in `2Ways`.* |
| [**VerifyOSPFNeighborState**](https://anta.arista.com/stable/api/tests/routing.ospf/#anta.tests.routing.ospf.VerifyOSPFNeighborState){:target="_blank"} | Verifies that all OSPF neighbors are in the *full* state; the *2Ways* state is **not** accepted. Use `VerifyOSPFSpecificNeighbors` in a user-defined catalog instead for any device with a neighbor that is expected to be in the *2Ways* state. | `router_ospf` |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Thanks!!

@github-actions github-actions bot added the state: conflict PR with conflict label Oct 29, 2025
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR with conflict label Oct 30, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

anta_runner - Add OSPF tests

3 participants