All Superinterfaces:
org.opendaylight.yangtools.yang.binding.DataRoot

@Generated("mdsal-binding-generator") public interface OpenconfigBgpPolicyData extends org.opendaylight.yangtools.yang.binding.DataRoot
This module contains data definitions for BGP routing policy. It augments the base routing-policy module with BGP-specific options for conditions and actions.

This class represents the following YANG schema fragment defined in module openconfig-bgp-policy

 module openconfig-bgp-policy {
   yang-version 1.1;
   namespace "http://openconfig.net/yang/bgp-policy";
   prefix bgp-pol;
   import ietf-inet-types {
     prefix inet;
   }
   import openconfig-routing-policy {
     prefix rpol;
   }
   import openconfig-policy-types {
     prefix pt;
   }
   import openconfig-bgp-types {
     prefix bgp-types;
   }
   import openconfig-extensions {
     prefix oc-ext;
   }
   import bgp-types {
     prefix bgp-t;
     revision-date 2020-01-20;
   }
   oc-ext:openconfig-version 1.1.0;
   revision 2015-10-09 {
   }
   revision 2015-05-15 {
   }
   typedef bgp-as-path-prepend-repeat {
     type uint8;
   }
   typedef bgp-set-community-option-type {
     type enumeration {
       enum ADD {
       }
       enum REMOVE {
       }
       enum REPLACE {
       }
     }
   }
   typedef bgp-next-hop-type {
     type union {
       type inet:ip-address;
       type enumeration {
         enum SELF {
         }
       }
     }
   }
   typedef bgp-set-med-type {
     type union {
       type uint32;
       type string {
         pattern ^[+-][0-9]+;
       }
       type enumeration {
         enum IGP {
         }
       }
     }
   }
   grouping bgp-match-conditions {
     container match-community-set {
       presence
         "The presence of this container indicates that the routes
          should match the referenced community-set";
       leaf community-set {
         type leafref {
           path /rpol:routing-policy/rpol:defined-sets/bgp-pol:bgp-defined-sets/bgp-pol:community-sets/bgp-pol:community-set/bgp-pol:community-set-name;
         }
       }
       uses rpol:match-set-options-group;
     }
     container match-ext-community-set {
       presence
         "The presence of this container indicates that the routes
          should match the referenced extended community set";
       leaf ext-community-set {
         type leafref {
           path /rpol:routing-policy/rpol:defined-sets/bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/bgp-pol:ext-community-set/bgp-pol:ext-community-set-name;
         }
       }
       uses rpol:match-set-options-group;
     }
     container match-as-path-set {
       presence
         "The presence of this container indicates that the route
          should match the referenced as-path set";
       leaf as-path-set {
         type leafref {
           path /rpol:routing-policy/rpol:defined-sets/bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/bgp-pol:as-path-set/bgp-pol:as-path-set-name;
         }
       }
       uses rpol:match-set-options-group;
     }
   }
   grouping bgp-attribute-conditions {
     leaf med-eq {
       type uint32;
     }
     leaf origin-eq {
       type bgp-types:bgp-origin-attr-type;
     }
     leaf-list next-hop-in {
       type inet:ip-address;
     }
     leaf-list afi-safi-in {
       type identityref {
         base afi-safi-type;
       }
     }
     leaf local-pref-eq {
       type uint32;
     }
     container community-count {
       presence
         "node is present in the config data to indicate a
          community-count condition";
       uses pt:attribute-compare-operators;
     }
     container as-path-length {
       presence
         "node is present in the config data to indicate a
          as-path-length condition";
       uses pt:attribute-compare-operators;
     }
     leaf route-type {
       type enumeration {
         enum INTERNAL {
         }
         enum EXTERNAL {
         }
       }
     }
   }
   augment /rpol:routing-policy/rpol:defined-sets {
     container bgp-defined-sets {
       container community-sets {
         list community-set {
           key community-set-name;
           leaf community-set-name {
             type string;
           }
           list communities {
             uses bgp-t:community;
           }
         }
       }
       container ext-community-sets {
         list ext-community-set {
           key ext-community-set-name;
           leaf ext-community-set-name {
             type string;
           }
           list ext-community-member {
             uses bgp-t:extended-community;
           }
         }
       }
       container as-path-sets {
         list as-path-set {
           key as-path-set-name;
           leaf as-path-set-name {
             type string;
           }
           leaf-list as-path-set-member {
             type inet:as-number;
           }
         }
       }
     }
   }
   augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions {
     container bgp-conditions {
       uses bgp-match-conditions;
       uses bgp-attribute-conditions;
     }
   }
   augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions {
     container bgp-actions {
       container set-as-path-prepend {
         presence
           "node is present in the config data to use the AS
            prepend action";
         leaf repeat-n {
           type uint8;
         }
       }
       container set-community {
         presence
           "node is present in the config data when
            set-community action is used";
         choice set-community-method {
           case inline {
             list communities {
               uses bgp-t:community;
             }
           }
           case reference {
             leaf community-set-ref {
               type leafref {
                 path /rpol:routing-policy/rpol:defined-sets/bgp-pol:bgp-defined-sets/bgp-pol:community-sets/bgp-pol:community-set/bgp-pol:community-set-name;
               }
             }
           }
         }
         leaf options {
           type bgp-set-community-option-type;
         }
       }
       container set-ext-community {
         presence
           "node is present in the config data when
            set-community action is used";
         choice set-ext-community-method {
           case inline {
             list ext-community-member {
               uses bgp-t:extended-community;
             }
           }
           case reference {
             leaf ext-community-set-ref {
               type leafref {
                 path /rpol:routing-policy/rpol:defined-sets/bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/bgp-pol:ext-community-set/bgp-pol:ext-community-set-name;
               }
             }
           }
         }
         leaf options {
           type bgp-set-community-option-type;
         }
       }
       leaf set-route-origin {
         type bgp-types:bgp-origin-attr-type;
       }
       leaf set-local-pref {
         type uint32;
       }
       leaf set-next-hop {
         type bgp-next-hop-type;
       }
       leaf set-med {
         type bgp-set-med-type;
       }
     }
   }
 }