From cd4b0107c3b6855a8bf495cb972d04f8863d95c9 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Tue, 16 Aug 2016 19:27:39 +0000 Subject: 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 --- tools/pyang_plugins/gobgp.yang | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tools') 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; -- cgit v1.2.3