3d3ccbe533c62a2915a48484a787cbd036601c7d
[vpnservice.git] / itm / itm-api / src / main / yang / itm.yang
1 module itm {
2
3     namespace "urn:opendaylight:vpnservice:itm";
4
5     prefix itm;
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 "2010-09-24";
16     }
17     
18     import odl-interface {
19         prefix odlif;
20     }
21     
22     
23     import config { prefix config; revision-date 2013-04-05; }
24
25     description "This YANG module defines tunnel configuration.";
26     revision "2015-07-01";
27
28     /* Configuration data */
29
30     container transport-zones {
31       list transport-zone {
32         key zone-name;
33         leaf zone-name {
34             type string;
35         }
36         leaf tunnel-type {
37             type identityref {
38                 base odlif:tunnel-type-base;
39             }
40         }
41
42         list subnets {
43             key "prefix";
44             leaf prefix {
45                 type inet:ip-prefix;
46             }
47             leaf gateway-ip {
48                 type inet:ip-address;
49             }
50             leaf vlan-id {
51                 type uint16{
52                 range "0..4094";
53             }
54             }
55             list vteps {
56                 key "dpn-id portname";
57                 leaf dpn-id {
58                     type uint64;
59                 }
60                 leaf portname {
61                     type string;
62                 }
63                 leaf ip-address {
64                     type inet:ip-address;
65                 }
66             }
67              list device-vteps {
68               key "node-id ip-address";
69                      leaf topology-id {
70                         type string;
71                      }
72                      leaf node-id {
73                        type string;
74                      }
75                      leaf ip-address {
76                      type inet:ip-address;
77                    }
78            }
79
80         }
81       }
82     }
83     identity itm {
84         base "config:service-type";
85         config:java-class "org.opendaylight.vpnservice.itm.api.IITMProvider";
86     }
87 }