acidjunk / acidjunk/pyang

pyang should re-check config flags after deviations + invalidating before running tests again

Đang mở
#78 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
auto-migrated Priority-Medium Type-Defect
Ngôn ngữ chính
Python
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```
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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.