openBackhaul / wireInterface

Technology specific interface definition for Ethernet PHY interfaces according to IEEE 802.3
Apache License 2.0
3 stars 1 forks source link

leafref changes for path and must statement to point the same LTP instance. #34

Closed PrathibaJee closed 2 years ago

PrathibaJee commented 3 years ago

Problem : For the attributes fixed-pmd-kind,auto-negotiation-pmd-list in wire-interface-configuration , pyang tool reports warning with regards to the must statements defined ,

wire-interface-2-0.yang:654: warning: node "wire-interface-2-0::wire-interface-capability" is config false and is not part of the accessible tree wire-interface-2-0.yang:663: warning: node "wire-interface-2-0::wire-interface-capability" is config false and is not part of the accessible tree

the current "must" statement for the attributes are not pointing to the capabilities of the same LTP instance.

Possible Solution :

leaf fixed-pmd-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]/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list/wire-interface:pmd-name";
                    require-instance false;
                }
                must  'deref(.) = current()';
                description    
                    "If (autoPmdNegotiationIsOn==0) : Configuration of the concrete kind of Physical Medium Dependent (PMD). If (autoNegotiationIsOn=1) value of this field becomes irrelevant";
            }
 leaf-list auto-negotiation-pmd-list {
                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]/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list/wire-interface:pmd-name";
                    require-instance false;
                }
                must  'deref(.) = current()';
                description     
                 "If (autoPmdNegotiationIsOn==1) AND (autoNegotiationPmdSelectionIsAvail==1), this list defines the selection of PMDs the automated negotiation process is allowed to choose from. If no entry, the automated negotiation process is allowed to choose from all available PMDs.";
            }
openBackhaul commented 2 years ago

Solved with WireInterface_2.0.0-tsp.220314.1810 release.