L2 Gw create changes related to ITM Tunnels creation in neutronvpn module
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / odl-interface-rpc.yang
1 module odl-interface-rpc {
2     namespace "urn:opendaylight:vpnservice:interfacemgr:rpcs";
3     prefix "odlifrpc";
4
5     import ietf-inet-types {
6         prefix inet;
7     }
8
9     import odl-interface {
10         prefix odlif; revision-date 2015-03-31;
11     }
12
13     import opendaylight-inventory {
14         prefix inv; revision-date 2013-08-19;
15     }
16
17     import ietf-interfaces {
18         prefix if; revision-date 2014-05-08;
19     }
20
21     import opendaylight-action-types {prefix action;}
22     import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
23
24     revision "2015-10-03" {
25         description "ODL Specific Interface Manager Rpcs Module";
26     }
27
28     /* RPCs */
29
30     rpc get-dpid-from-interface {
31         description "used to retrieve dpid from interface name";
32         input {
33             leaf intf-name {
34                 type string;
35             }
36         }
37         output {
38             leaf dpid {
39                 type uint64;
40             }
41         }
42     }
43
44     rpc get-port-from-interface {
45         description "used to retrieve dpid from interface name";
46         input {
47             leaf intf-name {
48                 type string;
49             }
50         }
51         output {
52             leaf dpid {
53                 type uint64;
54             }
55             leaf portno {
56                 type uint32;
57             }
58             leaf portname {
59                 type string;
60             }
61         }
62     }
63
64     rpc get-egress-actions-for-interface {
65         description "used to retrieve group actions to use from interface name";
66         input {
67             leaf intf-name {
68                 type string;
69             }
70         }
71         output {
72             uses action:action-list;
73         }
74     }
75
76     rpc get-egress-actions {
77         description "used to retrieve group actions to use from interface name";
78         input {
79             leaf intf-name {
80                 type string;
81             }
82             leaf service-tag {
83                 type uint32;
84             }
85         }
86         output {
87             uses action:action-list;
88         }
89     }
90
91     rpc get-egress-instructions-for-interface {
92         description "used to retrieve flow instructions to use from interface name";
93         input {
94             leaf intf-name {
95                 type string;
96             }
97         }
98         output {
99             uses offlow:instruction-list;
100         }
101     }
102
103     rpc get-endpoint-ip-for-dpn {
104         description "to get the local ip of the tunnel/trunk interface";
105         input {
106             leaf dpid {
107                 type uint64;
108             }
109         }
110         output {
111             leaf-list local-ips {
112                 type inet:ip-address;
113             }
114         }
115     }
116
117     rpc get-interface-type {
118     description "to get the type of the interface(vlan/vxlan or gre)";
119         input {
120             leaf intf-name {
121                 type string;
122             }
123         }
124         output {
125             leaf interface-type {
126                 type identityref {
127                     base if:interface-type;
128                 }
129             }
130         }
131     }
132
133     rpc get-tunnel-type {
134     description "to get the type of the tunnel interface(vxlan or gre)";
135         input {
136             leaf intf-name {
137                 type string;
138             }
139         }
140         output {
141             leaf tunnel-type {
142                 type identityref {
143                     base odlif:tunnel-type-base;
144                 }
145             }
146         }
147     }
148
149
150     rpc get-nodeconnector-id-from-interface {
151     description "to get nodeconnector id associated with an interface";
152         input {
153             leaf intf-name {
154                 type string;
155             }
156         }
157         output {
158             leaf nodeconnector-id {
159                 type inv:node-connector-id;
160             }
161         }
162     }
163
164     rpc get-interface-from-if-index {
165         description "to get interface associated with an if-index";
166             input {
167                 leaf if-index {
168                     type int32;
169                 }
170             }
171             output {
172                 leaf interface-name {
173                     type string;
174                 }
175             }
176         }
177
178     rpc create-terminating-service-actions {
179     description "create the ingress terminating service table entries";
180         input {
181              leaf dpid {
182                  type uint64;
183              }
184              leaf tunnel-key {
185                  type uint64;
186              }
187              leaf interface-name {
188                  type string;
189              }
190              uses offlow:instruction-list;
191         }
192     }
193
194     rpc remove-terminating-service-actions {
195     description "remove the ingress terminating service table entries";
196         input {
197              leaf dpid {
198                  type uint64;
199              }
200              leaf interface-name {
201                  type string;
202              }
203              leaf tunnel-key {
204                  type uint64;
205              }
206         }
207     }
208 }