[ONOS-4650][ONOS-4726][ONOS-4727] [ONOS-4728]Implement must parser + when parser + feature + if-feature + revision defect fix
Change-Id: I0a3aee6c1c6b72ef7da7f7f565fd0f149fe3fd42
diff --git a/utils/yangutils/plugin/src/test/resources/ContainerSubStatementMust.yang b/utils/yangutils/plugin/src/test/resources/ContainerSubStatementMust.yang
new file mode 100644
index 0000000..c089850
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/ContainerSubStatementMust.yang
@@ -0,0 +1,24 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container interface {
+ leaf ifType {
+ type enumeration {
+ enum ethernet;
+ enum atm;
+ }
+ }
+ leaf ifMTU {
+ type uint32;
+ }
+ must "ifType != 'ethernet' or " +
+ "(ifType = 'ethernet' and ifMTU = 1500)" {
+ description "An ethernet MTU must be 1500";
+ }
+ must "ifType != 'atm' or " +
+ "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" {
+ description "An atm MTU must be 64 .. 17966";
+ }
+ }
+}