Initial Code commit for OVS Support for vpnservice
[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-action-types {prefix action;}
14     import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
15
16     revision "2015-10-03" {
17         description "ODL Specific Interface Manager Rpcs Module";
18     }
19
20 /* RPCs */
21     rpc get-interface-from-lporttag {
22         description "Used to retrieve the interface-name using lporttag";
23         input {
24             leaf lportag {
25                 type uint32;
26             }
27         }
28         output {
29             leaf intf-name {
30                 type string;
31             }
32         }
33     }
34
35     rpc get-lporttag-from-interface {
36         description "Used to retrieve the lporttag from interface-name";
37         input {
38             leaf intf-name {
39                 type string;
40             }
41         }
42         output {
43             leaf lportag {
44                 type uint32;
45             }
46         }
47     }
48
49     rpc get-interface-from-groupid {
50         description "Used to retrieve the interface-name using groupid";
51         input {
52             leaf groupid {
53                 type uint32;
54             }
55         }
56         output {
57             leaf intf-name {
58                 type string;
59             }
60         }
61     }
62
63     rpc get-groupid-from-interface {
64         description "Used to retrieve the interface-name using groupid";
65         input {
66             leaf intf-name {
67                 type string;
68             }
69         }
70         output {
71             leaf groupid {
72                 type uint32;
73             }
74         }
75     }
76
77     rpc get-dpid-from-interface {
78         description "used to retrieve dpid from interface name";
79         input {
80             leaf intf-name {
81                 type string;
82             }
83         }
84         output {
85             leaf dpid {
86                 type uint64;
87             }
88         }
89     }
90
91     rpc get-port-from-interface {
92         description "used to retrieve dpid from interface name";
93         input {
94             leaf intf-name {
95                 type string;
96             }
97         }
98         output {
99             leaf dpid {
100                 type uint64;
101             }
102             leaf portno {
103                 type uint32;
104             }
105             leaf portname {
106                 type string;
107             }
108         }
109     }
110
111     rpc get-interface-from-port {
112         description "used to retrieve interface from port details";
113         input {
114             leaf interface-type {
115                 description "Type of the interface (vlan/gre or vxlan tunnel)";
116                 type identityref {
117                     base odlif:tunnel-type-base;
118                 }
119             }
120             leaf dpid {
121                 type uint64;
122             }
123             leaf portno {
124                 type uint32;
125             }
126             leaf interface-id {
127                 description "Used to provide the interface specific differentiator information (vlanId/gre-key/vxlan-vni)";
128                 type uint64;
129             }
130         }
131         output {
132             leaf interface-name {
133                 type string;
134             }
135         }
136     }
137
138     rpc get-egress-actions-for-interface {
139         description "used to retrieve group actions to use from interface name";
140         input {
141             leaf intf-name {
142                 type string;
143             }
144         }
145         output {
146             uses action:action-list;
147         }
148     }
149
150     rpc get-egress-instructions-for-interface {
151         description "used to retrieve flow instructions to use from interface name";
152         input {
153             leaf intf-name {
154                 type string;
155             }
156         }
157         output {
158             uses offlow:instruction-list;
159         }
160     }
161
162     rpc get-endpoint-ip-for-dpn {
163         description "to get the local ip of the tunnel/trunk interface";
164         input {
165             leaf dpid {
166                 type uint64;
167             }
168         }
169         output {
170             leaf-list local-ips {
171                 type inet:ip-address;
172             }
173         }
174     }
175 }