pyang icon indicating copy to clipboard operation
pyang copied to clipboard

Deviation

Open masif-cs opened this issue 5 years ago • 2 comments

Hi,

I have a yang model which has a leafref parameter as shown below

leaf rw-duplex-scheme {
      type leafref {
        path "/user-plane-configuration/tx-array-carriers[name=current()/../name]" + "/duplex-scheme";
        require-instance false;
      }
      description
        "Config true type of duplex scheme.";
    }

I have augument this yang model into another yang model like below:

augment "/agg:aggregated-o-ru/agg:aggregation" {
    container uplane-conf-model {
        container user-plane-configuration {
                uses uplaneConf:uplane-conf-group;
                config false;
        }
    }
  }

Then I am trying to add deviation like below, but it is giving error for the leafref parameter when I am trying to verify using Pyang.

deviation "/agg:aggregated-o-ru/agg:aggregation/uplane-conf-model/user-plane-configuration/tx-array-carriers/rw-duplex-scheme" {
        deviate replace {
                type leafref {
                        path "/agg:aggregated-o-ru/agg:aggregation/uplane-conf-model/user-plane-configuration/tx-array-carriers[name=current()/../name]" + "/duplex-scheme";
                }
        }
 }

Here is the error which I am getting:

pyang --format=tree --output=sample.tree *.yang
o-ran-uplane-conf.yang:6: warning: imported module "o-ran-aggregation-base" not used
o-ran-uplane-conf.yang:618: error: "o-ran-agg-uplane-conf:user-plane-configuration" in the path for rw-duplex-scheme at o-ran-agg-uplane-conf.yang:58 (at o-ran-uplane-conf.yang:616) is not found

Could you please help me to resolve this problem?

masif-cs avatar Nov 17 '20 13:11 masif-cs

The same as #687 BTW: Curious about whether you are dealing the same problem or in the same company with @mdoshi-com

fredgan avatar Nov 17 '20 13:11 fredgan

Yeah we both are in same company but I wasn't aware of she also posted. But it would be good if you can help us to solve this problem quickly.

masif-cs avatar Nov 17 '20 13:11 masif-cs