--- /dev/null
+module bmp-monitor {
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:bmp-monitor";
+ prefix "bmp-mon";
+
+ import bgp-rib { prefix rib; revision-date 2013-09-25; }
+ import bmp-message { prefix bmp-msg; revision-date 2015-05-12; }
+ import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+ import ietf-yang-types { prefix yang; revision-date 2010-09-24; }
+
+ organization "Cisco Systems, Inc.";
+ contact "Milos Fabian <milfabia@cisco.com>";
+
+ description
+ "This module contains the base data model of a BMP monitor.
+
+ Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
+
+ This program and the accompanying materials are made available
+ under the terms of the Eclipse Public License v1.0 which
+ accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html";
+
+ revision "2015-05-12" {
+ description
+ "Initial revision.";
+ }
+
+ typedef router-id {
+ description "Monitored router identified by IP address.";
+ type inet:ip-address;
+ }
+
+ typedef monitor-id {
+ description "The name of BMP monitoring station instance.";
+ type string;
+ }
+
+ typedef status {
+ type enumeration {
+ enum up;
+ enum down;
+ }
+ }
+
+ grouping peers {
+ list peer {
+ key "peer-id";
+ leaf peer-id {
+ type rib:peer-id;
+ }
+ uses bmp-msg:peer;
+ leaf router-distinguisher {
+ type string;
+ }
+ container peer-session {
+ uses bmp-msg:peer-up;
+ leaf status {
+ type status;
+ }
+ uses bmp-msg:timestamp;
+ }
+ container stats {
+ leaf rejected-prefixes {
+ type yang:counter32;
+ }
+ leaf duplicate-prefix-advertisements {
+ type yang:counter32;
+ }
+ leaf duplicate-withdraws {
+ type yang:counter32;
+ }
+ leaf invalidated-cluster-list-loop {
+ type yang:counter32;
+ }
+ leaf invalidated-as-path-loop {
+ type yang:counter32;
+ }
+ leaf invalidated-originator-id {
+ type yang:counter32;
+ }
+ leaf invalidated-as-confed-loop {
+ type yang:counter32;
+ }
+ leaf adj-ribs-in-routes {
+ type yang:gauge64;
+ }
+ leaf loc-rib-routes {
+ type yang:gauge64;
+ }
+ uses bmp-msg:timestamp;
+ }
+ container pre-policy-rib {
+ uses rib:rib;
+ }
+ container post-policy-rib {
+ uses rib:rib;
+ }
+ }
+ }
+
+ grouping routers {
+ list router {
+ key "router-id";
+ leaf name {
+ type string;
+ }
+ leaf description {
+ type string;
+ }
+ leaf info {
+ type string;
+ }
+ leaf router-id {
+ type router-id;
+ }
+ leaf status {
+ type status;
+ }
+ uses peers;
+ }
+ }
+
+ container bmp-monitor {
+ list monitor {
+ config false;
+ key "monitor-id";
+ leaf monitor-id {
+ type monitor-id;
+ }
+ uses routers;
+ }
+ }
+}
\ No newline at end of file