huawei-bgp-srv6

BGP SRv6 configuration.

  • Version: 2020-03-13

    huawei-bgp-srv6@2020-03-13


    
      module huawei-bgp-srv6 {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-bgp-srv6";
    
        prefix bgp-srv6;
    
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-extension {
          prefix ext;
        }
        import huawei-bgp {
          prefix bgp;
        }
        import huawei-srv6 {
          prefix srv6;
        }
    
        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 "BGP SRv6 configuration.";
    
        revision "2020-03-13" {
          description
            "The modifications about srv6-be are synchronized to the YANG file.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-25" {
          description
            "The YANG descriptions are modified according to new standards.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-03-22" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "bgp";
    
        typedef apply-sid-mode {
          type enumeration {
            enum "per-instance" {
              value 0;
              description
                "Allocate a SID per VPN instance.";
            }
            enum "per-nexthop" {
              value 1;
              description
                "Allocate a SID per next hop.";
            }
          }
          description
            "SID allocation mode of SRv6 for BGP.";
        }
    
        augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:afs/bgp:af/bgp:ipv4-unicast {
          description "BGP SRv6 configuration.";
          container locators {
            description
              "List of locators used by segment-routing IPv6 for BGP.";
            list locator {
              key "name";
              max-elements 1;
              description
                "Configure SRv6 locator.";
              leaf name {
                type leafref {
                  path
                    "/ni:network-instance/ni:instances/ni:instance/srv6:srv6/srv6:locators/srv6:locator/srv6:name";
                }
                description "Locator name.";
              }
    
              leaf auto-sid {
                when
                  "../../../../../../../../ni:name!='_public_' and ../name";
                type boolean;
                default "true";
                description
                  "Enable/disable SID automatic allocation ability.";
              }
    
              leaf apply-sid-mode {
                when
                  "../../../../../../../../ni:name='_public_'";
                type apply-sid-mode;
                default "per-instance";
                description
                  "Configure a SID allocation mode of SRv6 for BGP.";
              }
            }  // list locator
          }  // container locators
        }
    
        augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:afs/bgp:af/bgp:ipv6-unicast {
          description "BGP SRv6 configuration.";
          container locators {
            when
              "../../../../../../ni:name='_public_'";
            description
              "List of locators used by segment-routing IPv6 for BGP.";
            list locator {
              key "name";
              description
                "Configure SRv6 locator.";
              leaf name {
                type leafref {
                  path
                    "/ni:network-instance/ni:instances/ni:instance/srv6:srv6/srv6:locators/srv6:locator/srv6:name";
                }
                description "Locator name.";
              }
            }  // list locator
          }  // container locators
    
          container locator-routes {
            when
              "../../../../../../ni:name='_public_'";
            description
              "List of locator routes.";
            list locator-route {
              key "locator-name";
              description
                "Configure a locator route in the BGP routing table.";
              leaf locator-name {
                type leafref {
                  path
                    "/ni:network-instance/ni:instances/ni:instance/srv6:srv6/srv6:locators/srv6:locator/srv6:name";
                }
                description
                  "Referenced locator name.";
              }
    
              uses bgp:choice-policy-set {
                refine policy-type {
                  description
                    "Specify the route-policy or filter for route advertisement.";
                }
              }
            }  // list locator-route
          }  // container locator-routes
        }
      }  // module huawei-bgp-srv6
    

© 2023 YumaWorks, Inc. All rights reserved.