ietf-ptp@2019-04-10.yang | ietf-ptp@2019-04-10-formatted.yang | |||
---|---|---|---|---|
module ietf-ptp { | module ietf-ptp { | |||
yang-version 1.1; | yang-version 1.1; | |||
namespace "urn:ietf:params:xml:ns:yang:ietf-ptp"; | namespace "urn:ietf:params:xml:ns:yang:ietf-ptp"; | |||
prefix "ptp"; | prefix ptp; | |||
import ietf-interfaces { | import ietf-interfaces { | |||
prefix if; | prefix if; | |||
reference | reference | |||
"RFC 8343: A YANG Data Model for Interface Management"; | "RFC 8343: A YANG Data Model for Interface Management"; | |||
} | } | |||
organization "IETF TICTOC Working Group"; | organization | |||
"IETF TICTOC Working Group"; | ||||
contact | contact | |||
"WG Web: https://datatracker.ietf.org/wg/tictoc/ | "WG Web: https://datatracker.ietf.org/wg/tictoc/ | |||
WG List: <mailto:tictoc@ietf.org> | WG List: <mailto:tictoc@ietf.org> | |||
Editor: Yuanlong Jiang | Editor: Yuanlong Jiang | |||
<mailto:jiangyuanlong@huawei.com> | <mailto:jiangyuanlong@huawei.com> | |||
Editor: Rodney Cummings | Editor: Rodney Cummings | |||
<mailto:rodney.cummings@ni.com>"; | <mailto:rodney.cummings@ni.com>"; | |||
description | description | |||
"This YANG module defines a data model for the configuration | "This YANG module defines a data model for the configuration | |||
of IEEE 1588-2008 clocks, and also for retrieval of the state | of IEEE 1588-2008 clocks, and also for retrieval of the state | |||
data of IEEE 1588-2008 clocks."; | data of IEEE 1588-2008 clocks."; | |||
revision "2019-04-10" { | revision 2019-04-10 { | |||
description "Initial version"; | description | |||
reference "RFC 8575: YANG Data Model for IEEE 1588-2008"; | "Initial version"; | |||
reference | ||||
"RFC 8575: YANG Data Model for IEEE 1588-2008"; | ||||
} | } | |||
typedef delay-mechanism-enumeration { | typedef delay-mechanism-enumeration { | |||
type enumeration { | type enumeration { | |||
enum e2e { | enum e2e { | |||
value 1; | value 1; | |||
description | description | |||
"The port uses the delay request-response mechanism."; | "The port uses the delay request-response mechanism."; | |||
} | } | |||
enum p2p { | enum p2p { | |||
value 2; | value 2; | |||
description | description | |||
"The port uses the peer delay mechanism."; | "The port uses the peer delay mechanism."; | |||
} | } | |||
enum disabled { | enum disabled { | |||
value 254; | value 254; | |||
description | description | |||
"The port does not implement any delay mechanism."; | "The port does not implement any delay mechanism."; | |||
} | } | |||
skipping to change at line 145 ¶ | skipping to change at line 144 ¶ | |||
reference | reference | |||
"IEEE Std 1588-2008: 5.3.4"; | "IEEE Std 1588-2008: 5.3.4"; | |||
} | } | |||
grouping clock-quality-grouping { | grouping clock-quality-grouping { | |||
description | description | |||
"Derived data type for quality of a clock, which contains | "Derived data type for quality of a clock, which contains | |||
clockClass, clockAccuracy, and offsetScaledLogVariance."; | clockClass, clockAccuracy, and offsetScaledLogVariance."; | |||
reference | reference | |||
"IEEE Std 1588-2008: 5.3.7"; | "IEEE Std 1588-2008: 5.3.7"; | |||
leaf clock-class { | leaf clock-class { | |||
type uint8; | type uint8; | |||
default 248; | default "248"; | |||
description | description | |||
"The clockClass denotes the traceability of the time | "The clockClass denotes the traceability of the time | |||
or frequency distributed by the clock."; | or frequency distributed by the clock."; | |||
} | } | |||
leaf clock-accuracy { | leaf clock-accuracy { | |||
type uint8; | type uint8; | |||
description | description | |||
"The clockAccuracy indicates the expected accuracy | "The clockAccuracy indicates the expected accuracy | |||
of the clock."; | of the clock."; | |||
} | } | |||
leaf offset-scaled-log-variance { | leaf offset-scaled-log-variance { | |||
type uint16; | type uint16; | |||
description | description | |||
"The offsetScaledLogVariance provides an estimate of | "The offsetScaledLogVariance provides an estimate of | |||
the variations of the clock from a linear timescale | the variations of the clock from a linear timescale | |||
when it is not synchronized to another clock | when it is not synchronized to another clock | |||
using the protocol."; | using the protocol."; | |||
} | } | |||
} | } | |||
skipping to change at line 175 ¶ | skipping to change at line 171 ¶ | |||
the variations of the clock from a linear timescale | the variations of the clock from a linear timescale | |||
when it is not synchronized to another clock | when it is not synchronized to another clock | |||
using the protocol."; | using the protocol."; | |||
} | } | |||
} | } | |||
container ptp { | container ptp { | |||
description | description | |||
"The PTP struct containing all attributes of PTP data set, | "The PTP struct containing all attributes of PTP data set, | |||
other optional PTP attributes can be augmented as well."; | other optional PTP attributes can be augmented as well."; | |||
list instance-list { | list instance-list { | |||
key "instance-number"; | key "instance-number"; | |||
description | description | |||
"List of one or more PTP data sets in the device (see IEEE | "List of one or more PTP data sets in the device (see IEEE | |||
Std 1588-2008 subclause 6.3). | Std 1588-2008 subclause 6.3). | |||
Each PTP data set represents a distinct instance of | Each PTP data set represents a distinct instance of | |||
PTP implementation in the device (i.e., distinct | PTP implementation in the device (i.e., distinct | |||
Ordinary Clock or Boundary Clock)."; | Ordinary Clock or Boundary Clock)."; | |||
leaf instance-number { | leaf instance-number { | |||
type uint32; | type uint32; | |||
description | description | |||
"The instance number of the current PTP instance. | "The instance number of the current PTP instance. | |||
This instance number is used for management purposes | This instance number is used for management purposes | |||
only. This instance number does not represent the PTP | only. This instance number does not represent the PTP | |||
domain number and is not used in PTP messages."; | domain number and is not used in PTP messages."; | |||
} | } | |||
container default-ds { | container default-ds { | |||
description | description | |||
"The default data set of the clock (see IEEE Std | "The default data set of the clock (see IEEE Std | |||
1588-2008 subclause 8.2.1). This data set represents | 1588-2008 subclause 8.2.1). This data set represents | |||
the configuration/state required for operation | the configuration/state required for operation | |||
of Precision Time Protocol (PTP) state machines."; | of Precision Time Protocol (PTP) state machines."; | |||
leaf two-step-flag { | leaf two-step-flag { | |||
type boolean; | type boolean; | |||
description | description | |||
"When set to true, the clock is a two-step clock; | "When set to true, the clock is a two-step clock; | |||
otherwise,the clock is a one-step clock."; | otherwise,the clock is a one-step clock."; | |||
} | } | |||
leaf clock-identity { | leaf clock-identity { | |||
type clock-identity-type; | type clock-identity-type; | |||
config false; | config false; | |||
description | description | |||
"The clockIdentity of the local clock."; | "The clockIdentity of the local clock."; | |||
} | } | |||
leaf number-ports { | leaf number-ports { | |||
type uint16; | type uint16; | |||
description | description | |||
"The number of PTP ports on the instance."; | "The number of PTP ports on the instance."; | |||
} | } | |||
container clock-quality { | container clock-quality { | |||
description | description | |||
"The clockQuality of the local clock."; | "The clockQuality of the local clock."; | |||
uses clock-quality-grouping; | uses clock-quality-grouping; | |||
} | } | |||
leaf priority1 { | leaf priority1 { | |||
type uint8; | type uint8; | |||
description | description | |||
"The priority1 attribute of the local clock."; | "The priority1 attribute of the local clock."; | |||
} | } | |||
leaf priority2 { | ||||
leaf priority2{ | ||||
type uint8; | type uint8; | |||
description | description | |||
"The priority2 attribute of the local clock."; | "The priority2 attribute of the local clock."; | |||
} | } | |||
leaf domain-number { | leaf domain-number { | |||
type uint8; | type uint8; | |||
description | description | |||
"The domain number of the current syntonization | "The domain number of the current syntonization | |||
domain."; | domain."; | |||
} | } | |||
leaf slave-only { | leaf slave-only { | |||
type boolean; | type boolean; | |||
description | description | |||
"When set to true, the clock is a slave-only clock."; | "When set to true, the clock is a slave-only clock."; | |||
} | } | |||
} | } | |||
container current-ds { | container current-ds { | |||
description | description | |||
"The current data set of the clock (see IEEE Std | "The current data set of the clock (see IEEE Std | |||
1588-2008 subclause 8.2.2). This data set represents | 1588-2008 subclause 8.2.2). This data set represents | |||
local states learned from the exchange of | local states learned from the exchange of | |||
Precision Time Protocol (PTP) messages."; | Precision Time Protocol (PTP) messages."; | |||
leaf steps-removed { | leaf steps-removed { | |||
type uint16; | type uint16; | |||
default 0; | default "0"; | |||
description | description | |||
"The number of communication paths traversed | "The number of communication paths traversed | |||
between the local clock and the grandmaster clock."; | between the local clock and the grandmaster clock."; | |||
} | } | |||
leaf offset-from-master { | leaf offset-from-master { | |||
type time-interval-type; | type time-interval-type; | |||
description | description | |||
"The current value of the time difference between | "The current value of the time difference between | |||
a master and a slave clock as computed by the slave."; | a master and a slave clock as computed by the slave."; | |||
} | } | |||
leaf mean-path-delay { | leaf mean-path-delay { | |||
type time-interval-type; | type time-interval-type; | |||
description | description | |||
"The current value of the mean propagation time between | "The current value of the mean propagation time between | |||
a master and a slave clock as computed by the slave."; | a master and a slave clock as computed by the slave."; | |||
} | } | |||
} | } | |||
container parent-ds { | container parent-ds { | |||
description | description | |||
"The parent data set of the clock (see IEEE Std 1588-2008 | "The parent data set of the clock (see IEEE Std 1588-2008 | |||
subclause 8.2.3)."; | subclause 8.2.3)."; | |||
container parent-port-identity { | container parent-port-identity { | |||
description | description | |||
"The portIdentity of the port on the master, it | "The portIdentity of the port on the master, it | |||
contains two members: clockIdentity and portNumber."; | contains two members: clockIdentity and portNumber."; | |||
reference | reference | |||
"IEEE Std 1588-2008: 5.3.5"; | "IEEE Std 1588-2008: 5.3.5"; | |||
leaf clock-identity { | leaf clock-identity { | |||
type clock-identity-type; | type clock-identity-type; | |||
description | description | |||
"Identity of the clock."; | "Identity of the clock."; | |||
} | } | |||
leaf port-number { | leaf port-number { | |||
type uint16; | type uint16; | |||
description | description | |||
"Port number."; | "Port number."; | |||
} | } | |||
} | } | |||
leaf parent-stats { | leaf parent-stats { | |||
type boolean; | type boolean; | |||
default false; | default "false"; | |||
description | description | |||
"When set to true, the values of | "When set to true, the values of | |||
observedParentOffsetScaledLogVariance and | observedParentOffsetScaledLogVariance and | |||
observedParentClockPhaseChangeRate of parentDS | observedParentClockPhaseChangeRate of parentDS | |||
have been measured and are valid."; | have been measured and are valid."; | |||
} | } | |||
leaf observed-parent-offset-scaled-log-variance { | leaf observed-parent-offset-scaled-log-variance { | |||
type uint16; | type uint16; | |||
default 65535; | default "65535"; | |||
description | description | |||
"An estimate of the parent clock's PTP variance | "An estimate of the parent clock's PTP variance | |||
as observed by the slave clock."; | as observed by the slave clock."; | |||
} | } | |||
leaf observed-parent-clock-phase-change-rate { | leaf observed-parent-clock-phase-change-rate { | |||
type int32; | type int32; | |||
description | description | |||
"An estimate of the parent clock's phase change rate | "An estimate of the parent clock's phase change rate | |||
as observed by the slave clock."; | as observed by the slave clock."; | |||
} | } | |||
leaf grandmaster-identity { | leaf grandmaster-identity { | |||
type clock-identity-type; | type clock-identity-type; | |||
description | description | |||
"The clockIdentity attribute of the grandmaster clock."; | "The clockIdentity attribute of the grandmaster clock."; | |||
} | } | |||
container grandmaster-clock-quality { | container grandmaster-clock-quality { | |||
description | description | |||
"The clockQuality of the grandmaster clock."; | "The clockQuality of the grandmaster clock."; | |||
uses clock-quality-grouping; | uses clock-quality-grouping; | |||
} | } | |||
leaf grandmaster-priority1 { | leaf grandmaster-priority1 { | |||
type uint8; | type uint8; | |||
description | description | |||
"The priority1 attribute of the grandmaster clock."; | "The priority1 attribute of the grandmaster clock."; | |||
} | } | |||
leaf grandmaster-priority2 { | leaf grandmaster-priority2 { | |||
type uint8; | type uint8; | |||
description | description | |||
"The priority2 attribute of the grandmaster clock."; | "The priority2 attribute of the grandmaster clock."; | |||
} | } | |||
} | } | |||
container time-properties-ds { | container time-properties-ds { | |||
description | description | |||
"The timeProperties data set of the clock (see | "The timeProperties data set of the clock (see | |||
IEEE Std 1588-2008 subclause 8.2.4)."; | IEEE Std 1588-2008 subclause 8.2.4)."; | |||
leaf current-utc-offset-valid { | leaf current-utc-offset-valid { | |||
type boolean; | type boolean; | |||
description | description | |||
"When set to true, the current UTC offset is valid."; | "When set to true, the current UTC offset is valid."; | |||
} | } | |||
leaf current-utc-offset { | leaf current-utc-offset { | |||
when "../current-utc-offset-valid='true'"; | when "../current-utc-offset-valid='true'"; | |||
type int16; | type int16; | |||
description | description | |||
"The offset between TAI and UTC when the epoch of the | "The offset between TAI and UTC when the epoch of the | |||
skipping to change at line 454 ¶ | skipping to change at line 406 ¶ | |||
In this YANG data model, portIdentity is not modeled | In this YANG data model, portIdentity is not modeled | |||
in the port-ds-list. However, its members are provided | in the port-ds-list. However, its members are provided | |||
as follows: | as follows: | |||
portIdentity.portNumber is provided as this | portIdentity.portNumber is provided as this | |||
port-number leaf in port-ds-list, and | port-number leaf in port-ds-list, and | |||
portIdentity.clockIdentity is provided as the | portIdentity.clockIdentity is provided as the | |||
clock-identity leaf in default-ds of the instance | clock-identity leaf in default-ds of the instance | |||
(i.e., ../../default-ds/clock-identity)."; | (i.e., ../../default-ds/clock-identity)."; | |||
} | } | |||
leaf port-state { | leaf port-state { | |||
type port-state-enumeration; | type port-state-enumeration; | |||
default "initializing"; | default "initializing"; | |||
description | description | |||
"Current state associated with the port."; | "Current state associated with the port."; | |||
} | } | |||
leaf underlying-interface { | leaf underlying-interface { | |||
type if:interface-ref; | type if:interface-ref; | |||
description | description | |||
"Reference to the configured underlying interface that | "Reference to the configured underlying interface that | |||
is used by this PTP port (see RFC 8343)."; | is used by this PTP port (see RFC 8343)."; | |||
} | } | |||
leaf log-min-delay-req-interval { | leaf log-min-delay-req-interval { | |||
type int8; | type int8; | |||
description | description | |||
"The base-2 logarithm of the minDelayReqInterval | "The base-2 logarithm of the minDelayReqInterval | |||
(the minimum permitted mean time interval between | (the minimum permitted mean time interval between | |||
successive Delay_Req messages)."; | successive Delay_Req messages)."; | |||
} | } | |||
leaf peer-mean-path-delay { | leaf peer-mean-path-delay { | |||
type time-interval-type; | type time-interval-type; | |||
default 0; | default "0"; | |||
description | description | |||
"An estimate of the current one-way propagation delay | "An estimate of the current one-way propagation delay | |||
on the link when the delayMechanism is P2P; otherwise, | on the link when the delayMechanism is P2P; otherwise, | |||
it is zero."; | it is zero."; | |||
} | } | |||
leaf log-announce-interval { | leaf log-announce-interval { | |||
type int8; | type int8; | |||
description | description | |||
"The base-2 logarithm of the mean | "The base-2 logarithm of the mean | |||
announceInterval (mean time interval between | announceInterval (mean time interval between | |||
successive Announce messages)."; | successive Announce messages)."; | |||
} | } | |||
leaf announce-receipt-timeout { | leaf announce-receipt-timeout { | |||
type uint8; | type uint8; | |||
description | description | |||
"The number of announceIntervals that have to pass | "The number of announceIntervals that have to pass | |||
without receipt of an Announce message before the | without receipt of an Announce message before the | |||
occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ | occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ | |||
EXPIRES."; | EXPIRES."; | |||
} | } | |||
leaf log-sync-interval { | leaf log-sync-interval { | |||
type int8; | type int8; | |||
description | description | |||
"The base-2 logarithm of the mean SyncInterval | "The base-2 logarithm of the mean SyncInterval | |||
for multicast messages. The rates for unicast | for multicast messages. The rates for unicast | |||
transmissions are negotiated separately on a per-port | transmissions are negotiated separately on a per-port | |||
basis and are not constrained by this attribute."; | basis and are not constrained by this attribute."; | |||
} | } | |||
leaf delay-mechanism { | leaf delay-mechanism { | |||
type delay-mechanism-enumeration; | type delay-mechanism-enumeration; | |||
description | description | |||
"The propagation delay measuring option used by the | "The propagation delay measuring option used by the | |||
port in computing meanPathDelay."; | port in computing meanPathDelay."; | |||
} | } | |||
leaf log-min-pdelay-req-interval { | leaf log-min-pdelay-req-interval { | |||
type int8; | type int8; | |||
description | description | |||
"The base-2 logarithm of the | "The base-2 logarithm of the | |||
minPdelayReqInterval (minimum permitted mean time | minPdelayReqInterval (minimum permitted mean time | |||
interval between successive Pdelay_Req messages)."; | interval between successive Pdelay_Req messages)."; | |||
} | } | |||
leaf version-number { | leaf version-number { | |||
type uint8; | type uint8; | |||
description | description | |||
"The PTP version in use on the port."; | "The PTP version in use on the port."; | |||
} | } | |||
} | } | |||
} | } | |||
container transparent-clock-default-ds { | ||||
container transparent-clock-default-ds { | description | |||
description | "The members of the transparentClockDefault data set (see | |||
"The members of the transparentClockDefault data set (see | IEEE Std 1588-2008 subclause 8.3.2)."; | |||
IEEE Std 1588-2008 subclause 8.3.2)."; | leaf clock-identity { | |||
type clock-identity-type; | ||||
leaf clock-identity { | config false; | |||
type clock-identity-type; | description | |||
config false; | "The clockIdentity of the transparent clock."; | |||
description | } | |||
"The clockIdentity of the transparent clock."; | leaf number-ports { | |||
} | type uint16; | |||
description | ||||
leaf number-ports { | "The number of PTP ports on the transparent clock."; | |||
type uint16; | } | |||
description | leaf delay-mechanism { | |||
"The number of PTP ports on the transparent clock."; | type delay-mechanism-enumeration; | |||
} | description | |||
"The propagation delay measuring option | ||||
leaf delay-mechanism { | used by the transparent clock."; | |||
type delay-mechanism-enumeration; | } | |||
description | leaf primary-domain { | |||
"The propagation delay measuring option | type uint8; | |||
used by the transparent clock."; | default "0"; | |||
} | description | |||
"The domainNumber of the primary syntonization domain (see | ||||
leaf primary-domain { | IEEE Std 1588-2008 subclause 10.1)."; | |||
type uint8; | } | |||
default 0; | } | |||
description | list transparent-clock-port-ds-list { | |||
"The domainNumber of the primary syntonization domain (see | key "port-number"; | |||
IEEE Std 1588-2008 subclause 10.1)."; | description | |||
} | "List of transparentClockPort data sets of the transparent | |||
} | clock (see IEEE Std 1588-2008 subclause 8.3.3)."; | |||
leaf port-number { | ||||
list transparent-clock-port-ds-list { | type uint16; | |||
key "port-number"; | description | |||
description | "Port number. | |||
"List of transparentClockPort data sets of the transparent | The data sets (i.e., information model) of IEEE Std | |||
clock (see IEEE Std 1588-2008 subclause 8.3.3)."; | 1588-2008 specify a member | |||
transparentClockPortDS.portIdentity, which uses a typed | ||||
leaf port-number { | struct with members clockIdentity and portNumber. | |||
type uint16; | ||||
description | ||||
"Port number. | ||||
The data sets (i.e., information model) of IEEE Std | ||||
1588-2008 specify a member | ||||
transparentClockPortDS.portIdentity, which uses a typed | ||||
struct with members clockIdentity and portNumber. | ||||
In this YANG data model, portIdentity is not modeled in | ||||
the transparent-clock-port-ds-list. However, its | ||||
members are provided as follows: | ||||
portIdentity.portNumber is provided as this leaf member | ||||
in transparent-clock-port-ds-list and | ||||
portIdentity.clockIdentity is provided as the | ||||
clock-identity leaf in transparent-clock-default-ds | ||||
(i.e., ../../transparent-clock-default-ds/clock- | ||||
identity)."; | ||||
} | ||||
leaf log-min-pdelay-req-interval { | ||||
type int8; | ||||
description | ||||
"The logarithm to the base 2 of the | ||||
minPdelayReqInterval (minimum permitted mean time | ||||
interval between successive Pdelay_Req messages)."; | ||||
} | ||||
leaf faulty-flag { | ||||
type boolean; | ||||
default false; | ||||
description | ||||
"When set to true, the port is faulty."; | ||||
} | ||||
leaf peer-mean-path-delay { | ||||
type time-interval-type; | ||||
default 0; | ||||
description | ||||
"An estimate of the current one-way propagation delay | ||||
on the link when the delayMechanism is P2P; otherwise, | ||||
it is zero."; | ||||
} | ||||
In this YANG data model, portIdentity is not modeled in | ||||
the transparent-clock-port-ds-list. However, its | ||||
members are provided as follows: | ||||
portIdentity.portNumber is provided as this leaf member | ||||
in transparent-clock-port-ds-list and | ||||
portIdentity.clockIdentity is provided as the | ||||
clock-identity leaf in transparent-clock-default-ds | ||||
(i.e., ../../transparent-clock-default-ds/clock- | ||||
identity)."; | ||||
} | ||||
leaf log-min-pdelay-req-interval { | ||||
type int8; | ||||
description | ||||
"The logarithm to the base 2 of the | ||||
minPdelayReqInterval (minimum permitted mean time | ||||
interval between successive Pdelay_Req messages)."; | ||||
} | ||||
leaf faulty-flag { | ||||
type boolean; | ||||
default "false"; | ||||
description | ||||
"When set to true, the port is faulty."; | ||||
} | ||||
leaf peer-mean-path-delay { | ||||
type time-interval-type; | ||||
default "0"; | ||||
description | ||||
"An estimate of the current one-way propagation delay | ||||
on the link when the delayMechanism is P2P; otherwise, | ||||
it is zero."; | ||||
} | ||||
} | } | |||
} | } | |||
} | } | |||
End of changes. 65 change blocks. | ||||
162 lines changed or deleted | 101 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |