openconfig-bgp-policy

This module contains data definitions for BGP routing policy. It augments the base routing-policy module with BGP-specific optio...

  • Version: 2024-11-13

    openconfig-bgp-policy@2024-11-13


    
      module openconfig-bgp-policy {
    
        yang-version 1;
    
        namespace
          "http://openconfig.net/yang/bgp-policy";
    
        prefix oc-bgp-pol;
    
        import openconfig-inet-types {
          prefix oc-inet;
        }
        import openconfig-routing-policy {
          prefix oc-rpol;
        }
        import openconfig-policy-types {
          prefix oc-pol-types;
        }
        import openconfig-bgp-types {
          prefix oc-bgp-types;
        }
        import openconfig-extensions {
          prefix oc-ext;
        }
        import openconfig-types {
          prefix oc-types;
        }
    
        organization "OpenConfig working group";
    
        contact
          "OpenConfig working group
        netopenconfig@googlegroups.com";
    
        description
          "This module contains data definitions for BGP routing policy.
        It augments the base routing-policy module with BGP-specific
        options for conditions and actions.";
    
        revision "2024-11-13" {
          description
            "Add use-last-as leaf to set-as-path-prepend to prepend last AS.";
          reference
            "8.1.0";
    
        }
    
        revision "2024-08-23" {
          description
            "Separate the ability to set the BGP MED along with an appropriate
          action.";
          reference
            "8.0.0";
    
        }
    
        revision "2024-07-02" {
          description
            "Add ext-community-count container, which also clarifies that
          community-count does not include other types of communities (e.g.
          extended).";
          reference
            "7.1.0";
    
        }
    
        revision "2024-01-31" {
          description
            "Update community-sets/members/member union type by replacing
          the bgp-regex type with posix-eregexp.";
          reference
            "7.0.0";
    
        }
    
        revision "2023-12-19" {
          description
            "Add PEER_ADDRESS to bgp-next-hop-type.";
          reference
            "6.4.0";
    
        }
    
        revision "2023-10-23" {
          description
            "Revert revision 2019-02-01.
          Move match-set-options of BGP community and BGP extended community from
          defined-sets/bgp-defined-sets/community-set and
          defined-sets/bgp-defined-sets/ext-community-set back to
          policy-definitions/statements/.../bgp-conditions
          for consistency across sets.";
          reference
            "6.3.0";
    
        }
    
        revision "2023-10-03" {
          description
            "Deprecate community-set-ref and ext-community-set-ref,
          add the following leaf-list nodes:
          * community-set-refs
          * ext-community-set-refs";
          reference
            "6.2.0";
    
        }
    
        revision "2023-03-27" {
          description
            "Clarify bgp-set-med-type description";
          reference
            "6.1.1";
    
        }
    
        revision "2022-05-24" {
          description
            "Remove module extension oc-ext:regexp-posix by making pattern regexes
          conform to RFC6020/RFC7950.
    
          Types impacted:
          - bgp-set-med-type";
          reference
            "6.1.0";
    
        }
    
        revision "2020-06-30" {
          description
            "Add OpenConfig POSIX pattern extensions.";
          reference
            "6.0.2";
    
        }
    
        revision "2019-11-28" {
          description
            "Fix quotes on literals in when statements";
          reference
            "6.0.1";
    
        }
    
        revision "2019-02-01" {
          description
            "Move BGP community match-set-options from
          policy-definitions/statements/.../bgp-conditions to
          defined-sets/bgp-defined-sets/community-set for wider platform
          support.";
          reference
            "6.0.0";
    
        }
    
        revision "2018-11-21" {
          description
            "Add OpenConfig module metadata extensions.";
          reference
            "5.0.2";
    
        }
    
        revision "2018-08-20" {
          description
            "Correct description of AFI-SAFI enabled leaf.";
          reference
            "5.0.1";
    
        }
    
        revision "2018-04-11" {
          description
            "Correct naming of BGP maximum prefix warning percentage leaf.";
          reference
            "5.0.0";
    
        }
    
        revision "2018-03-20" {
          description "Added SR-TE policy SAFI";
          reference
            "4.1.0";
    
        }
    
        revision "2017-07-10" {
          description
            "Add error notifications; moved add-paths config; add AS
          prepend policy features; removed unneeded config leaves";
          reference
            "4.0.0";
    
        }
    
        revision "2017-02-02" {
          description
            "Bugfix to remove remaining global-level policy data";
          reference
            "3.0.1";
    
        }
    
        revision "2017-01-26" {
          description
            "Add dynamic neighbor support, migrate to OpenConfig types";
          reference
            "3.0.0";
    
        }
    
        revision "2016-06-21" {
          description "OpenConfig BGP refactor";
          reference
            "2.1.1";
    
        }
    
        oc-ext:openconfig-version "8.1.0";
        oc-ext:catalog-organization "openconfig";
        oc-ext:origin "openconfig";
    
        typedef bgp-set-community-option-type {
          type enumeration {
            enum "ADD" {
              value 0;
              description
                "add the specified communities to the existing
              community attribute";
            }
            enum "REMOVE" {
              value 1;
              description
                "remove the specified communities from the
              existing community attribute";
            }
            enum "REPLACE" {
              value 2;
              description
                "replace the existing community attribute with
              the specified communities. If an empty set is
              specified, this removes the community attribute
              from the route.";
            }
          }
          description
            "Type definition for options when setting the community
          attribute in a policy action";
        }
    
        typedef bgp-next-hop-type {
          type union {
            type oc-inet:ip-address;
            type enumeration {
              enum "SELF" {
                value 0;
                description
                  "special designation for local router's own
              address, i.e., next-hop-self";
              }
              enum "PEER_ADDRESS" {
                value 1;
                description
                  "The ip address of the peer should be used.
              This enum is efficient to use when setting the next hop
              in a policy applied to a peer group.";
              }
            }
          }
          description
            "type definition for specifying next-hop in policy actions";
        }
    
        typedef bgp-set-med-type {
          type union {
            type uint32;
            type enumeration {
              enum "IGP" {
                value 0;
                description
                  "Set the MED value to the IGP cost toward the next hop for
                the route";
              }
            }
          }
          description
            "Type definition for specifying how the BGP MED can be set in BGP
          policy actions.  The MED can be specified as a direct integer
          value or setting it to the IGP cost.  To be used in conjunction
          with `bgp-set-med-action` in order to specify the appropriate
          action to take on this value.";
        }
    
        typedef bgp-set-med-action {
          type enumeration {
            enum "SET" {
              value 0;
              description
                "Action to set the MED to a specific value.";
            }
            enum "ADD" {
              value 1;
              description
                "Action to increment the previous MED value.";
            }
            enum "SUBTRACT" {
              value 2;
              description
                "Action to decrement the previous MED value.";
            }
          }
          description
            "Specifies which action to take on the value specified by the
          bgp-set-med-type.";
        }
      }  // module openconfig-bgp-policy
    

© 2024 YumaWorks, Inc. All rights reserved.