Merge "ITM: Fix for tunnel ports not getting deleted."
[genius.git] / itm / itm-api / src / main / yang / itm-config.yang
1 module itm-config {
2
3     namespace "urn:opendaylight:genius:itm:config";
4
5     prefix itm-config;
6
7     import ietf-interfaces {
8         prefix if;
9     }
10     import ietf-yang-types {
11         prefix yang;
12     }
13     import ietf-inet-types {
14         prefix inet;
15         revision-date "2013-07-15";
16     }
17     import odl-interface {
18             prefix odlif;
19     }
20     import config { prefix config; revision-date 2013-04-05; }
21
22     description "This YANG module defines automatic tunnel configuration.";
23     revision "2016-04-06";
24
25     /* Tunnel Monitoring Knob */
26
27     container tunnel-monitor-params {
28       leaf enabled {
29          type boolean;
30          default true;
31       }
32
33       leaf monitor-protocol {
34          type identityref {
35              base odlif:tunnel-monitoring-type-base;
36          }
37          default odlif:tunnel-monitoring-type-bfd;
38       }
39     }
40     container tunnel-monitor-interval {
41       leaf interval {
42          type uint16 {
43              range "1000..30000";
44          }
45       }
46     }
47
48     /* Configuration data */
49
50     container vtep-config-schemas {
51       list vtep-config-schema {
52         key schema-name;
53      
54         leaf schema-name {
55             type string;
56             mandatory true;
57             description "Schema name";
58         }
59         
60         leaf transport-zone-name {
61             type string;
62             mandatory true;
63             description "Transport zone";
64         }
65         
66         leaf tunnel-type {
67             type identityref {
68             base odlif:tunnel-type-base;
69             }
70         }
71         
72         leaf port-name {
73             type string;
74             mandatory true;
75             description "Port name";
76         }
77
78         leaf vlan-id {
79             type uint16 {
80                 range "0..4094";
81             }
82             mandatory true;
83             description "VLAN ID";
84         }
85         
86         leaf gateway-ip {
87             type inet:ip-address;
88             description "Gateway IP address";
89         }
90         
91         leaf subnet {
92             type inet:ip-prefix;
93             mandatory true;
94             description "Subnet Mask in CIDR-notation string, e.g. 10.0.0.0/24";
95         }
96         
97         leaf exclude-ip-filter {
98             type string;
99             description "IP Addresses which needs to be excluded from the specified subnet. IP address range or comma separated IP addresses can to be specified. e.g: 10.0.0.1-10.0.0.20,10.0.0.30,10.0.0.35";
100         }
101         
102         list dpn-ids {
103             key "DPN";
104             
105             leaf DPN {
106                type uint64;
107                description "DPN ID";
108             }
109         }    
110       }
111     }
112     
113     /* Ip Address book keeping */
114     container vtep-ip-pools {
115        config true;
116        list vtep-ip-pool {
117           key subnet-cidr;
118           leaf subnet-cidr{
119              type string;
120           }
121           leaf-list available-ipaddress {
122              type inet:ip-address;
123           }
124           leaf-list allocated-ipaddress {
125              type inet:ip-address;
126           }
127        }
128     }
129 }