Implemented new RPCs, add/delete int/ext I/f name
[vpnservice.git] / itm / itm-api / src / main / yang / itm-state.yang
1 module itm-state {
2
3       namespace "urn:opendaylight:vpnservice: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           revision-date "2010-09-24";
18       }
19       import odl-interface {
20           prefix odlif; revision-date "2015-03-31";
21       }
22     
23
24       description "This YANG module defines operation part of the model.";
25
26       revision "2015-07-01";
27
28         /* Operational state */
29
30       container dpn-endpoints {
31
32         list DPN-TEPs-info {
33
34           key "DPN-ID";
35
36           leaf DPN-ID {
37                    type uint64;
38           }
39           leaf up {
40              type boolean;
41              config false;
42           }
43
44           /* Minimum 1 port. We may for now support only two ports */
45           list tunnel-end-points {
46
47                key "portname VLAN-ID ip-address"; /* Multiple tunnels on the same physical port but on different VLAN can be supported */
48
49                  leaf portname {
50                      type string;
51                      }
52                  leaf VLAN-ID {
53                      type uint16;
54                      }
55                  leaf ip-address {
56                      type inet:ip-address;
57                  }
58                  leaf subnet-mask {
59                      type inet:ip-prefix;
60                  }
61                  leaf gw-ip-address {
62                           type inet:ip-address;
63                  }
64                  leaf transport-zone {
65                           type string;
66                  }
67                  leaf interface-name {
68                           type string;
69                  }
70                  leaf tunnel-type {
71                       type identityref {
72                           base odlif:tunnel-type-base;
73                       }
74                  }
75            }
76
77          }
78       }
79
80
81       container tunnel-list {
82              list internal-tunnel {
83
84                key  "source-DPN destination-DPN";
85
86                leaf source-DPN {
87                    type uint64;
88                }
89
90                leaf destination-DPN {
91                    type uint64;
92                }
93
94                /* logical-group interface id */
95
96                leaf tunnel-interface-name {
97                     type string;
98                }
99              }
100           }
101
102       container external-tunnel-list {
103              list external-tunnel {
104
105                key  "source-DPN destination-IP";
106
107                leaf source-DPN {
108                    type uint64;
109                }
110
111                leaf destination-IP {
112                    type inet:ip-address;
113                }
114
115                /* logical-group interface id */
116
117                leaf tunnel-interface-name {
118                     type string;
119                }
120
121              }
122           }
123
124           notification itm-tunnel-build-complete{
125           }
126
127 }