Merge "Fixing issues with ARP integration of VpnService - Table 0 and Table 80...
[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-instructions-for-interface {
77         description "used to retrieve flow instructions to use from interface name";
78         input {
79             leaf intf-name {
80                 type string;
81             }
82         }
83         output {
84             uses offlow:instruction-list;
85         }
86     }
87
88     rpc get-endpoint-ip-for-dpn {
89         description "to get the local ip of the tunnel/trunk interface";
90         input {
91             leaf dpid {
92                 type uint64;
93             }
94         }
95         output {
96             leaf-list local-ips {
97                 type inet:ip-address;
98             }
99         }
100     }
101
102     rpc get-interface-type {
103     description "to get the type of the interface(vlan/vxlan or gre)";
104         input {
105             leaf intf-name {
106                 type string;
107             }
108         }
109         output {
110             leaf interface-type {
111                 type identityref {
112                     base if:interface-type;
113                 }
114             }
115         }
116     }
117
118     rpc get-tunnel-type {
119     description "to get the type of the tunnel interface(vxlan or gre)";
120         input {
121             leaf intf-name {
122                 type string;
123             }
124         }
125         output {
126             leaf tunnel-type {
127                 type identityref {
128                     base odlif:tunnel-type-base;
129                 }
130             }
131         }
132     }
133
134
135     rpc get-nodeconnector-id-from-interface {
136     description "to get nodeconnector id associated with an interface";
137         input {
138             leaf intf-name {
139                 type string;
140             }
141         }
142         output {
143             leaf nodeconnector-id {
144                 type inv:node-connector-id;
145             }
146         }
147     }
148
149     rpc get-interface-from-if-index {
150         description "to get interface associated with an if-index";
151             input {
152                 leaf if-index {
153                     type int32;
154                 }
155             }
156             output {
157                 leaf interface-name {
158                     type string;
159                 }
160             }
161         }
162
163     rpc create-terminating-service-actions {
164     description "create the ingress terminating service table entries";
165         input {
166              leaf dpid {
167                  type uint64;
168              }
169              leaf tunnel-key {
170                  type uint64;
171              }
172              leaf interface-name {
173                  type string;
174              }
175              uses offlow:instruction-list;
176         }
177     }
178
179     rpc remove-terminating-service-actions {
180     description "remove the ingress terminating service table entries";
181         input {
182              leaf dpid {
183                  type uint64;
184              }
185              leaf interface-name {
186                  type string;
187              }
188              leaf tunnel-key {
189                  type uint64;
190              }
191         }
192     }
193 }