From: Robert Varga Date: Fri, 27 Sep 2013 10:03:01 +0000 (+0200) Subject: BUG-46: initial model for RIB X-Git-Tag: jenkins-bgpcep-bulk-release-prepare-only-1~237^2~245 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=bd1ef5f8c054c660cce3b3889ce3d53bf7fa260c;p=bgpcep.git BUG-46: initial model for RIB Change-Id: Iebd3168012708a896a178ac089c88518729aeb2f Signed-off-by: Robert Varga --- diff --git a/bgp/rib-api/pom.xml b/bgp/rib-api/pom.xml index 096cfc8bf0..c3e6c76d92 100644 --- a/bgp/rib-api/pom.xml +++ b/bgp/rib-api/pom.xml @@ -48,7 +48,17 @@ com.google.guava guava ${guava.version} - + + + org.opendaylight.yangtools + yang-binding + ${yangtools.version} + + + org.opendaylight.yangtools + yang-common + ${yangtools.version} + junit junit @@ -59,6 +69,40 @@ + + org.opendaylight.yangtools + yang-maven-plugin + ${yangtools.version} + + + + generate-sources + + + src/main/yang + + + + org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl + + + target/generated-sources/sal + + + + true + + + + + + org.opendaylight.yangtools + maven-sal-api-gen-plugin + ${yangtools.version} + jar + + + org.apache.felix maven-bundle-plugin diff --git a/bgp/rib-api/src/main/yang/bgp-rib.yang b/bgp/rib-api/src/main/yang/bgp-rib.yang new file mode 100644 index 0000000000..816979cd49 --- /dev/null +++ b/bgp/rib-api/src/main/yang/bgp-rib.yang @@ -0,0 +1,103 @@ +module bgp-rib { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-rib"; + prefix "rib"; + + import bgp-types { prefix bgp-t; revision-date 2013-09-19; } + import bgp-message { prefix bgp-msg; revision-date 2013-09-18; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-18; } + import ietf-inet-types { prefix inet; revision-date 2010-09-24; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the concept of a Routing Information Base, + as defined by RFC4271. + + Copyright (c)2013 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 "2013-09-25" { + description + "Initial revision."; + reference "RFC4271"; + } + + grouping route { + container next-hop { + uses bgp-t:next-hop; + } + + container attributes { + uses bgp-msg:path-attributes; + } + } + + grouping rib { + list tables { + uses bgp-mp:bgp-table-type; + key "afi safi"; + + leaf uptodate { + type boolean; + default false; + } + + choice routes { + list ipv4-routes { + when "../../afi = ipv4"; + + leaf prefix { + type inet:ipv4-prefix; + } + key prefix; + + uses route; + } + list ipv6-routes { + when "../../afi = ipv6"; + + leaf prefix { + type inet:ipv4-prefix; + } + key prefix; + + uses route; + } + case link-state { + list link-state-links { + // FIXME: fill this out + + uses route; + } + list link-state-nodes { + // FIXME: fill this out + + uses route; + } + list link-state-ipv4-prefixes { + // FIXME: fill this out + + uses route; + } + list link-state-ipv6-prefixes { + // FIXME: fill this out + + uses route; + } + } + } + } + } + + container loc-rib { + config false; + uses rib; + } +} +