8c37a20313a4f8593e3444148445b39964965f95
[vpnservice.git] / itm / itm-api / src / main / yang / itm-config.yang
1 module itm-config {
2
3     namespace "urn:opendaylight:vpnservice: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 "2015-11-02";
24
25     /* Tunnel Monitoring Knob */
26
27     container tunnel-monitor-enabled {
28       leaf enabled {
29          type boolean;
30          default true;
31       }
32     }
33
34     container tunnel-monitor-interval {
35       leaf interval {
36          type uint16 {
37              range "5..30";
38          }
39          default 10;
40       }
41     }
42
43     /* Configuration data */
44
45     container vtep-config-schemas {
46       list vtep-config-schema {
47         key schema-name;
48         leaf schema-name {
49             type string;
50             mandatory true;
51             description "Schema name";
52         }
53         leaf transport-zone-name {
54             type string;
55             mandatory true;
56             description "Transport zone";
57         }
58         leaf tunnel-type {
59             type identityref {
60             base odlif:tunnel-type-base;
61             }
62         }
63         leaf port-name {
64             type string;
65             mandatory true;
66             description "Port name";
67         }
68         leaf vlan-id {
69             type uint16 {
70                 range "0..4094";
71             }
72             mandatory true;
73             description "VLAN ID";
74         }
75         leaf gateway-ip {
76             type inet:ip-address;
77             description "Gateway IP address";
78         }
79         leaf subnet {
80             type inet:ip-prefix;
81             mandatory true;
82             description "Subnet Mask in CIDR-notation string, e.g. 10.0.0.0/24";
83         }
84         leaf exclude-ip-filter {
85             type string;
86             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";
87         }
88         list dpn-ids {
89             key "DPN";
90             leaf DPN {
91                type uint64;
92                description "DPN ID";
93             }
94         }
95       }
96     }
97
98     /* Ip Address book keeping */
99     container vtep-ip-pools {
100        config true;
101        list vtep-ip-pool {
102           key subnet-cidr;
103           leaf subnet-cidr{
104              type string;
105           }
106           leaf-list available-ipaddress {
107              type inet:ip-address;
108           }
109           leaf-list allocated-ipaddress {
110              type inet:ip-address;
111           }
112        }
113     }
114 }