summaryrefslogtreecommitdiffhomepage
path: root/tools/pyang_plugins
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-08-16 19:27:39 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-17 21:23:08 +0900
commitcd4b0107c3b6855a8bf495cb972d04f8863d95c9 (patch)
treeb08e45d6ae97205d09ba942cdf3a3f546e9dcd45 /tools/pyang_plugins
parent60241ab6ad8c8290d8745388eaed5e6b0efd965f (diff)
policy: support route-type condition
// match with routes locally generated $ gobgp policy statement s0 add condition route-type local // match with routes received from eBGP peers $ gobgp policy statement s0 add condition route-type external // match with routes received from iBGP peers $ gobgp policy statement s0 add condition route-type internal Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'tools/pyang_plugins')
-rw-r--r--tools/pyang_plugins/gobgp.yang23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang
index a7b78b95..873b8816 100644
--- a/tools/pyang_plugins/gobgp.yang
+++ b/tools/pyang_plugins/gobgp.yang
@@ -798,6 +798,29 @@ module gobgp {
uses gobgp-rpki-validation-result;
}
+ deviation "/rpol:routing-policy/rpol:policy-definitions/" +
+ "rpol:policy-definition/rpol:statements/rpol:statement/" +
+ "rpol:conditions/bgp-pol:bgp-conditions/bgp-pol:route-type" {
+ description "alternative route-type condition";
+ deviate replace {
+ type enumeration {
+ enum NONE {
+ description "route type is none";
+ }
+ enum INTERNAL {
+ description "route type is internal";
+ }
+ enum EXTERNAL {
+ description "route type is external";
+ }
+ enum LOCAL {
+ description "route type is local";
+ }
+ }
+
+ }
+ }
+
augment "/bgp:bgp" {
description "additional rpki configuration and state";
uses gobgp-rpki-servers;