Initial checkin for ITM module
[vpnservice.git] / itm / itm-api / src / main / yang / itm-state.yang
1 module itm-state {
2
3       namespace "urn:opendaylight:params:xml:ns:yang:itm:op";
4
5       prefix itm-state;
6
7       import ietf-interfaces {
8           prefix if;
9       }
10
11       import ietf-yang-types {
12           prefix yang;
13       }
14
15       import ietf-inet-types {
16           prefix inet;
17       }
18
19       description "This YANG module defines operation part of the model.";
20
21       revision "2015-07-01";
22
23         /* Operational state */
24
25       container tunnels {
26
27         list DPN-TEPs-info {
28
29           key "DPN-ID";
30
31           leaf DPN-ID {
32                    type uint64;
33           }
34           leaf up {
35              type boolean;
36              config false;
37           }
38
39           /* Minimum 1 port. We may for now support only two ports */
40           list tunnel-end-points {
41
42                key "portname VLAN-ID ip-address"; /* Multiple tunnels on the same physical port but on different VLAN can be supported */
43
44                  leaf portname {
45                      type string;
46                      }
47                  leaf VLAN-ID {
48                      type uint16;
49                      }
50                  leaf ip-address {
51                      type inet:ip-address;
52                  }
53                  leaf subnet-mask {
54                      type inet:ip-prefix;
55                  }
56                  leaf gw-ip-address {
57                           type inet:ip-address;
58                  }
59                  leaf transport-zone {
60                           type string;
61                  }
62                  leaf interface-name {
63                           type string;
64                  }
65                  leaf tunnel-type {
66                       type string;
67                  }
68            }
69
70          }
71       }
72
73
74       container tunnels_state {
75              list state-tunnel-list {
76
77                key  "source-DPN destination-DPN";
78
79                leaf source-DPN {
80                    type uint64;
81                }
82
83                leaf destination-DPN {
84                    type uint64;
85                }
86
87                /* logical-group interface id */
88
89                leaf logical-tunnel-group-name {
90                     type string;
91                     config false;
92                }
93
94                leaf logical-tunnel-state {
95                     type boolean;
96                     config false;
97                }
98
99              }
100           }
101
102           rpc get-tunnel-id {
103
104              input {
105                 leaf source-dpn {
106                     type uint64;
107                 }
108                 leaf destination-dpn {
109                     type uint64;
110                 }
111              }
112
113              output {
114                      leaf logical-group-name {
115                         type string;
116                      }
117              }
118
119           }
120           
121           notification itm-tunnel-build-complete{
122           }
123
124 }