-
Notifications
You must be signed in to change notification settings - Fork 79
Define PTP model for the Dell Enterprise SONiC collection #300
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
fc8be63
39b255c
7c07355
42f27fc
98b6579
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Using deleted | ||
# | ||
# Before State: | ||
# ------------- | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp network-transport l2 multicast | ||
# ptp domain 25 | ||
# ptp domain-profile default | ||
# ptp priority1 101 | ||
# ptp priority2 91 | ||
# ptp log-announce-interval 1 | ||
# ptp log-sync-interval -3 | ||
# sonic# | ||
|
||
- name: Delete specified PTP configurations | ||
dellemc.enterprise_sonic.sonic_ptp: | ||
config: | ||
log-sync-interval: -3 | ||
log-announce-interval: 1 | ||
network-transport: 'L2' | ||
unicast-multicast: 'multicast' | ||
priority1 101 | ||
priority2 91 | ||
domain-number: 25 | ||
state: deleted | ||
|
||
# After State: | ||
# ------------ | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp domain-profile default | ||
# sonic# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Using deleted | ||
# | ||
# Before State: | ||
# ------------- | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp mode boundary-clock | ||
# ptp network-transport ipv6 unicast | ||
# ptp domain 45 | ||
# ptp domain-profile g8275.2 | ||
# ptp announce-timeout 3 | ||
# sonic# | ||
|
||
- name: Delete all PTP configurations | ||
dellemc.enterprise_sonic.sonic_ptp: | ||
config: | ||
announce-receipt-timeout: 3 | ||
network-transport: 'ipv6' | ||
unicast-multicast: 'unicast' | ||
domain-number: 45 | ||
clock-type: 'BC' | ||
domain-profile: 'G.8275.2' | ||
state: deleted | ||
|
||
# After State: | ||
# ------------ | ||
# | ||
# sonic# show running-configuration ptp | ||
|
||
# sonic# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Using merged | ||
# | ||
# Before State: | ||
# ------------- | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp domain 35 | ||
# ptp domain-profile default | ||
# ptp priority2 100 | ||
# sonic# | ||
|
||
- name: Merge provided global PTP configurations | ||
dellemc.enterprise_sonic.sonic_ptp: | ||
config: | ||
domain-profile: 'G.8275.1' | ||
log-sync-interval: -4 | ||
log-announce-interval: -3 | ||
announce-receipt-timeout: 5 | ||
log-min-delay-req-interval: -4 | ||
clock-type: 'BC' | ||
network-transport: 'L2' | ||
unicast-multicast: 'multicast' | ||
state: merged | ||
|
||
# After State: | ||
# ------------ | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp mode boundary-clock | ||
# ptp network-transport l2 multicast | ||
# ptp domain 35 | ||
# ptp domain-profile g8275.1 | ||
# ptp priority2 100 | ||
# ptp log-announce-interval -3 | ||
# ptp announce-timeout 5 | ||
# ptp log-sync-interval -4 | ||
# ptp log-min-delay-req-interval -4 | ||
# sonic# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Using overridden | ||
# | ||
# Before State: | ||
# ------------- | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp mode boundary-clock | ||
# ptp network-transport l2 multicast | ||
# ptp domain 35 | ||
# ptp domain-profile g8275.1 | ||
# ptp priority2 100 | ||
# ptp log-announce-interval -3 | ||
# ptp announce-timeout 5 | ||
# ptp log-sync-interval -4 | ||
# ptp log-min-delay-req-interval -4 | ||
# sonic# | ||
|
||
- name: Override device configuration of ptp with provided configuration | ||
dellemc.enterprise_sonic.sonic_ptp: | ||
config: | ||
domain-number: 44 | ||
domain-profile: 'G.8275.2' | ||
network-transport: 'ipv4' | ||
unicast-multicast: 'unicast' | ||
state: overridden | ||
|
||
# After State: | ||
# ------------ | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp network-transport ipv4 unicast | ||
# ptp domain 44 | ||
# ptp domain-profile g8275.2 | ||
# sonic# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Using replaced | ||
# | ||
# Before State: | ||
# ------------- | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp network-transport ipv4 unicast | ||
# ptp domain 44 | ||
# ptp domain-profile default | ||
# ptp priority1 100 | ||
# ptp priority2 90 | ||
# ptp log-announce-interval -2 | ||
# ptp log-sync-interval -4 | ||
# sonic# | ||
|
||
- name: Replace global PTP configurations | ||
dellemc.enterprise_sonic.sonic_ptp: | ||
config: | ||
log-sync-interval: -3 | ||
log-announce-interval: 1 | ||
network-transport: 'L2' | ||
unicast-multicast: 'multicast' | ||
priority1 101 | ||
priority2 91 | ||
domain-number: 25 | ||
state: replaced | ||
|
||
# After State: | ||
# ------------ | ||
# | ||
# sonic# show running-configuration ptp | ||
# ptp network-transport l2 multicast | ||
# ptp domain 25 | ||
# ptp domain-profile default | ||
# ptp priority1 101 | ||
# ptp priority2 91 | ||
# ptp log-announce-interval 1 | ||
# ptp log-sync-interval -3 | ||
# sonic# |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,123 @@ | ||||||||||||||
--- | ||||||||||||||
GENERATOR_VERSION: '1.0' | ||||||||||||||
ANSIBLE_METADATA: | | ||||||||||||||
{ | ||||||||||||||
'metadata_version': '1.1', | ||||||||||||||
'status': ['preview'], | ||||||||||||||
'supported_by': 'community', | ||||||||||||||
'license': 'Apache 2.0' | ||||||||||||||
} | ||||||||||||||
NETWORK_OS: sonic | ||||||||||||||
RESOURCE: ptp_default_ds | ||||||||||||||
COPYRIGHT: Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved | ||||||||||||||
DOCUMENTATION: | | ||||||||||||||
module: sonic_ptp_default_ds | ||||||||||||||
version_added: '3.1.0' | ||||||||||||||
short_description: Manage global PTP configurations on SONiC | ||||||||||||||
description: | ||||||||||||||
- This module provides configuration management of global PTP | ||||||||||||||
parameters for devices running SONiC. | ||||||||||||||
- The device should have timing chip support. | ||||||||||||||
author: 'Vidya Chidambaram (@vidyac86)' | ||||||||||||||
options: | ||||||||||||||
config: | ||||||||||||||
description: | ||||||||||||||
- Specifies global PTP clock configurations. | ||||||||||||||
type: dict | ||||||||||||||
suboptions: | ||||||||||||||
priority1: | ||||||||||||||
description: | ||||||||||||||
- the priority1 attribute of the local clock. | ||||||||||||||
- the range is from 0 to 255. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
priority2: | ||||||||||||||
description: | ||||||||||||||
- the priority2 attribute of the local clock. | ||||||||||||||
- the range is from 0 to 255. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
domain_number: | ||||||||||||||
description: | ||||||||||||||
- The domain number of the current syntonization domain. | ||||||||||||||
- the range is from 0 to 127. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
log_announce_interval: | ||||||||||||||
description: | ||||||||||||||
- The base-2 logarithm of the mean announceInterval (mean time | ||||||||||||||
- interval between successive Announce messages) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
announce_receipt_timeout: | ||||||||||||||
description: | ||||||||||||||
- The number of announceIntervals that have to pass | ||||||||||||||
- without receipt of an Announce message before the | ||||||||||||||
- occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
log_sync_interval: | ||||||||||||||
description: | ||||||||||||||
- The base-2 logarithm of the mean SyncInterval | ||||||||||||||
- for multicast messages. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
log_min_delay_req_interval: | ||||||||||||||
description: | ||||||||||||||
- The base-2 logarithm of the minDelayReqInterval.(The minimum | ||||||||||||||
- permitted mean time interval between successive Delay_Req | ||||||||||||||
messages) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
two_step_flag: | ||||||||||||||
description: | ||||||||||||||
- The clockAccuracy indicates the expected accuracy of the clock | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: int | ||||||||||||||
clock_type: | ||||||||||||||
description: | ||||||||||||||
- Defines the type of clock configured in the PTP domain. | ||||||||||||||
- The possible values are (BC)|(P2P_TC)|(E2E_TC)|(disable) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: str | ||||||||||||||
choices: ['BC', 'E2E_TC', 'P2P_TC', 'disable'] | ||||||||||||||
network_transport: | ||||||||||||||
description: | ||||||||||||||
- The network transport used for communication | ||||||||||||||
- The permitted values are (L2)|(UDPv4)|(UDPv6) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: str | ||||||||||||||
choices: ['L2', 'UDPv4', 'UDPv6'] | ||||||||||||||
unicast_multicast: | ||||||||||||||
description: | ||||||||||||||
- Whether the network transport uses unicast or | ||||||||||||||
- multicast communication | ||||||||||||||
- The permitted values are (unicast)|(multicast) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: str | ||||||||||||||
choices: ['unicast', 'multicast'] | ||||||||||||||
domain_profile: | ||||||||||||||
description: | ||||||||||||||
- The method to be used when comparing data sets during | ||||||||||||||
- the Best Master Clock Algorithm. | ||||||||||||||
- The permitted values are (ieee1588)|(G.8275.1)|(G.8275.2) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: str | ||||||||||||||
choices: ['ieee1588', 'G.8275.1', 'G.8275.2'] | ||||||||||||||
source_interface: | ||||||||||||||
description: | ||||||||||||||
- Source interface whose IP to use as source ip for PTP IPv4 | ||||||||||||||
and IPv6 multicast transport mode | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
type: str | ||||||||||||||
|
||||||||||||||
state: | ||||||||||||||
description: | ||||||||||||||
- The state of the configuration after module completion. | ||||||||||||||
- C(merged) - Merges provided PTP configuration with on-device | ||||||||||||||
configuration. | ||||||||||||||
- C(replaced) - Replaces on-device PTP configuration with provided | ||||||||||||||
configuration. | ||||||||||||||
- C(overridden) - Overrides all on-device PTP configurations with the | ||||||||||||||
provided configuration. | ||||||||||||||
- C(deleted) - Deletes on-device PTP configuration. | ||||||||||||||
type: str | ||||||||||||||
choices: | ||||||||||||||
- merged | ||||||||||||||
- deleted | ||||||||||||||
- replaced | ||||||||||||||
- overridden | ||||||||||||||
default: merged | ||||||||||||||
EXAMPLES: | ||||||||||||||
- deleted_example_01.txt | ||||||||||||||
- deleted_example_02.txt | ||||||||||||||
- merged_example_01.txt | ||||||||||||||
- replaced_example_01.txt | ||||||||||||||
- overridden_example_01.txt |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,26 @@ | ||||||
# Using deleted | ||||||
# | ||||||
# Before State: | ||||||
# ------------- | ||||||
# | ||||||
# sonic# show running-configuration ptp | grep "ptp port" | ||||||
# ptp port add Ethernet0 role slave local-priority 100 | ||||||
# ptp port add Ethernet4 role master local-priority 90 | ||||||
# ptp port master-table Ethernet0 add 1.1.1.1 | ||||||
# sonic# | ||||||
|
||||||
- name: Delete specified PTP configurations | ||||||
dellemc.enterprise_sonic.sonic_ptp: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
config: | ||||||
- interface: 'ethernet4' | ||||||
role: 'master' | ||||||
localpriority: 90 | ||||||
state: deleted | ||||||
|
||||||
# After State: | ||||||
# ------------ | ||||||
# | ||||||
# sonic# show running-configuration ptp | ||||||
# ptp port add Ethernet0 role slave local-priority 100 | ||||||
# ptp port master-table Ethernet0 add 1.1.1.1 | ||||||
# sonic# |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,26 @@ | ||||||||
# Using deleted | ||||||||
# | ||||||||
# Before State: | ||||||||
# ------------- | ||||||||
# | ||||||||
# sonic# show running-configuration ptp | grep "ptp port" | ||||||||
# ptp port add Ethernet0 role slave local-priority 100 | ||||||||
# ptp port add Ethernet4 role master local-priority 90 | ||||||||
# ptp port master-table Ethernet0 add 1.1.1.1 | ||||||||
# sonic# | ||||||||
|
||||||||
- name: Delete specified PTP configurations | ||||||||
dellemc.enterprise_sonic.sonic_ptp: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
config: | ||||||||
- interface: 'ethernet0' | ||||||||
role: 'slave' | ||||||||
localpriority: 100 | ||||||||
unicasttable: ['1.1.1.1'] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will address this like unicasttable: ["1.1.1.1" , "1.1.1.2"] |
||||||||
state: deleted | ||||||||
|
||||||||
# After State: | ||||||||
# ------------ | ||||||||
# | ||||||||
# sonic# show running-configuration ptp | ||||||||
# ptp port add Ethernet4 role master local-priority 90 | ||||||||
# sonic# |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Using merged | ||
# | ||
# Before State: | ||
# ------------- | ||
# | ||
# sonic# show running-configuration ptp | grep "ptp port" | ||
# ptp port add Ethernet0 | ||
# sonic# | ||
|
||
- name: Merge provided global PTP configurations | ||
dellemc.enterprise_sonic.sonic_ptp_port_ds: | ||
config: | ||
- interface: 'Ethernet0' | ||
role: 'slave' | ||
localpriority: 100 | ||
state: merged | ||
|
||
# After State: | ||
# ------------ | ||
# | ||
# sonic# show running-configuration ptp | grep "ptp port" | ||
# ptp port add Ethernet0 role slave local-priority 100 | ||
# sonic# |
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.