blob: de450fc0ac8025fc0ef39302d041e59958fb050e [file] [log] [blame]
Vidyashree Rama13b4c552016-06-20 15:12:43 +05301module Test {
2 yang-version 1;
3 namespace http://huawei.com;
4 prefix Ant;
5 container interface {
6 leaf ifType {
7 type enumeration {
8 enum ethernet;
9 enum atm;
10 }
11 }
12 leaf ifMTU {
13 type uint32;
14 }
surya-huaweib2c64c52017-06-22 10:25:35 +053015 must "ifType != ethernet or " +
16 "(ifType = ethernet and ifMTU = 1500)" {
Vidyashree Rama13b4c552016-06-20 15:12:43 +053017 description "An ethernet MTU must be 1500";
18 }
19 must "ifType != 'atm' or " +
20 "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" {
21 description "An atm MTU must be 64 .. 17966";
22 }
23 }
24}