pyang should re-check config flags after deviations + invalidating before running tests again
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
```
You should make an additional check within
statements.v_reference_deviation_4(ctx, stmt) which re-checks the entire target
module for illegaly set config flags.
In module with prefix "a":
container interface-stats {
config false;
leaf in-pkts {
type int32;
}
}
In another module which imports the above module:
deviation /a:interface-stats/a:in-pkts {
deviate add {
config true;
}
}
This should generate an error, saying that config true cannot be set when a
parent has config false set. It currently doesn't.
Perhaps calling statements.v_inherit_properties(ctx, stmt) again with target
module in the argument will do the trick. config-stmt is an inherited property
anyways so recalling this method is actually a must when config flags get
deviated (you need to re-inherit).
Also "invalidating" target statements before re-running the tests on them after
deviations makes sense to me. As far as I remember you check
Statement.i_is_validated in some functions. You should invalidate this member
before making any re-checks or you might end up checking nothing. :)
```
Original issue reported on code.google.com by `jernej.t...@gmail.com` on 12 Sep 2012 at 12:25
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.