-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(eos_designs): Improve ptp
settings for p2p_links
#4612
base: devel
Are you sure you want to change the base?
Feat(eos_designs): Improve ptp
settings for p2p_links
#4612
Conversation
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-4612
# Activate the virtual environment
source test-avd-pr-4612/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@feat/ptp-p2p-links#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/laxmikantchintakindi/avd.git#/ansible_collections/arista/avd/,feat/ptp-p2p-links --force
# Optional: Install AVD examples
cd test-avd-pr-4612
ansible-playbook arista.avd.install_examples |
ptp
settings for p2p_links
ptp
settings for p2p_links
python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/utils.py
Outdated
Show resolved
Hide resolved
5504ee0
to
3477fa5
Compare
python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_p2p_links.schema.yml
Show resolved
Hide resolved
...-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
type: str | ||
default: "bmca" | ||
valid_values: | ||
- "bmca" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you confirm the role bmca. I see dynamic and master in eos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this as per comment from the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use can add dynamic and master here. But then also please update the valid values for the endpoints to also accept dynamic (without removing bmca, but add deprecated in the description for bmca). Dynamic == bmca
@@ -46,6 +46,7 @@ interface Ethernet8 | |||
ptp announce interval 4 | |||
ptp announce timeout 3 | |||
ptp delay-req interval -6 | |||
ptp role master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems role master is configure by default.
# Apply PTP profile config | ||
if self.shared_utils.ptp_enabled: | ||
ptp_config.update(self.shared_utils.ptp_profile) | ||
|
||
ptp_config["enable"] = True | ||
|
||
if get(p2p_link, "role") != "bmca": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it means default role is master which is not correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw similar logic in connected_endpoints.utils.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have different assumptions for endpoints and p2p links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic behaves different than the schema says. The schema says the default is "bmca", but your logic requires "bmca" to be set directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test coverage in eos_designs_unit_tests
scenario
cf1360c
to
6b67c93
Compare
Added. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
6b67c93
to
fee17c7
Compare
Quality Gate passedIssues Measures |
Change Summary
Improve
ptp
settings forp2p_links
Related Issue(s)
Fixes #2698
Component(s) name
arista.avd.eos_designs
Proposed changes
PTP knobs are available in connected_endpoints:
These would be valuable to have also in l3_edge p2p_links for L3 devices.
How to test
Checklist
User Checklist
Repository Checklist