Trying out bgp-api with apidoc explorer
[unimgr.git] / bgp-api / src / main / yang / ietf-bgp-rib-types@2019-06-13.yang
diff --git a/bgp-api/src/main/yang/ietf-bgp-rib-types@2019-06-13.yang b/bgp-api/src/main/yang/ietf-bgp-rib-types@2019-06-13.yang
new file mode 100644 (file)
index 0000000..e8d6ace
--- /dev/null
@@ -0,0 +1,143 @@
+submodule ietf-bgp-rib-types {
+  yang-version "1.1";
+  belongs-to ietf-bgp {
+    prefix "br";
+  }
+
+  organization
+    "IETF IDR Working Group";
+
+  contact
+    "WG Web:   <http://tools.ietf.org/wg/idr>
+     WG List:  <idr@ietf.org>
+
+     Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
+              Keyur Patel (keyur at arrcus.com),
+              Susan Hares (shares at ndzh.com)";
+
+  description
+    "Defines identity and type definitions associated with
+     the BGP RIB modules";
+
+  revision "2019-06-13" {
+    description
+      "Initial Version";
+    reference
+      "RFC XXXX, BGP Model for Service Provider Network.";
+  }
+
+  identity invalid-route-reason {
+    description
+      "Base identity for reason code for routes that are rejected as
+       invalid.  Some derived entities are based on BMP v3";
+    reference
+      "BGP Monitoring Protocol (draft-ietf-grow-bmp-07)";
+  }
+
+  identity invalid-cluster-loop {
+    base invalid-route-reason;
+    description
+      "Route was invalid due to CLUSTER_LIST loop";
+  }
+
+  identity invalid-as-loop {
+    base invalid-route-reason;
+    description
+      "Route was invalid due to AS_PATH loop";
+  }
+
+  identity invalid-originator {
+    base invalid-route-reason;
+    description
+      "Route was invalid due to ORIGINATOR_ID, e.g., update has
+       local router as originator";
+  }
+
+  identity bgp-not-selected-bestpath {
+    description
+
+      "Base identity for indicating reason a route was was not
+       selected by BGP route selection algorithm";
+    reference
+      "RFC 4271 - Section 9.1";
+  }
+
+  identity local-pref-lower {
+    base bgp-not-selected-bestpath;
+    description
+      "Route has a lower localpref attribute than current best path";
+    reference
+      "RFC 4271 - Section 9.1.2";
+  }
+
+  identity as-path-longer {
+    base bgp-not-selected-bestpath;
+    description
+      "Route has a longer AS path attribute than current best path";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (a)";
+  }
+
+  identity origin-type-higher {
+    base bgp-not-selected-bestpath;
+    description
+      "Route has a higher origin type, i.e., IGP origin is preferred
+       over EGP or incomplete";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (b)";
+  }
+
+  identity med-higher {
+    base bgp-not-selected-bestpath;
+    description
+      "Route has a higher MED, or metric, attribute than the current
+       best path";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (c)";
+  }
+
+  identity prefer-external {
+    base bgp-not-selected-bestpath;
+    description
+      "Route source is via IGP, rather than EGP.";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (d)";
+  }
+
+  identity nexthop-cost-higher {
+    base bgp-not-selected-bestpath;
+    description
+      "Route has a higher interior cost to the next hop.";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (e)";
+  }
+
+  identity higher-router-id {
+    base bgp-not-selected-bestpath;
+    description
+      "Route was sent by a peer with a higher BGP Identifier value,
+       or router id";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (f)";
+  }
+
+  identity higher-peer-address {
+    base bgp-not-selected-bestpath;
+    description
+      "Route was sent by a peer with a higher IP address";
+    reference
+      "RFC 4271 - Section 9.1.2.2 (g)";
+  }
+
+  identity bgp-not-selected-policy {
+    description
+      "Base identity for reason code for routes that are rejected
+       due to policy";
+  }
+
+  identity rejected-import-policy {
+    base bgp-not-selected-policy;
+    description
+      "Route was rejected after apply import policies";
+  }
+}