mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
528 stars 342 forks source link

config deviations are not always visible in generated code #896

Open bd339 opened 3 months ago

bd339 commented 3 months ago

If you have a deviation like this:

  deviation /foo/bar/baz {
      deviate replace {
          config false;
      }
  }

  deviation /foo/bar/quux {
      deviate not-supported;
  }

For a module like this:

module A {
    container foo {
        list bar {
            leaf baz {
                type boolean;
           }

            leaf quux {
                type string;
            }
        }
    }
}

If you generate a yin file from the yang module + deviations module, quux is deleted (correct) but baz is missing a config false; statement (incorrect).