Bug-3075: BMP application yang model 27/21127/5
authorMilos Fabian <milfabia@cisco.com>
Tue, 26 May 2015 12:33:59 +0000 (14:33 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 23 Jun 2015 21:01:51 +0000 (21:01 +0000)
-representing data model for BMP application

Change-Id: I81c78516850829746df08a5d68ce9a2992d8d022
Signed-off-by: Milos Fabian <milfabia@cisco.com>
bgp/bmp-api/src/main/yang/bmp-monitor.yang [new file with mode: 0644]

diff --git a/bgp/bmp-api/src/main/yang/bmp-monitor.yang b/bgp/bmp-api/src/main/yang/bmp-monitor.yang
new file mode 100644 (file)
index 0000000..6e7424a
--- /dev/null
@@ -0,0 +1,134 @@
+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