The overall goal is to store adjacency ribs in the datastore. In order
to do that, we need to fix the (defunct) model, so each peer has a
unique subtree. This patch fixes the model and introduces a peer ID
type, which we will use throughout to identify peers.
Change-Id: I45a4493d0aabb29828e6e935017939a5b09e7b60
Signed-off-by: Robert Varga <rovarga@cisco.com>
type inet:uri;
}
+ typedef peer-id {
+ description
+ "An abstract peer identifier. The protocol part identifies
+ the type of the peer. One well-known protocol is define, which
+ has the following format: bgp://1.2.3.4, where 1.2.3.4 is the
+ peer's BGP Identifier in IPv4 dotted-quad format.";
+ type inet:uri;
+ }
+
+ typedef peer-role {
+ type enumeration {
+ enum ebgp;
+ enum ibgp;
+ enum rr-client;
+ }
+ }
+
grouping route {
container attributes {
uses bgp-msg:path-attributes;
}
key id;
- list peers {
+ list peer {
+ key peer-id;
+ leaf peer-id {
+ type peer-id;
+ }
+ leaf peer-role {
+ type peer-role;
+ mandatory true;
+ }
+
container adj-rib-in {
+ description "Routes as we have received them from the peer.";
+ uses rib;
+ }
+ container effective-rib-in {
+ description "Routes as processed by inbound policy.";
uses rib;
}
container adj-rib-out {