BGPCEP-685: Add Peer Release session rpc
[bgpcep.git] / bgp / rib-api / src / main / yang / bgp-peer-rpc.yang
1 module bgp-peer-rpc {
2     namespace "urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc";
3     prefix "bgp-rpc";
4
5     import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
6     import bgp-rib { prefix rib; revision-date 2013-09-25; }
7     import yang-ext { prefix ext; revision-date "2013-07-09"; }
8
9     organization "Cisco Systems, Inc.";
10     contact "Iveta Halanova <ihalanov@cisco.com>";
11
12     description
13         "Module contains rpc for route refresh request, which is described in rfc2918.
14
15         Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
16
17         This program and the accompanying materials are made available
18         under the terms of the Eclipse Public License v1.0 which
19         accompanies this distribution, and is available at
20         http://www.eclipse.org/legal/epl-v10.html";
21
22     revision 2016-03-22 {
23         description "Initial revision";
24     }
25
26     revision 2017-10-27 {
27         description "Add reset session RPC";
28     }
29
30     identity peer-context {
31         description "Identity used to mark the Peer context for binding RPCs in a particular RIB.";
32     }
33
34     typedef peer-ref {
35         type instance-identifier;
36         ext:context-reference "peer-context";
37     }
38
39     grouping peer-reference {
40         leaf peer-ref {
41             type peer-ref;
42             mandatory true;
43             ext:context-reference "peer-context";
44         }
45     }
46
47     grouping rr-msg-args {
48         uses peer-reference;
49         uses bgp-mp:bgp-table-type;
50     }
51
52     rpc route-refresh-request {
53         input {
54             uses rr-msg-args;
55         }
56     }
57
58     augment "/rib:bgp-rib/rib:rib/rib:peer" {
59         ext:context-instance "peer-context";
60     }
61
62     rpc release-connection {
63         description "Release the peer session";
64         input {
65             uses peer-reference;
66         }
67     }
68 }