aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang
diff options
context:
space:
mode:
authorAndrej Kozemcak <andrej.kozemcak@pantheon.tech>2018-12-20 17:49:33 +0100
committerAndrej Kozemcak <andrej.kozemcak@pantheon.tech>2018-12-20 17:51:10 +0100
commit639509ad42f8bd6baf9b6f5b668a9bbfb05108d4 (patch)
tree83de866d2e47bd71dae0c6ff9e03f51c3269413b /src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang
parentba089324594f450a1b549906ec7fde1ba63a1e89 (diff)
Add Openconfig YANG modules.
Change-Id: I7e98bf1ca7196cff042a35b8bf096d2ea9d80028 Signed-off-by: Andrej Kozemcak <andrej.kozemcak@pantheon.tech>
Diffstat (limited to 'src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang')
-rw-r--r--src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang244
1 files changed, 244 insertions, 0 deletions
diff --git a/src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang b/src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang
new file mode 100644
index 0000000..3c0d1b0
--- /dev/null
+++ b/src/plugins/yang/openconfig/openconfig-rib-bgp-types.yang
@@ -0,0 +1,244 @@
+module openconfig-rib-bgp-types {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/rib/bgp-types";
+
+ prefix "oc-bgprib-types";
+
+ import openconfig-extensions { prefix oc-ext; }
+
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "Defines identity and type defintions associated with
+ the OpenConfig BGP RIB modules";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision "2016-10-17" {
+ description
+ "OpenConfig BGP RIB refactor";
+ reference "0.3.0";
+ }
+
+ revision "2016-04-11" {
+ description
+ "OpenConfig public release";
+ reference "0.2.0";
+ }
+
+ 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 INVALID_CONFED {
+ base INVALID_ROUTE_REASON;
+ description
+ "Route was invalid due to a loop in the AS_CONFED_SEQUENCE or
+ AS_CONFED_SET attributes";
+ }
+
+ 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";
+ }
+
+ identity TUNNEL_ENCAPSULATION_TYPE {
+ description
+ "Types of tunnel encapsulation, as described by the Tunnel
+ Encapsulation attribute";
+ reference
+ "RFC5512";
+ }
+
+ identity SRTE_POLICY_TUNNEL {
+ base TUNNEL_ENCAPSULATION_TYPE;
+ description
+ "Segment Routing Traffic Engineering Policy tunnel.";
+ reference
+ "draft-previdi-idr-segment-routing-te-policy";
+ }
+
+ identity TUNNEL_ENCAPSULATION_SUBTLV_TYPE {
+ description
+ "SubTLVs of the Tunnel Encapsulation attribute";
+ reference
+ "RFC5512";
+ }
+
+ identity TUNNEL_REMOTE_ENDPOINT {
+ base TUNNEL_ENCAPSULATION_SUBTLV_TYPE;
+ description
+ "Remote endpoint of the tunnel.";
+ reference
+ "RFC5512";
+ }
+
+ identity TUNNEL_COLOR {
+ base TUNNEL_ENCAPSULATION_SUBTLV_TYPE;
+ description
+ "Colour of the tunnel";
+ reference
+ "RFC5512";
+ }
+
+ identity SRTE_PREFERENCE {
+ base TUNNEL_ENCAPSULATION_SUBTLV_TYPE;
+ description
+ "Preference of the SR-TE policy entry described by
+ the tunnel encapsulation attribute.";
+ reference
+ "draft-previdi-idr-segment-routing-te-policy";
+ }
+
+ identity SRTE_BINDING_SID {
+ base TUNNEL_ENCAPSULATION_SUBTLV_TYPE;
+ description
+ "Binding SID to be used by the SR-TE policy described
+ by the tunnel encapsulation attribute.";
+ reference
+ "draft-previdi-idr-segment-routing-te-policy";
+ }
+
+ identity SRTE_SEGMENT_LIST {
+ base TUNNEL_ENCAPSULATION_SUBTLV_TYPE;
+ description
+ "Segment lists to be used by the SR-TE policy described
+ by the tunnel encapsulation attribute.";
+ reference
+ "draft-previdi-idr-segment-routing-te-policy";
+ }
+
+ identity SRTE_SEGMENT_LIST_SUBTLV {
+ description
+ "SubTLVs of the SR-TE Policy Segment List sub-TLV of the
+ Tunnel Encapsulation attribute.";
+ reference
+ "draft-previdi-idr-segment-routing-te-policy";
+ }
+
+ identity SRTE_SEGMENT_LIST_WEIGHT {
+ base SRTE_SEGMENT_LIST_SUBTLV;
+ description
+ "Weight of the segment list within the SR-TE policy";
+ reference
+ "draft-previdi-idr-segment-routing-te-policy";
+ }
+
+ identity SRTE_SEGMENT_LIST_SEGMENT {
+ base SRTE_SEGMENT_LIST_SUBTLV;
+ description
+ "An individual element within the SR-TE Policy Segment
+ List.";
+ }
+}