huawei-routing-policy-ext

Routing policies are used to filter routes and control the receiving and advertising of routes. By changing the route attributes...

  • Version: 2019-04-27

    huawei-routing-policy-ext@2019-04-27


    
      module huawei-routing-policy-ext {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-routing-policy-ext";
    
        prefix rtp-ext;
    
        import ietf-inet-types {
          prefix inet;
        }
        import huawei-extension {
          prefix ext;
        }
        import huawei-qos {
          prefix qos;
        }
        import huawei-routing-policy {
          prefix rtp;
        }
        import huawei-mpls {
          prefix mpls;
        }
        import huawei-mpls-te {
          prefix mpls-te;
        }
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
        Bantian, Longgang
        Shenzhen 518129
        People's Republic of China
        Website: http://www.huawei.com
        Email: support@huawei.com";
    
        description
          "Routing policies are used to filter routes and control the receiving and advertising of routes. By changing the route attributes, such as reachability, you can change the path through which the traffic passes.";
    
        revision "2019-04-27" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "route-base";
    
        augment /rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:nodes/rtp:node/rtp:actions/rtp:apply-qos-parameter/rtp:set-qos-parameter {
          description
            "Augment the huawei-routing-policy model to add apply behavior configuration.";
          case behavior {
            description "Set behavior.";
            leaf name {
              type leafref {
                path "/qos:qos/qos:classifier-template/qos:traffic-behaviors/qos:traffic-behavior/qos:name";
              }
              description
                "Name of traffic behavior.";
            }
          }  // case behavior
        }
    
        augment /rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:nodes/rtp:node/rtp:actions {
          description
            "Augment the huawei-routing-policy model to add actions configuration.";
          container apply-stitch-pmsi {
            must
              "(pmsi-type='incoming' and p2mp-template) or (pmsi-type='mldp' and not(p2mp-template)) or (pmsi-type='rsvp-te' and not(root-ip) and p2mp-template)";
            presence
              "Create parameters of apply stitch-pmsi.";
            description
              "Enable/disable the PMSI attribute.";
            leaf pmsi-type {
              type enumeration {
                enum "mldp" {
                  value 0;
                  description "MLDP type.";
                }
                enum "rsvp-te" {
                  value 1;
                  description "RSVP-TE type.";
                }
                enum "incoming" {
                  value 2;
                  description "Incoming type.";
                }
              }
              mandatory true;
              description "PMSI attribute type.";
            }
    
            leaf root-ip {
              when "not(../pmsi-type='rsvp-te')";
              type inet:ipv4-address-no-zone;
              must
                "(../pmsi-type='incoming' and ../p2mp-template) or (../pmsi-type='mldp' and not(../p2mp-template))";
              description
                "MLDP root ip address.";
            }
    
            leaf p2mp-template {
              when "not(../pmsi-type='mldp')";
              type leafref {
                path "/mpls:mpls/mpls-te:te/mpls-te:p2mp-templates/mpls-te:p2mp-template/mpls-te:name";
              }
              must
                "../pmsi-type='incoming' or (../pmsi-type='rsvp-te' and not(../root-ip))";
              description "P2MP TE template.";
            }
          }  // container apply-stitch-pmsi
        }
      }  // module huawei-routing-policy-ext
    

© 2023 YumaWorks, Inc. All rights reserved.