Interface OpenconfigRoutingPolicyData

  • All Superinterfaces:
    org.opendaylight.yangtools.yang.binding.BindingObject, org.opendaylight.yangtools.yang.binding.DataContainer, org.opendaylight.yangtools.yang.binding.DataObject, org.opendaylight.yangtools.yang.binding.DataRoot, RoutingPolicyTop

    @Generated("mdsal-binding-generator")
    public interface OpenconfigRoutingPolicyData
    extends org.opendaylight.yangtools.yang.binding.DataRoot, RoutingPolicyTop
    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 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 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 of the policy statement conditions are satisfied, then evaluation of the 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).

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

     module openconfig-routing-policy {
       yang-version 1;
       namespace "http://openconfig.net/yang/routing-policy";
       prefix rpol;
       import ietf-inet-types {
         prefix inet;
       }
       import openconfig-policy-types {
         prefix pt;
       }
       import openconfig-extensions {
         prefix oc-ext;
       }
       oc-ext:openconfig-version 1.1.0;
       revision 2015-10-09 {
       }
       revision 2015-05-15 {
       }
       typedef default-policy-type {
         type enumeration {
           enum ACCEPT-ROUTE {
           }
           enum REJECT-ROUTE {
           }
         }
       }
       grouping prefix-set {
         list prefix-set {
           key prefix-set-name;
           leaf prefix-set-name {
             type string;
           }
           list prefix {
             key "ip-prefix masklength-range";
             leaf ip-prefix {
               type inet:ip-prefix;
             }
             leaf masklength-range {
               type string {
                 pattern ([0-9]+\.\.[0-9]+)|exact;
               }
             }
           }
         }
       }
       grouping neighbor-set {
         list neighbor-set {
           key neighbor-set-name;
           leaf neighbor-set-name {
             type string;
           }
           list neighbor {
             key address;
             leaf address {
               type inet:ip-address;
             }
           }
         }
       }
       grouping tag-set {
         list tag-set {
           key tag-set-name;
           leaf tag-set-name {
             type string;
           }
           list tag {
             key value;
             leaf value {
               type pt:tag-type;
             }
           }
         }
       }
       grouping generic-defined-sets {
         container prefix-sets {
           uses prefix-set;
         }
         container neighbor-sets {
           uses neighbor-set;
         }
         container tag-sets {
           uses tag-set;
         }
       }
       grouping local-generic-conditions {
         leaf install-protocol-eq {
           type identityref {
             base install-protocol-type;
           }
         }
       }
       grouping match-set-options-group {
         leaf match-set-options {
           type pt:match-set-options-type;
         }
       }
       grouping match-set-options-restricted-group {
         leaf match-set-options {
           type pt:match-set-options-restricted-type;
         }
       }
       grouping generic-conditions {
         container match-prefix-set {
           presence
             "The presence of this container indicates that the routes
              should match the prefix-set referenced.";
           leaf prefix-set {
             type leafref {
               path /routing-policy/defined-sets/prefix-sets/prefix-set/prefix-set-name;
             }
           }
           uses match-set-options-restricted-group;
         }
         container match-neighbor-set {
           presence
             "The presence of this container indicates that the routes
              should match the neighbour set referenced";
           leaf neighbor-set {
             type leafref {
               path /routing-policy/defined-sets/neighbor-sets/neighbor-set/neighbor-set-name;
             }
           }
           uses match-set-options-restricted-group;
         }
         container match-tag-set {
           presence
             "The presence of this container indicates that the routes
              should match the tag-set referenced";
           leaf tag-set {
             type leafref {
               path /routing-policy/defined-sets/tag-sets/tag-set/tag-set-name;
             }
           }
           uses match-set-options-restricted-group;
         }
         uses local-generic-conditions;
       }
       grouping igp-generic-conditions {
       }
       grouping igp-conditions {
         container igp-conditions {
           uses igp-generic-conditions;
         }
       }
       grouping generic-actions {
         choice route-disposition {
           leaf accept-route {
             type empty;
           }
           leaf reject-route {
             type empty;
           }
         }
       }
       grouping igp-actions {
         container igp-actions {
           leaf set-tag {
             type pt:tag-type;
           }
         }
       }
       grouping routing-policy-top {
         container routing-policy {
           container defined-sets {
             uses generic-defined-sets;
           }
           container policy-definitions {
             list policy-definition {
               key name;
               leaf name {
                 type string;
               }
               container statements {
                 list statement {
                   key name;
                   ordered-by user;
                   leaf name {
                     type string;
                   }
                   container conditions {
                     leaf call-policy {
                       type leafref {
                         path /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:name;
                       }
                     }
                     uses generic-conditions;
                     uses igp-conditions;
                   }
                   container actions {
                     uses generic-actions;
                     uses igp-actions;
                   }
                 }
               }
             }
           }
         }
       }
       grouping apply-policy-config {
         leaf-list import-policy {
           type leafref {
             path /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:name;
           }
           ordered-by user;
         }
         leaf default-import-policy {
           type default-policy-type;
           default REJECT-ROUTE;
         }
         leaf-list export-policy {
           type leafref {
             path /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:name;
           }
           ordered-by user;
         }
         leaf default-export-policy {
           type default-policy-type;
           default REJECT-ROUTE;
         }
       }
       grouping apply-policy-state {
       }
       grouping apply-policy-group {
         container apply-policy {
           container config {
             uses apply-policy-config;
           }
           container state {
             config false;
             uses apply-policy-config;
             uses apply-policy-state;
           }
         }
       }
       uses routing-policy-top;
     }