BUG-4692: Migrate TCP-MD5 support in bgp package to netty's native-epoll
[bgpcep.git] / bgp / rib-impl / src / main / yang / bgp-peer.yang
1 module bgp-peer {
2     namespace "urn:opendaylight:params:xml:ns:yang:controller:bgp:peer:config";
3     prefix "bgp-peer";
4
5     import bgp-rib { prefix rib; revision-date 2013-09-25; }
6     import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
7     import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
8     import config { prefix config; revision-date 2013-04-05; }
9     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
10     import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
11     import rfc2385 { prefix rfc2385; revision-date 2016-03-24; }
12
13     organization "Brocade Communications Systems, Inc.";
14     contact "Kevin Wang <kwang@brocade.com>";
15
16     description
17         "This module contains the base data model of BGP peer.
18
19         Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved.
20
21         This program and the accompanying materials are made available
22         under the terms of the Eclipse Public License v1.0 which
23         accompanies this distribution, and is available at
24         http://www.eclipse.org/legal/epl-v10.html";
25
26     revision 2016-06-06 {
27         description "Initial revision";
28     }
29
30     grouping bgp-peer-config-attributes {
31         leaf host {
32             description "Host IP address of BGP connection";
33             type inet:ip-address;
34             mandatory true;
35         }
36
37         leaf port {
38             description "The port for connection between the BGP peers.";
39             type inet:port-number;
40             default 179;
41         }
42
43         leaf holdtimer {
44             description "Time interval (in seconds) for HoldTimer proposed by the peer.";
45             type uint16;
46             default 180;
47         }
48     }
49
50     grouping bgp-peer-config {
51         uses bgp-peer-config-attributes;
52
53         leaf retrytimer {
54             type uint16;
55             default 10;
56         }
57
58         leaf peer-role {
59             type rib:peer-role;
60             default ibgp;
61         }
62
63         leaf simple-routing-policy {
64             type rib:simple-routing-policy;
65         }
66
67         leaf initiate-connection {
68             description "If true, connection will be initiated right away from current device.
69                 If not, the peer will only be registered to peer registry and available for incomming bgp connections.";
70             type boolean;
71             default true;
72         }
73
74         leaf route-refresh {
75             type boolean;
76             default "true";
77         }
78
79         leaf remote-as {
80             description
81                 "Expected remote AS number. If not present, it is assumed
82                 to be the same as our local AS number.";
83             type uint32;
84         }
85
86         leaf password {
87             type rfc2385:rfc2385-key;
88             description "RFC2385 shared secret";
89         }
90     }
91
92     grouping bgp-peer-preferences {
93         leaf bgp-id {
94             description "The BGP Identifier.";
95             type bgp-t:bgp-id;
96         }
97
98         uses bgp-peer-config-attributes;
99
100         leaf as {
101             description "Autonomous system number.";
102             type uint32;
103             default 0;
104         }
105
106         leaf four-octet-as-capability {
107             description "The BGP peer 4 byte AS numbers support capability.";
108             type boolean;
109             default "false";
110         }
111
112         leaf bgp-extended-message-capability {
113             description "The bgp extended message support capability.";
114             type boolean;
115             default "false";
116         }
117
118         leaf gr-capability {
119             description "BGP graceful restart support capability.";
120             type boolean;
121             default "false";
122         }
123
124         leaf add-path-capability {
125             type boolean;
126             default "false";
127             status deprecated;
128         }
129
130         leaf route-refresh-capability {
131             reference "https://tools.ietf.org/html/rfc2918";
132             type boolean;
133             default "false";
134         }
135
136         list advertized-table-types {
137             description "The BGP Table-type capabilities advertized by the BGP peer.";
138             key "afi safi";
139             uses bgp-mp:bgp-table-type;
140         }
141
142         list advertised-add-path-table-types {
143             description "The BGP Table-type capabilities advertized by the BGP peer.";
144             key "afi safi";
145             uses bgp-mp:bgp-add-path-table-type;
146         }
147     }
148 }