Delete netconf
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / resources / full-versions / yangs / ex-vlan.yang
1 module ex-vlan {
2   namespace "http://example.com/vlan";
3   prefix "vlan";
4   
5   import ietf-interfaces {
6     prefix if;
7   }
8   
9   revision 2013-10-22 {
10     description
11       "Initial revision.";
12     reference
13       "RFC A YANG Data Model for Interface Management draft-ietf-netmod-interfaces-cfg-12 - Appendix C";
14   }
15
16   augment "/if:interfaces/if:interface" {
17     when "if:type = 'ethernetCsmacd' or
18           if:type = 'ieee8023adLag'";
19     leaf vlan-tagging {
20       type boolean;
21       default false;
22     }
23   }
24
25   augment "/if:interfaces/if:interface" {
26     when "if:type = 'l2vlan'";
27
28     leaf base-interface {
29       type if:interface-ref;
30       must "/if:interfaces/if:interface[if:name = current()]"
31          + "/vlan:vlan-tagging = 'true'" {
32         description
33           "The base interface must have vlan tagging enabled.";
34       }
35     }
36     leaf vlan-id {
37       type uint16 {
38         range "1..4094";
39       }
40       must "../base-interface" {
41         description
42           "If a vlan-id is defined, a base-interface must
43            be specified.";
44       }
45     }
46   }
47 }