1 module bgp-stats-peer {
2 namespace "urn:opendaylight:params:xml:ns:yang:controller:bgp:stats:peer";
3 prefix "bgp-stats-peer";
5 import bgp-peer { prefix peer; revision-date 2016-06-06; }
6 import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
7 import bgp-message { prefix bgp-msg; revision-date 2013-09-19; }
8 import ietf-yang-types { prefix yang; revision-date 2013-07-15; }
10 organization "Brocade Communications Systems, Inc.";
11 contact "Kevin Wang <kwang@brocade.com>";
14 "This module contains the base data model of BGP peer statistic.
16 Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved.
18 This program and the accompanying materials are made available
19 under the terms of the Eclipse Public License v1.0 which
20 accompanies this distribution, and is available at
21 http://www.eclipse.org/legal/epl-v10.html";
24 description "Initial revision";
27 grouping bgp-message-state {
29 description "Total number of BGP messages.";
30 type yang:zero-based-counter32;
34 description "The BGP message timestamp (seconds).";
39 grouping bgp-message-stats {
41 description "The received BGP messages statistics.";
42 uses bgp-message-state;
46 description "The sent BGP messages statistics.";
47 uses bgp-message-state;
51 grouping bgp-peer-state {
52 container bgp-peer-state {
55 uses bgp-mp:bgp-table-type;
57 leaf adj-rib-in-routes-count {
58 description "The total number of Adj-RIB-In routes in table.";
59 type yang:zero-based-counter32;
62 leaf adj-rib-out-routes-count {
63 description "The total number of Adj-RIB-Out routes in table.";
64 type yang:zero-based-counter32;
67 leaf effective-rib-in-routes-count {
68 description "The total number of Effective-RIB-In routes in table.";
69 type yang:zero-based-counter32;
73 leaf session-established-count {
74 description "The total number of time the BGP session was transitioned to Up state.";
75 type yang:zero-based-counter32;
80 grouping bgp-session-state {
81 container bgp-session-state {
84 description "The BGP peer connection state.";
88 leaf session-duration {
89 description "The session duration (time formated d:HH:mm:ss).";
93 leaf holdtime-current {
94 description "Time interval (in seconds) for HoldTimer established with the peer.";
99 leaf keepalive-current {
100 description "Time interval (in seconds) for KeepAlive established with the peer.";
105 container remote-peer-preferences {
106 description "The BGP remote peer preferences, to which this BGP peer is connected.";
107 uses peer:bgp-peer-preferences;
110 container local-peer-preferences {
111 description "The BGP local peer preferences.";
112 uses peer:bgp-peer-preferences;
115 container messages-stats {
116 description "The BGP messages statistics.";
117 container total-msgs {
118 description "The statistics for all received/sent BGP messages.";
119 uses bgp-message-stats;
122 container keep-alive-msgs {
123 description "The statistics for received/sent BGP Keep-Alive messages.";
124 uses bgp-message-stats;
127 container update-msgs {
128 description "The statistics for received/sent BGP Update messages.";
129 uses bgp-message-stats;
132 container route-refresh-msgs {
133 description "The statistics for received/sent BGP Route Refresh messages.";
134 uses bgp-message-stats;
137 container error-msgs {
138 container error-received-total {
139 description "The total number of received BGP Error (notification) messages.";
140 uses bgp-message-state;
143 list error-received {
144 description "The received BGP Error (notification) messages.";
145 key "error-code error-subcode";
147 uses bgp-message-state;
148 uses bgp-msg:notify-message;
151 container error-sent-total {
152 description "The total number of sent BGP Error (notification) messages.";
153 uses bgp-message-state;
157 description "The sent BGP Error (notification) messages.";
158 key "error-code error-subcode";
160 uses bgp-message-state;
161 uses bgp-msg:notify-message;
168 grouping bgp-peer-stats {
170 uses bgp-session-state;