<?xml version="1.0"?>
<interfaceDefinition>
  <node name="policy" owner="${vyos_conf_scripts_dir}/policy.py">
    <properties>
      <priority>200</priority>
      <help>Routing policy</help>
    </properties>
    <children>
      <tagNode name="access-list">
        <properties>
          <help>IP access-list filter</help>
          <valueHelp>
            <format>u32:1-99</format>
            <description>IP standard access list</description>
          </valueHelp>
          <valueHelp>
            <format>u32:100-199</format>
            <description>IP extended access list</description>
          </valueHelp>
          <valueHelp>
            <format>u32:1300-1999</format>
            <description>IP standard access list (expanded range)</description>
          </valueHelp>
          <valueHelp>
            <format>u32:2000-2699</format>
            <description>IP extended access list (expanded range)</description>
          </valueHelp>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this access-list</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Access-list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <node name="destination">
                <properties>
                  <help>Destination network or address</help>
                </properties>
                <children>
                  <leafNode name="any">
                    <properties>
                      <help>Any IP address to match</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  #include <include/policy/host.xml.i>
                  #include <include/policy/inverse-mask.xml.i>
                  #include <include/policy/network.xml.i>
                </children>
              </node>
              <node name="source">
                <properties>
                  <help>Source network or address to match</help>
                </properties>
                <children>
                  <leafNode name="any">
                    <properties>
                      <help>Any IP address to match</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  #include <include/policy/host.xml.i>
                  #include <include/policy/inverse-mask.xml.i>
                  #include <include/policy/network.xml.i>
                </children>
              </node>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="access-list6">
        <properties>
          <help>IPv6 access-list filter</help>
          <valueHelp>
            <format>txt</format>
            <description>Name of IPv6 access-list</description>
          </valueHelp>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this access-list6</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Access-list6 rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <node name="source">
                <properties>
                  <help>Source IPv6 network to match</help>
                </properties>
                <children>
                  <leafNode name="any">
                    <properties>
                      <help>Any IP address to match</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  <leafNode name="exact-match">
                    <properties>
                      <help>Exact match of the network prefixes</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  <leafNode name="network">
                    <properties>
                      <help>Network/netmask to match</help>
                      <valueHelp>
                        <format>ipv6net</format>
                        <description>IPv6 address and prefix length</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv6-prefix"/>
                      </constraint>
                    </properties>
                  </leafNode>
                </children>
              </node>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="as-path-list">
        <properties>
          <help>Add a BGP autonomous system path filter</help>
          <valueHelp>
            <format>txt</format>
            <description>AS path list name</description>
          </valueHelp>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this as-path-list</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>AS path list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <leafNode name="regex">
                <properties>
                  <help>Regular expression to match against an AS path</help>
                  <valueHelp>
                    <format>txt</format>
                    <description>AS path regular expression (ex: "64501 64502")</description>
                  </valueHelp>
                </properties>
              </leafNode>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="community-list">
        <properties>
          <help>Add a BGP community list entry</help>
          <valueHelp>
            <format>txt</format>
            <description>BGP community-list name</description>
          </valueHelp>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this BGP community list</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Community-list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <leafNode name="regex">
                <properties>
                  <help>Regular expression to match against a community-list</help>
                  <completionHelp>
                    <list>local-AS no-advertise no-export internet additive</list>
                  </completionHelp>
                  <valueHelp>
                    <format>&lt;aa:nn&gt;</format>
                    <description>Community number in AA:NN format</description>
                  </valueHelp>
                  <valueHelp>
                    <format>local-AS</format>
                    <description>Well-known communities value NO_EXPORT_SUBCONFED 0xFFFFFF03</description>
                  </valueHelp>
                  <valueHelp>
                    <format>no-advertise</format>
                    <description>Well-known communities value NO_ADVERTISE 0xFFFFFF02</description>
                  </valueHelp>
                  <valueHelp>
                    <format>no-export</format>
                    <description>Well-known communities value NO_EXPORT 0xFFFFFF01</description>
                  </valueHelp>
                  <valueHelp>
                    <format>internet</format>
                    <description>Well-known communities value 0</description>
                  </valueHelp>
                  <valueHelp>
                    <format>additive</format>
                    <description>New value is appended to the existing value</description>
                  </valueHelp>
                </properties>
              </leafNode>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="extcommunity-list">
        <properties>
          <help>Add a BGP extended community list entry</help>
          <valueHelp>
            <format>txt</format>
            <description>BGP extended community-list name</description>
          </valueHelp>
          <constraint>
            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
          </constraint>
          <constraintErrorMessage>Should be an alphanumeric name</constraintErrorMessage>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this BGP extended community list</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Extended community-list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <leafNode name="regex">
                <properties>
                  <help>Regular expression to match against an extended community list</help>
                  <valueHelp>
                    <format>&lt;aa:nn:nn&gt;</format>
                    <description>Extended community list regular expression</description>
                  </valueHelp>
                  <valueHelp>
                    <format>&lt;rt aa:nn:nn&gt;</format>
                    <description>Route Target regular expression</description>
                  </valueHelp>
                  <valueHelp>
                    <format>&lt;soo aa:nn:nn&gt;</format>
                    <description>Site of Origin regular expression</description>
                  </valueHelp>
                </properties>
              </leafNode>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="large-community-list">
        <properties>
          <help>Add a BGP large community list entry</help>
          <valueHelp>
            <format>txt</format>
            <description>BGP large-community-list name</description>
          </valueHelp>
          <constraint>
            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
          </constraint>
          <constraintErrorMessage>Should be an alphanumeric name</constraintErrorMessage>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this BGP extended community list</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Large community-list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <leafNode name="regex">
                <properties>
                  <help>Regular expression to match against a large community list</help>
                  <valueHelp>
                    <format>ASN:NN:NN</format>
                    <description>BGP large-community-list filter</description>
                  </valueHelp>
                  <valueHelp>
                    <format>IP:NN:NN</format>
                    <description>BGP large-community-list filter (IPv4 address format)</description>
                  </valueHelp>
                  <constraint>
                    <validator name="bgp-large-community-list"/>
                  </constraint>
                  <constraintErrorMessage>Malformed large-community-list</constraintErrorMessage>
                </properties>
              </leafNode>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="prefix-list">
        <properties>
          <help>IP prefix-list filter</help>
          <valueHelp>
            <format>txt</format>
            <description>Name of IPv4 prefix-list</description>
          </valueHelp>
          <constraint>
            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
          </constraint>
          <constraintErrorMessage>Name of prefix-list can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this prefix-list</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Prefix-list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <leafNode name="ge">
                <properties>
                  <help>Prefix length to match a netmask greater than or equal to it</help>
                  <valueHelp>
                    <format>u32:0-32</format>
                    <description>Netmask greater than length</description>
                  </valueHelp>
                  <constraint>
                    <validator name="numeric" argument="--range 0-32"/>
                  </constraint>
                </properties>
              </leafNode>
              <leafNode name="le">
                <properties>
                  <help>Prefix length to match a netmask less than or equal to it</help>
                  <valueHelp>
                    <format>u32:0-32</format>
                    <description>Netmask less than length</description>
                  </valueHelp>
                  <constraint>
                    <validator name="numeric" argument="--range 0-32"/>
                  </constraint>
                </properties>
              </leafNode>
              <leafNode name="prefix">
                <properties>
                  <help>Prefix to match</help>
                  <valueHelp>
                    <format>ipv4net</format>
                    <description>Prefix to match against</description>
                  </valueHelp>
                  <constraint>
                    <validator name="ipv4-prefix"/>
                  </constraint>
                </properties>
              </leafNode>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="prefix-list6">
        <properties>
          <help>IPv6 prefix-list filter</help>
          <valueHelp>
            <format>txt</format>
            <description>Name of IPv6 prefix-list</description>
          </valueHelp>
          <constraint>
            #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
          </constraint>
          <constraintErrorMessage>Name of prefix-list6 can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this prefix-list6</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Prefix-list rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              #include <include/generic-description.xml.i>
              <leafNode name="ge">
                <properties>
                  <help>Prefix length to match a netmask greater than or equal to it</help>
                  <valueHelp>
                    <format>u32:0-128</format>
                    <description>Netmask greater than length</description>
                  </valueHelp>
                  <constraint>
                    <validator name="numeric" argument="--range 0-128"/>
                  </constraint>
                </properties>
              </leafNode>
              <leafNode name="le">
                <properties>
                  <help>Prefix length to match a netmask less than or equal to it</help>
                  <valueHelp>
                    <format>u32:0-128</format>
                    <description>Netmask less than length</description>
                  </valueHelp>
                  <constraint>
                    <validator name="numeric" argument="--range 0-128"/>
                  </constraint>
                </properties>
              </leafNode>
              <leafNode name="prefix">
                <properties>
                  <help>Prefix to match</help>
                  <valueHelp>
                    <format>ipv6net</format>
                    <description>IPv6 prefix</description>
                  </valueHelp>
                  <constraint>
                    <validator name="ipv6-prefix"/>
                  </constraint>
                </properties>
              </leafNode>
            </children>
          </tagNode>
        </children>
      </tagNode>
      <tagNode name="route-map">
        <properties>
          <help>IP route-map</help>
          <valueHelp>
            <format>txt</format>
            <description>Route map name</description>
          </valueHelp>
          <constraint>
            <regex>[-_a-zA-Z0-9.]+</regex>
          </constraint>
          <constraintErrorMessage>Name of route-map can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
        </properties>
        <children>
          #include <include/generic-description.xml.i>
          <tagNode name="rule">
            <properties>
              <help>Rule for this route-map</help>
              <valueHelp>
                <format>u32:1-65535</format>
                <description>Route-map rule number</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-65535"/>
              </constraint>
            </properties>
            <children>
              #include <include/policy/action.xml.i>
              <leafNode name="call">
                <properties>
                  <help>Call another route-map on match</help>
                  <valueHelp>
                    <format>txt</format>
                    <description>Route map name</description>
                  </valueHelp>
                  <completionHelp>
                    <path>policy route-map</path>
                  </completionHelp>
                </properties>
              </leafNode>
              <leafNode name="continue">
                <properties>
                  <help>Jump to a different rule in this route-map on a match</help>
                  <valueHelp>
                    <format>u32:1-65535</format>
                    <description>Rule number</description>
                  </valueHelp>
                </properties>
              </leafNode>
              #include <include/generic-description.xml.i>
              <node name="match">
                <properties>
                  <help>Route parameters to match</help>
                </properties>
                <children>
                  <leafNode name="as-path">
                    <properties>
                      <help>BGP as-path-list to match</help>
                      <completionHelp>
                        <path>policy as-path-list</path>
                      </completionHelp>
                    </properties>
                  </leafNode>
                  <node name="community">
                    <properties>
                      <help>BGP community-list to match</help>
                    </properties>
                    <children>
                      <leafNode name="community-list">
                        <properties>
                          <help>BGP community-list to match</help>
                          <completionHelp>
                            <path>policy community-list</path>
                          </completionHelp>
                        </properties>
                      </leafNode>
                      <leafNode name="exact-match">
                        <properties>
                          <help>Community-list to exactly match</help>
                          <valueless/>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <node name="evpn">
                    <properties>
                      <help>Ethernet Virtual Private Network</help>
                    </properties>
                    <children>
                      <leafNode name="default-route">
                        <properties>
                          <help>Default EVPN type-5 route</help>
                          <valueless/>
                        </properties>
                      </leafNode>
                      #include <include/bgp/route-distinguisher.xml.i>
                      <leafNode name="route-type">
                        <properties>
                          <help>Match route-type</help>
                          <completionHelp>
                            <list>macip multicast prefix</list>
                          </completionHelp>
                          <valueHelp>
                            <format>macip</format>
                            <description>mac-ip route</description>
                          </valueHelp>
                          <valueHelp>
                            <format>multicast</format>
                            <description>IMET route</description>
                          </valueHelp>
                          <valueHelp>
                            <format>prefix</format>
                            <description>Prefix route</description>
                          </valueHelp>
                          <constraint>
                            <regex>(macip|multicast|prefix)</regex>
                          </constraint>
                        </properties>
                      </leafNode>
                      #include <include/vni.xml.i>
                    </children>
                  </node>
                  <leafNode name="extcommunity">
                    <properties>
                      <help>BGP extended community to match</help>
                      <completionHelp>
                        <path>policy extcommunity-list</path>
                      </completionHelp>
                    </properties>
                  </leafNode>
                  #include <include/generic-interface.xml.i>
                  <node name="ip">
                    <properties>
                      <help>IP prefix parameters to match</help>
                    </properties>
                    <children>
                      <node name="address">
                        <properties>
                          <help>IP address of route to match</help>
                        </properties>
                        <children>
                          <leafNode name="access-list">
                            <properties>
                              <help>IP access-list to match</help>
                              <valueHelp>
                                <format>u32:1-99</format>
                                <description>IP standard access list</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:100-199</format>
                                <description>IP extended access list</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:1300-1999</format>
                                <description>IP standard access list (expanded range)</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:2000-2699</format>
                                <description>IP extended access list (expanded range)</description>
                              </valueHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-list">
                            <properties>
                              <help>IP prefix-list to match</help>
                              <completionHelp>
                                <path>policy prefix-list</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-len">
                            <properties>
                              <help>IP prefix-length to match (can be used for kernel routes only)</help>
                              <valueHelp>
                                <format>u32:0-32</format>
                                <description>Prefix length</description>
                              </valueHelp>
                              <constraint>
                                <validator name="numeric" argument="--range 0-32"/>
                              </constraint>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                <!--  T3304 but it overwrite node nexthop
                      <leafNode name="nexthop">
                        <properties>
                          <help>IP next-hop of route to match</help>
                          <valueHelp>
                            <format>ipv4</format>
                            <description>Next-hop IPv4 router address</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv4-address"/>
                          </constraint>
                        </properties>
                      </leafNode>   -->
                      <node name="nexthop">
                        <properties>
                          <help>IP next-hop of route to match</help>
                        </properties>
                        <children>
                          <leafNode name="address">
                            <properties>
                              <help>IP address to match</help>
                              <valueHelp>
                                <format>ipv4</format>
                                <description>Nexthop IP address</description>
                              </valueHelp>
                              <constraint>
                                <validator name="ipv4-address"/>
                              </constraint>
                            </properties>
                          </leafNode>
                          <leafNode name="access-list">
                            <properties>
                              <help>IP access-list to match</help>
                              <valueHelp>
                                <format>u32:1-99</format>
                                <description>IP standard access list</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:100-199</format>
                                <description>IP extended access list</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:1300-1999</format>
                                <description>IP standard access list (expanded range)</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:2000-2699</format>
                                <description>IP extended access list (expanded range)</description>
                              </valueHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-len">
                            <properties>
                              <help>IP prefix-length to match</help>
                              <valueHelp>
                                <format>u32:0-32</format>
                                <description>Prefix length</description>
                              </valueHelp>
                              <constraint>
                                <validator name="numeric" argument="--range 0-32"/>
                              </constraint>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-list">
                            <properties>
                              <help>IP prefix-list to match</help>
                              <completionHelp>
                                <path>policy prefix-list</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="type">
                            <properties>
                              <help>Match type</help>
                              <completionHelp>
                                <list>blackhole</list>
                              </completionHelp>
                              <valueHelp>
                                <format>blackhole</format>
                                <description>Blackhole</description>
                              </valueHelp>
                              <constraint>
                                <regex>(blackhole)</regex>
                              </constraint>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                      <node name="route-source">
                        <properties>
                          <help>Match advertising source address of route</help>
                        </properties>
                        <children>
                          <leafNode name="access-list">
                            <properties>
                              <help>IP access-list to match</help>
                              <valueHelp>
                                <format>u32:1-99</format>
                                <description>IP standard access list</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:100-199</format>
                                <description>IP extended access list</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:1300-1999</format>
                                <description>IP standard access list (expanded range)</description>
                              </valueHelp>
                              <valueHelp>
                                <format>u32:2000-2699</format>
                                <description>IP extended access list (expanded range)</description>
                              </valueHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-list">
                            <properties>
                              <help>IP prefix-list to match</help>
                              <completionHelp>
                                <path>policy prefix-list</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                    </children>
                  </node>
                  <node name="ipv6">
                    <properties>
                      <help>IPv6 prefix parameters to match</help>
                    </properties>
                    <children>
                      <node name="address">
                        <properties>
                          <help>IPv6 address of route to match</help>
                        </properties>
                        <children>
                          <leafNode name="access-list">
                            <properties>
                              <help>IPv6 access-list to match</help>
                              <valueHelp>
                                <format>txt</format>
                                <description>IPV6 access list name</description>
                              </valueHelp>
                              <completionHelp>
                                <path>policy access-list6</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-list">
                            <properties>
                              <help>IPv6 prefix-list to match</help>
                              <completionHelp>
                                <path>policy prefix-list6</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-len">
                            <properties>
                              <help>IPv6 prefix-length to match (can be used for kernel routes only)</help>
                              <valueHelp>
                                <format>u32:0-128</format>
                                <description>Prefix length</description>
                              </valueHelp>
                              <constraint>
                                <validator name="numeric" argument="--range 0-128"/>
                              </constraint>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                <!--  T3976 but it overwrite node nexthop
                      <leafNode name="nexthop">
                        <properties>
                          <help>IPv6 next-hop of route to match</help>
                          <valueHelp>
                            <format>ipv6</format>
                            <description>Nexthop IPv6 address</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv6-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                    </children>
                  </node> -->
                      <node name="nexthop">
                        <properties>
                          <help>IPv6 next-hop of route to match</help>
                        </properties>
                        <children>
                          <leafNode name="address">
                            <properties>
                              <help>IPv6 address of next-hop</help>
                              <valueHelp>
                                <format>ipv6</format>
                                <description>Nexthop IPv6 address</description>
                              </valueHelp>
                              <constraint>
                                <validator name="ipv6-address"/>
                              </constraint>
                            </properties>
                          </leafNode>
                          <leafNode name="access-list">
                            <properties>
                              <help>IPv6 access-list to match</help>
                              <valueHelp>
                                <format>txt</format>
                                <description>IPV6 access list name</description>
                              </valueHelp>
                              <completionHelp>
                                <path>policy access-list6</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="prefix-list">
                            <properties>
                              <help>IPv6 prefix-list to match</help>
                              <completionHelp>
                                <path>policy prefix-list6</path>
                              </completionHelp>
                            </properties>
                          </leafNode>
                          <leafNode name="type">
                            <properties>
                              <help>Match type</help>
                              <completionHelp>
                                <list>blackhole</list>
                              </completionHelp>
                              <valueHelp>
                                <format>blackhole</format>
                                <description>Blackhole</description>
                              </valueHelp>
                              <constraint>
                                <regex>(blackhole)</regex>
                              </constraint>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                    </children>
                  </node>
                  <node name="large-community">
                    <properties>
                      <help>Match BGP large communities</help>
                    </properties>
                    <children>
                      <leafNode name="large-community-list">
                        <properties>
                          <help>BGP large-community-list to match</help>
                          <completionHelp>
                            <path>policy large-community-list</path>
                          </completionHelp>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <leafNode name="local-preference">
                    <properties>
                      <help>Local Preference</help>
                      <valueHelp>
                        <format>u32:0-4294967295</format>
                        <description>Local Preference</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 0-4294967295"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="metric">
                    <properties>
                      <help>Metric of route to match</help>
                      <valueHelp>
                        <format>u32:1-65535</format>
                        <description>Route metric</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 1-65535"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="origin">
                    <properties>
                      <help>BGP origin code to match</help>
                      <completionHelp>
                        <list>egp igp incomplete</list>
                      </completionHelp>
                      <valueHelp>
                        <format>egp</format>
                        <description>Exterior gateway protocol origin</description>
                      </valueHelp>
                      <valueHelp>
                        <format>igp</format>
                        <description>Interior gateway protocol origin</description>
                      </valueHelp>
                      <valueHelp>
                        <format>incomplete</format>
                        <description>Incomplete origin</description>
                      </valueHelp>
                      <constraint>
                        <regex>(egp|igp|incomplete)</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="peer">
                    <properties>
                      <help>Peer address to match</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>Peer IP address</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ipv6</format>
                        <description>Peer IPv6 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ip-address"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="protocol">
                    <properties>
                      <help>Match protocol via which the route was learnt</help>
                      <completionHelp>
                        <list>babel bgp connected isis kernel ospf ospfv3 rip ripng static table vnc</list>
                      </completionHelp>
                      <valueHelp>
                        <format>babel</format>
                        <description>Babel routing protocol (Babel)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>bgp</format>
                        <description>Border Gateway Protocol (BGP)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>connected</format>
                        <description>Connected routes (directly attached subnet or host)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>isis</format>
                        <description>Intermediate System to Intermediate System (IS-IS)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>kernel</format>
                        <description>Kernel routes</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ospf</format>
                        <description>Open Shortest Path First (OSPFv2)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ospfv3</format>
                        <description>Open Shortest Path First (IPv6) (OSPFv3)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>rip</format>
                        <description>Routing Information Protocol (RIP)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ripng</format>
                        <description>Routing Information Protocol next-generation (IPv6) (RIPng)</description>
                      </valueHelp>
                      <valueHelp>
                        <format>static</format>
                        <description>Statically configured routes</description>
                      </valueHelp>
                      <valueHelp>
                        <format>table</format>
                        <description>Non-main Kernel Routing Table</description>
                      </valueHelp>
                      <valueHelp>
                        <format>vnc</format>
                        <description>Virtual Network Control (VNC)</description>
                      </valueHelp>
                      <constraint>
                        <regex>(babel|bgp|connected|isis|kernel|ospf|ospfv3|rip|ripng|static|table|vnc)</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="rpki">
                    <properties>
                      <help>Match RPKI validation result</help>
                      <completionHelp>
                        <list>invalid notfound valid</list>
                      </completionHelp>
                      <valueHelp>
                        <format>invalid</format>
                        <description>Match invalid entries</description>
                      </valueHelp>
                      <valueHelp>
                        <format>notfound</format>
                        <description>Match notfound entries</description>
                      </valueHelp>
                      <valueHelp>
                        <format>valid</format>
                        <description>Match valid entries</description>
                      </valueHelp>
                      <constraint>
                        <regex>(invalid|notfound|valid)</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  #include <include/policy/tag.xml.i>
                </children>
              </node>
              <node name="on-match">
                <properties>
                  <help>Exit policy on matches</help>
                </properties>
                <children>
                  <leafNode name="goto">
                    <properties>
                      <help>Rule number to goto on match</help>
                      <valueHelp>
                        <format>u32:1-65535</format>
                        <description>Rule number</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 1-65535"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="next">
                    <properties>
                      <help>Next sequence number to goto on match</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                </children>
              </node>
              <node name="set">
                <properties>
                  <help>Route parameters</help>
                </properties>
                <children>
                  <node name="aggregator">
                    <properties>
                      <help>BGP aggregator attribute</help>
                    </properties>
                    <children>
                      <leafNode name="as">
                        <properties>
                          <help>AS number of an aggregation</help>
                          <valueHelp>
                            <format>u32:1-4294967295</format>
                            <description>Rule number</description>
                          </valueHelp>
                          <constraint>
                            <validator name="numeric" argument="--range 1-4294967295"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="ip">
                        <properties>
                          <help>IP address of an aggregation</help>
                          <valueHelp>
                            <format>ipv4</format>
                            <description>IP address</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv4-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <node name="as-path">
                    <properties>
                      <help>Transform BGP AS_PATH attribute</help>
                    </properties>
                    <children>
                      <leafNode name="exclude">
                        <properties>
                          <help>Remove/exclude from the as-path attribute</help>
                          <valueHelp>
                            <format>u32</format>
                            <description>AS number</description>
                          </valueHelp>
                          <constraint>
                            <validator name="as-number-list"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="prepend">
                        <properties>
                          <help>Prepend to the as-path</help>
                          <valueHelp>
                            <format>u32</format>
                            <description>AS number</description>
                          </valueHelp>
                          <constraint>
                            <validator name="as-number-list"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="prepend-last-as">
                        <properties>
                          <help>Use the last AS-number in the as-path</help>
                          <valueHelp>
                            <format>u32:1-10</format>
                            <description>Number of times to insert</description>
                          </valueHelp>
                          <constraint>
                            <validator name="numeric" argument="--range 1-10"/>
                          </constraint>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <leafNode name="atomic-aggregate">
                    <properties>
                      <help>BGP atomic aggregate attribute</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  <node name="community">
                    <properties>
                      <help>BGP community attribute</help>
                    </properties>
                    <children>
                      <leafNode name="add">
                        <properties>
                          <help>Add communities to a prefix</help>
                          #include <include/policy/community-value-list.xml.i>
                        </properties>
                      </leafNode>
                      <leafNode name="replace">
                        <properties>
                          <help>Set communities for a prefix</help>
                          #include <include/policy/community-value-list.xml.i>
                        </properties>
                      </leafNode>
                      #include <include/policy/community-clear.xml.i>
                      <leafNode name="delete">
                        <properties>
                          <help>Remove communities defined in a list from a prefix</help>
                          <completionHelp>
                            <path>policy community-list</path>
                          </completionHelp>
                          <valueHelp>
                            <description>Community-list</description>
                            <format>txt</format>
                          </valueHelp>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <node name="large-community">
                    <properties>
                      <help>BGP large community attribute</help>
                    </properties>
                    <children>
                      <leafNode name="add">
                        <properties>
                          <help>Add large communities to a prefix ;</help>
                          #include <include/policy/large-community-value-list.xml.i>
                        </properties>
                      </leafNode>
                      <leafNode name="replace">
                        <properties>
                          <help>Set large communities for a prefix</help>
                          #include <include/policy/large-community-value-list.xml.i>
                        </properties>
                      </leafNode>
                      #include <include/policy/community-clear.xml.i>
                      <leafNode name="delete">
                        <properties>
                          <help>Remove communities defined in a list from a prefix</help>
                          <completionHelp>
                            <path>policy large-community-list</path>
                          </completionHelp>
                          <valueHelp>
                            <description>Community-list</description>
                            <format>txt</format>
                          </valueHelp>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <node name="extcommunity">
                    <properties>
                      <help>BGP extended community attribute</help>
                    </properties>
                    <children>
                      <leafNode name="bandwidth">
                        <properties>
                          <help>Bandwidth value in Mbps</help>
                          <completionHelp>
                            <list>cumulative num-multipaths</list>
                          </completionHelp>
                          <valueHelp>
                            <format>u32:1-25600</format>
                            <description>Bandwidth value in Mbps</description>
                          </valueHelp>
                          <valueHelp>
                            <format>cumulative</format>
                            <description>Cumulative bandwidth of all multipaths (outbound-only)</description>
                          </valueHelp>
                          <valueHelp>
                            <format>num-multipaths</format>
                            <description>Internally computed bandwidth based on number of multipaths (outbound-only)</description>
                          </valueHelp>
                          <constraint>
                            <validator name="numeric" argument="--range 1-25600"/>
                            <regex>(cumulative|num-multipaths)</regex>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="bandwidth-non-transitive">
                        <properties>
                          <help>The link bandwidth extended community is encoded as non-transitive</help>
                          <valueless/>
                        </properties>
                      </leafNode>
                      <leafNode name="rt">
                        <properties>
                          <help>Set route target value</help>
                          #include <include/policy/extended-community-value-list.xml.i>
                        </properties>
                      </leafNode>
                      <leafNode name="soo">
                        <properties>
                          <help>Set Site of Origin value</help>
                          #include <include/policy/extended-community-value-list.xml.i>
                        </properties>
                      </leafNode>
                      #include <include/policy/community-clear.xml.i>
                    </children>
                  </node>
                  <leafNode name="distance">
                    <properties>
                      <help>Locally significant administrative distance</help>
                      <valueHelp>
                        <format>u32:0-255</format>
                        <description>Distance value</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 0-255"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <node name="evpn">
                    <properties>
                      <help>Ethernet Virtual Private Network</help>
                    </properties>
                    <children>
                      <node name="gateway">
                        <properties>
                          <help>Set gateway IP for prefix advertisement route</help>
                        </properties>
                        <children>
                          <leafNode name="ipv4">
                            <properties>
                              <help>Set gateway IPv4 address</help>
                              <valueHelp>
                                <format>ipv4</format>
                                <description>Gateway IPv4 address</description>
                              </valueHelp>
                              <constraint>
                                <validator name="ipv4-address"/>
                              </constraint>
                            </properties>
                          </leafNode>
                          <leafNode name="ipv6">
                            <properties>
                              <help>Set gateway IPv6 address</help>
                              <valueHelp>
                                <format>ipv6</format>
                                <description>Gateway IPv6 address</description>
                              </valueHelp>
                              <constraint>
                                <validator name="ipv6-address"/>
                              </constraint>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                    </children>
                  </node>
                  <leafNode name="ip-next-hop">
                    <properties>
                      <help>Nexthop IP address</help>
                      <completionHelp>
                        <script>${vyos_completion_dir}/list_local_ips.sh --ipv4</script>
                        <list>unchanged peer-address</list>
                      </completionHelp>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>IP address</description>
                      </valueHelp>
                      <valueHelp>
                        <format>unchanged</format>
                        <description>Set the BGP nexthop address as unchanged</description>
                      </valueHelp>
                      <valueHelp>
                        <format>peer-address</format>
                        <description>Set the BGP nexthop address to the address of the peer</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                        <regex>(unchanged|peer-address)</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  <node name="ipv6-next-hop">
                    <properties>
                      <help>Nexthop IPv6 address</help>
                    </properties>
                    <children>
                      <leafNode name="global">
                        <properties>
                          <help>Nexthop IPv6 global address</help>
                          <completionHelp>
                            <script>${vyos_completion_dir}/list_local_ips.sh --ipv6</script>
                          </completionHelp>
                          <valueHelp>
                            <format>ipv6</format>
                            <description>IPv6 address and prefix length</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv6-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="local">
                        <properties>
                          <help>Nexthop IPv6 local address</help>
                          <completionHelp>
                            <script>${vyos_completion_dir}/list_local_ips.sh --ipv6</script>
                          </completionHelp>
                          <valueHelp>
                            <format>ipv6</format>
                            <description>IPv6 address and prefix length</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv6-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="peer-address">
                        <properties>
                          <help>Use peer address (for BGP only)</help>
                          <valueless/>
                        </properties>
                      </leafNode>
                      <leafNode name="prefer-global">
                        <properties>
                          <help>Prefer global address as the nexthop</help>
                          <valueless/>
                        </properties>
                      </leafNode>
                    </children>
                  </node>
                  <node name="l3vpn-nexthop">
                    <properties>
                      <help>Next hop Information</help>
                    </properties>
                    <children>
                      <node name="encapsulation">
                        <properties>
                          <help>Encapsulation options (for BGP only)</help>
                        </properties>
                        <children>
                          <leafNode name="gre">
                            <properties>
                              <help>Accept L3VPN traffic over GRE encapsulation</help>
                              <valueless/>
                            </properties>
                          </leafNode>
                        </children>
                       </node>
                    </children>
                  </node>
                  <leafNode name="local-preference">
                    <properties>
                      <help>BGP local preference attribute</help>
                      <valueHelp>
                        <format>u32:0-4294967295</format>
                        <description>Local preference value</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 0-4294967295"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="metric">
                    <properties>
                      <help>Destination routing protocol metric</help>
                      <valueHelp>
                        <format>&lt;+/-metric&gt;</format>
                        <description>Add or subtract metric</description>
                      </valueHelp>
                      <valueHelp>
                        <format>u32:0-4294967295</format>
                        <description>Metric value</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--relative --"/>
                        <validator name="numeric" argument="--range 0-4294967295"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="metric-type">
                    <properties>
                      <help>Open Shortest Path First (OSPF) external metric-type</help>
                      <completionHelp>
                        <list>type-1 type-2</list>
                      </completionHelp>
                      <valueHelp>
                        <format>type-1</format>
                        <description>OSPF external type 1 metric</description>
                      </valueHelp>
                      <valueHelp>
                        <format>type-2</format>
                        <description>OSPF external type 2 metric</description>
                      </valueHelp>
                      <constraint>
                        <regex>(type-1|type-2)</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="origin">
                    <properties>
                      <help>Border Gateway Protocl (BGP) origin code</help>
                      <completionHelp>
                        <list>igp egp incomplete</list>
                      </completionHelp>
                      <valueHelp>
                        <format>igp</format>
                        <description>Interior gateway protocol origin</description>
                      </valueHelp>
                      <valueHelp>
                        <format>egp</format>
                        <description>Exterior gateway protocol origin</description>
                      </valueHelp>
                      <valueHelp>
                        <format>incomplete</format>
                        <description>Incomplete origin</description>
                      </valueHelp>
                      <constraint>
                        <regex>(igp|egp|incomplete)</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="originator-id">
                    <properties>
                      <help>BGP originator ID attribute</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>Orignator IP address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="src">
                    <properties>
                      <help>Source address for route</help>
                      <completionHelp>
                        <script>${vyos_completion_dir}/list_local_ips.sh --both</script>
                      </completionHelp>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>IPv4 address</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ipv6</format>
                        <description>IPv6 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ip-address"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="table">
                    <properties>
                      <help>Set prefixes to table</help>
                      <valueHelp>
                        <format>u32:1-200</format>
                        <description>Table value</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 1-200"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  #include <include/policy/tag.xml.i>
                  <leafNode name="weight">
                    <properties>
                      <help>BGP weight attribute</help>
                      <valueHelp>
                        <format>u32:0-4294967295</format>
                        <description>BGP weight</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 0-4294967295"/>
                      </constraint>
                    </properties>
                  </leafNode>
                </children>
              </node>
            </children>
          </tagNode>
        </children>
      </tagNode>
    </children>
  </node>
</interfaceDefinition>