Pyang parser should not check leafrefs in typedefs
- Vorherrschende Sprache
- Python
- Sterne
- 0
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
```
The following happens with the "stateless-pf" module form (now expired) draft
draft-huang-netmod-acl-03:
$ pyang stateless-pf@2013-09-03.yang (no output)
$ pyang --features stateless-pf: stateless-pf@2013-09-03.yang
stateless-pf@2013-09-03.yang:236: error: stateless-pf:port-groups in the path
for port-group-ref at stateless-pf@2013-09-03.yang:232 is not found
stateless-pf@2013-09-03.yang:245: error: stateless-pf:ip-address-groups in the
path for ip-address-group-ref at stateless-pf@2013-09-03.yang:241 is not found
Pyang checks the paths of leafrefs also in typedefs, and this fails if some
nodes in the path are conditional.
The parser should check this when the derived type is used for a leaf (which
then has to depend on the same feature).
```
Original issue reported on code.google.com by `lada.lho...@gmail.com` on 29 Mar 2014 at 5:08
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Reproduce the issue with the stateless-pf@2013-09-03.yang module and the two pyang commands shown. Trace where leafref paths are checked for typedefs and where the derived type is used for a leaf; done means conditional paths no longer fail during typedef parsing, while the corresponding leaf usage still validates under its feature.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100