openBackhaul / airInterface

Technology specific interface definition for microwave air interfaces
Apache License 2.0
3 stars 0 forks source link

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

Closed PrathibaJee closed 2 years ago

PrathibaJee commented 3 years ago

problem :

For the attributes transmission-mode-min,transmission-mode-max,acm-threshold-cross-alarm-list(acm-threshold-cross-alarm-type)/transmission-mode in air-interface-configuration , pyang tool reports warning with regards to the must statements defined ,

air-interface-2-0.yang:607: warning: node "air-interface-2-0::air-interface-capability" is config false and is not part of the accessible tree air-interface-2-0.yang:616: warning: node "air-interface-2-0::air-interface-capability" is config false and is not part of the accessible tree air-interface-2-0.yang:1567: warning: node "air-interface-2-0::air-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 transmission-mode-min {
                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]/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
                    require-instance false;
                }
                must  'deref(.) = current()';
                description    
                    "Minimum transmission mode to be configured (in case adaptive modulation is not used, this value represents also the fixed transmission mode).";
            }
leaf transmission-mode-max {
                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]/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
                    require-instance false;
                }
                must  'deref(.) = current()';
                description    
                    "Maximum transmission mode to be configured.";
            }
leaf transmission-mode {
                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]/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
                    require-instance false;
                }
                must  'deref(.) = current()';
                description    
                    "none";
            }
openBackhaul commented 2 years ago

Fixed with AirInterface_2.0.0-tsp.220328.1245.