junos-nfx-conf-fabric

Junos fabric configuration module

  • Version: 2019-01-01

    junos-nfx-conf-fabric@2019-01-01


    
      module junos-nfx-conf-fabric {
    
        yang-version 1;
    
        namespace
          "http://yang.juniper.net/junos-nfx/conf/fabric";
    
        prefix jc-fabric;
    
        import junos-common-ddl-extensions {
          prefix junos;
          revision-date "2019-01-01";
        }
        import junos-common-types {
          prefix jt;
          revision-date "2019-01-01";
        }
        import junos-nfx-conf-root {
          prefix jc;
          revision-date "2019-01-01";
        }
    
        organization "Juniper Networks, Inc.";
    
        contact "yang-support@juniper.net";
    
        description
          "Junos fabric configuration module";
    
        revision "2019-01-01" {
          description "Junos: 21.3R1.9";
        }
    
    
        augment /jc:configuration {
          uses fabric-group;
        }
    
        augment /jc:configuration/jc:groups {
          uses fabric-group;
        }
    
        grouping fabric-group {
          container fabric {
            description "Fabric configuration";
            uses apply-advanced;
    
            container protocols {
              status deprecated;
              description
                "Routing protocol configuration";
              uses apply-advanced;
    
              container bgp {
                description "BGP options";
                uses juniper-protocols-bgp;
              }  // container bgp
            }  // container protocols
    
            container virtual-chassis {
              description
                "Virtual chassis configuration";
              uses apply-advanced;
    
              container flow-groups {
                description "Flow groups";
                uses apply-advanced;
    
                list flow-group {
                  key "name";
                  uses flow_group_type;
                }  // list flow-group
    
                list node-device {
                  key "name";
                  ordered-by user;
                  description "Node device";
                  leaf name {
                    type string;
                    description
                      "Serial ID or alias of node-device";
                  }
    
                  uses apply-advanced;
    
                  list interconnect-device {
                    key "name";
                    ordered-by user;
                    description
                      "Interconnect device";
                    leaf name {
                      type string;
                      description
                        "Serial ID or alias of interconnect-device";
                    }
    
                    uses apply-advanced;
    
                    leaf preference {
                      type enumeration {
                        enum "high" {
                          value 0;
                          description
                            "High link preference";
                        }
                        enum "normal" {
                          value 1;
                          description
                            "Normal link preference";
                        }
                        enum "never" {
                          value 2;
                          description
                            "Never use this link";
                        }
                      }
                      description
                        "Preference metric for link";
                    }
                  }  // list interconnect-device
                }  // list node-device
              }  // container flow-groups
    
              container traceoptions {
                uses juniper-virtual-chassis-traceoptions;
              }  // container traceoptions
            }  // container virtual-chassis
          }  // container fabric
        }  // grouping fabric-group
    
        grouping apply-advanced {
          description
            "Apply advanced configuration logic";
          leaf-list apply-groups {
            type string;
            ordered-by user;
            description
              "Groups from which to inherit configuration data";
          }
    
          leaf-list apply-groups-except {
            type string;
            ordered-by user;
            description
              "Don't inherit configuration data from these groups";
          }
    
          list apply-macro {
            key "name";
            ordered-by user;
            description
              "Macro and parameters for commit script expansion";
            uses apply-macro-type;
          }  // list apply-macro
        }  // grouping apply-advanced
    
        grouping apply-macro-type {
          description
            "Macro data for commit-script expansion";
          leaf name {
            type string;
            description
              "Name of the macro to be expanded";
          }
    
          list data {
            key "name";
            uses macro-data-type;
          }  // list data
        }  // grouping apply-macro-type
    
        grouping flow_group_type {
          description "Flow Group";
          leaf name {
            type string {
              length "1 .. 32";
            }
            description "Flow Group name";
          }
    
          uses apply-advanced;
    
          list node-device {
            key "name";
            ordered-by user;
            description
              "Node device(s) associated with this flow group";
            leaf name {
              type string {
                length "1 .. 40";
              }
              description "Alias of node-device";
            }
    
            uses apply-advanced;
          }  // list node-device
    
          list interconnect-device {
            key "name";
            ordered-by user;
            description
              "Interconnect device(s) associated with this flow group";
            leaf name {
              type string {
                length "1 .. 40";
              }
              description
                "Alias of interconnect-device";
            }
    
            uses apply-advanced;
          }  // list interconnect-device
        }  // grouping flow_group_type
    
        grouping juniper-protocols-bgp {
          uses apply-advanced;
    
          container path-selection {
            description
              "Configure path selection strategy";
            uses apply-advanced;
    
            leaf l2vpn-use-bgp-rules {
              type empty;
              description
                "Use standard BGP rules during L2VPN path selection";
            }
    
            leaf cisco-non-deterministic {
              type empty;
              description
                "Use Cisco IOS nondeterministic path selection algorithm";
            }
    
            leaf always-compare-med {
              type empty;
              description
                "Always compare MED values, regardless of neighbor AS";
            }
    
            container med-plus-igp {
              presence "enable med-plus-igp";
              description
                "Add IGP cost to next-hop to MED before comparing MED values";
              uses apply-advanced;
    
              leaf med-multiplier {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "1 .. 1000";
                  }
                }
                default "1";
                description "Multiplier for MED";
              }
    
              leaf igp-multiplier {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "1 .. 1000";
                  }
                }
                default "1";
                description
                  "Multiplier for IGP cost to next-hop";
              }
            }  // container med-plus-igp
    
            leaf external-router-id {
              type empty;
              description
                "Compare router ID on BGP externals";
            }
    
            leaf as-path-ignore {
              junos:must "(!(".. .. .. .. routing-options multipath as-path-compare"))";
              junos:must-message "Configuring 'as-path-ignore' is not allowed when 'as-path-compare' is enabled for this routing instance";
              type empty;
              description
                "Ignore AS path comparison during path selection";
            }
          }  // container path-selection
    
          container accept-prpd-connection {
            presence
              "enable accept-prpd-connection";
            description
              "Enable BGP to accept PRPD connections";
          }  // container accept-prpd-connection
    
          leaf advertise-from-main-vpn-tables {
            type empty;
            description
              "Advertise VPN routes from bgp.Xvpn.0 tables in master instance";
          }
    
          leaf stale-labels-holddown-period {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type int32 {
                range "1 .. 600";
              }
            }
            description
              "Duration (sec) MPLS labels allocated by BGP are kept after they go stale";
          }
    
          leaf holddown-all-stale-labels {
            type empty;
            description
              "Hold all BGP stale-labels, facilating make-before-break for new label advertisements";
          }
    
          container egress-te-backup-paths {
            description
              "Backup-path for Egress-TE peer interface failure";
            uses apply-advanced;
    
            list template {
              key "name";
              description "Backup-path template";
              leaf name {
                type string {
                  junos:posix-pattern "^.{1,64}$";
                  junos:pattern-message "Must be a string of 64 characters or less";
                }
                description
                  "Name of Egress-TE backup path";
              }
    
              uses apply-advanced;
    
              list peer {
                key "name";
                ordered-by user;
                description
                  "Egress peer TE backup exit path";
                leaf name {
                  type jt:ipaddr;
                  description
                    "Address of BGP peer to use as backup next-hop";
                }
    
                uses apply-advanced;
              }  // list peer
    
              container remote-nexthop {
                description
                  "Resolve and use tunnel to this next-hop as backup path";
                uses apply-advanced;
    
                leaf remote-nh-addr {
                  type jt:ipaddr;
                  description
                    "Address of remote-nexthop to use as backup path";
                }
              }  // container remote-nexthop
    
              container ip-forward {
                junos:must "(!(".. remote-nexthop"))";
                junos:must-message "'ip-forward' will not take effect as backup when 'remote-nexthop' is in use";
                presence "enable ip-forward";
                description
                  "Use IP-forward backup path for Egress TE";
                uses apply-advanced;
    
                leaf rti-name {
                  type string {
                    junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                    junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                  }
                  description
                    "Routing-instance to use as IP forward backup-path";
                }
              }  // container ip-forward
            }  // list template
          }  // container egress-te-backup-paths
    
          leaf sr-preference-override {
            type union {
              type uint32;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Replace received segment routing traffic engineering preference value with override value";
          }
    
          leaf vpn-apply-export {
            type empty;
            description
              "Apply BGP export policy when exporting VPN routes";
          }
    
          container family {
            description
              "Protocol family for NLRIs in updates";
            uses apply-advanced;
    
            container inet {
              description "IPv4 NLRI parameters";
              uses apply-advanced;
    
              container labeled-unicast {
                presence
                  "enable labeled-unicast";
                description
                  "Include labeled unicast NLRI";
                uses bgp-afi-labeled;
              }  // container labeled-unicast
    
              container segment-routing-te {
                presence
                  "enable segment-routing-te";
                description
                  "Include segment-routing TE policy";
                uses bgp-afi-srte;
              }  // container segment-routing-te
    
              container transport {
                presence "enable transport";
                description
                  "Include Classful Transport NLRI";
                uses bgp-afi-inet-transport;
              }  // container transport
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-topo;
              }  // container unicast
    
              container multicast {
                presence "enable multicast";
                description
                  "Include multicast NLRI";
                uses bgp-afi-default;
              }  // container multicast
    
              container flow {
                presence "enable flow";
                description "Include flow NLRI";
                uses bgp-afi-flow-with-redirect-ip-action;
              }  // container flow
    
              container any {
                presence "enable any";
                description
                  "Include unicast or multicast NLRI";
                uses bgp-afi-default;
              }  // container any
            }  // container inet
    
            container inet-vpn {
              description
                "IPv4 Layer 3 VPN NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-l3vpn;
              }  // container unicast
    
              container multicast {
                presence "enable multicast";
                description
                  "Include multicast NLRI";
                uses bgp-afi-vpn;
              }  // container multicast
    
              container flow {
                presence "enable flow";
                description
                  "Include flow VPN NLRI";
                uses bgp-afi-flow-with-redirect-ip-action;
              }  // container flow
    
              container any {
                presence "enable any";
                description
                  "Include unicast or multicast NLRI";
                uses bgp-afi-vpn;
              }  // container any
            }  // container inet-vpn
    
            container inet6 {
              description "IPv6 NLRI parameters";
              uses apply-advanced;
    
              container labeled-unicast {
                presence
                  "enable labeled-unicast";
                description
                  "Include labeled unicast NLRI";
                uses bgp-afi-inet6-labeled;
              }  // container labeled-unicast
    
              container segment-routing-te {
                presence
                  "enable segment-routing-te";
                description
                  "Include segment-routing TE policy";
                uses bgp-afi-srte;
              }  // container segment-routing-te
    
              container transport {
                presence "enable transport";
                description
                  "Include Classful Transport NLRI";
                uses bgp-afi-inet6-transport;
              }  // container transport
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-topo;
              }  // container unicast
    
              container multicast {
                presence "enable multicast";
                description
                  "Include multicast NLRI";
                uses bgp-afi-default;
              }  // container multicast
    
              container flow {
                presence "enable flow";
                description "Include flow NLRI";
                uses bgp-afi-flow;
              }  // container flow
    
              container any {
                presence "enable any";
                description
                  "Include unicast or multicast NLRI";
                uses bgp-afi-default;
              }  // container any
            }  // container inet6
    
            container inet6-vpn {
              description
                "IPv6 Layer 3 VPN NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-l3vpn;
              }  // container unicast
    
              container multicast {
                presence "enable multicast";
                description
                  "Include multicast NLRI";
                uses bgp-afi-vpn;
              }  // container multicast
    
              container flow {
                presence "enable flow";
                description
                  "Include flow VPN NLRI";
                uses bgp-afi-flow;
              }  // container flow
    
              container any {
                presence "enable any";
                description
                  "Include unicast or multicast NLRI";
                uses bgp-afi-vpn;
              }  // container any
            }  // container inet6-vpn
    
            container iso-vpn {
              description
                "ISO Layer 3 VPN NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-vpn-protection;
              }  // container unicast
            }  // container iso-vpn
    
            container l2vpn {
              description
                "MPLS-based Layer 2 VPN and VPLS NLRI parameters";
              uses apply-advanced;
    
              container auto-discovery-only {
                presence
                  "enable auto-discovery-only";
                description
                  "Include auto-discovery NLRI for LDP Layer 2 VPN and VPLS";
                uses bgp-afi-default;
              }  // container auto-discovery-only
    
              container auto-discovery-mspw {
                presence
                  "enable auto-discovery-mspw";
                description
                  "Include auto-discovery NLRI for LDP Signalled MultiSegment PW";
                uses bgp-afi-default;
              }  // container auto-discovery-mspw
    
              container signaling {
                presence "enable signaling";
                description
                  "Include Layer 2 VPN and VPLS signaling NLRI";
                uses bgp-afi-l2vpn;
              }  // container signaling
            }  // container l2vpn
    
            container evpn {
              description "EVPN NLRI parameters";
              uses apply-advanced;
    
              container signaling {
                presence "enable signaling";
                description
                  "Include EVPN signaling NLRI";
                uses bgp-afi-default;
              }  // container signaling
            }  // container evpn
    
            container inet-mvpn {
              description
                "IPv4 MVPN NLRI parameters";
              uses apply-advanced;
    
              container signaling {
                presence "enable signaling";
                description
                  "Include IPv4 multicast VPN signaling NLRI";
                uses bgp-afi-default;
              }  // container signaling
            }  // container inet-mvpn
    
            container inet6-mvpn {
              description
                "IPv6 MVPN NLRI parameters";
              uses apply-advanced;
    
              container signaling {
                presence "enable signaling";
                description
                  "Include IPv6 multicast VPN signaling NLRI";
                uses bgp-afi-default;
              }  // container signaling
            }  // container inet6-mvpn
    
            container inet-mdt {
              description
                "IPv4 Multicast Distribution Tree (MDT) NLRI parameters";
              uses apply-advanced;
    
              container signaling {
                presence "enable signaling";
                description
                  "Include IPv4 multicast VPN auto-discovery NLRI";
                uses bgp-afi-default;
              }  // container signaling
            }  // container inet-mdt
    
            container traffic-engineering {
              description
                "Traffic Engineering (BGP-TE) NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include BGP-TE NLRI";
                uses bgp-afi-default;
              }  // container unicast
            }  // container traffic-engineering
    
            container route-target {
              presence "enable route-target";
              description
                "Route target NLRI used for VPN route filtering";
              uses apply-advanced;
    
              container prefix-limit {
                description
                  "Limit maximum number of prefixes from a peer";
                uses bgpaf-prefix-limit;
              }  // container prefix-limit
    
              container accepted-prefix-limit {
                description
                  "Limit maximum number of prefixes accepted from a peer";
                uses bgpaf-accepted-prefix-limit;
              }  // container accepted-prefix-limit
    
              container proxy-generate {
                presence "enable proxy-generate";
                description
                  "Generate route target NLRI for peers that don't support it";
                uses apply-advanced;
    
                leaf-list route-target-policy {
                  type jt:policy-algebra;
                  ordered-by user;
                  description
                    "Limit VPN routes that are used to generate proxy route-target filters";
                }
              }  // container proxy-generate
    
              leaf external-paths {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 256";
                  }
                }
                description
                  "Number of external paths accepted for route filtering";
              }
    
              leaf advertise-default {
                type empty;
                description
                  "Advertise default and suppress more specific routes";
              }
    
              leaf damping {
                type empty;
                description
                  "Enable route flap damping";
              }
    
              container graceful-restart {
                description
                  "BGP graceful restart options";
                uses bgp-af-gr;
              }  // container graceful-restart
    
              leaf local-ipv4-address {
                type jt:ipv4addr;
                description "Local IPv4 address";
              }
    
              container output-queue-priority {
                description
                  "Default output-queue to assign updates to";
                uses bgp-output-queue-priority-class;
              }  // container output-queue-priority
    
              container route-refresh-priority {
                description
                  "Default output-queue to assign route refreshes to";
                uses bgp-output-queue-priority-class;
              }  // container route-refresh-priority
    
              container withdraw-priority {
                description
                  "Default output-queue to assign withdrawn routes to";
                uses bgp-output-queue-priority-class;
              }  // container withdraw-priority
            }  // container route-target
    
            container fabric {
              status deprecated;
              description
                "Fabric NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-default;
              }  // container unicast
            }  // container fabric
    
            container bridge {
              status deprecated;
              description
                "Bridge NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-default;
              }  // container unicast
            }  // container bridge
    
            container bridge-vpn {
              status deprecated;
              description
                "Bridge VPN NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-vpn;
              }  // container unicast
            }  // container bridge-vpn
    
            container fabric-vpn {
              status deprecated;
              description
                "Fabric VPN NLRI parameters";
              uses apply-advanced;
    
              container unicast {
                presence "enable unicast";
                description
                  "Include unicast NLRI";
                uses bgp-afi-vpn;
              }  // container unicast
            }  // container fabric-vpn
    
            container inet-bgpmcast {
              description
                "IPv4 BGPMCAST NLRI parameters";
              uses apply-advanced;
    
              container signaling {
                presence "enable signaling";
                description
                  "Include IPv4 BGP multicast signaling NLRI";
                uses bgp-afi-default;
              }  // container signaling
            }  // container inet-bgpmcast
    
            container inet6-bgpmcast {
              description
                "IPv6 BGPMCAST NLRI parameters";
              uses apply-advanced;
    
              container signaling {
                presence "enable signaling";
                description
                  "Include IPv6 BGP multicast signaling NLRI";
                uses bgp-afi-default;
              }  // container signaling
            }  // container inet6-bgpmcast
          }  // container family
    
          container egress-te {
            presence "enable egress-te";
            description
              "Use Egress Peering traffic engineering";
            uses apply-advanced;
    
            leaf install-address {
              type jt:ipaddr;
              description
                "Address to use in egress-te created inet route";
            }
    
            container rib {
              description
                "Select primary table for Egress-TE routes";
              uses apply-advanced;
    
              leaf inet.0 {
                type empty;
                description
                  "Install Egress-TE routes in inet.0";
              }
    
              leaf inet6.0 {
                type empty;
                description
                  "Install Egress-TE routes in inet6.0";
              }
            }  // container rib
    
            leaf no-install {
              type empty;
              description
                "Avoid installation to FIB or resolving over";
            }
    
            leaf-list import {
              type jt:policy-algebra;
              ordered-by user;
              description
                "Import policy to set attributes";
            }
    
            leaf backup-path {
              junos:must "("protocols bgp egress-te-backup-paths template $$")";
              junos:must-message "bgp egress-te-backup-paths template not configured";
              type string {
                junos:posix-pattern "^.{1,64}$";
                junos:pattern-message "Must be a string of 64 characters or less";
              }
              description
                "The 'egress-te-backup-paths template' to use for this peer";
            }
          }  // container egress-te
    
          leaf advertise-prefix-sid {
            type empty;
            description
              "Advertise prefix sid to E-BGP peers";
          }
    
          leaf accept-prefix-sid {
            type empty;
            description
              "Accept prefix sid from E-BGP peers";
          }
    
          leaf advertise-srgb {
            type empty;
            description "Advertise SRGB TLV";
          }
    
          leaf tcp-connect-port {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint16 {
                range "1 .. 65535";
              }
            }
            description
              "TCP port number to connect with peer on";
          }
    
          leaf egress-te-sid-stats {
            type empty;
            description
              "Create BGP-Peer-SID sensor";
          }
    
          list egress-te-set-segment {
            key "name";
            ordered-by user;
            description
              "Configure BGP-Peer-Set segment";
            leaf name {
              type string {
                junos:posix-pattern "^.{1,64}$";
                junos:pattern-message "Must be a string of 64 characters or less";
              }
              description
                "The BGP-Peer-Set segment name";
            }
    
            uses apply-advanced;
    
            container label {
              description
                "BGP-Peer-Set SID label from static label pool";
              uses apply-advanced;
    
              leaf label-value {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "16 .. 1048575";
                  }
                }
                description
                  "BGP-Peer-Set SID label value from static label pool";
              }
            }  // container label
    
            container egress-te-backup-segment {
              description
                "Backup segment for FRR";
              uses apply-advanced;
    
              container label {
                description
                  "Backup segment label from static label pool";
                uses apply-advanced;
    
                leaf label-value {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "16 .. 1048575";
                    }
                  }
                  description
                    "Backup segment label value from static label pool";
                }
              }  // container label
            }  // container egress-te-backup-segment
    
            container egress-te-backup-ip-forward {
              presence
                "enable egress-te-backup-ip-forward";
              description
                "Use IP-forward backup path for Egress TE";
              uses apply-advanced;
    
              leaf instance-name {
                type string {
                  junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                  junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                }
                description
                  "Routing-instance to use as IP forward backup-path";
              }
            }  // container egress-te-backup-ip-forward
          }  // list egress-te-set-segment
    
          list group {
            key "name";
            ordered-by user;
            description "Define a peer group";
            leaf name {
              type string;
              description "Group name";
            }
    
            uses apply-advanced;
    
            leaf type {
              type enumeration {
                enum "internal" {
                  value 0;
                  description "IBGP group";
                }
                enum "external" {
                  value 1;
                  description "EBGP group";
                }
              }
              description "Type of peer group";
            }
    
            leaf protocol {
              type enumeration {
                enum "rip" {
                  value 0;
                  status deprecated;
                  description
                    "Use RIP to resolve the BGP next hop";
                }
                enum "ospf" {
                  value 1;
                  status deprecated;
                  description
                    "Use OSPF to resolve the BGP next hop";
                }
                enum "isis" {
                  value 2;
                  status deprecated;
                  description
                    "Use IS-IS to resolve the BGP next hop";
                }
              }
              status deprecated;
              description
                "IGP to use to resolve the next hop";
            }
    
            container traceoptions {
              description
                "Trace options for BGP";
              uses apply-advanced;
    
              container file {
                description "Trace file options";
                leaf filename {
                  type string {
                    junos:posix-pattern "![/ %]";
                    junos:pattern-message "Must not contain '/', % or a space";
                    length "1 .. 1024";
                  }
                  description
                    "Name of file in which to write trace information";
                }
    
                leaf replace {
                  type empty;
                  status deprecated;
                  description
                    "Replace trace file rather than appending to it";
                }
    
                leaf size {
                  type string;
                  description
                    "Maximum trace file size";
                }
    
                leaf files {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "2 .. 1000";
                    }
                  }
                  default "10";
                  description
                    "Maximum number of trace files";
                }
    
                leaf no-stamp {
                  type empty;
                  status deprecated;
                  description
                    "Do not timestamp trace file";
                }
    
                choice world-readable-choice {
                  leaf world-readable {
                    type empty;
                    description
                      "Allow any user to read the log file";
                  }
                  leaf no-world-readable {
                    type empty;
                    description
                      "Don't allow any user to read the log file";
                  }
                }  // choice world-readable-choice
              }  // container file
    
              list flag {
                key "name";
                ordered-by user;
                description "Tracing parameters";
                leaf name {
                  type enumeration {
                    enum "damping" {
                      value 0;
                      description
                        "Trace BGP damping information";
                    }
                    enum "packets" {
                      value 1;
                      description
                        "Trace all BGP protocol packets";
                    }
                    enum "open" {
                      value 2;
                      description
                        "Trace BGP open packets";
                    }
                    enum "update" {
                      value 3;
                      description
                        "Trace BGP update packets";
                    }
                    enum "keepalive" {
                      value 4;
                      description
                        "Trace BGP keepalive packets";
                    }
                    enum "refresh" {
                      value 5;
                      description
                        "Trace BGP refresh packets";
                    }
                    enum "nsr-synchronization" {
                      value 6;
                      description
                        "Trace NSR synchronization events";
                    }
                    enum "bfd" {
                      value 7;
                      description
                        "Trace BFD events";
                    }
                    enum "4byte-as" {
                      value 8;
                      description
                        "Trace 4 byte AS events";
                    }
                    enum "add-path" {
                      value 9;
                      description
                        "Trace add-path events";
                    }
                    enum "graceful-restart" {
                      value 10;
                      description
                        "Trace Graceful Restart events";
                    }
                    enum "egress-te" {
                      value 11;
                      description
                        "Egress Peering Traffic-Engineering events";
                    }
                    enum "thread-io" {
                      value 12;
                      description
                        "Trace threaded I/O processing";
                    }
                    enum "sharding" {
                      value 13;
                      description
                        "Trace BGP rib sharding";
                    }
                    enum "thread-update-io" {
                      value 14;
                      description
                        "Trace threaded update I/O processing";
                    }
                    enum "route-validation" {
                      value 15;
                      description
                        "Trace route validation";
                    }
                    enum "ipsec" {
                      value 16;
                      description "Trace ipsec";
                    }
                    enum "route" {
                      value 17;
                      description
                        "Trace routing information";
                    }
                    enum "normal" {
                      value 18;
                      description
                        "Trace normal events";
                    }
                    enum "general" {
                      value 19;
                      description
                        "Trace general events";
                    }
                    enum "state" {
                      value 20;
                      description
                        "Trace state transitions";
                    }
                    enum "policy" {
                      value 21;
                      description
                        "Trace policy processing";
                    }
                    enum "task" {
                      value 22;
                      description
                        "Trace routing protocol task processing";
                    }
                    enum "timer" {
                      value 23;
                      description
                        "Trace routing protocol timer processing";
                    }
                    enum "all" {
                      value 24;
                      description
                        "Trace everything";
                    }
                  }
                }
    
                leaf send {
                  type empty;
                  description
                    "Trace transmitted packets";
                }
    
                leaf receive {
                  type empty;
                  description
                    "Trace received packets";
                }
    
                leaf detail {
                  type empty;
                  description
                    "Trace detailed information";
                }
    
                leaf disable {
                  type empty;
                  description
                    "Disable this trace flag";
                }
    
                container filter {
                  presence "enable filter";
                  description
                    "Filter to apply to this flag";
                  uses bgp_filter_obj;
                }  // container filter
              }  // list flag
            }  // container traceoptions
    
            leaf description {
              type string {
                length "1 .. 255";
              }
              description "Text description";
            }
    
            container metric-out {
              description
                "Route metric sent in MED";
              choice metric_param {
                leaf metric-value {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 4294967295";
                    }
                  }
                  description "Metric value";
                }
                container minimum-igp {
                  presence "enable minimum-igp";
                  description
                    "Track the minimum IGP metric";
                  leaf metric-offset {
                    type union {
                      type int32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Metric offset for MED";
                  }
                }  // container minimum-igp
                container igp {
                  presence "enable igp";
                  description
                    "Track the IGP metric";
                  leaf metric-offset {
                    type union {
                      type int32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Metric offset for MED";
                  }
    
                  leaf delay-med-update {
                    type empty;
                    description
                      "Delay updating MED when IGP metric increases";
                  }
                }  // container igp
                container effective-aigp {
                  presence
                    "enable effective-aigp";
                  description
                    "Track the effective AIGP metric";
                  leaf metric-offset {
                    type union {
                      type int32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Metric offset for MED";
                  }
                }  // container effective-aigp
                container minimum-effective-aigp {
                  presence
                    "enable minimum-effective-aigp";
                  description
                    "Track the minimum effective AIGP metric";
                  leaf metric-offset {
                    type union {
                      type int32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Metric offset for MED";
                  }
                }  // container minimum-effective-aigp
              }  // choice metric_param
            }  // container metric-out
    
            container multihop {
              presence "enable multihop";
              description
                "Configure an EBGP multihop session";
              uses apply-advanced;
    
              leaf ttl {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint8 {
                    range "1 .. 255";
                  }
                }
                description
                  "TTL value for the session";
              }
    
              leaf no-nexthop-change {
                type empty;
                description
                  "Do not change next hop to self in advertisements";
              }
            }  // container multihop
    
            leaf route-server-client {
              type empty;
              description
                "Enable route server client behavior";
            }
    
            leaf accept-remote-nexthop {
              type empty;
              description
                "Allow import policy to specify a non-directly connected next-hop";
            }
    
            leaf preference {
              type union {
                type uint32;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description "Preference value";
            }
    
            leaf local-preference {
              type union {
                type uint32;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description
                "Value of LOCAL_PREF path attribute";
            }
    
            leaf local-address {
              type jt:ipaddr;
              description
                "Address of local end of BGP session";
            }
    
            leaf local-interface {
              type union {
                type jt:interface-name;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description
                "Local interface for IPv6 link local EBGP peering";
            }
    
            leaf forwarding-context {
              type string {
                junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
              }
              description
                "Routing-instance used for data-forwarding and transport-session";
            }
    
            leaf hold-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "0 .. 65535";
                }
              }
              description
                "Hold time used when negotiating with a peer";
            }
    
            leaf minimum-hold-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "3 .. 65535";
                }
              }
              description
                "Minimum hold time accepted from the peer";
            }
    
            leaf passive {
              type empty;
              description
                "Do not send open messages to a peer";
            }
    
            leaf advertise-inactive {
              type empty;
              description
                "Advertise inactive routes";
            }
    
            choice advertise-peer-as-choice {
              leaf advertise-peer-as {
                type empty;
                description
                  "Advertise routes received from the same autonomous system";
              }
              leaf no-advertise-peer-as {
                type empty;
                description
                  "Don't advertise routes received from the same autonomous system";
              }
            }  // choice advertise-peer-as-choice
    
            container advertise-external {
              presence
                "enable advertise-external";
              description
                "Advertise best external routes";
              leaf conditional {
                type empty;
                description
                  "Route matches active route upto med-comparison rule";
              }
            }  // container advertise-external
    
            leaf keep {
              type enumeration {
                enum "all" {
                  value 0;
                  description
                    "Retain all routes";
                }
                enum "none" {
                  value 1;
                  description "Retain no routes";
                }
              }
              description
                "How to retain routes in the routing table";
            }
    
            leaf rfc6514-compliant-safi129 {
              type empty;
              description
                "Compliant with RFC6514 SAFI129 format";
            }
    
            leaf no-aggregator-id {
              type empty;
              description
                "Set router ID in aggregator path attribute to 0";
            }
    
            leaf mtu-discovery {
              type empty;
              description
                "Enable TCP path MTU discovery";
            }
    
            leaf enforce-first-as {
              type empty;
              description
                "Enforce first AS in AS-path is the neighbor's AS";
            }
    
            leaf out-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "0 .. 65535";
                }
              }
              description
                "How long before exporting routes from routing table";
            }
    
            leaf ttl {
              junos:must "((!(".. .. type internal") && !(".. multihop")))";
              junos:must-message "This option is valid only for single-hop EBGP neighbor";
              type enumeration {
                enum "1" {
                  value 0;
                }
                enum "255" {
                  value 1;
                }
              }
              description
                "TTL value for the single-hop peer";
            }
    
            leaf log-updown {
              type empty;
              description
                "Log a message for peer state transitions";
            }
    
            leaf damping {
              type empty;
              description
                "Enable route flap damping";
            }
    
            leaf-list import {
              type jt:policy-algebra;
              ordered-by user;
              description "Import policy";
            }
    
            leaf-list nlri {
              type enumeration {
                enum "unicast" {
                  value 0;
                  status deprecated;
                  description
                    "Include unicast NLRI";
                }
                enum "multicast" {
                  value 1;
                  status deprecated;
                  description
                    "Include multicast NLRI";
                }
                enum "any" {
                  value 2;
                  status deprecated;
                  description
                    "Include any kind of NLRI";
                }
              }
              ordered-by user;
              status deprecated;
              description
                "NLRI type to include in updates";
            }
    
            container bgp-error-tolerance {
              presence
                "enable bgp-error-tolerance";
              description
                "Handle BGP malformed updates softly";
              uses apply-advanced;
    
              leaf malformed-update-log-interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "10 .. 65535";
                  }
                }
                units "seconds";
                default "300";
                description
                  "Time used when logging malformed update";
              }
    
              choice malformed-routes-limit-choice {
                leaf malformed-route-limit {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 4294967295";
                    }
                  }
                  default "1000";
                  description
                    "Maximum number of malformed routes from a peer";
                }
                leaf no-malformed-route-limit {
                  type empty;
                  description
                    "No malformed route limit";
                }
              }  // choice malformed-routes-limit-choice
            }  // container bgp-error-tolerance
    
            container family {
              description
                "Protocol family for NLRIs in updates";
              uses apply-advanced;
    
              container inet {
                description
                  "IPv4 NLRI parameters";
                uses apply-advanced;
    
                container labeled-unicast {
                  presence
                    "enable labeled-unicast";
                  description
                    "Include labeled unicast NLRI";
                  uses bgp-afi-labeled;
                }  // container labeled-unicast
    
                container segment-routing-te {
                  presence
                    "enable segment-routing-te";
                  description
                    "Include segment-routing TE policy";
                  uses bgp-afi-srte;
                }  // container segment-routing-te
    
                container transport {
                  presence "enable transport";
                  description
                    "Include Classful Transport NLRI";
                  uses bgp-afi-inet-transport;
                }  // container transport
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-topo;
                }  // container unicast
    
                container multicast {
                  presence "enable multicast";
                  description
                    "Include multicast NLRI";
                  uses bgp-afi-default;
                }  // container multicast
    
                container flow {
                  presence "enable flow";
                  description
                    "Include flow NLRI";
                  uses bgp-afi-flow-with-redirect-ip-action;
                }  // container flow
    
                container any {
                  presence "enable any";
                  description
                    "Include unicast or multicast NLRI";
                  uses bgp-afi-default;
                }  // container any
              }  // container inet
    
              container inet-vpn {
                description
                  "IPv4 Layer 3 VPN NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-l3vpn;
                }  // container unicast
    
                container multicast {
                  presence "enable multicast";
                  description
                    "Include multicast NLRI";
                  uses bgp-afi-vpn;
                }  // container multicast
    
                container flow {
                  presence "enable flow";
                  description
                    "Include flow VPN NLRI";
                  uses bgp-afi-flow-with-redirect-ip-action;
                }  // container flow
    
                container any {
                  presence "enable any";
                  description
                    "Include unicast or multicast NLRI";
                  uses bgp-afi-vpn;
                }  // container any
              }  // container inet-vpn
    
              container inet6 {
                description
                  "IPv6 NLRI parameters";
                uses apply-advanced;
    
                container labeled-unicast {
                  presence
                    "enable labeled-unicast";
                  description
                    "Include labeled unicast NLRI";
                  uses bgp-afi-inet6-labeled;
                }  // container labeled-unicast
    
                container segment-routing-te {
                  presence
                    "enable segment-routing-te";
                  description
                    "Include segment-routing TE policy";
                  uses bgp-afi-srte;
                }  // container segment-routing-te
    
                container transport {
                  presence "enable transport";
                  description
                    "Include Classful Transport NLRI";
                  uses bgp-afi-inet6-transport;
                }  // container transport
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-topo;
                }  // container unicast
    
                container multicast {
                  presence "enable multicast";
                  description
                    "Include multicast NLRI";
                  uses bgp-afi-default;
                }  // container multicast
    
                container flow {
                  presence "enable flow";
                  description
                    "Include flow NLRI";
                  uses bgp-afi-flow;
                }  // container flow
    
                container any {
                  presence "enable any";
                  description
                    "Include unicast or multicast NLRI";
                  uses bgp-afi-default;
                }  // container any
              }  // container inet6
    
              container inet6-vpn {
                description
                  "IPv6 Layer 3 VPN NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-l3vpn;
                }  // container unicast
    
                container multicast {
                  presence "enable multicast";
                  description
                    "Include multicast NLRI";
                  uses bgp-afi-vpn;
                }  // container multicast
    
                container flow {
                  presence "enable flow";
                  description
                    "Include flow VPN NLRI";
                  uses bgp-afi-flow;
                }  // container flow
    
                container any {
                  presence "enable any";
                  description
                    "Include unicast or multicast NLRI";
                  uses bgp-afi-vpn;
                }  // container any
              }  // container inet6-vpn
    
              container iso-vpn {
                description
                  "ISO Layer 3 VPN NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-vpn-protection;
                }  // container unicast
              }  // container iso-vpn
    
              container l2vpn {
                description
                  "MPLS-based Layer 2 VPN and VPLS NLRI parameters";
                uses apply-advanced;
    
                container auto-discovery-only {
                  presence
                    "enable auto-discovery-only";
                  description
                    "Include auto-discovery NLRI for LDP Layer 2 VPN and VPLS";
                  uses bgp-afi-default;
                }  // container auto-discovery-only
    
                container auto-discovery-mspw {
                  presence
                    "enable auto-discovery-mspw";
                  description
                    "Include auto-discovery NLRI for LDP Signalled MultiSegment PW";
                  uses bgp-afi-default;
                }  // container auto-discovery-mspw
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include Layer 2 VPN and VPLS signaling NLRI";
                  uses bgp-afi-l2vpn;
                }  // container signaling
              }  // container l2vpn
    
              container evpn {
                description
                  "EVPN NLRI parameters";
                uses apply-advanced;
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include EVPN signaling NLRI";
                  uses bgp-afi-default;
                }  // container signaling
              }  // container evpn
    
              container inet-mvpn {
                description
                  "IPv4 MVPN NLRI parameters";
                uses apply-advanced;
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include IPv4 multicast VPN signaling NLRI";
                  uses bgp-afi-default;
                }  // container signaling
              }  // container inet-mvpn
    
              container inet6-mvpn {
                description
                  "IPv6 MVPN NLRI parameters";
                uses apply-advanced;
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include IPv6 multicast VPN signaling NLRI";
                  uses bgp-afi-default;
                }  // container signaling
              }  // container inet6-mvpn
    
              container inet-mdt {
                description
                  "IPv4 Multicast Distribution Tree (MDT) NLRI parameters";
                uses apply-advanced;
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include IPv4 multicast VPN auto-discovery NLRI";
                  uses bgp-afi-default;
                }  // container signaling
              }  // container inet-mdt
    
              container traffic-engineering {
                description
                  "Traffic Engineering (BGP-TE) NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include BGP-TE NLRI";
                  uses bgp-afi-default;
                }  // container unicast
              }  // container traffic-engineering
    
              container route-target {
                presence "enable route-target";
                description
                  "Route target NLRI used for VPN route filtering";
                uses apply-advanced;
    
                container prefix-limit {
                  description
                    "Limit maximum number of prefixes from a peer";
                  uses bgpaf-prefix-limit;
                }  // container prefix-limit
    
                container accepted-prefix-limit {
                  description
                    "Limit maximum number of prefixes accepted from a peer";
                  uses bgpaf-accepted-prefix-limit;
                }  // container accepted-prefix-limit
    
                container proxy-generate {
                  presence
                    "enable proxy-generate";
                  description
                    "Generate route target NLRI for peers that don't support it";
                  uses apply-advanced;
    
                  leaf-list route-target-policy {
                    type jt:policy-algebra;
                    ordered-by user;
                    description
                      "Limit VPN routes that are used to generate proxy route-target filters";
                  }
                }  // container proxy-generate
    
                leaf external-paths {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 256";
                    }
                  }
                  description
                    "Number of external paths accepted for route filtering";
                }
    
                leaf advertise-default {
                  type empty;
                  description
                    "Advertise default and suppress more specific routes";
                }
    
                leaf damping {
                  type empty;
                  description
                    "Enable route flap damping";
                }
    
                container graceful-restart {
                  description
                    "BGP graceful restart options";
                  uses bgp-af-gr;
                }  // container graceful-restart
    
                leaf local-ipv4-address {
                  type jt:ipv4addr;
                  description
                    "Local IPv4 address";
                }
    
                container output-queue-priority {
                  description
                    "Default output-queue to assign updates to";
                  uses bgp-output-queue-priority-class;
                }  // container output-queue-priority
    
                container route-refresh-priority {
                  description
                    "Default output-queue to assign route refreshes to";
                  uses bgp-output-queue-priority-class;
                }  // container route-refresh-priority
    
                container withdraw-priority {
                  description
                    "Default output-queue to assign withdrawn routes to";
                  uses bgp-output-queue-priority-class;
                }  // container withdraw-priority
              }  // container route-target
    
              container fabric {
                status deprecated;
                description
                  "Fabric NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-default;
                }  // container unicast
              }  // container fabric
    
              container bridge {
                status deprecated;
                description
                  "Bridge NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-default;
                }  // container unicast
              }  // container bridge
    
              container bridge-vpn {
                status deprecated;
                description
                  "Bridge VPN NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-vpn;
                }  // container unicast
              }  // container bridge-vpn
    
              container fabric-vpn {
                status deprecated;
                description
                  "Fabric VPN NLRI parameters";
                uses apply-advanced;
    
                container unicast {
                  presence "enable unicast";
                  description
                    "Include unicast NLRI";
                  uses bgp-afi-vpn;
                }  // container unicast
              }  // container fabric-vpn
    
              container inet-bgpmcast {
                description
                  "IPv4 BGPMCAST NLRI parameters";
                uses apply-advanced;
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include IPv4 BGP multicast signaling NLRI";
                  uses bgp-afi-default;
                }  // container signaling
              }  // container inet-bgpmcast
    
              container inet6-bgpmcast {
                description
                  "IPv6 BGPMCAST NLRI parameters";
                uses apply-advanced;
    
                container signaling {
                  presence "enable signaling";
                  description
                    "Include IPv6 BGP multicast signaling NLRI";
                  uses bgp-afi-default;
                }  // container signaling
              }  // container inet6-bgpmcast
            }  // container family
    
            leaf authentication-key {
              type string {
                length "1 .. 126";
              }
              description
                "MD5 authentication key";
            }
    
            leaf authentication-algorithm {
              junos:must "(".. authentication-key-chain")";
              junos:must-message "May not be configured without authentication-key-chain";
              junos:must "(!(".. authentication-key"))";
              junos:must-message "May not be configured with authentication-key";
              type enumeration {
                enum "md5" {
                  value 0;
                  description "Message Digest 5";
                }
                enum "hmac-sha-1-96" {
                  value 1;
                  description
                    "Hash-based Message Authentication Code (SHA1) (96 bits)";
                }
                enum "aes-128-cmac-96" {
                  value 2;
                  description
                    "Cipher-based Message Authentication Code (AES128) (96 bits)";
                }
                enum "ao" {
                  value 3;
                  description
                    "TCP Authentication Option";
                }
              }
              description
                "Authentication algorithm name";
            }
    
            leaf tcpao-handling-with-digest-mismatch {
              junos:must "(!(".. authentication-key"))";
              junos:must-message "May not be configured with authentication-key";
              type enumeration {
                enum "drop-if-no-tcpao" {
                  value 0;
                  description
                    "Drop the connection if Digest mismatched";
                }
                enum "allow-without-tcpao" {
                  value 1;
                  description
                    "Allow the connection establishment without TCP-AO";
                }
              }
              description
                "Drop or continue without TCP-AO with digest mismatch with TCP-AO";
            }
    
            leaf authentication-key-chain {
              junos:must "(!(".. authentication-key"))";
              junos:must-message "May not be configured with authentication-key";
              junos:must "("security authentication-key-chains key-chain $$")";
              junos:must-message "Referenced key-chain must be defined";
              type string {
                length "1 .. 128";
              }
              description "Key chain name";
            }
    
            leaf-list export {
              type jt:policy-algebra;
              ordered-by user;
              description "Export policy";
            }
    
            container remove-private {
              presence "enable remove-private";
              description
                "Remove well-known private AS numbers";
              uses apply-advanced;
    
              container all {
                presence "enable all";
                description
                  "Remove all private AS numbers and do not stop at the first public AS number";
                container replace {
                  presence "enable replace";
                  description
                    "Replace private AS numbers with the BGP Group's local AS number";
                  leaf nearest {
                    type empty;
                    description
                      "Use closest public AS number to replace a private AS number";
                  }
                }  // container replace
              }  // container all
    
              leaf no-peer-loop-check {
                type empty;
                description
                  "Remove peer loop-check";
              }
            }  // container remove-private
    
            leaf cluster {
              type jt:areaid;
              description "Cluster identifier";
            }
    
            leaf no-client-reflect {
              type empty;
              description
                "Disable intracluster route redistribution";
            }
    
            leaf peer-as {
              type string {
                junos:posix-pattern "^[0-9]+(.[0-9]+)?$";
                junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively";
              }
              description
                " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format";
            }
    
            container local-as {
              description
                "Local autonomous system number";
              leaf as-number {
                type string {
                  junos:posix-pattern "^[0-9]+(.[0-9]+)?$";
                  junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively";
                }
                description
                  " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format";
              }
    
              leaf loops {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type int32 {
                    range "1 .. 10";
                  }
                }
                description
                  "Maximum number of times this AS can be in an AS path";
              }
    
              leaf private {
                type empty;
                description
                  "Hide this local AS in paths learned from this peering";
              }
    
              leaf alias {
                type empty;
                description
                  "Treat this AS as an alias to the system AS";
              }
    
              leaf no-prepend-global-as {
                type empty;
                description
                  "Do not prepend global autonomous-system number in advertised paths";
              }
            }  // container local-as
    
            leaf ipsec-sa {
              junos:must "("security ipsec security-association $$")";
              junos:must-message "Referenced IPSec Security Association must be defined";
              type string {
                length "1 .. 32";
              }
              description "IPSec SA name";
            }
    
            container graceful-shutdown {
              description
                "BGP peer graceful shutdown option";
              uses apply-advanced;
    
              container receiver {
                presence "enable receiver";
                description
                  "BGP peer graceful-shutdown receiver";
                uses apply-advanced;
    
                leaf disable {
                  junos:must "(!(".. .. sender"))";
                  junos:must-message "Receiver cannot be disabled on Sender";
                  type empty;
                  description
                    "Disable graceful-shutdown receiver";
                }
    
                leaf local-preference {
                  type union {
                    type uint32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Value of receiver LOCAL_PREF path attribute";
                }
              }  // container receiver
    
              container sender {
                presence "enable sender";
                description
                  "BGP peer graceful-shutdown sender";
                uses apply-advanced;
    
                leaf local-preference {
                  type union {
                    type uint32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Value of sender LOCAL_PREF path attribute";
                }
              }  // container sender
            }  // container graceful-shutdown
    
            container shutdown {
              presence "enable shutdown";
              description "Shutdown";
              uses apply-advanced;
    
              leaf notify-message {
                type string;
                description
                  "Notification message";
              }
            }  // container shutdown
    
            leaf unconfigured-peer-graceful-restart {
              junos:must "(".. graceful-restart")";
              junos:must-message "unconfigured-peer-graceful-restart is only valid with 'graceful-restart'";
              type empty;
              description
                "BGP unconfigured peer graceful restart options";
            }
    
            container graceful-restart {
              presence "enable graceful-restart";
              description
                "BGP graceful restart options";
              uses apply-advanced;
    
              choice enable-disable {
                leaf disable {
                  type empty;
                  description
                    "Disable graceful restart";
                }
              }  // choice enable-disable
    
              leaf restart-time {
                junos:must "(("routing-options graceful-restart" || "fabric routing-options graceful-restart"))";
                junos:must-message "restart-time is only valid with 'routing-options graceful-restart'";
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 1800";
                  }
                }
                description
                  "Restart time used when negotiating with a peer";
              }
    
              leaf stale-routes-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 1800";
                  }
                }
                description
                  "Maximum time for which stale routes are kept";
              }
    
              container long-lived {
                description
                  "Long-lived graceful restart options";
                uses apply-advanced;
    
                container receiver {
                  description
                    "Long-lived graceful restart receiver (helper) options";
                  uses apply-advanced;
    
                  choice enable-disable {
                    leaf disable {
                      type empty;
                      description
                        "Disable receiver (helper) functionality";
                    }
                  }  // choice enable-disable
                }  // container receiver
    
                container advertise-to-non-llgr-neighbor {
                  presence
                    "enable advertise-to-non-llgr-neighbor";
                  description
                    "Advertise stale routes to non-LLGR neighbors";
                  uses apply-advanced;
    
                  leaf omit-no-export {
                    type empty;
                    description
                      "Do not attach no-export community to stale routes";
                  }
                }  // container advertise-to-non-llgr-neighbor
              }  // container long-lived
    
              leaf disable-notification-extensions {
                type empty;
                description
                  "Disable notification extensions";
              }
    
              leaf forwarding-state-bit {
                type enumeration {
                  enum "as-rr-client" {
                    value 0;
                    description
                      "As for a route reflector client";
                  }
                  enum "from-fib" {
                    value 1;
                    description
                      "Always use state of associated FIB(s)";
                  }
                }
                description
                  "Control forwarding-state flag negotiation";
              }
    
              leaf dont-help-shared-fate-bfd-down {
                type empty;
                description
                  "Honor BFD-Down(C=0) if GR-restart not in progress";
              }
            }  // container graceful-restart
    
            leaf include-mp-next-hop {
              type empty;
              description
                "Include NEXT-HOP attribute in multiprotocol updates";
            }
    
            leaf disable-4byte-as {
              type empty;
              description
                "Disable 4 byte AS capability advertisement";
            }
    
            container idle-after-switch-over {
              description
                "Stop peer session from coming up after nonstop-routing switch-over";
              choice idle-interval {
                leaf forever {
                  type empty;
                  description
                    "Idle the peer until the user intervenes";
                }
                leaf timeout {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 4294967295";
                    }
                  }
                  description
                    "Timeout value, in seconds, for starting peer after switch over";
                }
              }  // choice idle-interval
            }  // container idle-after-switch-over
    
            container outbound-route-filter {
              junos:must "(!("system processes routing bgp update-threading"))";
              junos:must-message "Can't be configured together with update-threading";
              description
                "Dynamically negotiated cooperative route filtering";
              uses apply-advanced;
    
              leaf bgp-orf-cisco-mode {
                type empty;
                description
                  "Using BGP ORF capability code 130 and Prefix ORF type 128";
              }
    
              container extended-community {
                status deprecated;
                description
                  "Extended community filtering";
                uses apply-advanced;
    
                choice accept-choice {
                  leaf accept {
                    type empty;
                    description
                      "Honor remote requests for extended community ORF";
                  }
                  leaf no-accept {
                    type empty;
                    description
                      "Don't honor remote requests for extended community ORF";
                  }
                }  // choice accept-choice
    
                leaf vrf-filter {
                  type empty;
                  description
                    "Request remote filtering using locally configured VRF import targets";
                }
              }  // container extended-community
    
              container prefix-based {
                presence "enable prefix-based";
                description
                  "Prefix-based outbound route filtering";
                uses apply-advanced;
    
                container accept {
                  presence "enable accept";
                  description
                    "Honor Prefix-based ORFs from remote peers";
                  uses apply-advanced;
    
                  leaf inet {
                    type empty;
                    description
                      "Honor IPv4 prefix filters";
                  }
    
                  leaf inet6 {
                    type empty;
                    description
                      "Honor IPv6 prefix filters";
                  }
                }  // container accept
              }  // container prefix-based
            }  // container outbound-route-filter
    
            container message-batching {
              status deprecated;
              description
                "DEPRECATED - Batching of outgoing messages";
              uses apply-advanced;
    
              choice enable-disable {
                leaf enable {
                  type empty;
                  description "Enable parameter";
                }
                leaf disable {
                  type empty;
                  description
                    "Disable parameter";
                }
              }  // choice enable-disable
    
              leaf interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "100 .. 1000";
                  }
                }
                units "milliseconds";
                default "250";
                description
                  "DEPRECATED - Interval over which to batch messages";
              }
            }  // container message-batching
    
            container multipath {
              presence "enable multipath";
              description
                "Allow load sharing among multiple BGP paths";
              uses apply-advanced;
    
              leaf disable {
                type empty;
                description "Disable Multipath";
              }
    
              leaf multiple-as {
                type empty;
                description
                  "Use paths received from different ASs";
              }
    
              leaf allow-protection {
                type empty;
                description
                  "Allow protection for multipath legs";
              }
    
              leaf pause-computation-during-churn {
                type empty;
                description
                  "Pause multipath job to absorb churn";
              }
    
              leaf list-nexthop {
                type empty;
                description
                  "Use List-NH for homogenous nexthop-set also";
              }
            }  // container multipath
    
            leaf tcp-mss {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 4096";
                }
              }
              description
                "Maximum TCP segment size";
            }
    
            leaf bgp-identifier {
              type jt:ipv4addr;
              description "BGP Identifier";
            }
    
            leaf tcp-aggressive-transmission {
              type empty;
              description
                "Enable aggressive transmission of pure TCP ACKs and retransmissions";
            }
    
            container bmp {
              description
                "Specific settings to override the routing-options settings";
              uses apply-advanced;
    
              leaf monitor {
                type enumeration {
                  enum "enable" {
                    value 0;
                    description
                      "Enable monitoring of BGP peer(s)";
                  }
                  enum "disable" {
                    value 1;
                    description
                      "Disable monitoring of BGP peer(s)";
                  }
                }
                description
                  "Enable/Disable monitoring";
              }
    
              container route-monitoring {
                description
                  "Control route monitoring settings";
                uses apply-advanced;
    
                leaf none {
                  junos:must "((!(".. pre-policy") && (!(".. post-policy") && !(".. rib-out"))))";
                  junos:must-message "May not be configured with pre-policy or post-policy or rib-out";
                  type empty;
                  description
                    "Do not send route monitoring messages";
                }
    
                container pre-policy {
                  presence "enable pre-policy";
                  description
                    "Send pre-policy route monitoring messages";
                  leaf exclude-non-feasible {
                    type empty;
                    description
                      "Exclude looped routes, etc";
                  }
                }  // container pre-policy
    
                container post-policy {
                  presence "enable post-policy";
                  description
                    "Send post-policy route monitoring messages";
                  leaf exclude-non-eligible {
                    type empty;
                    description
                      "Exclude unresolved routes, etc.";
                  }
                }  // container post-policy
    
                container rib-out {
                  junos:must "((!("system processes routing bgp update-threading") || "system processes routing bgp rib-sharding"))";
                  junos:must-message "Update threading can't be configured together with bmp rib-out monitoring";
                  presence "enable rib-out";
                  description
                    "Send adj-ribs-out route monitoring messages";
                  leaf pre-policy {
                    type empty;
                    description
                      "Send pre-policy adj-ribs-out route monitoring messages";
                  }
    
                  leaf post-policy {
                    type empty;
                    description
                      "Send post-policy adj-ribs-out route monitoring messages";
                  }
                }  // container rib-out
              }  // container route-monitoring
            }  // container bmp
    
            container advertise-bgp-static {
              presence
                "enable advertise-bgp-static";
              description
                "Advertise bgp-static routes";
              uses apply-advanced;
    
              leaf-list policy {
                type jt:policy-algebra;
                ordered-by user;
                description
                  "Static route advertisement policy";
              }
            }  // container advertise-bgp-static
    
            leaf add-path-display-ipv4-address {
              type empty;
              description
                "Display add-path path-id in IPv4 address format";
            }
    
            container bfd-liveness-detection {
              description
                "Bidirectional Forwarding Detection (BFD) options";
              uses apply-advanced;
    
              leaf version {
                type enumeration {
                  enum "0" {
                    value 0;
                    description
                      "BFD version 0 (deprecated)";
                  }
                  enum "1" {
                    value 1;
                    description "BFD version 1";
                  }
                  enum "automatic" {
                    value 2;
                    description
                      "Choose BFD version automatically";
                  }
                }
                default "automatic";
                description
                  "BFD protocol version number";
              }
    
              leaf minimum-interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 255000";
                  }
                }
                units "milliseconds";
                description
                  "Minimum transmit and receive interval";
              }
    
              leaf minimum-transmit-interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 255000";
                  }
                }
                units "milliseconds";
                status deprecated;
                description
                  "Minimum transmit interval";
              }
    
              leaf minimum-receive-interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 255000";
                  }
                }
                units "milliseconds";
                description
                  "Minimum receive interval";
              }
    
              leaf multiplier {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 255";
                  }
                }
                default "3";
                description
                  "Detection time multiplier";
              }
    
              choice adaptation-choice {
                leaf no-adaptation {
                  type empty;
                  description
                    "Disable adaptation";
                }
              }  // choice adaptation-choice
    
              container transmit-interval {
                description
                  "Transmit-interval options";
                uses apply-advanced;
    
                leaf minimum-interval {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 255000";
                    }
                  }
                  units "milliseconds";
                  description
                    "Minimum transmit interval";
                }
    
                leaf threshold {
                  type union {
                    type uint32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  units "milliseconds";
                  description
                    "High transmit interval triggering a trap";
                }
              }  // container transmit-interval
    
              container detection-time {
                description
                  "Detection-time options";
                uses apply-advanced;
    
                leaf threshold {
                  type union {
                    type uint32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  units "milliseconds";
                  description
                    "High detection-time triggering a trap";
                }
              }  // container detection-time
    
              container authentication {
                description
                  "Authentication options";
                uses apply-advanced;
    
                leaf key-chain {
                  junos:must "(".. algorithm")";
                  junos:must-message "May not be configured without algorithm";
                  junos:must "("security authentication-key-chains key-chain $$")";
                  junos:must-message "Referenced key-chain must be defined";
                  type string;
                  description "Key chain name";
                }
    
                leaf algorithm {
                  junos:must "(".. key-chain")";
                  junos:must-message "May not be configured without key-chain";
                  type enumeration {
                    enum "simple-password" {
                      value 0;
                      description
                        "Simple password";
                    }
                    enum "keyed-md5" {
                      value 1;
                      description
                        "Keyed message Digest 5";
                    }
                    enum "meticulous-keyed-md5" {
                      value 2;
                      description
                        "Meticulous keyed message Digest 5";
                    }
                    enum "keyed-sha-1" {
                      value 3;
                      description
                        "Keyed secure hash algorithm (SHA1) ";
                    }
                    enum
                      "meticulous-keyed-sha-1" {
                      value 4;
                      description
                        "Meticulous keyed secure hash algorithm (SHA1) ";
                    }
                  }
                  description "Algorithm name";
                }
    
                leaf loose-check {
                  type empty;
                  description
                    "Verify authentication only if authentication is negotiated";
                }
              }  // container authentication
    
              leaf session-mode {
                type enumeration {
                  enum "automatic" {
                    value 0;
                    description
                      "Choose session-mode automatically";
                  }
                  enum "single-hop" {
                    value 1;
                    description "Use single-hop";
                  }
                  enum "multihop" {
                    value 2;
                    description "Use multihop";
                  }
                }
                default "automatic";
                description
                  "BFD single-hop or multihop session-mode";
              }
    
              leaf holddown-interval {
                junos:must "(!(".. .. type internal"))";
                junos:must-message "bfd holddown-interval is only valid for EBGP.";
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 255000";
                  }
                }
                units "milliseconds";
                description
                  "Time to hold the session-UP notification to the client";
              }
            }  // container bfd-liveness-detection
    
            leaf as-override {
              type empty;
              description
                "Replace neighbor AS number with our AS number";
            }
    
            leaf-list allow {
              type jt:ipprefix;
              ordered-by user;
              description
                "Configure peer connections for specific networks";
            }
    
            list dynamic-neighbor {
              key "name";
              ordered-by user;
              description
                "Configure peer options for specific networks";
              leaf name {
                junos:must "((".. allow" || ".. peer-auto-discovery"))";
                junos:must-message "dynamic-neighbor must enable allow or peer-auto-discovery";
                type string;
                description "Template name";
              }
    
              uses apply-advanced;
    
              leaf-list allow {
                type jt:ipprefix;
                ordered-by user;
                description
                  "Configure peer connections for specific networks";
              }
    
              leaf authentication-key {
                type string {
                  length "1 .. 126";
                }
                description
                  "MD5 authentication key";
              }
    
              leaf authentication-algorithm {
                junos:must "(".. authentication-key-chain")";
                junos:must-message "May not be configured without authentication-key-chain";
                junos:must "(!(".. authentication-key"))";
                junos:must-message "May not be configured with authentication-key";
                type enumeration {
                  enum "md5" {
                    value 0;
                    description
                      "Message Digest 5";
                  }
                  enum "hmac-sha-1-96" {
                    value 1;
                    description
                      "Hash-based Message Authentication Code (SHA1) (96 bits)";
                  }
                  enum "aes-128-cmac-96" {
                    value 2;
                    description
                      "Cipher-based Message Authentication Code (AES128) (96 bits)";
                  }
                  enum "ao" {
                    value 3;
                    description
                      "TCP Authentication Option";
                  }
                }
                description
                  "Authentication algorithm name";
              }
    
              leaf tcpao-handling-with-digest-mismatch {
                junos:must "(!(".. authentication-key"))";
                junos:must-message "May not be configured with authentication-key";
                type enumeration {
                  enum "drop-if-no-tcpao" {
                    value 0;
                    description
                      "Drop the connection if Digest mismatched";
                  }
                  enum "allow-without-tcpao" {
                    value 1;
                    description
                      "Allow the connection establishment without TCP-AO";
                  }
                }
                description
                  "Drop or continue without TCP-AO with digest mismatch with TCP-AO";
              }
    
              leaf authentication-key-chain {
                junos:must "(!(".. authentication-key"))";
                junos:must-message "May not be configured with authentication-key";
                junos:must "("security authentication-key-chains key-chain $$")";
                junos:must-message "Referenced key-chain must be defined";
                type string {
                  length "1 .. 128";
                }
                description "Key chain name";
              }
    
              container peer-auto-discovery {
                junos:must "((!(".. authentication-algorithm") && (!(".. .. authentication-algorithm") && !(".. .. .. authentication-algorithm"))))";
                junos:must-message "Can't be configured along with authentication-algorithm";
                junos:must "((!(".. authentication-key") && (!(".. .. authentication-key") && !(".. .. .. authentication-key"))))";
                junos:must-message "Can't be configured along with authentication-key";
                junos:must "(!(".. allow"))";
                junos:must-message "peer-auto-discovery and allow cannot be configured in the same dynamic-neighbor";
                junos:must "((!(".. .. type internal") && !(".. .. multihop")))";
                junos:must-message "peer-auto-discovery is valid only for single-hop EBGP neighbor";
                description
                  "Configure auto-discovery options for BGP neighbors";
                uses apply-advanced;
    
                container family {
                  description
                    "Address family based neighbor auto-discovery parameters";
                  container inet6 {
                    uses apply-advanced;
    
                    choice auto-discovery-type {
                      container ipv6-nd {
                        presence
                          "enable ipv6-nd";
                        description
                          "Use ipv6 neighbor discovery to learn neighbor address";
                      }  // container ipv6-nd
                    }  // choice auto-discovery-type
                  }  // container inet6
                }  // container family
    
                list interface {
                  key "name";
                  leaf name {
                    type union {
                      type jt:interface-name;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Configure interfaces over which to discover bgp neighbors";
                  }
    
                  uses apply-advanced;
    
                  choice enable-disable {
                    leaf disable {
                      type empty;
                      description
                        "Disable peer discovery on interface";
                    }
                  }  // choice enable-disable
                }  // list interface
              }  // container peer-auto-discovery
            }  // list dynamic-neighbor
    
            container optimal-route-reflection {
              junos:must "(".. type internal")";
              junos:must-message "Must be configured with type internal";
              description
                "Enable optimal route reflection for this client group";
              uses apply-advanced;
    
              leaf igp-primary {
                type jt:ipv4addr;
                description
                  "Primary node identifier for this client group";
              }
    
              leaf igp-backup {
                type jt:ipv4addr;
                description
                  "Backup node identifier for this client group";
              }
            }  // container optimal-route-reflection
    
            leaf peer-as-list {
              junos:must "((".. allow" || ".. dynamic-neighbor"))";
              junos:must-message "May be configured only with allow or dynamic-neighbor";
              type string;
              description
                "Configure list of peer autonomous systems for unconfigured neighbors";
            }
    
            leaf mvpn-iana-rt-import {
              type empty;
              status deprecated;
              description
                "Use IANA assigned rt-import type value for MVPN";
            }
    
            list neighbor {
              key "name";
              ordered-by user;
              description "Configure a neighbor";
              leaf name {
                type jt:ipaddr-scoped;
              }
    
              uses apply-advanced;
    
              container traceoptions {
                description
                  "Trace options for BGP";
                uses apply-advanced;
    
                container file {
                  description
                    "Trace file options";
                  leaf filename {
                    type string {
                      junos:posix-pattern "![/ %]";
                      junos:pattern-message "Must not contain '/', % or a space";
                      length "1 .. 1024";
                    }
                    description
                      "Name of file in which to write trace information";
                  }
    
                  leaf replace {
                    type empty;
                    status deprecated;
                    description
                      "Replace trace file rather than appending to it";
                  }
    
                  leaf size {
                    type string;
                    description
                      "Maximum trace file size";
                  }
    
                  leaf files {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "2 .. 1000";
                      }
                    }
                    default "10";
                    description
                      "Maximum number of trace files";
                  }
    
                  leaf no-stamp {
                    type empty;
                    status deprecated;
                    description
                      "Do not timestamp trace file";
                  }
    
                  choice world-readable-choice {
                    leaf world-readable {
                      type empty;
                      description
                        "Allow any user to read the log file";
                    }
                    leaf no-world-readable {
                      type empty;
                      description
                        "Don't allow any user to read the log file";
                    }
                  }  // choice world-readable-choice
                }  // container file
    
                list flag {
                  key "name";
                  ordered-by user;
                  description
                    "Tracing parameters";
                  leaf name {
                    type enumeration {
                      enum "damping" {
                        value 0;
                        description
                          "Trace BGP damping information";
                      }
                      enum "packets" {
                        value 1;
                        description
                          "Trace all BGP protocol packets";
                      }
                      enum "open" {
                        value 2;
                        description
                          "Trace BGP open packets";
                      }
                      enum "update" {
                        value 3;
                        description
                          "Trace BGP update packets";
                      }
                      enum "keepalive" {
                        value 4;
                        description
                          "Trace BGP keepalive packets";
                      }
                      enum "refresh" {
                        value 5;
                        description
                          "Trace BGP refresh packets";
                      }
                      enum "nsr-synchronization" {
                        value 6;
                        description
                          "Trace NSR synchronization events";
                      }
                      enum "bfd" {
                        value 7;
                        description
                          "Trace BFD events";
                      }
                      enum "4byte-as" {
                        value 8;
                        description
                          "Trace 4 byte AS events";
                      }
                      enum "add-path" {
                        value 9;
                        description
                          "Trace add-path events";
                      }
                      enum "graceful-restart" {
                        value 10;
                        description
                          "Trace Graceful Restart events";
                      }
                      enum "egress-te" {
                        value 11;
                        description
                          "Egress Peering Traffic-Engineering events";
                      }
                      enum "thread-io" {
                        value 12;
                        description
                          "Trace threaded I/O processing";
                      }
                      enum "sharding" {
                        value 13;
                        description
                          "Trace BGP rib sharding";
                      }
                      enum "thread-update-io" {
                        value 14;
                        description
                          "Trace threaded update I/O processing";
                      }
                      enum "route-validation" {
                        value 15;
                        description
                          "Trace route validation";
                      }
                      enum "ipsec" {
                        value 16;
                        description
                          "Trace ipsec";
                      }
                      enum "route" {
                        value 17;
                        description
                          "Trace routing information";
                      }
                      enum "normal" {
                        value 18;
                        description
                          "Trace normal events";
                      }
                      enum "general" {
                        value 19;
                        description
                          "Trace general events";
                      }
                      enum "state" {
                        value 20;
                        description
                          "Trace state transitions";
                      }
                      enum "policy" {
                        value 21;
                        description
                          "Trace policy processing";
                      }
                      enum "task" {
                        value 22;
                        description
                          "Trace routing protocol task processing";
                      }
                      enum "timer" {
                        value 23;
                        description
                          "Trace routing protocol timer processing";
                      }
                      enum "all" {
                        value 24;
                        description
                          "Trace everything";
                      }
                    }
                  }
    
                  leaf send {
                    type empty;
                    description
                      "Trace transmitted packets";
                  }
    
                  leaf receive {
                    type empty;
                    description
                      "Trace received packets";
                  }
    
                  leaf detail {
                    type empty;
                    description
                      "Trace detailed information";
                  }
    
                  leaf disable {
                    type empty;
                    description
                      "Disable this trace flag";
                  }
    
                  container filter {
                    presence "enable filter";
                    description
                      "Filter to apply to this flag";
                    uses bgp_filter_obj;
                  }  // container filter
                }  // list flag
              }  // container traceoptions
    
              leaf description {
                type string {
                  length "1 .. 255";
                }
                description "Text description";
              }
    
              container metric-out {
                description
                  "Route metric sent in MED";
                choice metric_param {
                  leaf metric-value {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 4294967295";
                      }
                    }
                    description "Metric value";
                  }
                  container minimum-igp {
                    presence
                      "enable minimum-igp";
                    description
                      "Track the minimum IGP metric";
                    leaf metric-offset {
                      type union {
                        type int32;
                        type string {
                          pattern "<.*>|$.*";
                        }
                      }
                      description
                        "Metric offset for MED";
                    }
                  }  // container minimum-igp
                  container igp {
                    presence "enable igp";
                    description
                      "Track the IGP metric";
                    leaf metric-offset {
                      type union {
                        type int32;
                        type string {
                          pattern "<.*>|$.*";
                        }
                      }
                      description
                        "Metric offset for MED";
                    }
    
                    leaf delay-med-update {
                      type empty;
                      description
                        "Delay updating MED when IGP metric increases";
                    }
                  }  // container igp
                  container effective-aigp {
                    presence
                      "enable effective-aigp";
                    description
                      "Track the effective AIGP metric";
                    leaf metric-offset {
                      type union {
                        type int32;
                        type string {
                          pattern "<.*>|$.*";
                        }
                      }
                      description
                        "Metric offset for MED";
                    }
                  }  // container effective-aigp
                  container minimum-effective-aigp {
                    presence
                      "enable minimum-effective-aigp";
                    description
                      "Track the minimum effective AIGP metric";
                    leaf metric-offset {
                      type union {
                        type int32;
                        type string {
                          pattern "<.*>|$.*";
                        }
                      }
                      description
                        "Metric offset for MED";
                    }
                  }  // container minimum-effective-aigp
                }  // choice metric_param
              }  // container metric-out
    
              container multihop {
                presence "enable multihop";
                description
                  "Configure an EBGP multihop session";
                uses apply-advanced;
    
                leaf ttl {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint8 {
                      range "1 .. 255";
                    }
                  }
                  description
                    "TTL value for the session";
                }
    
                leaf no-nexthop-change {
                  type empty;
                  description
                    "Do not change next hop to self in advertisements";
                }
              }  // container multihop
    
              leaf route-server-client {
                type empty;
                description
                  "Enable route server client behavior";
              }
    
              leaf accept-remote-nexthop {
                type empty;
                description
                  "Allow import policy to specify a non-directly connected next-hop";
              }
    
              leaf preference {
                type union {
                  type uint32;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                description "Preference value";
              }
    
              leaf local-preference {
                type union {
                  type uint32;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                description
                  "Value of LOCAL_PREF path attribute";
              }
    
              leaf local-address {
                type jt:ipaddr;
                description
                  "Address of local end of BGP session";
              }
    
              leaf local-interface {
                type union {
                  type jt:interface-name;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                description
                  "Local interface for IPv6 link local EBGP peering";
              }
    
              leaf forwarding-context {
                type string {
                  junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                  junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                }
                description
                  "Routing-instance used for data-forwarding and transport-session";
              }
    
              leaf hold-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 65535";
                  }
                }
                description
                  "Hold time used when negotiating with a peer";
              }
    
              leaf minimum-hold-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "3 .. 65535";
                  }
                }
                description
                  "Minimum hold time accepted from the peer";
              }
    
              leaf passive {
                type empty;
                description
                  "Do not send open messages to a peer";
              }
    
              leaf advertise-inactive {
                type empty;
                description
                  "Advertise inactive routes";
              }
    
              choice advertise-peer-as-choice {
                leaf advertise-peer-as {
                  type empty;
                  description
                    "Advertise routes received from the same autonomous system";
                }
                leaf no-advertise-peer-as {
                  type empty;
                  description
                    "Don't advertise routes received from the same autonomous system";
                }
              }  // choice advertise-peer-as-choice
    
              container advertise-external {
                presence
                  "enable advertise-external";
                description
                  "Advertise best external routes";
                leaf conditional {
                  type empty;
                  description
                    "Route matches active route upto med-comparison rule";
                }
              }  // container advertise-external
    
              leaf keep {
                type enumeration {
                  enum "all" {
                    value 0;
                    description
                      "Retain all routes";
                  }
                  enum "none" {
                    value 1;
                    description
                      "Retain no routes";
                  }
                }
                description
                  "How to retain routes in the routing table";
              }
    
              leaf rfc6514-compliant-safi129 {
                type empty;
                description
                  "Compliant with RFC6514 SAFI129 format";
              }
    
              leaf no-aggregator-id {
                type empty;
                description
                  "Set router ID in aggregator path attribute to 0";
              }
    
              leaf mtu-discovery {
                type empty;
                description
                  "Enable TCP path MTU discovery";
              }
    
              leaf enforce-first-as {
                type empty;
                description
                  "Enforce first AS in AS-path is the neighbor's AS";
              }
    
              leaf out-delay {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 65535";
                  }
                }
                description
                  "How long before exporting routes from routing table";
              }
    
              leaf ttl {
                junos:must "((!(".. .. type internal") && !(".. multihop")))";
                junos:must-message "This option is valid only for single-hop EBGP neighbor";
                type enumeration {
                  enum "1" {
                    value 0;
                  }
                  enum "255" {
                    value 1;
                  }
                }
                description
                  "TTL value for the single-hop peer";
              }
    
              leaf log-updown {
                type empty;
                description
                  "Log a message for peer state transitions";
              }
    
              leaf damping {
                type empty;
                description
                  "Enable route flap damping";
              }
    
              leaf-list import {
                type jt:policy-algebra;
                ordered-by user;
                description "Import policy";
              }
    
              leaf-list nlri {
                type enumeration {
                  enum "unicast" {
                    value 0;
                    status deprecated;
                    description
                      "Include unicast NLRI";
                  }
                  enum "multicast" {
                    value 1;
                    status deprecated;
                    description
                      "Include multicast NLRI";
                  }
                  enum "any" {
                    value 2;
                    status deprecated;
                    description
                      "Include any kind of NLRI";
                  }
                }
                ordered-by user;
                status deprecated;
                description
                  "NLRI type to include in updates";
              }
    
              container bgp-error-tolerance {
                presence
                  "enable bgp-error-tolerance";
                description
                  "Handle BGP malformed updates softly";
                uses apply-advanced;
    
                leaf malformed-update-log-interval {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "10 .. 65535";
                    }
                  }
                  units "seconds";
                  default "300";
                  description
                    "Time used when logging malformed update";
                }
    
                choice malformed-routes-limit-choice {
                  leaf malformed-route-limit {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 4294967295";
                      }
                    }
                    default "1000";
                    description
                      "Maximum number of malformed routes from a peer";
                  }
                  leaf no-malformed-route-limit {
                    type empty;
                    description
                      "No malformed route limit";
                  }
                }  // choice malformed-routes-limit-choice
              }  // container bgp-error-tolerance
    
              container family {
                description
                  "Protocol family for NLRIs in updates";
                uses apply-advanced;
    
                container inet {
                  description
                    "IPv4 NLRI parameters";
                  uses apply-advanced;
    
                  container labeled-unicast {
                    presence
                      "enable labeled-unicast";
                    description
                      "Include labeled unicast NLRI";
                    uses bgp-afi-labeled;
                  }  // container labeled-unicast
    
                  container segment-routing-te {
                    presence
                      "enable segment-routing-te";
                    description
                      "Include segment-routing TE policy";
                    uses bgp-afi-srte;
                  }  // container segment-routing-te
    
                  container transport {
                    presence "enable transport";
                    description
                      "Include Classful Transport NLRI";
                    uses bgp-afi-inet-transport;
                  }  // container transport
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-topo;
                  }  // container unicast
    
                  container multicast {
                    presence "enable multicast";
                    description
                      "Include multicast NLRI";
                    uses bgp-afi-default;
                  }  // container multicast
    
                  container flow {
                    presence "enable flow";
                    description
                      "Include flow NLRI";
                    uses bgp-afi-flow-with-redirect-ip-action;
                  }  // container flow
    
                  container any {
                    presence "enable any";
                    description
                      "Include unicast or multicast NLRI";
                    uses bgp-afi-default;
                  }  // container any
                }  // container inet
    
                container inet-vpn {
                  description
                    "IPv4 Layer 3 VPN NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-l3vpn;
                  }  // container unicast
    
                  container multicast {
                    presence "enable multicast";
                    description
                      "Include multicast NLRI";
                    uses bgp-afi-vpn;
                  }  // container multicast
    
                  container flow {
                    presence "enable flow";
                    description
                      "Include flow VPN NLRI";
                    uses bgp-afi-flow-with-redirect-ip-action;
                  }  // container flow
    
                  container any {
                    presence "enable any";
                    description
                      "Include unicast or multicast NLRI";
                    uses bgp-afi-vpn;
                  }  // container any
                }  // container inet-vpn
    
                container inet6 {
                  description
                    "IPv6 NLRI parameters";
                  uses apply-advanced;
    
                  container labeled-unicast {
                    presence
                      "enable labeled-unicast";
                    description
                      "Include labeled unicast NLRI";
                    uses bgp-afi-inet6-labeled;
                  }  // container labeled-unicast
    
                  container segment-routing-te {
                    presence
                      "enable segment-routing-te";
                    description
                      "Include segment-routing TE policy";
                    uses bgp-afi-srte;
                  }  // container segment-routing-te
    
                  container transport {
                    presence "enable transport";
                    description
                      "Include Classful Transport NLRI";
                    uses bgp-afi-inet6-transport;
                  }  // container transport
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-topo;
                  }  // container unicast
    
                  container multicast {
                    presence "enable multicast";
                    description
                      "Include multicast NLRI";
                    uses bgp-afi-default;
                  }  // container multicast
    
                  container flow {
                    presence "enable flow";
                    description
                      "Include flow NLRI";
                    uses bgp-afi-flow;
                  }  // container flow
    
                  container any {
                    presence "enable any";
                    description
                      "Include unicast or multicast NLRI";
                    uses bgp-afi-default;
                  }  // container any
                }  // container inet6
    
                container inet6-vpn {
                  description
                    "IPv6 Layer 3 VPN NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-l3vpn;
                  }  // container unicast
    
                  container multicast {
                    presence "enable multicast";
                    description
                      "Include multicast NLRI";
                    uses bgp-afi-vpn;
                  }  // container multicast
    
                  container flow {
                    presence "enable flow";
                    description
                      "Include flow VPN NLRI";
                    uses bgp-afi-flow;
                  }  // container flow
    
                  container any {
                    presence "enable any";
                    description
                      "Include unicast or multicast NLRI";
                    uses bgp-afi-vpn;
                  }  // container any
                }  // container inet6-vpn
    
                container iso-vpn {
                  description
                    "ISO Layer 3 VPN NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-vpn-protection;
                  }  // container unicast
                }  // container iso-vpn
    
                container l2vpn {
                  description
                    "MPLS-based Layer 2 VPN and VPLS NLRI parameters";
                  uses apply-advanced;
    
                  container auto-discovery-only {
                    presence
                      "enable auto-discovery-only";
                    description
                      "Include auto-discovery NLRI for LDP Layer 2 VPN and VPLS";
                    uses bgp-afi-default;
                  }  // container auto-discovery-only
    
                  container auto-discovery-mspw {
                    presence
                      "enable auto-discovery-mspw";
                    description
                      "Include auto-discovery NLRI for LDP Signalled MultiSegment PW";
                    uses bgp-afi-default;
                  }  // container auto-discovery-mspw
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include Layer 2 VPN and VPLS signaling NLRI";
                    uses bgp-afi-l2vpn;
                  }  // container signaling
                }  // container l2vpn
    
                container evpn {
                  description
                    "EVPN NLRI parameters";
                  uses apply-advanced;
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include EVPN signaling NLRI";
                    uses bgp-afi-default;
                  }  // container signaling
                }  // container evpn
    
                container inet-mvpn {
                  description
                    "IPv4 MVPN NLRI parameters";
                  uses apply-advanced;
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include IPv4 multicast VPN signaling NLRI";
                    uses bgp-afi-default;
                  }  // container signaling
                }  // container inet-mvpn
    
                container inet6-mvpn {
                  description
                    "IPv6 MVPN NLRI parameters";
                  uses apply-advanced;
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include IPv6 multicast VPN signaling NLRI";
                    uses bgp-afi-default;
                  }  // container signaling
                }  // container inet6-mvpn
    
                container inet-mdt {
                  description
                    "IPv4 Multicast Distribution Tree (MDT) NLRI parameters";
                  uses apply-advanced;
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include IPv4 multicast VPN auto-discovery NLRI";
                    uses bgp-afi-default;
                  }  // container signaling
                }  // container inet-mdt
    
                container traffic-engineering {
                  description
                    "Traffic Engineering (BGP-TE) NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include BGP-TE NLRI";
                    uses bgp-afi-default;
                  }  // container unicast
                }  // container traffic-engineering
    
                container route-target {
                  presence "enable route-target";
                  description
                    "Route target NLRI used for VPN route filtering";
                  uses apply-advanced;
    
                  container prefix-limit {
                    description
                      "Limit maximum number of prefixes from a peer";
                    uses bgpaf-prefix-limit;
                  }  // container prefix-limit
    
                  container accepted-prefix-limit {
                    description
                      "Limit maximum number of prefixes accepted from a peer";
                    uses bgpaf-accepted-prefix-limit;
                  }  // container accepted-prefix-limit
    
                  container proxy-generate {
                    presence
                      "enable proxy-generate";
                    description
                      "Generate route target NLRI for peers that don't support it";
                    uses apply-advanced;
    
                    leaf-list route-target-policy {
                      type jt:policy-algebra;
                      ordered-by user;
                      description
                        "Limit VPN routes that are used to generate proxy route-target filters";
                    }
                  }  // container proxy-generate
    
                  leaf external-paths {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 256";
                      }
                    }
                    description
                      "Number of external paths accepted for route filtering";
                  }
    
                  leaf advertise-default {
                    type empty;
                    description
                      "Advertise default and suppress more specific routes";
                  }
    
                  leaf damping {
                    type empty;
                    description
                      "Enable route flap damping";
                  }
    
                  container graceful-restart {
                    description
                      "BGP graceful restart options";
                    uses bgp-af-gr;
                  }  // container graceful-restart
    
                  leaf local-ipv4-address {
                    type jt:ipv4addr;
                    description
                      "Local IPv4 address";
                  }
    
                  container output-queue-priority {
                    description
                      "Default output-queue to assign updates to";
                    uses bgp-output-queue-priority-class;
                  }  // container output-queue-priority
    
                  container route-refresh-priority {
                    description
                      "Default output-queue to assign route refreshes to";
                    uses bgp-output-queue-priority-class;
                  }  // container route-refresh-priority
    
                  container withdraw-priority {
                    description
                      "Default output-queue to assign withdrawn routes to";
                    uses bgp-output-queue-priority-class;
                  }  // container withdraw-priority
                }  // container route-target
    
                container fabric {
                  status deprecated;
                  description
                    "Fabric NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-default;
                  }  // container unicast
                }  // container fabric
    
                container bridge {
                  status deprecated;
                  description
                    "Bridge NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-default;
                  }  // container unicast
                }  // container bridge
    
                container bridge-vpn {
                  status deprecated;
                  description
                    "Bridge VPN NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-vpn;
                  }  // container unicast
                }  // container bridge-vpn
    
                container fabric-vpn {
                  status deprecated;
                  description
                    "Fabric VPN NLRI parameters";
                  uses apply-advanced;
    
                  container unicast {
                    presence "enable unicast";
                    description
                      "Include unicast NLRI";
                    uses bgp-afi-vpn;
                  }  // container unicast
                }  // container fabric-vpn
    
                container inet-bgpmcast {
                  description
                    "IPv4 BGPMCAST NLRI parameters";
                  uses apply-advanced;
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include IPv4 BGP multicast signaling NLRI";
                    uses bgp-afi-default;
                  }  // container signaling
                }  // container inet-bgpmcast
    
                container inet6-bgpmcast {
                  description
                    "IPv6 BGPMCAST NLRI parameters";
                  uses apply-advanced;
    
                  container signaling {
                    presence "enable signaling";
                    description
                      "Include IPv6 BGP multicast signaling NLRI";
                    uses bgp-afi-default;
                  }  // container signaling
                }  // container inet6-bgpmcast
              }  // container family
    
              leaf authentication-key {
                type string {
                  length "1 .. 126";
                }
                description
                  "MD5 authentication key";
              }
    
              leaf authentication-algorithm {
                junos:must "(".. authentication-key-chain")";
                junos:must-message "May not be configured without authentication-key-chain";
                junos:must "(!(".. authentication-key"))";
                junos:must-message "May not be configured with authentication-key";
                type enumeration {
                  enum "md5" {
                    value 0;
                    description
                      "Message Digest 5";
                  }
                  enum "hmac-sha-1-96" {
                    value 1;
                    description
                      "Hash-based Message Authentication Code (SHA1) (96 bits)";
                  }
                  enum "aes-128-cmac-96" {
                    value 2;
                    description
                      "Cipher-based Message Authentication Code (AES128) (96 bits)";
                  }
                  enum "ao" {
                    value 3;
                    description
                      "TCP Authentication Option";
                  }
                }
                description
                  "Authentication algorithm name";
              }
    
              leaf tcpao-handling-with-digest-mismatch {
                junos:must "(!(".. authentication-key"))";
                junos:must-message "May not be configured with authentication-key";
                type enumeration {
                  enum "drop-if-no-tcpao" {
                    value 0;
                    description
                      "Drop the connection if Digest mismatched";
                  }
                  enum "allow-without-tcpao" {
                    value 1;
                    description
                      "Allow the connection establishment without TCP-AO";
                  }
                }
                description
                  "Drop or continue without TCP-AO with digest mismatch with TCP-AO";
              }
    
              leaf authentication-key-chain {
                junos:must "(!(".. authentication-key"))";
                junos:must-message "May not be configured with authentication-key";
                junos:must "("security authentication-key-chains key-chain $$")";
                junos:must-message "Referenced key-chain must be defined";
                type string {
                  length "1 .. 128";
                }
                description "Key chain name";
              }
    
              leaf-list export {
                type jt:policy-algebra;
                ordered-by user;
                description "Export policy";
              }
    
              container remove-private {
                presence "enable remove-private";
                description
                  "Remove well-known private AS numbers";
                uses apply-advanced;
    
                container all {
                  presence "enable all";
                  description
                    "Remove all private AS numbers and do not stop at the first public AS number";
                  container replace {
                    presence "enable replace";
                    description
                      "Replace private AS numbers with the BGP Group's local AS number";
                    leaf nearest {
                      type empty;
                      description
                        "Use closest public AS number to replace a private AS number";
                    }
                  }  // container replace
                }  // container all
    
                leaf no-peer-loop-check {
                  type empty;
                  description
                    "Remove peer loop-check";
                }
              }  // container remove-private
    
              leaf cluster {
                type jt:areaid;
                description "Cluster identifier";
              }
    
              leaf no-client-reflect {
                type empty;
                description
                  "Disable intracluster route redistribution";
              }
    
              leaf peer-as {
                type string {
                  junos:posix-pattern "^[0-9]+(.[0-9]+)?$";
                  junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively";
                }
                description
                  " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format";
              }
    
              container local-as {
                description
                  "Local autonomous system number";
                leaf as-number {
                  type string {
                    junos:posix-pattern "^[0-9]+(.[0-9]+)?$";
                    junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively";
                  }
                  description
                    " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format";
                }
    
                leaf loops {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type int32 {
                      range "1 .. 10";
                    }
                  }
                  description
                    "Maximum number of times this AS can be in an AS path";
                }
    
                leaf private {
                  type empty;
                  description
                    "Hide this local AS in paths learned from this peering";
                }
    
                leaf alias {
                  type empty;
                  description
                    "Treat this AS as an alias to the system AS";
                }
    
                leaf no-prepend-global-as {
                  type empty;
                  description
                    "Do not prepend global autonomous-system number in advertised paths";
                }
              }  // container local-as
    
              leaf ipsec-sa {
                junos:must "("security ipsec security-association $$")";
                junos:must-message "Referenced IPSec Security Association must be defined";
                type string {
                  length "1 .. 32";
                }
                description "IPSec SA name";
              }
    
              container graceful-shutdown {
                description
                  "BGP peer graceful shutdown option";
                uses apply-advanced;
    
                container receiver {
                  presence "enable receiver";
                  description
                    "BGP peer graceful-shutdown receiver";
                  uses apply-advanced;
    
                  leaf disable {
                    junos:must "(!(".. .. sender"))";
                    junos:must-message "Receiver cannot be disabled on Sender";
                    type empty;
                    description
                      "Disable graceful-shutdown receiver";
                  }
    
                  leaf local-preference {
                    type union {
                      type uint32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Value of receiver LOCAL_PREF path attribute";
                  }
                }  // container receiver
    
                container sender {
                  presence "enable sender";
                  description
                    "BGP peer graceful-shutdown sender";
                  uses apply-advanced;
    
                  leaf local-preference {
                    type union {
                      type uint32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Value of sender LOCAL_PREF path attribute";
                  }
                }  // container sender
              }  // container graceful-shutdown
    
              container shutdown {
                presence "enable shutdown";
                description "Shutdown";
                uses apply-advanced;
    
                leaf notify-message {
                  type string;
                  description
                    "Notification message";
                }
              }  // container shutdown
    
              leaf unconfigured-peer-graceful-restart {
                junos:must "(".. graceful-restart")";
                junos:must-message "unconfigured-peer-graceful-restart is only valid with 'graceful-restart'";
                type empty;
                description
                  "BGP unconfigured peer graceful restart options";
              }
    
              container graceful-restart {
                presence
                  "enable graceful-restart";
                description
                  "BGP graceful restart options";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    description
                      "Disable graceful restart";
                  }
                }  // choice enable-disable
    
                leaf restart-time {
                  junos:must "(("routing-options graceful-restart" || "fabric routing-options graceful-restart"))";
                  junos:must-message "restart-time is only valid with 'routing-options graceful-restart'";
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 1800";
                    }
                  }
                  description
                    "Restart time used when negotiating with a peer";
                }
    
                leaf stale-routes-time {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 1800";
                    }
                  }
                  description
                    "Maximum time for which stale routes are kept";
                }
    
                container long-lived {
                  description
                    "Long-lived graceful restart options";
                  uses apply-advanced;
    
                  container receiver {
                    description
                      "Long-lived graceful restart receiver (helper) options";
                    uses apply-advanced;
    
                    choice enable-disable {
                      leaf disable {
                        type empty;
                        description
                          "Disable receiver (helper) functionality";
                      }
                    }  // choice enable-disable
                  }  // container receiver
    
                  container advertise-to-non-llgr-neighbor {
                    presence
                      "enable advertise-to-non-llgr-neighbor";
                    description
                      "Advertise stale routes to non-LLGR neighbors";
                    uses apply-advanced;
    
                    leaf omit-no-export {
                      type empty;
                      description
                        "Do not attach no-export community to stale routes";
                    }
                  }  // container advertise-to-non-llgr-neighbor
                }  // container long-lived
    
                leaf disable-notification-extensions {
                  type empty;
                  description
                    "Disable notification extensions";
                }
    
                leaf forwarding-state-bit {
                  type enumeration {
                    enum "as-rr-client" {
                      value 0;
                      description
                        "As for a route reflector client";
                    }
                    enum "from-fib" {
                      value 1;
                      description
                        "Always use state of associated FIB(s)";
                    }
                  }
                  description
                    "Control forwarding-state flag negotiation";
                }
    
                leaf dont-help-shared-fate-bfd-down {
                  type empty;
                  description
                    "Honor BFD-Down(C=0) if GR-restart not in progress";
                }
              }  // container graceful-restart
    
              leaf include-mp-next-hop {
                type empty;
                description
                  "Include NEXT-HOP attribute in multiprotocol updates";
              }
    
              leaf disable-4byte-as {
                type empty;
                description
                  "Disable 4 byte AS capability advertisement";
              }
    
              container idle-after-switch-over {
                description
                  "Stop peer session from coming up after nonstop-routing switch-over";
                choice idle-interval {
                  leaf forever {
                    type empty;
                    description
                      "Idle the peer until the user intervenes";
                  }
                  leaf timeout {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 4294967295";
                      }
                    }
                    description
                      "Timeout value, in seconds, for starting peer after switch over";
                  }
                }  // choice idle-interval
              }  // container idle-after-switch-over
    
              container outbound-route-filter {
                junos:must "(!("system processes routing bgp update-threading"))";
                junos:must-message "Can't be configured together with update-threading";
                description
                  "Dynamically negotiated cooperative route filtering";
                uses apply-advanced;
    
                leaf bgp-orf-cisco-mode {
                  type empty;
                  description
                    "Using BGP ORF capability code 130 and Prefix ORF type 128";
                }
    
                container extended-community {
                  status deprecated;
                  description
                    "Extended community filtering";
                  uses apply-advanced;
    
                  choice accept-choice {
                    leaf accept {
                      type empty;
                      description
                        "Honor remote requests for extended community ORF";
                    }
                    leaf no-accept {
                      type empty;
                      description
                        "Don't honor remote requests for extended community ORF";
                    }
                  }  // choice accept-choice
    
                  leaf vrf-filter {
                    type empty;
                    description
                      "Request remote filtering using locally configured VRF import targets";
                  }
                }  // container extended-community
    
                container prefix-based {
                  presence "enable prefix-based";
                  description
                    "Prefix-based outbound route filtering";
                  uses apply-advanced;
    
                  container accept {
                    presence "enable accept";
                    description
                      "Honor Prefix-based ORFs from remote peers";
                    uses apply-advanced;
    
                    leaf inet {
                      type empty;
                      description
                        "Honor IPv4 prefix filters";
                    }
    
                    leaf inet6 {
                      type empty;
                      description
                        "Honor IPv6 prefix filters";
                    }
                  }  // container accept
                }  // container prefix-based
              }  // container outbound-route-filter
    
              container message-batching {
                status deprecated;
                description
                  "DEPRECATED - Batching of outgoing messages";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf enable {
                    type empty;
                    description
                      "Enable parameter";
                  }
                  leaf disable {
                    type empty;
                    description
                      "Disable parameter";
                  }
                }  // choice enable-disable
    
                leaf interval {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "100 .. 1000";
                    }
                  }
                  units "milliseconds";
                  default "250";
                  description
                    "DEPRECATED - Interval over which to batch messages";
                }
              }  // container message-batching
    
              container multipath {
                presence "enable multipath";
                description
                  "Allow load sharing among multiple BGP paths";
                uses apply-advanced;
    
                leaf disable {
                  type empty;
                  description
                    "Disable Multipath";
                }
    
                leaf multiple-as {
                  type empty;
                  description
                    "Use paths received from different ASs";
                }
    
                leaf allow-protection {
                  type empty;
                  description
                    "Allow protection for multipath legs";
                }
    
                leaf pause-computation-during-churn {
                  type empty;
                  description
                    "Pause multipath job to absorb churn";
                }
    
                leaf list-nexthop {
                  type empty;
                  description
                    "Use List-NH for homogenous nexthop-set also";
                }
              }  // container multipath
    
              leaf tcp-mss {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 4096";
                  }
                }
                description
                  "Maximum TCP segment size";
              }
    
              leaf bgp-identifier {
                type jt:ipv4addr;
                description "BGP Identifier";
              }
    
              leaf tcp-aggressive-transmission {
                type empty;
                description
                  "Enable aggressive transmission of pure TCP ACKs and retransmissions";
              }
    
              container bmp {
                description
                  "Specific settings to override the routing-options settings";
                uses apply-advanced;
    
                leaf monitor {
                  type enumeration {
                    enum "enable" {
                      value 0;
                      description
                        "Enable monitoring of BGP peer(s)";
                    }
                    enum "disable" {
                      value 1;
                      description
                        "Disable monitoring of BGP peer(s)";
                    }
                  }
                  description
                    "Enable/Disable monitoring";
                }
    
                container route-monitoring {
                  description
                    "Control route monitoring settings";
                  uses apply-advanced;
    
                  leaf none {
                    junos:must "((!(".. pre-policy") && (!(".. post-policy") && !(".. rib-out"))))";
                    junos:must-message "May not be configured with pre-policy or post-policy or rib-out";
                    type empty;
                    description
                      "Do not send route monitoring messages";
                  }
    
                  container pre-policy {
                    presence "enable pre-policy";
                    description
                      "Send pre-policy route monitoring messages";
                    leaf exclude-non-feasible {
                      type empty;
                      description
                        "Exclude looped routes, etc";
                    }
                  }  // container pre-policy
    
                  container post-policy {
                    presence
                      "enable post-policy";
                    description
                      "Send post-policy route monitoring messages";
                    leaf exclude-non-eligible {
                      type empty;
                      description
                        "Exclude unresolved routes, etc.";
                    }
                  }  // container post-policy
    
                  container rib-out {
                    junos:must "((!("system processes routing bgp update-threading") || "system processes routing bgp rib-sharding"))";
                    junos:must-message "Update threading can't be configured together with bmp rib-out monitoring";
                    presence "enable rib-out";
                    description
                      "Send adj-ribs-out route monitoring messages";
                    leaf pre-policy {
                      type empty;
                      description
                        "Send pre-policy adj-ribs-out route monitoring messages";
                    }
    
                    leaf post-policy {
                      type empty;
                      description
                        "Send post-policy adj-ribs-out route monitoring messages";
                    }
                  }  // container rib-out
                }  // container route-monitoring
              }  // container bmp
    
              container advertise-bgp-static {
                presence
                  "enable advertise-bgp-static";
                description
                  "Advertise bgp-static routes";
                uses apply-advanced;
    
                leaf-list policy {
                  type jt:policy-algebra;
                  ordered-by user;
                  description
                    "Static route advertisement policy";
                }
              }  // container advertise-bgp-static
    
              leaf add-path-display-ipv4-address {
                type empty;
                description
                  "Display add-path path-id in IPv4 address format";
              }
    
              container bfd-liveness-detection {
                description
                  "Bidirectional Forwarding Detection (BFD) options";
                uses apply-advanced;
    
                leaf version {
                  type enumeration {
                    enum "0" {
                      value 0;
                      description
                        "BFD version 0 (deprecated)";
                    }
                    enum "1" {
                      value 1;
                      description
                        "BFD version 1";
                    }
                    enum "automatic" {
                      value 2;
                      description
                        "Choose BFD version automatically";
                    }
                  }
                  default "automatic";
                  description
                    "BFD protocol version number";
                }
    
                leaf minimum-interval {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 255000";
                    }
                  }
                  units "milliseconds";
                  description
                    "Minimum transmit and receive interval";
                }
    
                leaf minimum-transmit-interval {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 255000";
                    }
                  }
                  units "milliseconds";
                  status deprecated;
                  description
                    "Minimum transmit interval";
                }
    
                leaf minimum-receive-interval {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 255000";
                    }
                  }
                  units "milliseconds";
                  description
                    "Minimum receive interval";
                }
    
                leaf multiplier {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 255";
                    }
                  }
                  default "3";
                  description
                    "Detection time multiplier";
                }
    
                choice adaptation-choice {
                  leaf no-adaptation {
                    type empty;
                    description
                      "Disable adaptation";
                  }
                }  // choice adaptation-choice
    
                container transmit-interval {
                  description
                    "Transmit-interval options";
                  uses apply-advanced;
    
                  leaf minimum-interval {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 255000";
                      }
                    }
                    units "milliseconds";
                    description
                      "Minimum transmit interval";
                  }
    
                  leaf threshold {
                    type union {
                      type uint32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    units "milliseconds";
                    description
                      "High transmit interval triggering a trap";
                  }
                }  // container transmit-interval
    
                container detection-time {
                  description
                    "Detection-time options";
                  uses apply-advanced;
    
                  leaf threshold {
                    type union {
                      type uint32;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    units "milliseconds";
                    description
                      "High detection-time triggering a trap";
                  }
                }  // container detection-time
    
                container authentication {
                  description
                    "Authentication options";
                  uses apply-advanced;
    
                  leaf key-chain {
                    junos:must "(".. algorithm")";
                    junos:must-message "May not be configured without algorithm";
                    junos:must "("security authentication-key-chains key-chain $$")";
                    junos:must-message "Referenced key-chain must be defined";
                    type string;
                    description "Key chain name";
                  }
    
                  leaf algorithm {
                    junos:must "(".. key-chain")";
                    junos:must-message "May not be configured without key-chain";
                    type enumeration {
                      enum "simple-password" {
                        value 0;
                        description
                          "Simple password";
                      }
                      enum "keyed-md5" {
                        value 1;
                        description
                          "Keyed message Digest 5";
                      }
                      enum
                        "meticulous-keyed-md5" {
                        value 2;
                        description
                          "Meticulous keyed message Digest 5";
                      }
                      enum "keyed-sha-1" {
                        value 3;
                        description
                          "Keyed secure hash algorithm (SHA1) ";
                      }
                      enum
                        "meticulous-keyed-sha-1" {
                        value 4;
                        description
                          "Meticulous keyed secure hash algorithm (SHA1) ";
                      }
                    }
                    description "Algorithm name";
                  }
    
                  leaf loose-check {
                    type empty;
                    description
                      "Verify authentication only if authentication is negotiated";
                  }
                }  // container authentication
    
                leaf session-mode {
                  type enumeration {
                    enum "automatic" {
                      value 0;
                      description
                        "Choose session-mode automatically";
                    }
                    enum "single-hop" {
                      value 1;
                      description
                        "Use single-hop";
                    }
                    enum "multihop" {
                      value 2;
                      description "Use multihop";
                    }
                  }
                  default "automatic";
                  description
                    "BFD single-hop or multihop session-mode";
                }
    
                leaf holddown-interval {
                  junos:must "(!(".. .. .. type internal"))";
                  junos:must-message "bfd holddown-interval is only valid for EBGP.";
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 255000";
                    }
                  }
                  units "milliseconds";
                  description
                    "Time to hold the session-UP notification to the client";
                }
              }  // container bfd-liveness-detection
    
              leaf as-override {
                type empty;
                description
                  "Replace neighbor AS number with our AS number";
              }
    
              container egress-te-node-segment {
                description
                  "Configure BGP-Peer-Node segment";
                uses apply-advanced;
    
                container label {
                  description
                    "BGP-Peer-Node SID label from static label pool";
                  uses apply-advanced;
    
                  leaf label-value {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "16 .. 1048575";
                      }
                    }
                    description
                      "BGP-Peer-Node SID label value from static label pool";
                  }
                }  // container label
    
                container egress-te-set {
                  description
                    "Configure as a member of a SET segment";
                  uses apply-advanced;
    
                  leaf set-name {
                    junos:must "("protocols bgp egress-te-set-segment $$")";
                    junos:must-message "protocols bgp egress-te-set-segment not configured";
                    type string {
                      junos:posix-pattern "^.{1,64}$";
                      junos:pattern-message "Must be a string of 64 characters or less";
                    }
                    description "Set name";
                  }
    
                  leaf weight {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 255";
                      }
                    }
                    description
                      "Weight for set segment";
                  }
                }  // container egress-te-set
    
                container egress-te-backup-segment {
                  description
                    "Backup segment for FRR";
                  uses apply-advanced;
    
                  container label {
                    description
                      "Backup segment label from static label pool";
                    uses apply-advanced;
    
                    leaf label-value {
                      type union {
                        type string {
                          pattern "<.*>|$.*";
                        }
                        type uint32 {
                          range "16 .. 1048575";
                        }
                      }
                      description
                        "Backup segment label value from static label pool";
                    }
                  }  // container label
                }  // container egress-te-backup-segment
    
                container egress-te-backup-ip-forward {
                  presence
                    "enable egress-te-backup-ip-forward";
                  description
                    "Use IP-forward backup path for Egress TE";
                  uses apply-advanced;
    
                  leaf instance-name {
                    type string {
                      junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                      junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                    }
                    description
                      "Routing-instance to use as IP forward backup-path";
                  }
                }  // container egress-te-backup-ip-forward
              }  // container egress-te-node-segment
    
              list egress-te-adj-segment {
                key "name";
                description
                  "Configure BGP-Peer-Adj segment";
                leaf name {
                  type string {
                    junos:posix-pattern "^.{1,64}$";
                    junos:pattern-message "Must be a string of 64 characters or less";
                  }
                  description
                    "The BGP-Adj-Set segment name";
                }
    
                uses apply-advanced;
    
                container label {
                  junos:must "(".. next-hop")";
                  junos:must-message "The 'egress-te-adj-segment next-hop' must be configured";
                  description
                    "BGP-Peer-Adj SID label from static label pool";
                  uses apply-advanced;
    
                  leaf label-value {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "16 .. 1048575";
                      }
                    }
                    description
                      "BGP-Peer-Adj SID label value from static label pool";
                  }
                }  // container label
    
                container next-hop {
                  junos:must "(".. label")";
                  junos:must-message "The 'egress-te-adj-segment label' must be configured";
                  description
                    "Address of directly connected next-hop to use";
                  uses apply-advanced;
    
                  leaf next-hop-addr {
                    type jt:ipaddr;
                    description
                      "Address of directly connected next-hop";
                  }
                }  // container next-hop
    
                container egress-te-set {
                  description
                    "Configure as a member of a SET segment";
                  uses apply-advanced;
    
                  leaf set-name {
                    junos:must "("protocols bgp egress-te-set-segment $$")";
                    junos:must-message "protocols bgp egress-te-set-segment not configured";
                    type string {
                      junos:posix-pattern "^.{1,64}$";
                      junos:pattern-message "Must be a string of 64 characters or less";
                    }
                    description "Set name";
                  }
    
                  leaf weight {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 255";
                      }
                    }
                    description
                      "Weight for set segment";
                  }
                }  // container egress-te-set
    
                container egress-te-backup-segment {
                  description
                    "Backup segment for FRR";
                  uses apply-advanced;
    
                  container label {
                    description
                      "Backup segment label from static label pool";
                    uses apply-advanced;
    
                    leaf label-value {
                      type union {
                        type string {
                          pattern "<.*>|$.*";
                        }
                        type uint32 {
                          range "16 .. 1048575";
                        }
                      }
                      description
                        "Backup segment label value from static label pool";
                    }
                  }  // container label
                }  // container egress-te-backup-segment
    
                container egress-te-backup-ip-forward {
                  presence
                    "enable egress-te-backup-ip-forward";
                  description
                    "Use IP-forward backup path for Egress TE";
                  uses apply-advanced;
    
                  leaf instance-name {
                    type string {
                      junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                      junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                    }
                    description
                      "Routing-instance to use as IP forward backup-path";
                  }
                }  // container egress-te-backup-ip-forward
    
                container te-link-attribute {
                  presence
                    "enable te-link-attribute";
                  description "Link attribute";
                  uses apply-advanced;
    
                  leaf te-metric {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 4294967295";
                      }
                    }
                    default "1";
                    description
                      "TE Metric value";
                  }
    
                  leaf igp-metric {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 16777215";
                      }
                    }
                    default "1";
                    description
                      "IGP Metric value";
                  }
    
                  leaf-list admin-group {
                    type string;
                    max-elements 16;
                    ordered-by user;
                    description
                      "Administrative groups";
                  }
                }  // container te-link-attribute
              }  // list egress-te-adj-segment
    
              leaf vpn-apply-export {
                type empty;
                description
                  "Apply BGP export policy when exporting VPN routes";
              }
    
              container egress-te {
                presence "enable egress-te";
                description
                  "Use Egress Peering traffic engineering";
                uses apply-advanced;
    
                leaf install-address {
                  type jt:ipaddr;
                  description
                    "Address to use in egress-te created inet route";
                }
    
                container rib {
                  description
                    "Select primary table for Egress-TE routes";
                  uses apply-advanced;
    
                  leaf inet.0 {
                    type empty;
                    description
                      "Install Egress-TE routes in inet.0";
                  }
    
                  leaf inet6.0 {
                    type empty;
                    description
                      "Install Egress-TE routes in inet6.0";
                  }
                }  // container rib
    
                leaf no-install {
                  type empty;
                  description
                    "Avoid installation to FIB or resolving over";
                }
    
                leaf-list import {
                  type jt:policy-algebra;
                  ordered-by user;
                  description
                    "Import policy to set attributes";
                }
    
                leaf backup-path {
                  junos:must "("protocols bgp egress-te-backup-paths template $$")";
                  junos:must-message "bgp egress-te-backup-paths template not configured";
                  type string {
                    junos:posix-pattern "^.{1,64}$";
                    junos:pattern-message "Must be a string of 64 characters or less";
                  }
                  description
                    "The 'egress-te-backup-paths template' to use for this peer";
                }
              }  // container egress-te
    
              leaf advertise-prefix-sid {
                type empty;
                description
                  "Advertise prefix sid to E-BGP peers";
              }
    
              leaf accept-prefix-sid {
                type empty;
                description
                  "Accept prefix sid from E-BGP peers";
              }
    
              leaf advertise-srgb {
                type empty;
                description "Advertise SRGB TLV";
              }
    
              leaf tcp-connect-port {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "1 .. 65535";
                  }
                }
                description
                  "TCP port number to connect with peer on";
              }
            }  // list neighbor
    
            leaf vpn-apply-export {
              type empty;
              description
                "Apply BGP export policy when exporting VPN routes";
            }
    
            container egress-te {
              presence "enable egress-te";
              description
                "Use Egress Peering traffic engineering";
              uses apply-advanced;
    
              leaf install-address {
                type jt:ipaddr;
                description
                  "Address to use in egress-te created inet route";
              }
    
              container rib {
                description
                  "Select primary table for Egress-TE routes";
                uses apply-advanced;
    
                leaf inet.0 {
                  type empty;
                  description
                    "Install Egress-TE routes in inet.0";
                }
    
                leaf inet6.0 {
                  type empty;
                  description
                    "Install Egress-TE routes in inet6.0";
                }
              }  // container rib
    
              leaf no-install {
                type empty;
                description
                  "Avoid installation to FIB or resolving over";
              }
    
              leaf-list import {
                type jt:policy-algebra;
                ordered-by user;
                description
                  "Import policy to set attributes";
              }
    
              leaf backup-path {
                junos:must "("protocols bgp egress-te-backup-paths template $$")";
                junos:must-message "bgp egress-te-backup-paths template not configured";
                type string {
                  junos:posix-pattern "^.{1,64}$";
                  junos:pattern-message "Must be a string of 64 characters or less";
                }
                description
                  "The 'egress-te-backup-paths template' to use for this peer";
              }
            }  // container egress-te
    
            leaf advertise-prefix-sid {
              type empty;
              description
                "Advertise prefix sid to E-BGP peers";
            }
    
            leaf accept-prefix-sid {
              type empty;
              description
                "Accept prefix sid from E-BGP peers";
            }
    
            leaf advertise-srgb {
              type empty;
              description "Advertise SRGB TLV";
            }
    
            leaf tcp-connect-port {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint16 {
                  range "1 .. 65535";
                }
              }
              description
                "TCP port number to connect with peer on";
            }
          }  // list group
    
          container traffic-statistics-labeled-path {
            presence
              "enable traffic-statistics-labeled-path";
            description
              "Collect periodic ingress labeled statistics for BGP label-switched paths ";
            uses apply-advanced;
    
            container file {
              description
                "Statistics file options";
              leaf filename {
                type string {
                  junos:posix-pattern "![/ %]";
                  junos:pattern-message "Must not contain '/', % or a space";
                  length "1 .. 1024";
                }
                description
                  "Name of file in which to write trace information";
              }
    
              leaf replace {
                type empty;
                status deprecated;
                description
                  "Replace trace file rather than appending to it";
              }
    
              leaf size {
                type string;
                description
                  "Maximum trace file size";
              }
    
              leaf files {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "2 .. 1000";
                  }
                }
                default "10";
                description
                  "Maximum number of trace files";
              }
    
              leaf no-stamp {
                type empty;
                status deprecated;
                description
                  "Do not timestamp trace file";
              }
    
              choice world-readable-choice {
                leaf world-readable {
                  type empty;
                  description
                    "Allow any user to read the log file";
                }
                leaf no-world-readable {
                  type empty;
                  description
                    "Don't allow any user to read the log file";
                }
              }  // choice world-readable-choice
            }  // container file
    
            leaf interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type int32 {
                  range "60 .. 65535";
                }
              }
              units "seconds";
              description
                "Time interval to collect statistics";
            }
          }  // container traffic-statistics-labeled-path
    
          container source-packet-routing {
            description
              "Enable Source Packet Routing (SPRING)";
            uses apply-advanced;
    
            container srgb {
              junos:must "(!(".. .. .. .. protocols mpls disable"))";
              junos:must-message "SPRING configuration is not allowed with 'protocols mpls disable'";
              junos:must "(".. .. .. .. protocols mpls ")";
              junos:must-message "SPRING configuration is not allowed without 'protocols mpls'";
              description
                "Set the SRGB global block in SPRING";
              leaf start-label {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description
                  "Start range for SRGB label block";
              }
    
              leaf index-range {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description
                  "Index to the SRGB start label block";
              }
            }  // container srgb
    
            container srv6 {
              description
                "Enable IPv6 Segment Routing (SRv6)";
              uses apply-advanced;
    
              list locator {
                key "name";
                ordered-by user;
                description "SRv6 Locator";
                leaf name {
                  junos:must "("routing-options source-packet-routing srv6 locator $$")";
                  junos:must-message "Referenced srv6 locator must be defined";
                  type string;
                  description "Locator name";
                }
    
                uses apply-advanced;
    
                leaf end-dt4-sid {
                  type jt:ipv6addr;
                  description
                    "End dt4 sid with 128 bit address";
                }
    
                leaf end-dt6-sid {
                  type jt:ipv6addr;
                  description
                    "End dt6 sid with 128 bit address";
                }
              }  // list locator
            }  // container srv6
          }  // container source-packet-routing
    
          choice enable-disable {
            leaf disable {
              type empty;
              description "Disable BGP";
            }
          }  // choice enable-disable
    
          choice precision-timers-choice {
            leaf precision-timers {
              type empty;
              description
                "Use precision timers for scheduling keepalives";
            }
            leaf no-precision-timers {
              type empty;
              description
                "Don't use precision timers for scheduling keepalives";
            }
          }  // choice precision-timers-choice
    
          container snmp-options {
            description
              "Customize SNMP behaviors specifically for BGP MIBs";
            uses apply-advanced;
    
            leaf backward-traps-only-from-established {
              type empty;
              description
                "Limit traps for backward transitions to only those moving from Established state.";
            }
    
            leaf emit-inet-address-length-in-oid {
              type empty;
              description
                "Emit Length in OID for InetAddress MIB type.";
            }
          }  // container snmp-options
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          leaf prioritize-route-queueing {
            type empty;
            description
              "Let route-queue building happen without getting throttled";
          }
    
          container traceoptions {
            description "Trace options for BGP";
            uses apply-advanced;
    
            container file {
              description "Trace file options";
              leaf filename {
                type string {
                  junos:posix-pattern "![/ %]";
                  junos:pattern-message "Must not contain '/', % or a space";
                  length "1 .. 1024";
                }
                description
                  "Name of file in which to write trace information";
              }
    
              leaf replace {
                type empty;
                status deprecated;
                description
                  "Replace trace file rather than appending to it";
              }
    
              leaf size {
                type string;
                description
                  "Maximum trace file size";
              }
    
              leaf files {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "2 .. 1000";
                  }
                }
                default "10";
                description
                  "Maximum number of trace files";
              }
    
              leaf no-stamp {
                type empty;
                status deprecated;
                description
                  "Do not timestamp trace file";
              }
    
              choice world-readable-choice {
                leaf world-readable {
                  type empty;
                  description
                    "Allow any user to read the log file";
                }
                leaf no-world-readable {
                  type empty;
                  description
                    "Don't allow any user to read the log file";
                }
              }  // choice world-readable-choice
            }  // container file
    
            list flag {
              key "name";
              ordered-by user;
              description "Tracing parameters";
              leaf name {
                type enumeration {
                  enum "damping" {
                    value 0;
                    description
                      "Trace BGP damping information";
                  }
                  enum "packets" {
                    value 1;
                    description
                      "Trace all BGP protocol packets";
                  }
                  enum "open" {
                    value 2;
                    description
                      "Trace BGP open packets";
                  }
                  enum "update" {
                    value 3;
                    description
                      "Trace BGP update packets";
                  }
                  enum "keepalive" {
                    value 4;
                    description
                      "Trace BGP keepalive packets";
                  }
                  enum "refresh" {
                    value 5;
                    description
                      "Trace BGP refresh packets";
                  }
                  enum "nsr-synchronization" {
                    value 6;
                    description
                      "Trace NSR synchronization events";
                  }
                  enum "bfd" {
                    value 7;
                    description
                      "Trace BFD events";
                  }
                  enum "4byte-as" {
                    value 8;
                    description
                      "Trace 4 byte AS events";
                  }
                  enum "add-path" {
                    value 9;
                    description
                      "Trace add-path events";
                  }
                  enum "graceful-restart" {
                    value 10;
                    description
                      "Trace Graceful Restart events";
                  }
                  enum "egress-te" {
                    value 11;
                    description
                      "Egress Peering Traffic-Engineering events";
                  }
                  enum "thread-io" {
                    value 12;
                    description
                      "Trace threaded I/O processing";
                  }
                  enum "sharding" {
                    value 13;
                    description
                      "Trace BGP rib sharding";
                  }
                  enum "thread-update-io" {
                    value 14;
                    description
                      "Trace threaded update I/O processing";
                  }
                  enum "route-validation" {
                    value 15;
                    description
                      "Trace route validation";
                  }
                  enum "ipsec" {
                    value 16;
                    description "Trace ipsec";
                  }
                  enum "route" {
                    value 17;
                    description
                      "Trace routing information";
                  }
                  enum "normal" {
                    value 18;
                    description
                      "Trace normal events";
                  }
                  enum "general" {
                    value 19;
                    description
                      "Trace general events";
                  }
                  enum "state" {
                    value 20;
                    description
                      "Trace state transitions";
                  }
                  enum "policy" {
                    value 21;
                    description
                      "Trace policy processing";
                  }
                  enum "task" {
                    value 22;
                    description
                      "Trace routing protocol task processing";
                  }
                  enum "timer" {
                    value 23;
                    description
                      "Trace routing protocol timer processing";
                  }
                  enum "all" {
                    value 24;
                    description
                      "Trace everything";
                  }
                }
              }
    
              leaf send {
                type empty;
                description
                  "Trace transmitted packets";
              }
    
              leaf receive {
                type empty;
                description
                  "Trace received packets";
              }
    
              leaf detail {
                type empty;
                description
                  "Trace detailed information";
              }
    
              leaf disable {
                type empty;
                description
                  "Disable this trace flag";
              }
    
              container filter {
                presence "enable filter";
                description
                  "Filter to apply to this flag";
                uses bgp_filter_obj;
              }  // container filter
            }  // list flag
          }  // container traceoptions
    
          leaf description {
            type string {
              length "1 .. 255";
            }
            description "Text description";
          }
    
          container metric-out {
            description
              "Route metric sent in MED";
            choice metric_param {
              leaf metric-value {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 4294967295";
                  }
                }
                description "Metric value";
              }
              container minimum-igp {
                presence "enable minimum-igp";
                description
                  "Track the minimum IGP metric";
                leaf metric-offset {
                  type union {
                    type int32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Metric offset for MED";
                }
              }  // container minimum-igp
              container igp {
                presence "enable igp";
                description
                  "Track the IGP metric";
                leaf metric-offset {
                  type union {
                    type int32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Metric offset for MED";
                }
    
                leaf delay-med-update {
                  type empty;
                  description
                    "Delay updating MED when IGP metric increases";
                }
              }  // container igp
              container effective-aigp {
                presence "enable effective-aigp";
                description
                  "Track the effective AIGP metric";
                leaf metric-offset {
                  type union {
                    type int32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Metric offset for MED";
                }
              }  // container effective-aigp
              container minimum-effective-aigp {
                presence
                  "enable minimum-effective-aigp";
                description
                  "Track the minimum effective AIGP metric";
                leaf metric-offset {
                  type union {
                    type int32;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Metric offset for MED";
                }
              }  // container minimum-effective-aigp
            }  // choice metric_param
          }  // container metric-out
    
          container multihop {
            presence "enable multihop";
            description
              "Configure an EBGP multihop session";
            uses apply-advanced;
    
            leaf ttl {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint8 {
                  range "1 .. 255";
                }
              }
              description
                "TTL value for the session";
            }
    
            leaf no-nexthop-change {
              type empty;
              description
                "Do not change next hop to self in advertisements";
            }
          }  // container multihop
    
          leaf route-server-client {
            type empty;
            description
              "Enable route server client behavior";
          }
    
          leaf accept-remote-nexthop {
            type empty;
            description
              "Allow import policy to specify a non-directly connected next-hop";
          }
    
          leaf preference {
            type union {
              type uint32;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description "Preference value";
          }
    
          leaf local-preference {
            type union {
              type uint32;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Value of LOCAL_PREF path attribute";
          }
    
          leaf local-address {
            type jt:ipaddr;
            description
              "Address of local end of BGP session";
          }
    
          leaf local-interface {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Local interface for IPv6 link local EBGP peering";
          }
    
          leaf forwarding-context {
            type string {
              junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
              junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
            }
            description
              "Routing-instance used for data-forwarding and transport-session";
          }
    
          leaf hold-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 65535";
              }
            }
            description
              "Hold time used when negotiating with a peer";
          }
    
          leaf minimum-hold-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "3 .. 65535";
              }
            }
            description
              "Minimum hold time accepted from the peer";
          }
    
          leaf passive {
            type empty;
            description
              "Do not send open messages to a peer";
          }
    
          leaf advertise-inactive {
            type empty;
            description
              "Advertise inactive routes";
          }
    
          choice advertise-peer-as-choice {
            leaf advertise-peer-as {
              type empty;
              description
                "Advertise routes received from the same autonomous system";
            }
            leaf no-advertise-peer-as {
              type empty;
              description
                "Don't advertise routes received from the same autonomous system";
            }
          }  // choice advertise-peer-as-choice
    
          container advertise-external {
            presence "enable advertise-external";
            description
              "Advertise best external routes";
            leaf conditional {
              type empty;
              description
                "Route matches active route upto med-comparison rule";
            }
          }  // container advertise-external
    
          leaf keep {
            type enumeration {
              enum "all" {
                value 0;
                description "Retain all routes";
              }
              enum "none" {
                value 1;
                description "Retain no routes";
              }
            }
            description
              "How to retain routes in the routing table";
          }
    
          leaf rfc6514-compliant-safi129 {
            type empty;
            description
              "Compliant with RFC6514 SAFI129 format";
          }
    
          leaf no-aggregator-id {
            type empty;
            description
              "Set router ID in aggregator path attribute to 0";
          }
    
          leaf mtu-discovery {
            type empty;
            description
              "Enable TCP path MTU discovery";
          }
    
          leaf enforce-first-as {
            type empty;
            description
              "Enforce first AS in AS-path is the neighbor's AS";
          }
    
          leaf out-delay {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 65535";
              }
            }
            description
              "How long before exporting routes from routing table";
          }
    
          leaf ttl {
            junos:must "((!(".. .. type internal") && !(".. multihop")))";
            junos:must-message "This option is valid only for single-hop EBGP neighbor";
            type enumeration {
              enum "1" {
                value 0;
              }
              enum "255" {
                value 1;
              }
            }
            description
              "TTL value for the single-hop peer";
          }
    
          leaf log-updown {
            type empty;
            description
              "Log a message for peer state transitions";
          }
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf-list import {
            type jt:policy-algebra;
            ordered-by user;
            description "Import policy";
          }
    
          leaf-list nlri {
            type enumeration {
              enum "unicast" {
                value 0;
                status deprecated;
                description
                  "Include unicast NLRI";
              }
              enum "multicast" {
                value 1;
                status deprecated;
                description
                  "Include multicast NLRI";
              }
              enum "any" {
                value 2;
                status deprecated;
                description
                  "Include any kind of NLRI";
              }
            }
            ordered-by user;
            status deprecated;
            description
              "NLRI type to include in updates";
          }
    
          container bgp-error-tolerance {
            presence
              "enable bgp-error-tolerance";
            description
              "Handle BGP malformed updates softly";
            uses apply-advanced;
    
            leaf malformed-update-log-interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "10 .. 65535";
                }
              }
              units "seconds";
              default "300";
              description
                "Time used when logging malformed update";
            }
    
            choice malformed-routes-limit-choice {
              leaf malformed-route-limit {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 4294967295";
                  }
                }
                default "1000";
                description
                  "Maximum number of malformed routes from a peer";
              }
              leaf no-malformed-route-limit {
                type empty;
                description
                  "No malformed route limit";
              }
            }  // choice malformed-routes-limit-choice
          }  // container bgp-error-tolerance
    
          leaf authentication-key {
            type string {
              length "1 .. 126";
            }
            description "MD5 authentication key";
          }
    
          leaf authentication-algorithm {
            junos:must "(".. authentication-key-chain")";
            junos:must-message "May not be configured without authentication-key-chain";
            junos:must "(!(".. authentication-key"))";
            junos:must-message "May not be configured with authentication-key";
            type enumeration {
              enum "md5" {
                value 0;
                description "Message Digest 5";
              }
              enum "hmac-sha-1-96" {
                value 1;
                description
                  "Hash-based Message Authentication Code (SHA1) (96 bits)";
              }
              enum "aes-128-cmac-96" {
                value 2;
                description
                  "Cipher-based Message Authentication Code (AES128) (96 bits)";
              }
              enum "ao" {
                value 3;
                description
                  "TCP Authentication Option";
              }
            }
            default "hmac-sha-1-96";
            description
              "Authentication algorithm name";
          }
    
          leaf tcpao-handling-with-digest-mismatch {
            junos:must "(!(".. authentication-key"))";
            junos:must-message "May not be configured with authentication-key";
            type enumeration {
              enum "drop-if-no-tcpao" {
                value 0;
                description
                  "Drop the connection if Digest mismatched";
              }
              enum "allow-without-tcpao" {
                value 1;
                description
                  "Allow the connection establishment without TCP-AO";
              }
            }
            description
              "Drop or continue without TCP-AO with digest mismatch with TCP-AO";
          }
    
          leaf authentication-key-chain {
            junos:must "(!(".. authentication-key"))";
            junos:must-message "May not be configured with authentication-key";
            junos:must "("security authentication-key-chains key-chain $$")";
            junos:must-message "Referenced key-chain must be defined";
            type string {
              length "1 .. 128";
            }
            description "Key chain name";
          }
    
          leaf-list export {
            type jt:policy-algebra;
            ordered-by user;
            description "Export policy";
          }
    
          container remove-private {
            presence "enable remove-private";
            description
              "Remove well-known private AS numbers";
            uses apply-advanced;
    
            container all {
              presence "enable all";
              description
                "Remove all private AS numbers and do not stop at the first public AS number";
              container replace {
                presence "enable replace";
                description
                  "Replace private AS numbers with the BGP Group's local AS number";
                leaf nearest {
                  type empty;
                  description
                    "Use closest public AS number to replace a private AS number";
                }
              }  // container replace
            }  // container all
    
            leaf no-peer-loop-check {
              type empty;
              description
                "Remove peer loop-check";
            }
          }  // container remove-private
    
          leaf cluster {
            type jt:areaid;
            description "Cluster identifier";
          }
    
          leaf no-client-reflect {
            type empty;
            description
              "Disable intracluster route redistribution";
          }
    
          leaf peer-as {
            type string {
              junos:posix-pattern "^[0-9]+(.[0-9]+)?$";
              junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively";
            }
            description
              " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format";
          }
    
          container local-as {
            description
              "Local autonomous system number";
            leaf as-number {
              type string {
                junos:posix-pattern "^[0-9]+(.[0-9]+)?$";
                junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively";
              }
              description
                " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format";
            }
    
            leaf loops {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type int32 {
                  range "1 .. 10";
                }
              }
              description
                "Maximum number of times this AS can be in an AS path";
            }
    
            leaf private {
              type empty;
              description
                "Hide this local AS in paths learned from this peering";
            }
    
            leaf alias {
              type empty;
              description
                "Treat this AS as an alias to the system AS";
            }
    
            leaf no-prepend-global-as {
              type empty;
              description
                "Do not prepend global autonomous-system number in advertised paths";
            }
          }  // container local-as
    
          leaf ipsec-sa {
            junos:must "("security ipsec security-association $$")";
            junos:must-message "Referenced IPSec Security Association must be defined";
            type string {
              length "1 .. 32";
            }
            description "IPSec SA name";
          }
    
          container graceful-shutdown {
            description
              "BGP peer graceful shutdown option";
            uses apply-advanced;
    
            container receiver {
              presence "enable receiver";
              description
                "BGP peer graceful-shutdown receiver";
              uses apply-advanced;
    
              leaf disable {
                junos:must "(!(".. .. sender"))";
                junos:must-message "Receiver cannot be disabled on Sender";
                type empty;
                description
                  "Disable graceful-shutdown receiver";
              }
    
              leaf local-preference {
                type union {
                  type uint32;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                description
                  "Value of receiver LOCAL_PREF path attribute";
              }
            }  // container receiver
    
            container sender {
              presence "enable sender";
              description
                "BGP peer graceful-shutdown sender";
              uses apply-advanced;
    
              leaf local-preference {
                type union {
                  type uint32;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                description
                  "Value of sender LOCAL_PREF path attribute";
              }
            }  // container sender
          }  // container graceful-shutdown
    
          container shutdown {
            presence "enable shutdown";
            description "Shutdown";
            uses apply-advanced;
    
            leaf notify-message {
              type string;
              description "Notification message";
            }
          }  // container shutdown
    
          leaf unconfigured-peer-graceful-restart {
            junos:must "(".. graceful-restart")";
            junos:must-message "unconfigured-peer-graceful-restart is only valid with 'graceful-restart'";
            type empty;
            description
              "BGP unconfigured peer graceful restart options";
          }
    
          container graceful-restart {
            presence "enable graceful-restart";
            description
              "BGP graceful restart options";
            uses apply-advanced;
    
            choice enable-disable {
              leaf disable {
                type empty;
                description
                  "Disable graceful restart";
              }
            }  // choice enable-disable
    
            leaf restart-time {
              junos:must "(("routing-options graceful-restart" || "fabric routing-options graceful-restart"))";
              junos:must-message "restart-time is only valid with 'routing-options graceful-restart'";
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 1800";
                }
              }
              description
                "Restart time used when negotiating with a peer";
            }
    
            leaf stale-routes-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 1800";
                }
              }
              description
                "Maximum time for which stale routes are kept";
            }
    
            container long-lived {
              description
                "Long-lived graceful restart options";
              uses apply-advanced;
    
              container receiver {
                description
                  "Long-lived graceful restart receiver (helper) options";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    description
                      "Disable receiver (helper) functionality";
                  }
                }  // choice enable-disable
              }  // container receiver
    
              container advertise-to-non-llgr-neighbor {
                presence
                  "enable advertise-to-non-llgr-neighbor";
                description
                  "Advertise stale routes to non-LLGR neighbors";
                uses apply-advanced;
    
                leaf omit-no-export {
                  type empty;
                  description
                    "Do not attach no-export community to stale routes";
                }
              }  // container advertise-to-non-llgr-neighbor
            }  // container long-lived
    
            leaf disable-notification-extensions {
              type empty;
              description
                "Disable notification extensions";
            }
    
            leaf forwarding-state-bit {
              type enumeration {
                enum "as-rr-client" {
                  value 0;
                  description
                    "As for a route reflector client";
                }
                enum "from-fib" {
                  value 1;
                  description
                    "Always use state of associated FIB(s)";
                }
              }
              description
                "Control forwarding-state flag negotiation";
            }
    
            leaf dont-help-shared-fate-bfd-down {
              type empty;
              description
                "Honor BFD-Down(C=0) if GR-restart not in progress";
            }
          }  // container graceful-restart
    
          leaf include-mp-next-hop {
            type empty;
            description
              "Include NEXT-HOP attribute in multiprotocol updates";
          }
    
          leaf disable-4byte-as {
            type empty;
            description
              "Disable 4 byte AS capability advertisement";
          }
    
          container idle-after-switch-over {
            description
              "Stop peer session from coming up after nonstop-routing switch-over";
            choice idle-interval {
              leaf forever {
                type empty;
                description
                  "Idle the peer until the user intervenes";
              }
              leaf timeout {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 4294967295";
                  }
                }
                description
                  "Timeout value, in seconds, for starting peer after switch over";
              }
            }  // choice idle-interval
          }  // container idle-after-switch-over
    
          container outbound-route-filter {
            junos:must "(!("system processes routing bgp update-threading"))";
            junos:must-message "Can't be configured together with update-threading";
            description
              "Dynamically negotiated cooperative route filtering";
            uses apply-advanced;
    
            leaf bgp-orf-cisco-mode {
              type empty;
              description
                "Using BGP ORF capability code 130 and Prefix ORF type 128";
            }
    
            container extended-community {
              status deprecated;
              description
                "Extended community filtering";
              uses apply-advanced;
    
              choice accept-choice {
                leaf accept {
                  type empty;
                  description
                    "Honor remote requests for extended community ORF";
                }
                leaf no-accept {
                  type empty;
                  description
                    "Don't honor remote requests for extended community ORF";
                }
              }  // choice accept-choice
    
              leaf vrf-filter {
                type empty;
                description
                  "Request remote filtering using locally configured VRF import targets";
              }
            }  // container extended-community
    
            container prefix-based {
              presence "enable prefix-based";
              description
                "Prefix-based outbound route filtering";
              uses apply-advanced;
    
              container accept {
                presence "enable accept";
                description
                  "Honor Prefix-based ORFs from remote peers";
                uses apply-advanced;
    
                leaf inet {
                  type empty;
                  description
                    "Honor IPv4 prefix filters";
                }
    
                leaf inet6 {
                  type empty;
                  description
                    "Honor IPv6 prefix filters";
                }
              }  // container accept
            }  // container prefix-based
          }  // container outbound-route-filter
    
          container message-batching {
            status deprecated;
            description
              "DEPRECATED - Batching of outgoing messages";
            uses apply-advanced;
    
            choice enable-disable {
              leaf enable {
                type empty;
                description "Enable parameter";
              }
              leaf disable {
                type empty;
                description "Disable parameter";
              }
            }  // choice enable-disable
    
            leaf interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "100 .. 1000";
                }
              }
              units "milliseconds";
              default "250";
              description
                "DEPRECATED - Interval over which to batch messages";
            }
          }  // container message-batching
    
          container multipath {
            presence "enable multipath";
            description
              "Allow load sharing among multiple BGP paths";
            uses apply-advanced;
    
            leaf disable {
              type empty;
              description "Disable Multipath";
            }
    
            leaf multiple-as {
              type empty;
              description
                "Use paths received from different ASs";
            }
    
            leaf allow-protection {
              type empty;
              description
                "Allow protection for multipath legs";
            }
    
            leaf pause-computation-during-churn {
              type empty;
              description
                "Pause multipath job to absorb churn";
            }
    
            leaf list-nexthop {
              type empty;
              description
                "Use List-NH for homogenous nexthop-set also";
            }
          }  // container multipath
    
          leaf tcp-mss {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 4096";
              }
            }
            description
              "Maximum TCP segment size";
          }
    
          leaf bgp-identifier {
            type jt:ipv4addr;
            description "BGP Identifier";
          }
    
          leaf tcp-aggressive-transmission {
            type empty;
            description
              "Enable aggressive transmission of pure TCP ACKs and retransmissions";
          }
    
          container bmp {
            description
              "Specific settings to override the routing-options settings";
            uses apply-advanced;
    
            leaf monitor {
              type enumeration {
                enum "enable" {
                  value 0;
                  description
                    "Enable monitoring of BGP peer(s)";
                }
                enum "disable" {
                  value 1;
                  description
                    "Disable monitoring of BGP peer(s)";
                }
              }
              description
                "Enable/Disable monitoring";
            }
    
            container route-monitoring {
              description
                "Control route monitoring settings";
              uses apply-advanced;
    
              leaf none {
                junos:must "((!(".. pre-policy") && (!(".. post-policy") && !(".. rib-out"))))";
                junos:must-message "May not be configured with pre-policy or post-policy or rib-out";
                type empty;
                description
                  "Do not send route monitoring messages";
              }
    
              container pre-policy {
                presence "enable pre-policy";
                description
                  "Send pre-policy route monitoring messages";
                leaf exclude-non-feasible {
                  type empty;
                  description
                    "Exclude looped routes, etc";
                }
              }  // container pre-policy
    
              container post-policy {
                presence "enable post-policy";
                description
                  "Send post-policy route monitoring messages";
                leaf exclude-non-eligible {
                  type empty;
                  description
                    "Exclude unresolved routes, etc.";
                }
              }  // container post-policy
    
              container rib-out {
                junos:must "((!("system processes routing bgp update-threading") || "system processes routing bgp rib-sharding"))";
                junos:must-message "Update threading can't be configured together with bmp rib-out monitoring";
                presence "enable rib-out";
                description
                  "Send adj-ribs-out route monitoring messages";
                leaf pre-policy {
                  type empty;
                  description
                    "Send pre-policy adj-ribs-out route monitoring messages";
                }
    
                leaf post-policy {
                  type empty;
                  description
                    "Send post-policy adj-ribs-out route monitoring messages";
                }
              }  // container rib-out
            }  // container route-monitoring
          }  // container bmp
    
          container advertise-bgp-static {
            presence
              "enable advertise-bgp-static";
            description
              "Advertise bgp-static routes";
            uses apply-advanced;
    
            leaf-list policy {
              type jt:policy-algebra;
              ordered-by user;
              description
                "Static route advertisement policy";
            }
          }  // container advertise-bgp-static
    
          leaf add-path-display-ipv4-address {
            type empty;
            description
              "Display add-path path-id in IPv4 address format";
          }
    
          container bfd-liveness-detection {
            description
              "Bidirectional Forwarding Detection (BFD) options";
            uses apply-advanced;
    
            leaf version {
              type enumeration {
                enum "0" {
                  value 0;
                  description
                    "BFD version 0 (deprecated)";
                }
                enum "1" {
                  value 1;
                  description "BFD version 1";
                }
                enum "automatic" {
                  value 2;
                  description
                    "Choose BFD version automatically";
                }
              }
              default "automatic";
              description
                "BFD protocol version number";
            }
    
            leaf minimum-interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 255000";
                }
              }
              units "milliseconds";
              description
                "Minimum transmit and receive interval";
            }
    
            leaf minimum-transmit-interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 255000";
                }
              }
              units "milliseconds";
              status deprecated;
              description
                "Minimum transmit interval";
            }
    
            leaf minimum-receive-interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 255000";
                }
              }
              units "milliseconds";
              description
                "Minimum receive interval";
            }
    
            leaf multiplier {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 255";
                }
              }
              default "3";
              description
                "Detection time multiplier";
            }
    
            choice adaptation-choice {
              leaf no-adaptation {
                type empty;
                description "Disable adaptation";
              }
            }  // choice adaptation-choice
    
            container transmit-interval {
              description
                "Transmit-interval options";
              uses apply-advanced;
    
              leaf minimum-interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 255000";
                  }
                }
                units "milliseconds";
                description
                  "Minimum transmit interval";
              }
    
              leaf threshold {
                type union {
                  type uint32;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                units "milliseconds";
                description
                  "High transmit interval triggering a trap";
              }
            }  // container transmit-interval
    
            container detection-time {
              description
                "Detection-time options";
              uses apply-advanced;
    
              leaf threshold {
                type union {
                  type uint32;
                  type string {
                    pattern "<.*>|$.*";
                  }
                }
                units "milliseconds";
                description
                  "High detection-time triggering a trap";
              }
            }  // container detection-time
    
            container authentication {
              description
                "Authentication options";
              uses apply-advanced;
    
              leaf key-chain {
                junos:must "(".. algorithm")";
                junos:must-message "May not be configured without algorithm";
                junos:must "("security authentication-key-chains key-chain $$")";
                junos:must-message "Referenced key-chain must be defined";
                type string;
                description "Key chain name";
              }
    
              leaf algorithm {
                junos:must "(".. key-chain")";
                junos:must-message "May not be configured without key-chain";
                type enumeration {
                  enum "simple-password" {
                    value 0;
                    description
                      "Simple password";
                  }
                  enum "keyed-md5" {
                    value 1;
                    description
                      "Keyed message Digest 5";
                  }
                  enum "meticulous-keyed-md5" {
                    value 2;
                    description
                      "Meticulous keyed message Digest 5";
                  }
                  enum "keyed-sha-1" {
                    value 3;
                    description
                      "Keyed secure hash algorithm (SHA1) ";
                  }
                  enum "meticulous-keyed-sha-1" {
                    value 4;
                    description
                      "Meticulous keyed secure hash algorithm (SHA1) ";
                  }
                }
                description "Algorithm name";
              }
    
              leaf loose-check {
                type empty;
                description
                  "Verify authentication only if authentication is negotiated";
              }
            }  // container authentication
    
            leaf session-mode {
              type enumeration {
                enum "automatic" {
                  value 0;
                  description
                    "Choose session-mode automatically";
                }
                enum "single-hop" {
                  value 1;
                  description "Use single-hop";
                }
                enum "multihop" {
                  value 2;
                  description "Use multihop";
                }
              }
              default "automatic";
              description
                "BFD single-hop or multihop session-mode";
            }
    
            leaf holddown-interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "0 .. 255000";
                }
              }
              units "milliseconds";
              description
                "Time to hold the session-UP notification to the client";
            }
          }  // container bfd-liveness-detection
    
          container output-queue-priority {
            description
              "BGP output queue priority scheduler for updates";
            uses apply-advanced;
    
            container expedited {
              presence "enable expedited";
              description
                "Expedited queue; highest priority";
              leaf update-tokens {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 100";
                  }
                }
                description "Number of tokens";
              }
            }  // container expedited
    
            list priority {
              key "name";
              description
                "Output queue priority 1..16; higher is better";
              leaf name {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 16";
                  }
                }
                description
                  "Output queue priority; higher is better";
              }
    
              leaf update-tokens {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 100";
                  }
                }
                description "Number of tokens";
              }
            }  // list priority
    
            container defaults {
              description
                "Map policy's priority class and BGP output-queue";
              uses apply-advanced;
    
              container low {
                description
                  "Assign the 'low' priority class to this output-queue";
                uses bgp-output-queue-priority-class;
              }  // container low
    
              container medium {
                description
                  "Assign the 'medium' priority class to this output-queue";
                uses bgp-output-queue-priority-class;
              }  // container medium
    
              container high {
                description
                  "Assign the 'high' priority class to this output-queue";
                uses bgp-output-queue-priority-class;
              }  // container high
            }  // container defaults
          }  // container output-queue-priority
    
          container multipath-build-priority {
            description
              "Configure the multipath build priority";
            uses apply-advanced;
    
            choice multipath-priority {
              leaf low {
                type empty;
                description
                  "Do multipath build with low priority";
              }
              leaf medium {
                type empty;
                description
                  "Do multipath build with medium priority";
              }
            }  // choice multipath-priority
          }  // container multipath-build-priority
    
          leaf send-addpath-optimization {
            type empty;
            description
              "Enable BGP addpath advertisement optimization";
          }
    
          container defaults {
            uses apply-advanced;
    
            container ebgp {
              description
                "Options impacting external BGP default behaviors";
              uses apply-advanced;
    
              container no-policy {
                description
                  "Default ebgp behaviors in the absence of configured policy";
                uses apply-advanced;
    
                leaf receive {
                  type enumeration {
                    enum "accept" {
                      value 0;
                      description
                        "By default, accept routes from all address families";
                    }
                    enum "reject" {
                      value 1;
                      description
                        "By default, reject routes from IPv4/IPv6 unicast address families";
                    }
                    enum "reject-always" {
                      value 2;
                      description
                        "By default, reject routes from all address families";
                    }
                  }
                  description
                    "Default ebgp receive behavior";
                }
    
                leaf advertise {
                  type enumeration {
                    enum "accept" {
                      value 0;
                      description
                        "By default, advertise routes for all address families";
                    }
                    enum "reject" {
                      value 1;
                      description
                        "By default, do not advertise routes from IPv4/IPv6 unicast address families";
                    }
                    enum "reject-always" {
                      value 2;
                      description
                        "By default, do not advertise routes from any address families";
                    }
                  }
                  description
                    "Default ebgp advertise behavior";
                }
              }  // container no-policy
            }  // container ebgp
          }  // container defaults
        }  // grouping juniper-protocols-bgp
    
        grouping bgp-af-gr {
          uses apply-advanced;
    
          container long-lived {
            description
              "Long-lived graceful restart options";
            uses apply-advanced;
    
            container restarter {
              description
                "Long-lived graceful restart restarter options";
              uses apply-advanced;
    
              choice enable-disable {
                leaf disable {
                  type empty;
                  description
                    "Disable restarter functionality";
                }
              }  // choice enable-disable
    
              leaf stale-time {
                type string;
                description
                  "Stale time in seconds or dhms notation (1..16777215)";
              }
            }  // container restarter
          }  // container long-lived
    
          leaf forwarding-state-bit {
            type enumeration {
              enum "set" {
                value 0;
                description "Always set";
              }
              enum "from-fib" {
                value 1;
                description
                  "Use state of associated FIB(s)";
              }
            }
            description
              "Control forwarding-state flag negotiation";
          }
        }  // grouping bgp-af-gr
    
        grouping bgp-afi-default {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
        }  // grouping bgp-afi-default
    
        grouping apath-options {
          description
            "Number of paths to advertise";
          uses apply-advanced;
    
          leaf receive {
            type empty;
            description
              "Receive multiple paths from peer";
          }
    
          container send {
            presence "enable send";
            description
              "Send multiple paths to peer";
            uses apply-advanced;
    
            container path-selection-mode {
              junos:must "(!(".. multipath"))";
              junos:must-message "Multipath must be disabled";
              description
                "Configure how to select add-path routes";
              uses apply-advanced;
    
              choice mode {
                leaf all-paths {
                  type empty;
                  description
                    "Advertise all paths allowed by path count";
                }
                leaf equal-cost-paths {
                  type empty;
                  description
                    "Advertise equal cost paths";
                }
              }  // choice mode
            }  // container path-selection-mode
    
            leaf-list prefix-policy {
              type jt:policy-algebra;
              ordered-by user;
              description
                "Perform add-path only for prefixes that match policy";
            }
    
            leaf path-count {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type int32 {
                  range "2 .. 64";
                }
              }
              description
                "Number of paths to advertise";
            }
    
            leaf include-backup-path {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type int32 {
                  range "1 .. 2";
                }
              }
              description
                "Number of backup paths to advertise";
            }
    
            leaf multipath {
              type empty;
              description
                "Include only multipath contributor routes";
            }
          }  // container send
        }  // grouping apath-options
    
        grouping bgp-afi-flow {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          leaf-list no-validate {
            type jt:policy-algebra;
            ordered-by user;
            description
              "Bypass validation procedure for routes that match policy";
          }
    
          leaf strip-nexthop {
            type empty;
            description
              "Strip the next-hop from the outgoing flow update";
          }
    
          leaf allow-policy-add-nexthop {
            type empty;
            status deprecated;
            description
              "Allow policy to add nexthop to a route without nexthop";
          }
        }  // grouping bgp-afi-flow
    
        grouping bgp-afi-flow-with-redirect-ip-action {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          leaf-list no-validate {
            type jt:policy-algebra;
            ordered-by user;
            description
              "Bypass validation procedure for routes that match policy";
          }
    
          leaf strip-nexthop {
            type empty;
            description
              "Strip the next-hop from the outgoing flow update";
          }
    
          container legacy-redirect-ip-action {
            presence
              "enable legacy-redirect-ip-action";
            description
              "Configure legacy redirect to IP support";
            uses apply-advanced;
    
            leaf receive {
              type empty;
              description
                "Accept legacy encoded redirect-to-ip action attribute";
            }
    
            leaf send {
              type empty;
              description
                "Advertise Redirect action as legacy redirect attribute";
            }
          }  // container legacy-redirect-ip-action
    
          leaf secondary-independent-resolution {
            type empty;
            description
              "Resolve FLOW routes in VRF table independent of VPN FLOW route";
          }
        }  // grouping bgp-afi-flow-with-redirect-ip-action
    
        grouping bgp-afi-inet-transport {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
    
          leaf per-prefix-label {
            type empty;
            description
              "Allocate a unique label to each advertised prefix";
          }
    
          leaf per-group-label {
            type empty;
            description
              "Advertise prefixes with unique labels per group";
          }
    
          container traffic-statistics {
            presence "enable traffic-statistics";
            description
              "Collect statistics for BGP label-switched paths";
            uses bgpaf-traffic-statistics;
          }  // container traffic-statistics
    
          container protection {
            presence "enable protection";
            description
              "Compute backup path for active nexthop failure";
          }  // container protection
        }  // grouping bgp-afi-inet-transport
    
        grouping bgp-afi-inet6-labeled {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
    
          leaf per-group-label {
            type empty;
            description
              "Advertise prefixes with unique labels per group";
          }
    
          container traffic-statistics {
            presence "enable traffic-statistics";
            description
              "Collect statistics for BGP label-switched paths";
            uses bgpaf-traffic-statistics;
          }  // container traffic-statistics
    
          container rib {
            description
              "Select table used by labeled unicast routes";
            uses apply-advanced;
    
            leaf inet6.3 {
              type empty;
              description
                "Use inet6.3 to exchange labeled unicast routes";
            }
          }  // container rib
    
          container explicit-null {
            presence "enable explicit-null";
            description
              "Advertise explicit null";
            leaf connected-only {
              type empty;
              description
                "Advertise explicit null only for connected routes";
            }
          }  // container explicit-null
    
          container protection {
            junos:must "((!(".. .. .. .. type internal") && !(".. .. .. .. .. type internal")))";
            junos:must-message "Protection for labeled-bgp valid only for EBGP";
            presence "enable protection";
            description
              "Compute backup path for active nexthop failure";
          }  // container protection
    
          list topology {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            junos:must "(!("routing-options no-multi-topology-routing"))";
            junos:must-message "Multi topology routing is disabled";
            key "name";
            ordered-by user;
            description
              "Multi topology routing tables";
            leaf name {
              type string {
                junos:posix-pattern "!^((.*:.*)|(.{129,}))$";
                junos:pattern-message "Must be a non-reserved string of 128 characters or less";
              }
              description "Topology name";
            }
    
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify multi topology routes";
            }
          }  // list topology
        }  // grouping bgp-afi-inet6-labeled
    
        grouping bgp-afi-inet6-transport {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
    
          leaf per-prefix-label {
            type empty;
            description
              "Allocate a unique label to each advertised prefix";
          }
    
          leaf per-group-label {
            type empty;
            description
              "Advertise prefixes with unique labels per group";
          }
    
          container traffic-statistics {
            presence "enable traffic-statistics";
            description
              "Collect statistics for BGP label-switched paths";
            uses bgpaf-traffic-statistics;
          }  // container traffic-statistics
    
          container lu-export {
            presence "enable lu-export";
            description
              "Install Classful Transport routes in inet6.3";
            uses apply-advanced;
          }  // container lu-export
    
          container protection {
            presence "enable protection";
            description
              "Compute backup path for active nexthop failure";
          }  // container protection
        }  // grouping bgp-afi-inet6-transport
    
        grouping bgp-afi-l2vpn {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container egress-protection {
            junos:must "(!(".. .. .. .. type external"))";
            junos:must-message "Egress-protection is valid only for IBGP";
            presence "enable egress-protection";
            description
              "Egress router protection";
            uses apply-advanced;
    
            container context-identifier {
              description "Context identifier";
              uses apply-advanced;
    
              leaf context-id {
                junos:must "("protocols mpls egress-protection context-identifier $$ primary")";
                junos:must-message "context-identifier must be type primary";
                junos:must "("protocols mpls egress-protection context-identifier $$")";
                junos:must-message "same context-identifier must be defined in protocols mpls egress-protection";
                type jt:ipv4addr;
                description "IP address";
              }
            }  // container context-identifier
    
            leaf-list keep-import {
              junos:must "("policy-options policy-statement ")";
              junos:must-message "policy-options policy-statement";
              type jt:policy-algebra;
              ordered-by user;
              description "Import policy";
            }
          }  // container egress-protection
        }  // grouping bgp-afi-l2vpn
    
        grouping bgp-afi-l3vpn {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
    
          container egress-protection {
            junos:must "(!(".. .. .. .. type external"))";
            junos:must-message "Egress-protection is valid only for IBGP";
            presence "enable egress-protection";
            description
              "Egress router protection";
            uses apply-advanced;
    
            container context-identifier {
              description "Context identifier";
              uses apply-advanced;
    
              leaf context-id {
                junos:must "("protocols mpls egress-protection context-identifier $$ primary")";
                junos:must-message "context-identifier must be type primary";
                junos:must "("protocols mpls egress-protection context-identifier $$")";
                junos:must-message "same context-identifier must be defined in protocols mpls egress-protection";
                type jt:ipv4addr;
                description "IP address";
              }
            }  // container context-identifier
    
            leaf-list keep-import {
              junos:must "("policy-options policy-statement ")";
              junos:must-message "policy-options policy-statement";
              type jt:policy-algebra;
              ordered-by user;
              description "Import policy";
            }
          }  // container egress-protection
    
          leaf accept-local-nexthop {
            type empty;
            description
              "Enable processing of routes with own nexthop";
          }
        }  // grouping bgp-afi-l3vpn
    
        grouping bgp-afi-labeled {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
    
          leaf per-prefix-label {
            type empty;
            description
              "Allocate a unique label to each advertised prefix";
          }
    
          leaf per-group-label {
            type empty;
            description
              "Advertise prefixes with unique labels per group";
          }
    
          container traffic-statistics {
            presence "enable traffic-statistics";
            description
              "Collect statistics for BGP label-switched paths";
            uses bgpaf-traffic-statistics;
          }  // container traffic-statistics
    
          list topology {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            junos:must "(!("routing-options no-multi-topology-routing"))";
            junos:must-message "Multi topology routing is disabled";
            key "name";
            ordered-by user;
            description
              "Multi topology routing tables";
            leaf name {
              type string {
                junos:posix-pattern "!^((.*:.*)|(.{129,}))$";
                junos:pattern-message "Must be a non-reserved string of 128 characters or less";
              }
              description "Topology name";
            }
    
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify multi topology routes";
            }
          }  // list topology
    
          container rib {
            description
              "Select table used by labeled unicast routes";
            uses rib-inet3;
          }  // container rib
    
          container explicit-null {
            presence "enable explicit-null";
            description
              "Advertise explicit null";
            leaf connected-only {
              type empty;
              description
                "Advertise explicit null only for connected routes";
            }
          }  // container explicit-null
    
          container protection {
            junos:must "((!(".. .. .. .. type internal") && !(".. .. .. .. .. type internal")))";
            junos:must-message "Protection for labeled-bgp valid only for EBGP";
            presence "enable protection";
            description
              "Compute backup path for active nexthop failure";
            uses apply-advanced;
          }  // container protection
    
          container egress-protection {
            junos:must "(!(".. .. .. .. type external"))";
            junos:must-message "Egress-protection is valid only for IBGP";
            presence "enable egress-protection";
            description
              "Egress router protection";
            uses apply-advanced;
    
            container context-identifier {
              description "Context identifier";
              uses apply-advanced;
    
              leaf context-id {
                junos:must "("protocols mpls egress-protection context-identifier $$ primary")";
                junos:must-message "context-identifier must be type primary";
                junos:must "("protocols mpls egress-protection context-identifier $$")";
                junos:must-message "same context-identifier must be defined in protocols mpls egress-protection";
                type jt:ipv4addr;
                description "IP address";
              }
            }  // container context-identifier
    
            leaf-list keep-import {
              junos:must "("policy-options policy-statement ")";
              junos:must-message "policy-options policy-statement";
              type jt:policy-algebra;
              ordered-by user;
              description "Import policy";
            }
          }  // container egress-protection
    
          leaf resolve-vpn {
            type empty;
            description
              "Install received NLRI in inet.3 also";
          }
    
          container entropy-label {
            presence "enable entropy-label";
            description
              "Use entropy label for entropy label capable BGP LSPs";
            uses apply-advanced;
    
            leaf-list import {
              type jt:policy-algebra;
              ordered-by user;
              description
                "Policy to select BGP LSPs to use entropy label";
            }
    
            leaf no-next-hop-validation {
              type empty;
              description
                "Don't validate next hop field against route next hop";
            }
          }  // container entropy-label
        }  // grouping bgp-afi-labeled
    
        grouping bgp-afi-srte {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
        }  // grouping bgp-afi-srte
    
        grouping bgp-afi-topo {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container protection {
            junos:must "((!(".. .. .. .. type internal") && !(".. .. .. .. .. type internal")))";
            junos:must-message "Protection is valid only for EBGP";
            presence "enable protection";
            description
              "Compute backup path for active nexthop failure";
          }  // container protection
    
          list topology {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            junos:must "(!("routing-options no-multi-topology-routing"))";
            junos:must-message "Multi topology routing is disabled";
            key "name";
            ordered-by user;
            description
              "Multi topology routing tables";
            leaf name {
              type string {
                junos:posix-pattern "!^((.*:.*)|(.{129,}))$";
                junos:pattern-message "Must be a non-reserved string of 128 characters or less";
              }
              description "Topology name";
            }
    
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify multi topology routes";
            }
          }  // list topology
        }  // grouping bgp-afi-topo
    
        grouping bgp-afi-vpn {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
        }  // grouping bgp-afi-vpn
    
        grouping bgp-afi-vpn-protection {
          uses apply-advanced;
    
          container prefix-limit {
            description
              "Limit maximum number of prefixes from a peer";
            uses bgpaf-prefix-limit;
          }  // container prefix-limit
    
          container accepted-prefix-limit {
            description
              "Limit maximum number of prefixes accepted from a peer";
            uses bgpaf-accepted-prefix-limit;
          }  // container accepted-prefix-limit
    
          container rib-group {
            description "Routing table group";
            uses rib_group_inet_type;
          }  // container rib-group
    
          container add-path {
            description
              "Advertise multiple paths to peer";
            uses apath-options;
          }  // container add-path
    
          container aigp {
            presence "enable aigp";
            description
              "Allow sending and receiving of AIGP attribute";
            uses bgpaf-aigp-options;
          }  // container aigp
    
          leaf damping {
            type empty;
            description
              "Enable route flap damping";
          }
    
          leaf local-ipv4-address {
            type jt:ipv4addr;
            description "Local IPv4 address";
          }
    
          container loops {
            description
              "Allow local AS in received AS paths";
            uses bgpaf-loops;
          }  // container loops
    
          container delay-route-advertisements {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            presence
              "enable delay-route-advertisements";
            description
              "Delay route updates for this family until FIB-sync";
            uses apply-advanced;
    
            leaf always-wait-for-krt-drain {
              type empty;
              description
                "Wait for KRT-queue drain for more-specific prefixes";
            }
    
            container minimum-delay {
              description
                "Minumum-delay to ensure KRT sees the route flash";
              uses apply-advanced;
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after RPD start";
              }
    
              leaf inbound-convergence {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Min delay(sec) advertisement after source-peer sent all routes";
              }
            }  // container minimum-delay
    
            container maximum-delay {
              description
                "Maximum delay deferring routes";
              uses apply-advanced;
    
              leaf route-age {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement route age";
              }
    
              leaf routing-uptime {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 36000";
                  }
                }
                description
                  "Max delay(sec) advertisement after RPD start";
              }
            }  // container maximum-delay
          }  // container delay-route-advertisements
    
          container nexthop-resolution {
            description
              "Configure nexthop resolution properties";
            uses apply-advanced;
    
            leaf no-resolution {
              type empty;
              description
                "Consider nexthop good without resolution attempt";
            }
    
            leaf preserve-nexthop-hierarchy {
              type empty;
              description
                "Attempt preserving resolved nexthop chain in forwarding";
            }
          }  // container nexthop-resolution
    
          container defer-initial-multipath-build {
            presence
              "enable defer-initial-multipath-build";
            description
              "Defer initial multipath build until EOR is received";
            uses apply-advanced;
    
            leaf maximum-delay {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 3600";
                }
              }
              description
                "Max delay(sec) multipath build after peer is up";
            }
          }  // container defer-initial-multipath-build
    
          container graceful-restart {
            description
              "BGP graceful restart options";
            uses bgp-af-gr;
          }  // container graceful-restart
    
          leaf extended-nexthop {
            junos:must "(!("system processes routing bgp rib-sharding"))";
            junos:must-message "Can't be configured together with rib-sharding";
            type empty;
            description
              "Extended nexthop encoding";
          }
    
          leaf extended-nexthop-color {
            type empty;
            description
              "Resolve using extended color nexthop";
          }
    
          leaf extended-nexthop-tunnel {
            type empty;
            description
              "Use BGP tunnel attribute";
          }
    
          leaf no-install {
            type empty;
            description
              "Dont install received routes in forwarding";
          }
    
          leaf route-age-bgp-view {
            type empty;
            description
              "Maintain BGP route's age based on Update messages only";
          }
    
          container output-queue-priority {
            description
              "Default output-queue to assign updates to";
            uses bgp-output-queue-priority-class;
          }  // container output-queue-priority
    
          container route-refresh-priority {
            description
              "Default output-queue to assign route refreshes to";
            uses bgp-output-queue-priority-class;
          }  // container route-refresh-priority
    
          container withdraw-priority {
            description
              "Default output-queue to assign withdrawn routes to";
            uses bgp-output-queue-priority-class;
          }  // container withdraw-priority
    
          leaf advertise-srv6-service {
            type empty;
            description "Advertise SRv6 service";
          }
    
          leaf accept-srv6-service {
            type empty;
            description "Accept SRv6 service";
          }
    
          container aggregate-label {
            presence "enable aggregate-label";
            description
              "Aggregate labels of incoming routes with the same FEC";
            uses apply-advanced;
    
            leaf community {
              type string;
              description
                "Community to identify the FEC of incoming routes";
            }
          }  // container aggregate-label
    
          container egress-protection {
            junos:must "(!(".. .. .. .. type external"))";
            junos:must-message "Egress-protection is valid only for IBGP";
            presence "enable egress-protection";
            description
              "Egress router protection";
            uses apply-advanced;
    
            container context-identifier {
              description "Context identifier";
              uses apply-advanced;
    
              leaf context-id {
                junos:must "("protocols mpls egress-protection context-identifier $$ primary")";
                junos:must-message "context-identifier must be type primary";
                junos:must "("protocols mpls egress-protection context-identifier $$")";
                junos:must-message "same context-identifier must be defined in protocols mpls egress-protection";
                type jt:ipv4addr;
                description "IP address";
              }
            }  // container context-identifier
    
            leaf-list keep-import {
              junos:must "("policy-options policy-statement ")";
              junos:must-message "policy-options policy-statement";
              type jt:policy-algebra;
              ordered-by user;
              description "Import policy";
            }
          }  // container egress-protection
        }  // grouping bgp-afi-vpn-protection
    
        grouping bgp-output-queue-priority-class {
          choice class {
            leaf priority {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 16";
                }
              }
              description
                "Output queue priority; higher is better";
            }
            leaf expedited {
              type empty;
              description
                "Expedited queue; highest priority";
            }
          }  // choice class
        }  // grouping bgp-output-queue-priority-class
    
        grouping bgp_filter_obj {
          description
            "Filter to apply to tracing";
          leaf match-on {
            type enumeration {
              enum "prefix" {
                value 0;
                description
                  "Filter based on prefix";
              }
            }
            description
              "Argument on which to match";
          }
    
          leaf-list policy {
            type jt:policy-algebra;
            ordered-by user;
            description "Filter policy";
          }
        }  // grouping bgp_filter_obj
    
        grouping bgpaf-accepted-prefix-limit {
          uses apply-advanced;
    
          leaf maximum {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 4294967295";
              }
            }
            description
              "Maximum number of prefixes accepted from a peer";
          }
    
          container teardown {
            junos:must "(!(".. hide-excess"))";
            junos:must-message "Can't be configured together with hide-excess";
            junos:must "(!(".. drop-excess"))";
            junos:must-message "Can't be configured together with drop-excess";
            presence "enable teardown";
            description
              "Clear peer connection on reaching limit";
            uses apply-advanced;
    
            leaf limit-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100";
                }
              }
              description
                "Percentage of prefix-limit to start warnings";
            }
    
            container idle-timeout {
              presence "enable idle-timeout";
              description
                "Timeout before attempting to restart peer";
              choice idle-parm {
                leaf forever {
                  type empty;
                  description
                    "Idle the peer until the user intervenes";
                }
                leaf timeout {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 2400";
                    }
                  }
                  description
                    "Timeout value, in minutes, for restarting peer";
                }
              }  // choice idle-parm
            }  // container idle-timeout
          }  // container teardown
    
          container drop-excess {
            junos:must "(!(".. hide-excess"))";
            junos:must-message "Can't be configured together with hide-excess";
            junos:must "(!(".. teardown"))";
            junos:must-message "Can't be configured together with teardown";
            presence "enable drop-excess";
            description
              "Drop routes from peer on reaching limit";
            uses apply-advanced;
    
            leaf limit-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100";
                }
              }
              description
                "Percentage of prefix-limit to start warnings";
            }
          }  // container drop-excess
    
          container hide-excess {
            junos:must "(!(".. teardown"))";
            junos:must-message "Can't be configured together with teardown";
            junos:must "(!(".. drop-excess"))";
            junos:must-message "Can't be configured together with drop-excess";
            presence "enable hide-excess";
            description
              "Hide routes from peer on reaching limit";
            uses apply-advanced;
    
            leaf limit-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100";
                }
              }
              description
                "Percentage of prefix-limit to start warnings";
            }
          }  // container hide-excess
        }  // grouping bgpaf-accepted-prefix-limit
    
        grouping bgpaf-aigp-options {
          uses apply-advanced;
    
          leaf disable {
            type empty;
            description
              "Disable sending and receiving of AIGP attribute";
          }
        }  // grouping bgpaf-aigp-options
    
        grouping bgpaf-loops {
          uses apply-advanced;
    
          leaf loops {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type int32 {
                range "1 .. 10";
              }
            }
            description "AS-Path loop count";
          }
        }  // grouping bgpaf-loops
    
        grouping bgpaf-prefix-limit {
          uses apply-advanced;
    
          leaf maximum {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 4294967295";
              }
            }
            description
              "Maximum number of prefixes from a peer";
          }
    
          container teardown {
            junos:must "(!(".. hide-excess"))";
            junos:must-message "Can't be configured together with hide-excess";
            junos:must "(!(".. drop-excess"))";
            junos:must-message "Can't be configured together with drop-excess";
            presence "enable teardown";
            description
              "Clear peer connection on reaching limit";
            uses apply-advanced;
    
            leaf limit-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100";
                }
              }
              description
                "Percentage of prefix-limit to start warnings";
            }
    
            container idle-timeout {
              presence "enable idle-timeout";
              description
                "Timeout before attempting to restart peer";
              choice idle-parm {
                leaf forever {
                  type empty;
                  description
                    "Idle the peer until the user intervenes";
                }
                leaf timeout {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 2400";
                    }
                  }
                  description
                    "Timeout value, in minutes, for restarting peer";
                }
              }  // choice idle-parm
            }  // container idle-timeout
          }  // container teardown
    
          container drop-excess {
            junos:must "(!(".. hide-excess"))";
            junos:must-message "Can't be configured together with hide-excess";
            junos:must "(!(".. teardown"))";
            junos:must-message "Can't be configured together with teardown";
            presence "enable drop-excess";
            description
              "Drop routes from peer on reaching limit";
            uses apply-advanced;
    
            leaf limit-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100";
                }
              }
              description
                "Percentage of prefix-limit to start warnings";
            }
          }  // container drop-excess
    
          container hide-excess {
            junos:must "(!(".. teardown"))";
            junos:must-message "Can't be configured together with teardown";
            junos:must "(!(".. drop-excess"))";
            junos:must-message "Can't be configured together with drop-excess";
            presence "enable hide-excess";
            description
              "Hide routes from peer on reaching limit";
            uses apply-advanced;
    
            leaf limit-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100";
                }
              }
              description
                "Percentage of prefix-limit to start warnings";
            }
          }  // container hide-excess
        }  // grouping bgpaf-prefix-limit
    
        grouping bgpaf-traffic-statistics {
          uses apply-advanced;
    
          leaf labeled-path {
            type empty;
            description
              "Ingress labeled path statistics";
          }
    
          container file {
            description
              "Statistics file options";
            leaf filename {
              type string {
                junos:posix-pattern "![/ %]";
                junos:pattern-message "Must not contain '/', % or a space";
                length "1 .. 1024";
              }
              description
                "Name of file in which to write trace information";
            }
    
            leaf replace {
              type empty;
              status deprecated;
              description
                "Replace trace file rather than appending to it";
            }
    
            leaf size {
              type string;
              description
                "Maximum trace file size";
            }
    
            leaf files {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "2 .. 1000";
                }
              }
              default "10";
              description
                "Maximum number of trace files";
            }
    
            leaf no-stamp {
              type empty;
              status deprecated;
              description
                "Do not timestamp trace file";
            }
    
            choice world-readable-choice {
              leaf world-readable {
                type empty;
                description
                  "Allow any user to read the log file";
              }
              leaf no-world-readable {
                type empty;
                description
                  "Don't allow any user to read the log file";
              }
            }  // choice world-readable-choice
          }  // container file
    
          leaf interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type int32 {
                range "60 .. 65535";
              }
            }
            description
              "Time to collect statistics (seconds)";
          }
        }  // grouping bgpaf-traffic-statistics
    
        grouping juniper-virtual-chassis-traceoptions {
          description
            "Global tracing options for virtual chassis";
          uses apply-advanced;
    
          container file {
            description "Trace file options";
            uses vchassis_trace_file_type;
          }  // container file
    
          list flag {
            key "name";
            ordered-by user;
            description "Tracing parameters";
            leaf name {
              type enumeration {
                enum "parse" {
                  value 0;
                  description
                    "Trace configuration parsing";
                }
                enum "hello" {
                  value 1;
                  description
                    "Trace virtual chassis hello packets";
                }
                enum "psn" {
                  value 2;
                  description
                    "Trace partial sequence number (PSN) packets";
                }
                enum "csn" {
                  value 3;
                  description
                    "Trace complete sequence number (CSN) packets";
                }
                enum "lsp" {
                  value 4;
                  description
                    "Trace virtual link-state packets";
                }
                enum "normal" {
                  value 5;
                  description
                    "Trace normal events";
                }
                enum "task" {
                  value 6;
                  description
                    "Trace virtual chassis task processing";
                }
                enum "krt" {
                  value 7;
                  description
                    "Trace virtual chassis kernel events";
                }
                enum "spf" {
                  value 8;
                  description
                    "Trace virtual chassis SPF events";
                }
                enum "me" {
                  value 9;
                  description
                    "Trace virtual chassis master election events";
                }
                enum "packets" {
                  value 10;
                  description
                    "Trace virtual chassis packets";
                }
                enum "lsp-generation" {
                  value 11;
                  description
                    "Trace virtual chassis LSP generation";
                }
                enum "error" {
                  value 12;
                  description
                    "Trace virtual chassis errors";
                }
                enum "route" {
                  value 13;
                  description
                    "Trace virtual chassis routing information";
                }
                enum "state" {
                  value 14;
                  description
                    "Trace virtual chassis state transitions";
                }
                enum "auto-configuration" {
                  value 15;
                  description
                    "Trace virtual chassis ports auto configuration";
                }
                enum "graceful-restart" {
                  value 16;
                  description
                    "Trace graceful restart events";
                }
                enum "dcp-infra" {
                  value 17;
                  description
                    "Trace dcp infrastructure configuration";
                }
                enum "dcp-dev-state" {
                  value 18;
                  description
                    "Trace dcp infrastructure configuration";
                }
                enum "heartbeat" {
                  value 19;
                  description
                    "Trace virtual chassis heartbeat packets";
                }
                enum "all" {
                  value 20;
                  description "Trace everything";
                }
              }
            }
    
            leaf send {
              type empty;
              description
                "Trace transmitted packets";
            }
    
            leaf receive {
              type empty;
              description
                "Trace received packets";
            }
    
            leaf detail {
              type empty;
              description
                "Trace detailed information";
            }
    
            leaf disable {
              type empty;
              description
                "Disable this trace flag";
            }
          }  // list flag
        }  // grouping juniper-virtual-chassis-traceoptions
    
        grouping macro-data-type {
          leaf name {
            type string;
            description
              "Keyword part of the keyword-value pair";
          }
    
          leaf value {
            type string;
            description
              "Value part of the keyword-value pair";
          }
        }  // grouping macro-data-type
    
        grouping rib-inet3 {
          uses apply-advanced;
    
          container inet.3 {
            presence "enable inet.3";
            description
              "Use inet.3 to exchange labeled unicast routes";
            uses apply-advanced;
          }  // container inet.3
        }  // grouping rib-inet3
    
        grouping rib_group_inet_type {
          description "Routing table group";
          leaf ribgroup-name {
            type string;
            description
              "Name of the routing table group";
          }
        }  // grouping rib_group_inet_type
    
        grouping vchassis_trace_file_type {
          leaf filename {
            type string {
              junos:posix-pattern "![/ %]";
              junos:pattern-message "Must not contain '/', % or a space";
              length "1 .. 1024";
            }
            description
              "Name of file in which to write trace information";
          }
    
          leaf replace {
            type empty;
            description
              "Replace trace file rather than appending to it";
          }
    
          leaf size {
            type string;
            description
              "Maximum trace file size";
          }
    
          leaf files {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "2 .. 1000";
              }
            }
            default "10";
            description
              "Maximum number of trace files";
          }
    
          leaf no-stamp {
            type empty;
            description
              "Do not timestamp trace file";
          }
    
          choice world-readable-choice {
            leaf world-readable {
              type empty;
              description
                "Allow any user to read the log file";
            }
            leaf no-world-readable {
              type empty;
              description
                "Don't allow any user to read the log file";
            }
          }  // choice world-readable-choice
        }  // grouping vchassis_trace_file_type
      }  // module junos-nfx-conf-fabric
    

© 2023 YumaWorks, Inc. All rights reserved.