itm and mdsal porting
[vpnservice.git] / itm / itm-api / src / main / yang / itm-rpc.yang
1 module itm-rpc {
2     namespace "urn:opendaylight:vpnservice:itm:rpcs";
3     prefix "itmrpcs";
4
5     import ietf-inet-types {
6         prefix inet;
7         revision-date "2010-09-24";
8     }
9
10     import ietf-yang-types {
11               prefix yang;
12       }
13
14     import ietf-interfaces {
15         prefix if; revision-date 2014-05-08;
16     }
17
18     import odl-interface {
19         prefix odlif;
20         revision-date "2015-03-31";
21     }
22
23     import opendaylight-action-types {prefix action;revision-date "2013-11-12";}
24     import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
25
26
27     revision "2015-12-17" {
28         description "ODL Specific Itm Manager Rpcs Module";
29     }
30
31     /* RPCs */
32
33     rpc get-tunnel-interface-name {
34         description "used to retrieve tunnel interface id between Dpns";
35         input {
36             leaf source-dpid {
37                  type uint64;
38             }
39             leaf destination-dpid {
40                  type uint64;
41             }
42         }
43         output {
44             leaf interface-name {
45                 type string;
46             }
47         }
48     }
49
50     rpc get-internal-or-external-interface-name {
51         description "used to retrieve tunnel interface id with src Dpn and destination ip";
52             input {
53                 leaf source-dpid {
54                 type uint64;
55                 }
56                 leaf destination-ip {
57                 type inet:ip-address;
58                 }
59             }
60             output {
61                 leaf interface-name {
62                     type string;
63                 }
64         }
65     }
66
67     rpc get-external-tunnel-interface-name {
68         description "used to retrieve external tunnel interface id between Dpns/TORs";
69         input {
70             leaf source-node {
71             type string;
72             }
73             leaf destination-node {
74             type string;
75             }
76         }
77         output {
78             leaf interface-name {
79                 type string;
80             }
81         }
82     }
83
84     rpc build-external-tunnel-from-dpns {
85         description "used for building tunnels between a Dpn and external node";
86         input {
87             leaf-list dpn-id {
88                 type uint64;
89             }
90             leaf destination-ip {
91                 type inet:ip-address;
92             }
93             leaf tunnel-type {
94             type identityref {
95                 base odlif:tunnel-type-base;
96             }
97             }
98         }
99      }
100
101     rpc add-external-tunnel-endpoint {
102         description "used for building tunnels between teps on all Dpns and external node";
103         input {
104             leaf destination-ip {
105                  type inet:ip-address;
106             }
107             leaf tunnel-type {
108             type identityref {
109                 base odlif:tunnel-type-base;
110             }
111             }
112         }
113     }
114     rpc remove-external-tunnel-from-dpns {
115         description "used for building tunnels between a Dpn and external node";
116         input {
117             leaf-list dpn-id {
118                 type uint64;
119             }
120             leaf destination-ip {
121                 type inet:ip-address;
122             }
123             leaf tunnel-type {
124             type identityref {
125                 base odlif:tunnel-type-base;
126             }
127             }
128         }
129      }
130
131      rpc remove-external-tunnel-endpoint {
132         description "used for building tunnels between teps on all Dpns and external node";
133         input {
134             leaf destination-ip {
135                  type inet:ip-address;
136             }
137             leaf tunnel-type {
138             type identityref {
139                 base odlif:tunnel-type-base;
140             }
141             }
142         }
143      }
144
145      rpc create-terminating-service-actions {
146          description  "used for programming the terminating service actions";
147          input {
148              leaf dpn-id {
149                type uint64;
150              }
151              leaf service-id {
152                 type uint16;
153              }
154              uses offlow:instruction-list;
155          }
156      }
157
158     rpc remove-terminating-service-actions {
159         description  "used for removing the terminating service actions";
160         input {
161             leaf dpn-id {
162                     type uint64;
163             }
164             leaf service-id {
165                 type uint16;
166             }
167         }
168     }
169
170     rpc add-l2-gw-device {
171         description "used for building tunnels between teps on all Dpns and hwVtep";
172         input {
173             leaf topology-id {
174                 type string;
175             }
176             leaf node-id {
177                 type string;
178             }
179             leaf ip-address {
180                 type inet:ip-address;
181             }
182         }
183     }
184
185     rpc delete-l2-gw-device {
186         description "used for deleting tunnels between teps on all Dpns and hwVtep";
187         input {
188             leaf topology-id {
189                 type string;
190             }
191             leaf node-id {
192                 type string;
193             }
194             leaf ip-address {
195                 type inet:ip-address;
196             }
197         }
198     }
199
200 }