NETVIRT-1519: MIP entry duplicated in FIB
[netvirt.git] / vpnmanager / api / src / main / yang / vpn-rpc.yang
1 module vpn-rpc {
2     namespace "urn:opendaylight:netvirt:vpn:rpc";
3     prefix "vpn-rpc";
4
5     revision "2016-02-01" {
6         description "VPN Service RPC Module";
7     }
8
9     /* RPCs */
10     rpc add-static-route {
11         description "Creates a static route in a VPN, creating a new label if needed";
12         input {
13             leaf vpnInstanceName {
14                 mandatory true;
15                 type string;
16             }
17             leaf destination {
18                 mandatory true;
19                 type string;
20             }
21             leaf nexthop {
22                 description "Ip-address of the nexthop. The RPC will check if this nexthop is the endpoint
23                              of a VPN in an InterVpnLink";
24                 mandatory true;
25                 type string;
26             }
27             leaf label {
28                 description "Label for the static route. It can be left empty, in that case a new
29                             label will be autogenerated";
30                 type uint32;
31             }
32         }
33         output {
34             leaf label {
35                 description "The auto-generated label, if applies";
36                 type uint32;
37             }
38         }
39     }
40
41     rpc remove-static-route {
42         description "Removes a static route in a VPN, identified by this vpn name, destination and nexthop.
43                      Nextop is optional. If specified, the RPC will just remove one of the nexthops in the
44                      route (ECMP feature). If not specified, the whole route will be removed";
45         input {
46             leaf vpnInstanceName {
47                 mandatory true;
48                 type string;
49             }
50             leaf destination {
51                 mandatory true;
52                 type string;
53             }
54             leaf nexthop {
55                 description "Ip-address of the nexthop. If specified, just one nexthop will be removed. Removing
56                              the last nexthop in a route, will provoke the removal of the whole route";
57                 type string;
58             }
59         }
60     }
61
62     rpc generate-vpn-label {
63         description "to generate label for the given ip prefix from the associated VPN";
64         input {
65             leaf vpn-name {
66                 type string;
67             }
68             leaf ip-prefix {
69                 type string;
70             }
71         }
72         output {
73             leaf label {
74                 type uint32;
75             }
76         }
77     }
78
79     rpc remove-vpn-label {
80         description "to remove label for the given ip prefix from the associated VPN";
81         input {
82             leaf vpn-name {
83                 type string;
84             }
85             leaf ip-prefix {
86                 type string;
87             }
88         }
89     }
90
91     rpc apply-arp-config {
92         description "To apply ARP/GARP related configuration per PL";
93         input {
94             leaf enable-arp-learning {
95                 description "Enable (or) Disable arp based learning dynamically";
96                 type boolean;
97             }
98         }
99         output {
100             leaf enable-arp-learning {
101                 type boolean;
102             }
103         }
104     }    
105 }