openconfig-routing-policy

This module describes a YANG model for routing policy configuration. It is a limited subset of all of the policy configuration p...

  • Version: 2016-05-12

    openconfig-routing-policy@2016-05-12


    
      module openconfig-routing-policy {
    
        yang-version 1;
    
        namespace
          "http://openconfig.net/yang/routing-policy";
    
        prefix oc-rpol;
    
        import ietf-inet-types {
          prefix inet;
        }
        import openconfig-interfaces {
          prefix oc-if;
        }
        import openconfig-policy-types {
          prefix oc-pol-types;
        }
        import openconfig-extensions {
          prefix oc-ext;
        }
    
        organization "OpenConfig working group";
    
        contact
          "OpenConfig working group
        netopenconfig@googlegroups.com";
    
        description
          "This module describes a YANG model for routing policy
        configuration. It is a limited subset of all of the policy
        configuration parameters available in the variety of vendor
        implementations, but supports widely used constructs for managing
        how routes are imported, exported, and modified across different
        routing protocols.  This module is intended to be used in
        conjunction with routing protocol configuration models (e.g.,
        BGP) defined in other modules.
    
        Route policy expression:
    
        Policies are expressed as a set of top-level policy definitions,
        each of which consists of a sequence of policy statements. Policy
        statements consist of simple condition-action tuples. Conditions
        may include mutiple match or comparison operations, and similarly
        actions may be multitude of changes to route attributes or a
        final disposition of accepting or rejecting the route.
    
        Route policy evaluation:
    
        Policy definitions are referenced in routing protocol
        configurations using import and export configuration statements.
        The arguments are members of an ordered list of named policy
        definitions which comprise a policy chain, and optionally, an
        explicit default policy action (i.e., reject or accept).
    
        Evaluation of each policy definition proceeds by evaluating its
        corresponding individual policy statements in order.  When a
        condition statement in a policy statement is satisfied, the
        corresponding action statement is executed.  If the action
        statement has either accept-route or reject-route actions, policy
        evaluation of the current policy definition stops, and no further
        policy definitions in the chain are evaluated.
    
        If the condition is not satisfied, then evaluation proceeds to
        the next policy statement.  If none of the policy statement
        conditions are satisfied, then evaluation of the current policy
        definition stops, and the next policy definition in the chain is
        evaluated.  When the end of the policy chain is reached, the
        default route disposition action is performed (i.e., reject-route
        unless an an alternate default action is specified for the
        chain).
    
        Policy 'subroutines' (or nested policies) are supported by
        allowing policy statement conditions to reference another policy
        definition which applies conditions and actions from the
        referenced policy before returning to the calling policy
        statement and resuming evaluation.  If the called policy
        results in an accept-route (either explicit or by default), then
        the subroutine returns an effective true value to the calling
        policy.  Similarly, a reject-route action returns false.  If the
        subroutine returns true, the calling policy continues to evaluate
        the remaining conditions (using a modified route if the
        subroutine performed any changes to the route).";
    
        revision "2016-05-12" {
          description
            "OpenConfig public release";
          reference
            "2.0.1";
    
        }
    
        oc-ext:openconfig-version "2.0.1";
    
        typedef default-policy-type {
          type enumeration {
            enum "ACCEPT_ROUTE" {
              value 0;
              description
                "default policy to accept the route";
            }
            enum "REJECT_ROUTE" {
              value 1;
              description
                "default policy to reject the route";
            }
          }
          description
            "type used to specify default route disposition in
        a policy chain";
        }
      }  // module openconfig-routing-policy
    

© 2023 YumaWorks, Inc. All rights reserved.