dellemc.enterprise_sonic.sonic_ptp_default_ds module – Manage global PTP configurations on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 3.2.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_ptp_default_ds.
New in dellemc.enterprise_sonic 3.1.0
Synopsis
- This module provides configuration management of global PTP parameters for devices running SONiC.
- The device should have timing chip support.
Parameters
Parameter | Comments |
|---|---|
config dictionary | Specifies global PTP clock configurations. |
|
announce_receipt_timeout integer |
The number of announceIntervals that have to pass without receipt of an Announce message before the occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES. |
|
clock_type string |
Specifies the type of clock configured in the PTP domain. Choices:
|
|
domain_number integer |
The domain number of the current syntonization domain. The range is from 0 to 127. |
|
domain_profile string |
The method to be used when comparing data sets during the Best Master Clock Algorithm. Choices:
|
|
log_announce_interval integer |
The base-2 logarithm of the mean announceInterval (mean time interval between successive Announce messages). |
|
log_min_delay_req_interval integer |
The base-2 logarithm of the minDelayReqInterval. The minimum permitted mean time interval between successive Delay_Req messages. |
|
log_sync_interval integer |
The base-2 logarithm of the mean SyncInterval for multicast messages. |
|
network_transport string |
The network transport used for communication. Choices:
|
|
priority1 integer |
The priority1 attribute of the local clock. The range is from 0 to 255. |
|
priority2 integer |
The priority2 attribute of the local clock. The range is from 0 to 255. |
|
source_interface string |
Source interface whose IP to use as source ip for PTP IPv4 and IPv6 multicast transport mode. |
|
two_step_flag integer |
The clockAccuracy indicates the expected accuracy of the clock. |
|
unicast_multicast string |
Specifies whether the network transport uses unicast or multicast communication. Choices:
|
state string | The state of the configuration after module completion.
Choices:
|
Examples
# 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#
# 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:
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration ptp
# sonic#
# 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#
# 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#
# 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#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
after dictionary | The configuration resulting from module invocation. Returned: when changed |
after(generated) dictionary | The configuration that would be generated by module invocation in non-check mode. Returned: when Sample: |
before dictionary | The configuration prior to the model invocation. Returned: always |
commands list / elements=string | The set of commands pushed to the remote device. Returned: always |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/dellemc/enterprise_sonic/sonic_ptp_default_ds_module.html