openBackhaul / synchronization

Synchronization model according to ITU-T G.7721-2018
Apache License 2.0
1 stars 0 forks source link

Mutually exclusive containers in sync-lp-spec #54

Open michbin opened 1 year ago

michbin commented 1 year ago

The sync-lp-spec grouping attached to the layer-protocol contains 2 containers, ssm-external-clock-pac and ssm-in-band-pac.

They are probably mutually exclusive because they share a number of attributes: image

In order to avoid reporting unnecessary data only the container should be present which is valid or applicable in a certain situation. Possible solutions:

openBackhaul commented 1 year ago

(Obsoleted by a later, more complete proposal.)

Decision made during the 5G-xhaul call on 19th of July 2023: The composite associations

shall be replace by Abstractions of type Specify (translates into augment statements in YANG) and When statements.

An additional SyncLpSpec :: externalClockPort : Boolean = false attribute shall be added with comment "Defines whether the clock port is accessible from external of the device."

The When statements shall refer to this externalClockPort attribute. SsmExternalClock_Pac shall be augmented, if externalClockPort==true. SsmInBand_Pac shall be augmented, if externalClockPort==false.

PrathibaJee commented 11 months ago

Consolidating the email communication with Alex

Augmenting the SsmExternalClock_Pac,SsmInBand_Pac to SyncLpSpec will augment this pacs to the layerProtocol

augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
when "./synchronization:external-clock-port = ’true’”;
uses ssm-external-clock-pac;
description
"none";
}

augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
when "./synchronization:external-clock-port = ’false’”;
uses ssm-in-band-pac;
description
"none";
}

Problems : Problem#1: Since the attribute in the when statement is readonly , the following warning is observed in the pyang output,

  1. synchronization-1-0.yang:110: warning: node "synchronization-1-0::external-clock-port" is config false and is not part of the accessible tree
  2. synchronization-1-0.yang:117: warning: node "synchronization-1-0::external-clock-port" is config false and is not part of the accessible tree

Proposal : Using a if-feature statement instead of a when statement will solve this warning.( If interested , this approach shall be discussed further)

Problem#2: Since the 3 attributes “ssm-information”, “ssm-mode” and “ssm-configuration-value” are there in both ssmExternalClock_Pac and SsmInBand_Pac, the following error is observed in the pyang output,

  1. synchronization-1-0.yang:118 (at synchronization-1-0.yang:523): error: there is already a child node to "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" at synchronization-1-0.yang:116 with the name "ssm-information" defined at synchronization-1-0.yang:111 (at synchronization-1-0.yang:493)

Reason : This error is correct from a YANG modelling, because the YANG is not valid. The model has no guarantee that the two when statements which both include a leaf having the same name are mutually exclusive. From its point of view, both could be valid at the same time, and there is a name conflict in that case.

Proposal :

  1. Create a separate grouping containing “ssm-information”, “ssm-mode” and “ssm-configuration-value”, which always augments the SyncLpSpec, and keep under the when statements only the values that are different between the two cases.
  2. Define a feature “sync-external-clock”, and use if-feature for differentiating between the two cases.
openBackhaul commented 11 months ago

Decision during the 5G-xhaul call on 8th of November 2023: (Expands the proposal already decided during the 5G-xhaul call on 19th of July 2023.)

The composite associations

shall be replace by Abstractions of type Specify (translates into augment statements in YANG) and When statements.

An additional SyncLpSpec :: externalClockPort : Boolean = false attribute (read/write for avoiding a warning in yang validation) shall be added with comment "Defines whether the clock port is accessible from external of the device."

The When statements shall refer to this externalClockPort attribute. SsmExternalClock_Pac shall be augmented, if externalClockPort==true. SsmInBand_Pac shall be augmented, if externalClockPort==false.

Existing attributes

shall be moved from the SsmExternalClock_Pac to the SyncLpSpec.

Same three attributes shall be deleted from

openBackhaul commented 9 months ago

UML changed as decided above.