Skip to content

Commit

Permalink
Correct code for role settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxmikant Chintakindi authored and Laxmikant Chintakindi committed Nov 15, 2024
1 parent c58fc51 commit 9328da4
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ interface Ethernet10
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
isis enable CORE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ interface Ethernet8
ptp announce interval 4
ptp announce timeout 3
ptp delay-req interval -6
ptp role master
ptp sync-message interval -7
ptp transport ipv4
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ interface Ethernet6
ptp announce interval 2
ptp announce timeout 10
ptp delay-req interval 2
ptp role master
ptp sync-message interval 2
ptp transport ipv4
!
Expand All @@ -108,7 +107,6 @@ interface Ethernet7
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
!
Expand All @@ -121,7 +119,6 @@ interface Ethernet8
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
!
Expand All @@ -134,7 +131,6 @@ interface Ethernet9
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ interface Ethernet6
ptp announce interval 2
ptp announce timeout 10
ptp delay-req interval 2
ptp role master
ptp sync-message interval 2
ptp transport ipv4
!
Expand All @@ -64,7 +63,6 @@ interface Ethernet7
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
!
Expand All @@ -77,7 +75,6 @@ interface Ethernet8
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
!
Expand All @@ -90,7 +87,6 @@ interface Ethernet9
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp role master
ptp sync-message interval -3
ptp transport ipv4
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
- name: Ethernet12
peer: core-2-ospf-ldp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ ethernet_interfaces:
sync_message:
interval: -7
transport: ipv4
role: master
enable: true
vlans:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ ethernet_interfaces:
sync_message:
interval: 2
transport: ipv4
role: master
enable: true
- name: Ethernet7
peer: ptp-tests-spine2
Expand All @@ -235,7 +234,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
- name: Ethernet8
peer: ptp-tests-spine2
Expand All @@ -254,7 +252,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
- name: Ethernet9
peer: ptp-tests-spine2
Expand All @@ -273,7 +270,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
loopback_interfaces:
- name: Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ ethernet_interfaces:
sync_message:
interval: 2
transport: ipv4
role: master
enable: true
- name: Ethernet7
peer: ptp-tests-spine1
Expand All @@ -163,7 +162,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
- name: Ethernet8
peer: ptp-tests-spine1
Expand All @@ -182,7 +180,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
- name: Ethernet9
peer: ptp-tests-spine1
Expand All @@ -201,7 +198,6 @@ ethernet_interfaces:
sync_message:
interval: -3
transport: ipv4
role: master
enable: true
metadata:
platform: vEOS-LAB
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ core_interfaces:
interfaces: [ Ethernet7, Ethernet7 ]
ptp:
enabled: true
role: dynamic
include_in_underlay_protocol: false

# Testing the same as above with l3_edge
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ $defs:
description: Enable PTP.
role:
type: str
default: "bmca"
default: EOS default is `dynamic`.
valid_values:
- "bmca"
- "dynamic"
- "master"
profile:
type: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def _get_ethernet_cfg(self: AvdStructuredConfigCoreInterfacesAndL3Edge, p2p_link
msg = f"PTP Profile '{ptp_profile_name}' referenced under {self.data_model}.p2p_links does not exist in `ptp_profiles`."
ptp_config.update(get_item(self.shared_utils.ptp_profiles, "profile", ptp_profile_name, required=True, custom_error_msg=msg))

if get(p2p_link, "role") != "bmca":
if get(p2p_link, "ptp.role") == "master":
ptp_config["role"] = "master"

ptp_config["enable"] = True
Expand Down

0 comments on commit 9328da4

Please sign in to comment.