Working with OVS
[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
22     rpc get-dpid-from-interface {
23         description "used to retrieve dpid from interface name";
24         input {
25             leaf intf-name {
26                 type string;
27             }
28         }
29         output {
30             leaf dpid {
31                 type uint64;
32             }
33         }
34     }
35
36     rpc get-port-from-interface {
37         description "used to retrieve dpid from interface name";
38         input {
39             leaf intf-name {
40                 type string;
41             }
42         }
43         output {
44             leaf dpid {
45                 type uint64;
46             }
47             leaf portno {
48                 type uint32;
49             }
50             leaf portname {
51                 type string;
52             }
53         }
54     }
55
56     rpc get-interface-from-port {
57         description "used to retrieve interface from port details";
58         input {
59             leaf interface-type {
60                 description "Type of the interface (vlan/gre or vxlan tunnel)";
61                 type identityref {
62                     base odlif:tunnel-type-base;
63                 }
64             }
65             leaf dpid {
66                 type uint64;
67             }
68             leaf portno {
69                 type uint32;
70             }
71             leaf interface-id {
72                 description "Used to provide the interface specific differentiator information (vlanId/gre-key/vxlan-vni)";
73                 type uint64;
74             }
75         }
76         output {
77             leaf interface-name {
78                 type string;
79             }
80         }
81     }
82
83     rpc get-egress-actions-for-interface {
84         description "used to retrieve group actions to use from interface name";
85         input {
86             leaf intf-name {
87                 type string;
88             }
89         }
90         output {
91             uses action:action-list;
92         }
93     }
94
95     rpc get-egress-instructions-for-interface {
96         description "used to retrieve flow instructions to use from interface name";
97         input {
98             leaf intf-name {
99                 type string;
100             }
101         }
102         output {
103             uses offlow:instruction-list;
104         }
105     }
106
107     rpc get-endpoint-ip-for-dpn {
108         description "to get the local ip of the tunnel/trunk interface";
109         input {
110             leaf dpid {
111                 type uint64;
112             }
113         }
114         output {
115             leaf-list local-ips {
116                 type inet:ip-address;
117             }
118         }
119     }
120 }