Closed alexandrustancu closed 2 years ago
Possible solution:
leaf header-compression-kind {
type leafref {
path "/core-model:control-construct/core-model:logical-termination-point[core-model:uuid = current()/../../../../core-model:uuid]/core-model:layer-protocol[core-model:local-id = current()/../../../core-model:local-id]/ethernet-container:ethernet-container-pac/ethernet-container:ethernet-container-capability/ethernet-container:supported-header-compression-kind-list/ethernet-container:header-compression-name";
require-instance false;
}
must 'deref(.) = current()';
description
"Defines the kind of header compression to be used.";
}
Regarding the concern on the 'header-compression-kind' 'path' and 'must' changes , please find the below details.
Must :
In a leaf ref , if the path string is not having uuid included, then we are constructing the 'must' parameter from the already available 'path' statement using the following formula ,
"must boolean( <<complete 'path' till the last occurrence before '/'>> [ <<suffix of the 'path' based on ':'>> =current()])
So if we are planning to apply this change(deref(.) = current()) globally for all the must statement then we can replace this logic as per the new requirement.
Path: Based on the xmi aggregation=shared , we are constructing the path string for the associated constrain's hierarchy(using a recursive logic). So to including the string "[core-model:uuid = current()/../../../../core-model:uuid]" for logical-termination-point and the string "[core-model:local-id = current()/../../../core-model:local-id]" to the layer-protocol we needs some logical change. This is to be applied for all the 'path' statements associated with a 'must' statement.
Fixed with EthernetContainer_2.0.0-tsp.220405.1755.
The
pyang
tool reports warning with regards to the must statements defined in the model (the issue is the same for all other models):RFC 7950 defines the accessible tree like this:
Also, the current "must" statement does not enforce pointing to the capabilities of the same LTP instance.