summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md75
-rw-r--r--Makefile1
-rw-r--r--data/configd-include.json1
-rw-r--r--data/templates/firewall/nftables-nat66.tmpl20
-rw-r--r--data/templates/frr/bgp.frr.tmpl2
-rw-r--r--data/templates/frr/ospf.frr.tmpl4
-rw-r--r--data/templates/frr/static.frr.tmpl17
-rw-r--r--data/templates/frr/vrf.frr.tmpl25
-rw-r--r--debian/control2
-rw-r--r--interface-definitions/include/accel-ppp/auth-local-users.xml.i (renamed from interface-definitions/include/accel-auth-local-users.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/auth-mode.xml.i (renamed from interface-definitions/include/accel-auth-mode.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/auth-protocols.xml.i (renamed from interface-definitions/include/accel-auth-protocols.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/client-ip-pool-start-stop.xml.i (renamed from interface-definitions/include/accel-client-ip-pool-start-stop.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/client-ip-pool-subnet.xml.i (renamed from interface-definitions/include/accel-client-ip-pool-subnet.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/client-ipv6-pool.xml.i (renamed from interface-definitions/include/accel-client-ipv6-pool.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/gateway-address.xml.i (renamed from interface-definitions/include/accel-gateway-address.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/lcp-echo-interval-failure.xml.i (renamed from interface-definitions/include/accel-lcp-echo-interval-failure.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/lcp-echo-timeout.xml.i (renamed from interface-definitions/include/accel-lcp-echo-timeout.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/mtu-128-16384.xml.i (renamed from interface-definitions/include/accel-mtu-128-16384.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/name-server.xml.i (renamed from interface-definitions/include/accel-name-server.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/ppp-mppe.xml.i (renamed from interface-definitions/include/accel-ppp-mppe.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/radius-additions-disable-accounting.xml.i (renamed from interface-definitions/include/accel-radius-additions-disable-accounting.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/radius-additions-rate-limit.xml.i (renamed from interface-definitions/include/accel-radius-additions-rate-limit.xml.i)4
-rw-r--r--interface-definitions/include/accel-ppp/radius-additions.xml.i (renamed from interface-definitions/include/accel-radius-additions.xml.i)6
-rw-r--r--interface-definitions/include/accel-ppp/wins-server.xml.i (renamed from interface-definitions/include/accel-wins-server.xml.i)4
-rw-r--r--interface-definitions/include/bfd-common.xml.i4
-rw-r--r--interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i16
-rw-r--r--interface-definitions/include/bgp-route-map.xml.i10
-rw-r--r--interface-definitions/include/bgp/bgp-afi-aggregate-address.xml.i (renamed from interface-definitions/include/bgp-afi-aggregate-address.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-allowas-in.xml.i (renamed from interface-definitions/include/bgp-afi-allowas-in.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-attribute-unchanged.xml.i (renamed from interface-definitions/include/bgp-afi-attribute-unchanged.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-capability-orf.xml.i (renamed from interface-definitions/include/bgp-afi-capability-orf.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-common.xml.i (renamed from interface-definitions/include/bgp-afi-common.xml.i)20
-rw-r--r--interface-definitions/include/bgp/bgp-afi-ipv4-prefix-list.xml.i (renamed from interface-definitions/include/bgp-afi-ipv4-prefix-list.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-ipv6-nexthop-local.xml.i (renamed from interface-definitions/include/bgp-afi-ipv6-nexthop-local.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-ipv6-prefix-list.xml.i (renamed from interface-definitions/include/bgp-afi-ipv6-prefix-list.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-l2vpn-common.xml.i (renamed from interface-definitions/include/bgp-afi-l2vpn-common.xml.i)6
-rw-r--r--interface-definitions/include/bgp/bgp-afi-maximum-paths.xml.i (renamed from interface-definitions/include/bgp-afi-maximum-paths.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-nexthop-self.xml.i (renamed from interface-definitions/include/bgp-afi-nexthop-self.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-redistribute-metric-route-map.xml.i (renamed from interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i)6
-rw-r--r--interface-definitions/include/bgp/bgp-afi-route-map.xml.i (renamed from interface-definitions/include/bgp-afi-route-map.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-route-reflector-client.xml.i (renamed from interface-definitions/include/bgp-afi-route-reflector-client.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-route-server-client.xml.i (renamed from interface-definitions/include/bgp-afi-route-server-client.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-afi-soft-reconfiguration.xml.i (renamed from interface-definitions/include/bgp-afi-soft-reconfiguration.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-bfd.xml.i (renamed from interface-definitions/include/bgp-bfd.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-capability.xml.i (renamed from interface-definitions/include/bgp-capability.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-common-config.xml.i825
-rw-r--r--interface-definitions/include/bgp/bgp-description.xml.i (renamed from interface-definitions/include/bgp-description.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-disable-capability-negotiation.xml.i (renamed from interface-definitions/include/bgp-disable-capability-negotiation.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-disable-connected-check.xml.i (renamed from interface-definitions/include/bgp-disable-connected-check.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-ebgp-multihop.xml.i (renamed from interface-definitions/include/bgp-ebgp-multihop.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-local-as.xml.i (renamed from interface-definitions/include/bgp-local-as.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-neighbor-afi-ipv4-unicast.xml.i (renamed from interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i)10
-rw-r--r--interface-definitions/include/bgp/bgp-neighbor-afi-ipv6-unicast.xml.i (renamed from interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i)12
-rw-r--r--interface-definitions/include/bgp/bgp-neighbor-afi-l2vpn-evpn.xml.i16
-rw-r--r--interface-definitions/include/bgp/bgp-override-capability.xml.i (renamed from interface-definitions/include/bgp-override-capability.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-passive.xml.i (renamed from interface-definitions/include/bgp-passive.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-password.xml.i (renamed from interface-definitions/include/bgp-password.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-peer-group.xml.i (renamed from interface-definitions/include/bgp-peer-group.xml.i)7
-rw-r--r--interface-definitions/include/bgp/bgp-remote-as.xml.i (renamed from interface-definitions/include/bgp-remote-as.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-route-target.xml.i (renamed from interface-definitions/include/bgp-route-target.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-shutdown.xml.i (renamed from interface-definitions/include/bgp-shutdown.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-timers-holdtime.xml.i (renamed from interface-definitions/include/bgp-timers-holdtime.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-timers-keepalive.xml.i (renamed from interface-definitions/include/bgp-timers-keepalive.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-ttl-security.xml.i (renamed from interface-definitions/include/bgp-ttl-security.xml.i)4
-rw-r--r--interface-definitions/include/bgp/bgp-update-source.xml.i (renamed from interface-definitions/include/bgp-update-source.xml.i)4
-rw-r--r--interface-definitions/include/certificate-ca.xml.i4
-rw-r--r--interface-definitions/include/certificate-key.xml.i4
-rw-r--r--interface-definitions/include/certificate.xml.i4
-rw-r--r--interface-definitions/include/dhcp-server-domain-search.xml.i4
-rw-r--r--interface-definitions/include/generic-disable-node.xml.i4
-rw-r--r--interface-definitions/include/interface-ipv4-options.xml.i18
-rw-r--r--interface-definitions/include/interface-ipv6-options.xml.i12
-rw-r--r--interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i (renamed from interface-definitions/include/address-ipv4-ipv6-dhcp.xml.i)4
-rw-r--r--interface-definitions/include/interface/address-ipv4-ipv6.xml.i (renamed from interface-definitions/include/address-ipv4-ipv6.xml.i)4
-rw-r--r--interface-definitions/include/interface/dhcp-options.xml.i (renamed from interface-definitions/include/dhcp-options.xml.i)4
-rw-r--r--interface-definitions/include/interface/dhcpv6-options.xml.i (renamed from interface-definitions/include/dhcpv6-options.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-arp-cache-timeout.xml.i (renamed from interface-definitions/include/interface-arp-cache-timeout.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-description.xml.i (renamed from interface-definitions/include/interface-description.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-dial-on-demand.xml.i (renamed from interface-definitions/include/interface-dial-on-demand.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-disable-arp-filter.xml.i (renamed from interface-definitions/include/interface-disable-arp-filter.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-disable-forwarding.xml.i (renamed from interface-definitions/include/interface-disable-forwarding.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-disable-link-detect.xml.i (renamed from interface-definitions/include/interface-disable-link-detect.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-disable.xml.i (renamed from interface-definitions/include/interface-disable.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-eapol.xml.i (renamed from interface-definitions/include/interface-eapol.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-enable-arp-accept.xml.i (renamed from interface-definitions/include/interface-enable-arp-accept.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-enable-arp-announce.xml.i (renamed from interface-definitions/include/interface-enable-arp-announce.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-enable-arp-ignore.xml.i (renamed from interface-definitions/include/interface-enable-arp-ignore.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-enable-proxy-arp.xml.i (renamed from interface-definitions/include/interface-enable-proxy-arp.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-hw-id.xml.i (renamed from interface-definitions/include/interface-hw-id.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-ipv4-options.xml.i18
-rw-r--r--interface-definitions/include/interface/interface-ipv6-options.xml.i12
-rw-r--r--interface-definitions/include/interface/interface-mac.xml.i (renamed from interface-definitions/include/interface-mac.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-mirror.xml.i (renamed from interface-definitions/include/interface-mirror.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-mtu-1200-16000.xml.i (renamed from interface-definitions/include/interface-mtu-1200-16000.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-mtu-1450-16000.xml.i (renamed from interface-definitions/include/interface-mtu-1450-16000.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-mtu-64-8024.xml.i (renamed from interface-definitions/include/interface-mtu-64-8024.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-mtu-68-1500.xml.i (renamed from interface-definitions/include/interface-mtu-68-1500.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-mtu-68-16000.xml.i (renamed from interface-definitions/include/interface-mtu-68-16000.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-parameters-dont-fragment.xml.i (renamed from interface-definitions/include/interface-parameters-dont-fragment.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-parameters-flowlabel.xml.i (renamed from interface-definitions/include/interface-parameters-flowlabel.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-parameters-key.xml.i (renamed from interface-definitions/include/interface-parameters-key.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-parameters-tos.xml.i (renamed from interface-definitions/include/interface-parameters-tos.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-parameters-ttl.xml.i (renamed from interface-definitions/include/interface-parameters-ttl.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-proxy-arp-pvlan.xml.i (renamed from interface-definitions/include/interface-proxy-arp-pvlan.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-source-validation.xml.i (renamed from interface-definitions/include/interface-source-validation.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-vrf.xml.i (renamed from interface-definitions/include/interface-vrf.xml.i)4
-rw-r--r--interface-definitions/include/interface/interface-xdp.xml.i (renamed from interface-definitions/include/interface-xdp.xml.i)4
-rw-r--r--interface-definitions/include/interface/ipv6-address-autoconf.xml.i (renamed from interface-definitions/include/ipv6-address-autoconf.xml.i)4
-rw-r--r--interface-definitions/include/interface/ipv6-address-eui64.xml.i (renamed from interface-definitions/include/ipv6-address-eui64.xml.i)4
-rw-r--r--interface-definitions/include/interface/ipv6-address-no-default-link-local.xml.i (renamed from interface-definitions/include/ipv6-address-no-default-link-local.xml.i)4
-rw-r--r--interface-definitions/include/interface/ipv6-address.xml.i12
-rw-r--r--interface-definitions/include/interface/ipv6-disable-forwarding.xml.i (renamed from interface-definitions/include/ipv6-disable-forwarding.xml.i)4
-rw-r--r--interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i (renamed from interface-definitions/include/ipv6-dup-addr-detect-transmits.xml.i)4
-rw-r--r--interface-definitions/include/interface/tunnel-remote.xml.i (renamed from interface-definitions/include/tunnel-remote.xml.i)4
-rw-r--r--interface-definitions/include/interface/vif-s.xml.i (renamed from interface-definitions/include/vif-s.xml.i)48
-rw-r--r--interface-definitions/include/interface/vif.xml.i (renamed from interface-definitions/include/vif.xml.i)26
-rw-r--r--interface-definitions/include/ipv6-address.xml.i12
-rw-r--r--interface-definitions/include/isis-redistribute-ipv4.xml.i4
-rw-r--r--interface-definitions/include/listen-address-ipv4.xml.i4
-rw-r--r--interface-definitions/include/listen-address.xml.i4
-rw-r--r--interface-definitions/include/nat-address.xml.i4
-rw-r--r--interface-definitions/include/nat-interface.xml.i4
-rw-r--r--interface-definitions/include/nat-port.xml.i4
-rw-r--r--interface-definitions/include/nat-rule.xml.i4
-rw-r--r--interface-definitions/include/nat-translation-port.xml.i4
-rw-r--r--interface-definitions/include/ospf/ospf-authentication.xml.i (renamed from interface-definitions/include/ospf-authentication.xml.i)4
-rw-r--r--interface-definitions/include/ospf/ospf-common-config.xml.i761
-rw-r--r--interface-definitions/include/ospf/ospf-distance-global.xml.i14
-rw-r--r--interface-definitions/include/ospf/ospf-distance-per-protocol.xml.i38
-rw-r--r--interface-definitions/include/ospf/ospf-interface-common.xml.i (renamed from interface-definitions/include/ospf-interface-common.xml.i)4
-rw-r--r--interface-definitions/include/ospf/ospf-intervals.xml.i (renamed from interface-definitions/include/ospf-intervals.xml.i)4
-rw-r--r--interface-definitions/include/ospf/ospf-metric-type.xml.i (renamed from interface-definitions/include/ospf-metric-type.xml.i)4
-rw-r--r--interface-definitions/include/ospf/ospf-metric.xml.i (renamed from interface-definitions/include/ospf-metric.xml.i)4
-rw-r--r--interface-definitions/include/ospf/ospf-router-id.xml.i14
-rw-r--r--interface-definitions/include/policy-list-action.xml.i21
-rw-r--r--interface-definitions/include/policy-list-description.xml.i11
-rw-r--r--interface-definitions/include/policy-list-rule-description.xml.i11
-rw-r--r--interface-definitions/include/port-number.xml.i4
-rw-r--r--interface-definitions/include/radius-server-ipv4-ipv6.xml.i4
-rw-r--r--interface-definitions/include/radius-server-ipv4.xml.i4
-rw-r--r--interface-definitions/include/radius-server-key.xml.i4
-rw-r--r--interface-definitions/include/radius-server-port.xml.i4
-rw-r--r--interface-definitions/include/rip/rip-access-list.xml.i (renamed from interface-definitions/include/rip-access-list.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-access-list6.xml.i (renamed from interface-definitions/include/rip-access-list6.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-default-information.xml.i (renamed from interface-definitions/include/rip-default-information.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-default-metric.xml.i (renamed from interface-definitions/include/rip-default-metric.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-interface.xml.i (renamed from interface-definitions/include/rip-interface.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-prefix-list.xml.i (renamed from interface-definitions/include/rip-prefix-list.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-prefix-list6.xml.i (renamed from interface-definitions/include/rip-prefix-list6.xml.i)4
-rw-r--r--interface-definitions/include/rip/rip-redistribute.xml.i (renamed from interface-definitions/include/rip-redistribute.xml.i)6
-rw-r--r--interface-definitions/include/rip/rip-timers.xml.i (renamed from interface-definitions/include/rip-timers.xml.i)4
-rw-r--r--interface-definitions/include/route-map.xml.i (renamed from interface-definitions/include/ospf-route-map.xml.i)4
-rw-r--r--interface-definitions/include/source-address-ipv4-ipv6.xml.i4
-rw-r--r--interface-definitions/include/source-address-ipv4.xml.i4
-rw-r--r--interface-definitions/include/source-interface-ethernet.xml.i4
-rw-r--r--interface-definitions/include/source-interface.xml.i4
-rw-r--r--interface-definitions/include/static/static-route-blackhole.xml.i (renamed from interface-definitions/include/static-route-blackhole.xml.i)6
-rw-r--r--interface-definitions/include/static/static-route-distance.xml.i (renamed from interface-definitions/include/static-route-distance.xml.i)4
-rw-r--r--interface-definitions/include/static/static-route-interface.xml.i (renamed from interface-definitions/include/static-route-interface.xml.i)4
-rw-r--r--interface-definitions/include/static/static-route-map.xml.i (renamed from interface-definitions/include/static-route-map.xml.i)4
-rw-r--r--interface-definitions/include/static/static-route-vrf.xml.i (renamed from interface-definitions/include/static-route-vrf.xml.i)4
-rw-r--r--interface-definitions/include/static/static-route.xml.i (renamed from interface-definitions/include/static-route.xml.i)16
-rw-r--r--interface-definitions/include/static/static-route6.xml.i (renamed from interface-definitions/include/static-route6.xml.i)16
-rw-r--r--interface-definitions/include/vpn-ipsec-encryption.xml.i4
-rw-r--r--interface-definitions/include/vpn-ipsec-hash.xml.i4
-rw-r--r--interface-definitions/include/webproxy-url-filtering.xml.i4
-rw-r--r--interface-definitions/interfaces-bonding.xml.in30
-rw-r--r--interface-definitions/interfaces-bridge.xml.in26
-rw-r--r--interface-definitions/interfaces-dummy.xml.in10
-rw-r--r--interface-definitions/interfaces-erspan.xml.in16
-rw-r--r--interface-definitions/interfaces-ethernet.xml.in34
-rw-r--r--interface-definitions/interfaces-geneve.xml.in24
-rw-r--r--interface-definitions/interfaces-l2tpv3.xml.in16
-rw-r--r--interface-definitions/interfaces-loopback.xml.in6
-rw-r--r--interface-definitions/interfaces-macsec.xml.in14
-rw-r--r--interface-definitions/interfaces-openvpn.xml.in8
-rw-r--r--interface-definitions/interfaces-pppoe.xml.in16
-rw-r--r--interface-definitions/interfaces-pseudo-ethernet.xml.in26
-rw-r--r--interface-definitions/interfaces-tunnel.xml.in38
-rw-r--r--interface-definitions/interfaces-vxlan.xml.in24
-rw-r--r--interface-definitions/interfaces-wireguard.xml.in14
-rw-r--r--interface-definitions/interfaces-wireless.xml.in26
-rw-r--r--interface-definitions/interfaces-wirelessmodem.xml.in16
-rw-r--r--interface-definitions/ntp.xml.in2
-rw-r--r--interface-definitions/policy-lists.xml.in1266
-rw-r--r--interface-definitions/protocols-bgp.xml.in829
-rw-r--r--interface-definitions/protocols-ospf.xml.in818
-rw-r--r--interface-definitions/protocols-ospfv3.xml.in79
-rw-r--r--interface-definitions/protocols-rip.xml.in30
-rw-r--r--interface-definitions/protocols-ripng.xml.in28
-rw-r--r--interface-definitions/protocols-static.xml.in10
-rw-r--r--interface-definitions/protocols-vrf.xml.in35
-rw-r--r--interface-definitions/service_console-server.xml.in2
-rw-r--r--interface-definitions/service_ipoe-server.xml.in6
-rw-r--r--interface-definitions/service_pppoe-server.xml.in30
-rw-r--r--interface-definitions/snmp.xml.in2
-rw-r--r--interface-definitions/ssh.xml.in2
-rw-r--r--interface-definitions/system-login.xml.in2
-rw-r--r--interface-definitions/vpn_l2tp.xml.in24
-rw-r--r--interface-definitions/vpn_openconnect.xml.in2
-rw-r--r--interface-definitions/vpn_pptp.xml.in12
-rw-r--r--interface-definitions/vpn_sstp.xml.in26
-rw-r--r--interface-definitions/vrf.xml.in50
-rw-r--r--op-mode-definitions/nat.xml.in10
-rw-r--r--op-mode-definitions/nat66.xml.in98
-rw-r--r--python/vyos/util.py15
-rw-r--r--smoketest/configs/vrf-bgp166
-rw-r--r--smoketest/configs/vrf-ospf145
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py4
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_erspan.py6
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_geneve.py4
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_macsec.py4
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_tunnel.py12
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_vxlan.py4
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py34
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_ospf.py64
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_static.py54
-rwxr-xr-xsmoketest/scripts/cli/test_vrf.py6
-rwxr-xr-xsrc/completion/list_bgp_peer_groups.sh23
-rwxr-xr-xsrc/conf_mode/interfaces-tunnel.py4
-rwxr-xr-xsrc/conf_mode/nat66.py9
-rwxr-xr-xsrc/conf_mode/policy-lists.py117
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py57
-rwxr-xr-xsrc/conf_mode/protocols_ospf.py61
-rwxr-xr-xsrc/conf_mode/protocols_static.py24
-rwxr-xr-xsrc/conf_mode/protocols_vrf.py72
-rwxr-xr-xsrc/conf_mode/service_console-server.py32
-rwxr-xr-xsrc/migration-scripts/vrf/1-to-261
-rwxr-xr-xsrc/op_mode/ppp-server-ctrl.py5
-rwxr-xr-xsrc/op_mode/show_nat66_rules.py74
-rwxr-xr-xsrc/op_mode/show_nat66_statistics.py63
-rwxr-xr-xsrc/op_mode/show_nat66_translations.py204
-rwxr-xr-xsrc/op_mode/show_nat_rules.py74
-rwxr-xr-xsrc/op_mode/show_nat_statistics.py2
235 files changed, 5131 insertions, 2641 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7ac48ee4c..8458d3208 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,6 +8,81 @@ review this contribution guideline.
The following paragraphs are an excerpt from our Documentation.
+## Submit a Patch
+
+Patches are always more than welcome. To have a clean and easy to maintain
+repository we have some guidelines when working with Git. A clean repository
+eases the automatic generation of a changelog file.
+
+A good approach for writing commit messages is actually to have a look at the
+file(s) history by invoking git log path/to/file.txt.
+
+### Prepare patch/commit
+
+In a big system, such as VyOS, that is comprised of multiple components, it’s
+impossible to keep track of all the changes and bugs/feature requests in one’s
+head. We use a bugtracker known as Phabricator for it (“issue tracker” would
+be a better term, but this one stuck).
+
+The information is used in three ways:
+
+* Keep track of the progress (what we have already done in this branch and
+ what we still need to do).
+* Prepare automatic release notes for upcoming releases
+* Help future maintainers of VyOS (it could be you!) to find out why certain
+ things have been changed in the codebase or why certain features have been
+ added
+
+To make this approach work, every change must be associated with a task number
+(prefixed with **T**) and a component. If there is no bug report/feature
+request for the changes you are going to make, you have to create a Phabricator
+task first. Once there is an entry in Phabricator, you should reference its id
+in your commit message, as shown below:
+
+* `ddclient: T1030: auto create runtime directories`
+* `Jenkins: add current Git commit ID to build description`
+
+If there is no [Phabricator](https://phabricator.vyos.net) reference in the
+commits of your pull request, we have to ask you to amend the commit message.
+Otherwise we will have to reject it.
+
+## Writing good commit messages
+
+The format should be and is inspired by this very good and detailed
+[Git documentation](https://git-scm.com/book/ch5-2.html), it is also worth
+reading https://chris.beams.io/posts/git-commit/.
+
+This is nothing VyOS specific - it is more a general topic for distributed
+development environments.
+
+* A single, short, summary of the commit (recommended 50 characters or less,
+ not exceeding 80 characters) containing a prefix of the changed component
+ and the corresponding Phabricator reference e.g. `snmp: T1111:` or
+ `ethernet: T2222:` - multiple components could be concatenated as in `snmp:
+ ethernet: T3333`
+* In some contexts, the first line is treated as the subject of an email and
+ the rest of the text as the body. The blank line separating the summary from
+ the body is critical (unless you omit the body entirely); tools like rebase
+ can get confused if you run the two together.
+* Followed by a message which describes all the details like:
+ * What/why/how something has been changed, makes everyone’s life easier when
+ working with `git bisect`
+ * All text of the commit message should be wrapped at 72 characters if
+ possible which makes reading commit logs easier with git log on a standard
+ terminal (which happens to be 80x25)
+ * If applicable a reference to a previous commit should be made linking those
+ commits nicely when browsing the history: `After commit abcd12ef ("snmp:
+ this is a headline") a Python import statement is missing, throwing the
+ following exception: ABCDEF`
+* Always use the `-x` option to the `git cherry-pick` command when back or
+ forward porting an individual commit. This automatically appends the line:
+ `(cherry picked from commit <ID>)` to the original authors commit message
+ making it easier when bisecting problems.
+* Every change set must be consistent (self containing)! Do not fix multiple
+ bugs in a single commit. If you already worked on multiple fixes in the same
+ file use git add –patch to only add the parts related to the one issue into
+ your upcoming commit.
+
## Bug Report/Issue
Issues or bugs are found in any software project. VyOS is not an exception.
diff --git a/Makefile b/Makefile
index 2adf385f9..2d3a14f4e 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ interface_definitions: $(config_xml_obj)
rm -f $(TMPL_DIR)/vpn/node.def
rm -f $(TMPL_DIR)/vpn/ipsec/node.def
rm -rf $(TMPL_DIR)/vpn/nipsec
+ rm -rf $(TMPL_DIR)/npolicy
.PHONY: op_mode_definitions
.ONESHELL:
diff --git a/data/configd-include.json b/data/configd-include.json
index aabd7232e..eed858363 100644
--- a/data/configd-include.json
+++ b/data/configd-include.json
@@ -44,7 +44,6 @@
"protocols_ripng.py",
"protocols_static.py",
"protocols_static_multicast.py",
-"protocols_vrf.py",
"salt-minion.py",
"service_console-server.py",
"service_ids_fastnetmon.py",
diff --git a/data/templates/firewall/nftables-nat66.tmpl b/data/templates/firewall/nftables-nat66.tmpl
index cdaeaad6a..e5c1b1b8d 100644
--- a/data/templates/firewall/nftables-nat66.tmpl
+++ b/data/templates/firewall/nftables-nat66.tmpl
@@ -1,9 +1,13 @@
#!/usr/sbin/nft -f
{% macro nptv6_rule(rule,config, chain) %}
-{% set src_prefix = "ip6 saddr " + config.source.prefix if config.source is defined and config.source.prefix is defined and config.source.prefix is not none %}
-{% set dest_address = "ip6 daddr " + config.destination.address if config.destination is defined and config.destination.address is defined and config.destination.address is not none %}
+{% set comment = '' %}
+{% set base_log = '' %}
+{% set src_prefix = "ip6 saddr " + config.source.prefix if config.source is defined and config.source.prefix is defined and config.source.prefix is not none %}
+{% set dest_address = "ip6 daddr " + config.destination.address if config.destination is defined and config.destination.address is defined and config.destination.address is not none %}
{% if chain == "PREROUTING" %}
+{% set comment = "DST-NAT66-" + rule %}
+{% set base_log = '[NAT66-DST-' + rule %}
{% set interface = " iifname \"" + config.inbound_interface + "\"" if config.inbound_interface is defined and config.inbound_interface != 'any' else '' %}
{% if config.translation.address | is_ip_network %}
{# support 1:1 network translation #}
@@ -13,6 +17,8 @@
{% endif %}
{% set trns_address = dnat_type + config.translation.address if config.translation is defined and config.translation.address is defined and config.translation.address is not none %}
{% elif chain == "POSTROUTING" %}
+{% set comment = 'SRC-NAT66-' + rule %}
+{% set base_log = '[NAT66-SRC-' + rule %}
{% if config.translation is defined and config.translation.address is defined and config.translation.address is not none %}
{% if config.translation.address == 'masquerade' %}
{% set trns_address = config.translation.address %}
@@ -28,10 +34,12 @@
{% endif %}
{% set interface = " oifname \"" + config.outbound_interface + "\"" if config.outbound_interface is defined else '' %}
{% endif %}
-{% set comment = "NPT-NAT-" + rule %}
-{% if rule.log %}
-{% set base_log = "[NPT-DST-" + rule %}
-{% set log = base_log + "]" %}
+{% if config.log is defined %}
+{% if config.translation is defined and config.translation.address is defined and config.translation.address == 'masquerade' %}
+{% set log = base_log +'-MASQ]' %}
+{% else %}
+{% set log = base_log + "]" %}
+{% endif %}
{% endif %}
{% set output = "add rule ip6 nat " + chain + interface %}
{# Count packets #}
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl
index f7aeaeb9d..30e1ec082 100644
--- a/data/templates/frr/bgp.frr.tmpl
+++ b/data/templates/frr/bgp.frr.tmpl
@@ -185,7 +185,7 @@
{% endif %}
{% endmacro %}
!
-router bgp {{ asn }}
+router bgp {{ asn }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% if parameters is defined and parameters.ebgp_requires_policy is defined %}
bgp ebgp-requires-policy
{% else %}
diff --git a/data/templates/frr/ospf.frr.tmpl b/data/templates/frr/ospf.frr.tmpl
index 140b6b406..a47c64c89 100644
--- a/data/templates/frr/ospf.frr.tmpl
+++ b/data/templates/frr/ospf.frr.tmpl
@@ -1,7 +1,7 @@
!
{% if interface is defined and interface is not none %}
{% for iface, iface_config in interface.items() %}
-interface {{ iface }}
+interface {{ iface }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% if iface_config.authentication is defined and iface_config.authentication is not none %}
{% if iface_config.authentication.plaintext_password is defined and iface_config.authentication.plaintext_password is not none %}
ip ospf authentication-key {{ iface_config.authentication.plaintext_password }}
@@ -50,7 +50,7 @@ interface {{ iface }}
{% endfor %}
{% endif %}
!
-router ospf
+router ospf {{ 'vrf ' + vrf if vrf is defined and vrf is not none }}
{% if access_list is defined and access_list is not none %}
{% for acl, acl_config in access_list.items() %}
{% for protocol in acl_config.export if acl_config.export is defined %}
diff --git a/data/templates/frr/static.frr.tmpl b/data/templates/frr/static.frr.tmpl
index bb0ec80a5..db59a44c2 100644
--- a/data/templates/frr/static.frr.tmpl
+++ b/data/templates/frr/static.frr.tmpl
@@ -1,18 +1,29 @@
{% from 'frr/static_routes_macro.j2' import static_routes %}
!
+{% set ip_prefix = 'ip' %}
+{% set ipv6_prefix = 'ipv6' %}
+{% if vrf is defined and vrf is not none %}
+{# We need to add an additional whitespace in front of the prefix #}
+{# when VRFs are in use, thus we use a variable for prefix handling #}
+{% set ip_prefix = ' ip' %}
+{% set ipv6_prefix = ' ipv6' %}
+vrf {{ vrf }}
+{% endif %}
{# IPv4 routing #}
{% if route is defined and route is not none %}
{% for prefix, prefix_config in route.items() %}
-{{ static_routes('ip', prefix, prefix_config) }}
+{{ static_routes(ip_prefix, prefix, prefix_config) }}
{%- endfor -%}
{% endif %}
-!
{# IPv6 routing #}
{% if route6 is defined and route6 is not none %}
{% for prefix, prefix_config in route6.items() %}
-{{ static_routes('ipv6', prefix, prefix_config) }}
+{{ static_routes(ipv6_prefix, prefix, prefix_config) }}
{%- endfor -%}
{% endif %}
+{% if vrf is defined and vrf is not none %}
+ exit-vrf
+{% endif %}
!
{# Policy route tables #}
{% if table is defined and table is not none %}
diff --git a/data/templates/frr/vrf.frr.tmpl b/data/templates/frr/vrf.frr.tmpl
deleted file mode 100644
index 8d3d8e9dd..000000000
--- a/data/templates/frr/vrf.frr.tmpl
+++ /dev/null
@@ -1,25 +0,0 @@
-{% from 'frr/static_routes_macro.j2' import static_routes %}
-!
-{% if vrf is defined and vrf is not none %}
-{% for vrf_name, vrf_config in vrf.items() %}
-vrf {{ vrf_name }}
-{% if vrf_config.vni is defined and vrf_config.vni is not none %}
- vni {{ vrf_config.vni }}
-{% endif %}
-{% if vrf_config.static is defined and vrf_config.static is not none %}
-{# IPv4 routes #}
-{% if vrf_config.static.route is defined and vrf_config.static.route is not none %}
-{% for prefix, prefix_config in vrf_config.static.route.items() %}
- {{ static_routes('ip', prefix, prefix_config) }}
-{%- endfor -%}
-{% endif %}
-{# IPv6 routes #}
-{% if vrf_config.static.route6 is defined and vrf_config.static.route6 is not none %}
-{% for prefix, prefix_config in vrf_config.static.route6.items() %}
- {{ static_routes('ipv6', prefix, prefix_config) }}
-{%- endfor -%}
-{% endif %}
-{% endif %}
-{% endfor %}
-{% endif %}
-!
diff --git a/debian/control b/debian/control
index cf9835b07..91ff51b89 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,6 @@ Build-Depends:
python3-netifaces,
python3-nose,
python3-jinja2,
- python3-paramiko,
python3-psutil,
python3-setuptools,
python3-sphinx,
@@ -98,6 +97,7 @@ Depends:
python3-jmespath,
python3-netaddr,
python3-netifaces,
+ python3-paramiko,
python3-psutil,
python3-pystache,
python3-pyudev,
diff --git a/interface-definitions/include/accel-auth-local-users.xml.i b/interface-definitions/include/accel-ppp/auth-local-users.xml.i
index 35c7a2a06..308d6510d 100644
--- a/interface-definitions/include/accel-auth-local-users.xml.i
+++ b/interface-definitions/include/accel-ppp/auth-local-users.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-auth-local-users.xml.i -->
+<!-- include start from accel-ppp/auth-local-users.xml.i -->
<node name="local-users">
<properties>
<help>Local user authentication for PPPoE server</help>
@@ -48,4 +48,4 @@
</tagNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-auth-mode.xml.i b/interface-definitions/include/accel-ppp/auth-mode.xml.i
index 85c3c5e82..c1a87cfe3 100644
--- a/interface-definitions/include/accel-auth-mode.xml.i
+++ b/interface-definitions/include/accel-ppp/auth-mode.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-auth-mode.xml.i -->
+<!-- include start from accel-ppp/auth-mode.xml.i -->
<leafNode name="mode">
<properties>
<help>Authentication mode used by this server</help>
@@ -19,4 +19,4 @@
</properties>
<defaultValue>local</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-auth-protocols.xml.i b/interface-definitions/include/accel-ppp/auth-protocols.xml.i
index a6899a4d8..d43266152 100644
--- a/interface-definitions/include/accel-auth-protocols.xml.i
+++ b/interface-definitions/include/accel-ppp/auth-protocols.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-auth-protocols.xml.i -->
+<!-- include start from accel-ppp/auth-protocols.xml.i -->
<leafNode name="protocols">
<properties>
<help>Authentication protocol for remote access peer SSTP VPN</help>
@@ -28,4 +28,4 @@
</properties>
<defaultValue>pap chap mschap mschap-v2</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-client-ip-pool-start-stop.xml.i b/interface-definitions/include/accel-ppp/client-ip-pool-start-stop.xml.i
index b578f2b2c..5f4132d13 100644
--- a/interface-definitions/include/accel-client-ip-pool-start-stop.xml.i
+++ b/interface-definitions/include/accel-ppp/client-ip-pool-start-stop.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-client-ip-pool-start-stop.xml.i -->
+<!-- include start from accel-ppp/client-ip-pool-start-stop.xml.i -->
<leafNode name="start">
<properties>
<help>First IP address in the pool</help>
@@ -15,4 +15,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-client-ip-pool-subnet.xml.i b/interface-definitions/include/accel-ppp/client-ip-pool-subnet.xml.i
index 8e9ca0e92..2dc71d3f9 100644
--- a/interface-definitions/include/accel-client-ip-pool-subnet.xml.i
+++ b/interface-definitions/include/accel-ppp/client-ip-pool-subnet.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-client-ip-pool-subnet.xml.i -->
+<!-- include start from accel-ppp/client-ip-pool-subnet.xml.i -->
<leafNode name="subnet">
<properties>
<help>Client IP subnet (CIDR notation)</help>
@@ -13,4 +13,4 @@
<multi />
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-client-ipv6-pool.xml.i b/interface-definitions/include/accel-ppp/client-ipv6-pool.xml.i
index d15ff35d4..bd3dadf8d 100644
--- a/interface-definitions/include/accel-client-ipv6-pool.xml.i
+++ b/interface-definitions/include/accel-ppp/client-ipv6-pool.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-client-ipv6-pool.xml.i -->
+<!-- include start from accel-ppp/client-ipv6-pool.xml.i -->
<node name="client-ipv6-pool">
<properties>
<help>Pool of client IPv6 addresses</help>
@@ -58,4 +58,4 @@
</tagNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-gateway-address.xml.i b/interface-definitions/include/accel-ppp/gateway-address.xml.i
index c45c8b532..59f8b5023 100644
--- a/interface-definitions/include/accel-gateway-address.xml.i
+++ b/interface-definitions/include/accel-ppp/gateway-address.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-gateway-address.xml.i -->
+<!-- include start from accel-ppp/gateway-address.xml.i -->
<leafNode name="gateway-address">
<properties>
<help>Gateway IP address</help>
@@ -12,4 +12,4 @@
</valueHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-lcp-echo-interval-failure.xml.i b/interface-definitions/include/accel-ppp/lcp-echo-interval-failure.xml.i
index cccf4b4f2..dd7ae1276 100644
--- a/interface-definitions/include/accel-lcp-echo-interval-failure.xml.i
+++ b/interface-definitions/include/accel-ppp/lcp-echo-interval-failure.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-lcp-echo-interval-failure.xml.i -->
+<!-- include start from accel-ppp/lcp-echo-interval-failure.xml.i -->
<leafNode name="lcp-echo-interval">
<properties>
<help>LCP echo-requests/sec</help>
@@ -17,4 +17,4 @@
</properties>
<defaultValue>3</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-lcp-echo-timeout.xml.i b/interface-definitions/include/accel-ppp/lcp-echo-timeout.xml.i
index 888fa9d41..a630bec32 100644
--- a/interface-definitions/include/accel-lcp-echo-timeout.xml.i
+++ b/interface-definitions/include/accel-ppp/lcp-echo-timeout.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-lcp-echo-timeout.xml.i -->
+<!-- include start from accel-ppp/lcp-echo-timeout.xml.i -->
<leafNode name="lcp-echo-timeout">
<properties>
<help>Timeout in seconds to wait for any peer activity. If this option specified it turns on adaptive lcp echo functionality and "lcp-echo-failure" is not used.</help>
@@ -8,4 +8,4 @@
</properties>
<defaultValue>0</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-mtu-128-16384.xml.i b/interface-definitions/include/accel-ppp/mtu-128-16384.xml.i
index 6bd089823..b4008a63b 100644
--- a/interface-definitions/include/accel-mtu-128-16384.xml.i
+++ b/interface-definitions/include/accel-ppp/mtu-128-16384.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-mtu-128-16384.xml.i -->
+<!-- include start from accel-ppp/mtu-128-16384.xml.i -->
<leafNode name="mtu">
<properties>
<help>Maximum Transmission Unit (MTU) - default 1492</help>
@@ -8,4 +8,4 @@
</properties>
<defaultValue>1492</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-name-server.xml.i b/interface-definitions/include/accel-ppp/name-server.xml.i
index e46c75b52..e744b384f 100644
--- a/interface-definitions/include/accel-name-server.xml.i
+++ b/interface-definitions/include/accel-ppp/name-server.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-name-server.xml.i -->
+<!-- include start from accel-ppp/name-server.xml.i -->
<leafNode name="name-server">
<properties>
<help>Domain Name Server (DNS) propagated to client</help>
@@ -17,4 +17,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-ppp-mppe.xml.i b/interface-definitions/include/accel-ppp/ppp-mppe.xml.i
index b7f9cfd92..e8370180b 100644
--- a/interface-definitions/include/accel-ppp-mppe.xml.i
+++ b/interface-definitions/include/accel-ppp/ppp-mppe.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-ppp-mppe.xml.i -->
+<!-- include start from accel-ppp/ppp-mppe.xml.i -->
<leafNode name="mppe">
<properties>
<help>Specifies mppe negotiation preferences</help>
@@ -23,4 +23,4 @@
</properties>
<defaultValue>prefer</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-radius-additions-disable-accounting.xml.i b/interface-definitions/include/accel-ppp/radius-additions-disable-accounting.xml.i
index dc5b9dd96..c723c3174 100644
--- a/interface-definitions/include/accel-radius-additions-disable-accounting.xml.i
+++ b/interface-definitions/include/accel-ppp/radius-additions-disable-accounting.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from accel-radius-additions-disable-accounting.xml.i -->
+<!-- include start from accel-ppp/radius-additions-disable-accounting.xml.i -->
<leafNode name="disable-accounting">
<properties>
<help>Disable accounting</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-radius-additions-rate-limit.xml.i b/interface-definitions/include/accel-ppp/radius-additions-rate-limit.xml.i
index 23a4a51cf..be49fce5a 100644
--- a/interface-definitions/include/accel-radius-additions-rate-limit.xml.i
+++ b/interface-definitions/include/accel-ppp/radius-additions-rate-limit.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-radius-additions-rate-limit.xml.i -->
+<!-- include start from accel-ppp/radius-additions-rate-limit.xml.i -->
<node name="rate-limit">
<properties>
<help>Upload/Download speed limits</help>
@@ -23,4 +23,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-radius-additions.xml.i b/interface-definitions/include/accel-ppp/radius-additions.xml.i
index 0067b6d1c..e65088c43 100644
--- a/interface-definitions/include/accel-radius-additions.xml.i
+++ b/interface-definitions/include/accel-ppp/radius-additions.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-radius-additions.xml.i -->
+<!-- include start from accel-ppp/radius-additions.xml.i -->
<node name="radius">
<children>
<leafNode name="acct-interim-jitter">
@@ -29,7 +29,7 @@
</properties>
<defaultValue>1813</defaultValue>
</leafNode>
- #include <include/accel-radius-additions-disable-accounting.xml.i>
+ #include <include/accel-ppp/radius-additions-disable-accounting.xml.i>
<leafNode name="fail-time">
<properties>
<help>Mark server unavailable for &lt;n&gt; seconds on failure</help>
@@ -150,4 +150,4 @@
</node>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/accel-wins-server.xml.i b/interface-definitions/include/accel-ppp/wins-server.xml.i
index 6de032981..f7f483f59 100644
--- a/interface-definitions/include/accel-wins-server.xml.i
+++ b/interface-definitions/include/accel-ppp/wins-server.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from accel-wins-server.xml.i -->
+<!-- include start from accel-ppp/wins-server.xml.i -->
<leafNode name="wins-server">
<properties>
<help>Windows Internet Name Service (WINS) servers propagated to client</help>
@@ -12,4 +12,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bfd-common.xml.i b/interface-definitions/include/bfd-common.xml.i
index ff73e4b20..b47b47612 100644
--- a/interface-definitions/include/bfd-common.xml.i
+++ b/interface-definitions/include/bfd-common.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bfd-common.xml.i -->
+<!-- include start from bfd-common.xml.i -->
<leafNode name="echo-mode">
<properties>
<help>Enables the echo transmission mode</help>
@@ -69,4 +69,4 @@
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i b/interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i
deleted file mode 100644
index df346afc1..000000000
--- a/interface-definitions/include/bgp-neighbor-afi-l2vpn-evpn.xml.i
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- included start from bgp-neighbor-afi-l2vpn-evpn.xml.i -->
-<node name="l2vpn-evpn">
- <properties>
- <help>L2VPN EVPN BGP settings</help>
- </properties>
- <children>
- #include <include/bgp-afi-allowas-in.xml.i>
- #include <include/bgp-afi-attribute-unchanged.xml.i>
- #include <include/bgp-afi-nexthop-self.xml.i>
- #include <include/bgp-afi-route-map.xml.i>
- #include <include/bgp-afi-route-reflector-client.xml.i>
- #include <include/bgp-afi-route-server-client.xml.i>
- #include <include/bgp-afi-soft-reconfiguration.xml.i>
- </children>
-</node>
-<!-- included end -->
diff --git a/interface-definitions/include/bgp-route-map.xml.i b/interface-definitions/include/bgp-route-map.xml.i
deleted file mode 100644
index 18b092354..000000000
--- a/interface-definitions/include/bgp-route-map.xml.i
+++ /dev/null
@@ -1,10 +0,0 @@
-<!-- included start from bgp-route-map.xml.i -->
-<leafNode name="route-map">
- <properties>
- <help>Route-map to modify route attributes</help>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
-</leafNode>
-<!-- included end -->
diff --git a/interface-definitions/include/bgp-afi-aggregate-address.xml.i b/interface-definitions/include/bgp/bgp-afi-aggregate-address.xml.i
index c33d1097c..c731e970b 100644
--- a/interface-definitions/include/bgp-afi-aggregate-address.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-aggregate-address.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-aggregate-address.xml.i -->
+<!-- include start from bgp-afi-aggregate-address.xml.i -->
<leafNode name="as-set">
<properties>
<help>Generate AS-set path information for this aggregate address</help>
@@ -11,4 +11,4 @@
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-allowas-in.xml.i b/interface-definitions/include/bgp/bgp-afi-allowas-in.xml.i
index 77de04ed7..738bf0211 100644
--- a/interface-definitions/include/bgp-afi-allowas-in.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-allowas-in.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-allowas-in.xml.i -->
+<!-- include start from bgp-afi-allowas-in.xml.i -->
<node name="allowas-in">
<properties>
<help>Accept route that contains the local-as in the as-path</help>
@@ -18,4 +18,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-attribute-unchanged.xml.i b/interface-definitions/include/bgp/bgp-afi-attribute-unchanged.xml.i
index fef53dd9d..f407c3f74 100644
--- a/interface-definitions/include/bgp-afi-attribute-unchanged.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-attribute-unchanged.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-attribute-unchanged.xml.i -->
+<!-- include start from bgp-afi-attribute-unchanged.xml.i -->
<node name="attribute-unchanged">
<properties>
<help>BGP attributes are sent unchanged</help>
@@ -24,4 +24,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-capability-orf.xml.i b/interface-definitions/include/bgp/bgp-afi-capability-orf.xml.i
index 9bd265f93..dd5c5f8b2 100644
--- a/interface-definitions/include/bgp-afi-capability-orf.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-capability-orf.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-capability-orf.xml.i -->
+<!-- include start from bgp-afi-capability-orf.xml.i -->
<node name="orf">
<properties>
<help>Advertise ORF capability to this peer</help>
@@ -25,4 +25,4 @@
</node>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-common.xml.i b/interface-definitions/include/bgp/bgp-afi-common.xml.i
index 90c2753c8..7782e7ef2 100644
--- a/interface-definitions/include/bgp-afi-common.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-common.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-common.xml.i -->
+<!-- include start from bgp-afi-common.xml.i -->
<leafNode name="addpath-tx-all">
<properties>
<help>Use addpath to advertise all paths to a neighbor</help>
@@ -11,14 +11,14 @@
<valueless/>
</properties>
</leafNode>
-#include <include/bgp-afi-allowas-in.xml.i>
+#include <include/bgp/bgp-afi-allowas-in.xml.i>
<leafNode name="as-override">
<properties>
<help>AS for routes sent to this peer to be the local AS</help>
<valueless/>
</properties>
</leafNode>
-#include <include/bgp-afi-attribute-unchanged.xml.i>
+#include <include/bgp/bgp-afi-attribute-unchanged.xml.i>
<node name="disable-send-community">
<properties>
<help>Disable sending community attributes to this peer</help>
@@ -43,7 +43,7 @@
<help>Originate default route to this peer</help>
</properties>
<children>
- #include <include/bgp-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
<node name="distribute-list">
@@ -118,17 +118,17 @@
</constraint>
</properties>
</leafNode>
-#include <include/bgp-afi-nexthop-self.xml.i>
+#include <include/bgp/bgp-afi-nexthop-self.xml.i>
<leafNode name="remove-private-as">
<properties>
<help>Remove private AS numbers from AS path in outbound route updates</help>
<valueless/>
</properties>
</leafNode>
-#include <include/bgp-afi-route-map.xml.i>
-#include <include/bgp-afi-route-reflector-client.xml.i>
-#include <include/bgp-afi-route-server-client.xml.i>
-#include <include/bgp-afi-soft-reconfiguration.xml.i>
+#include <include/bgp/bgp-afi-route-map.xml.i>
+#include <include/bgp/bgp-afi-route-reflector-client.xml.i>
+#include <include/bgp/bgp-afi-route-server-client.xml.i>
+#include <include/bgp/bgp-afi-soft-reconfiguration.xml.i>
<leafNode name="unsuppress-map">
<properties>
<help>Route-map to selectively unsuppress suppressed routes</help>
@@ -149,4 +149,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-ipv4-prefix-list.xml.i b/interface-definitions/include/bgp/bgp-afi-ipv4-prefix-list.xml.i
index bbbada6bd..133b5da28 100644
--- a/interface-definitions/include/bgp-afi-ipv4-prefix-list.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-ipv4-prefix-list.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-ipv4-prefix-list.xml.i -->
+<!-- include start from bgp-afi-ipv4-prefix-list.xml.i -->
<node name="prefix-list">
<properties>
<help>IPv4-Prefix-list to filter route updates to/from this peer</help>
@@ -22,4 +22,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-ipv6-nexthop-local.xml.i b/interface-definitions/include/bgp/bgp-afi-ipv6-nexthop-local.xml.i
index 4778b392f..c74d81b1f 100644
--- a/interface-definitions/include/bgp-afi-ipv6-nexthop-local.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-ipv6-nexthop-local.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-ipv6-nexthop-local.xml.i -->
+<!-- include start from bgp-afi-ipv6-nexthop-local.xml.i -->
<node name="nexthop-local">
<properties>
<help>Nexthop attributes</help>
@@ -12,4 +12,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-ipv6-prefix-list.xml.i b/interface-definitions/include/bgp/bgp-afi-ipv6-prefix-list.xml.i
index 8ae7837e9..d597b7c99 100644
--- a/interface-definitions/include/bgp-afi-ipv6-prefix-list.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-ipv6-prefix-list.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-ipv6-prefix-list.xml.i -->
+<!-- include start from bgp-afi-ipv6-prefix-list.xml.i -->
<node name="prefix-list">
<properties>
<help>Prefix-list to filter route updates to/from this peer</help>
@@ -22,4 +22,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-l2vpn-common.xml.i b/interface-definitions/include/bgp/bgp-afi-l2vpn-common.xml.i
index 2bbf57532..3e7e4ef78 100644
--- a/interface-definitions/include/bgp-afi-l2vpn-common.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-l2vpn-common.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-l2vpn-common.xml.i -->
+<!-- include start from bgp-afi-l2vpn-common.xml.i -->
<leafNode name="advertise-default-gw">
<properties>
<help>Advertise All default g/w mac-ip routes in EVPN</help>
@@ -23,5 +23,5 @@
</constraint>
</properties>
</leafNode>
-#include <include/bgp-route-target.xml.i>
-<!-- included end -->
+#include <include/bgp/bgp-route-target.xml.i>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-maximum-paths.xml.i b/interface-definitions/include/bgp/bgp-afi-maximum-paths.xml.i
index 62133c375..6b220caa5 100644
--- a/interface-definitions/include/bgp-afi-maximum-paths.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-maximum-paths.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-maximum-paths.xml.i -->
+<!-- include start from bgp-afi-maximum-paths.xml.i -->
<node name="maximum-paths">
<properties>
<help>Forward packets over multiple paths</help>
@@ -30,4 +30,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-nexthop-self.xml.i b/interface-definitions/include/bgp/bgp-afi-nexthop-self.xml.i
index 0bcc4e937..a299f561e 100644
--- a/interface-definitions/include/bgp-afi-nexthop-self.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-nexthop-self.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-nexthop-self.xml.i -->
+<!-- include start from bgp-afi-nexthop-self.xml.i -->
<node name="nexthop-self">
<properties>
<help>Disable the next hop calculation for this peer</help>
@@ -12,4 +12,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i b/interface-definitions/include/bgp/bgp-afi-redistribute-metric-route-map.xml.i
index e85bf7d11..4382901c8 100644
--- a/interface-definitions/include/bgp-afi-redistribute-metric-route-map.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-redistribute-metric-route-map.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-redistribute-metric-route-map.xml.i -->
+<!-- include start from bgp-afi-redistribute-metric-route-map.xml.i -->
<leafNode name="metric">
<properties>
<help>Metric for redistributed routes</help>
@@ -8,5 +8,5 @@
</valueHelp>
</properties>
</leafNode>
-#include <include/bgp-route-map.xml.i>
-<!-- included end -->
+#include <include/route-map.xml.i>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-route-map.xml.i b/interface-definitions/include/bgp/bgp-afi-route-map.xml.i
index 5549f56ca..7fac98586 100644
--- a/interface-definitions/include/bgp-afi-route-map.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-route-map.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-route-map.xml.i -->
+<!-- include start from bgp-afi-route-map.xml.i -->
<node name="route-map">
<properties>
<help>Route-map to filter route updates to/from this peer</help>
@@ -22,4 +22,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-route-reflector-client.xml.i b/interface-definitions/include/bgp/bgp-afi-route-reflector-client.xml.i
index f6a9caa61..70fee40f0 100644
--- a/interface-definitions/include/bgp-afi-route-reflector-client.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-route-reflector-client.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-afi-route-reflector-client.xml.i -->
+<!-- include start from bgp-afi-route-reflector-client.xml.i -->
<leafNode name="route-reflector-client">
<properties>
<help>Peer is a route reflector client</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-afi-route-server-client.xml.i b/interface-definitions/include/bgp/bgp-afi-route-server-client.xml.i
index 60de553fe..29719c463 100644
--- a/interface-definitions/include/bgp-afi-route-server-client.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-route-server-client.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-afi-route-server-client.xml.i -->
+<!-- include start from bgp-afi-route-server-client.xml.i -->
<leafNode name="route-server-client">
<properties>
<help>Peer is a route server client</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end --> \ No newline at end of file
+<!-- include end --> \ No newline at end of file
diff --git a/interface-definitions/include/bgp-afi-soft-reconfiguration.xml.i b/interface-definitions/include/bgp/bgp-afi-soft-reconfiguration.xml.i
index 7af11f8f4..c3f050bb8 100644
--- a/interface-definitions/include/bgp-afi-soft-reconfiguration.xml.i
+++ b/interface-definitions/include/bgp/bgp-afi-soft-reconfiguration.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-afi-soft-reconfiguration.xml.i -->
+<!-- include start from bgp-afi-soft-reconfiguration.xml.i -->
<node name="soft-reconfiguration">
<properties>
<help>Soft reconfiguration for peer</help>
@@ -12,4 +12,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-bfd.xml.i b/interface-definitions/include/bgp/bgp-bfd.xml.i
index fe52b12f2..d918fd673 100644
--- a/interface-definitions/include/bgp-bfd.xml.i
+++ b/interface-definitions/include/bgp/bgp-bfd.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-bfd.xml.i -->
+<!-- include start from bgp-bfd.xml.i -->
<node name="bfd">
<properties>
<help>Enable Bidirectional Forwarding Detection (BFD) support</help>
@@ -12,4 +12,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-capability.xml.i b/interface-definitions/include/bgp/bgp-capability.xml.i
index 8de5bd8ab..89ce19ca6 100644
--- a/interface-definitions/include/bgp-capability.xml.i
+++ b/interface-definitions/include/bgp/bgp-capability.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-capability.xml.i -->
+<!-- include start from bgp-capability.xml.i -->
<node name="capability">
<properties>
<help>Advertise capabilities to this peer-group</help>
@@ -18,4 +18,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/bgp-common-config.xml.i b/interface-definitions/include/bgp/bgp-common-config.xml.i
new file mode 100644
index 000000000..ae0e8b178
--- /dev/null
+++ b/interface-definitions/include/bgp/bgp-common-config.xml.i
@@ -0,0 +1,825 @@
+<!-- include start from bgp/bgp-common-config.xml.i -->
+<node name="address-family">
+ <properties>
+ <help>BGP address-family parameters</help>
+ </properties>
+ <children>
+ <node name="ipv4-unicast">
+ <properties>
+ <help>IPv4 BGP settings</help>
+ </properties>
+ <children>
+ <tagNode name="aggregate-address">
+ <properties>
+ <help>BGP aggregate network</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>BGP aggregate network</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-aggregate-address.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="network">
+ <properties>
+ <help>BGP network</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>BGP network</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="backdoor">
+ <properties>
+ <help>Network as a backdoor route</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ #include <include/route-map.xml.i>
+ </children>
+ </tagNode>
+ #include <include/bgp/bgp-afi-maximum-paths.xml.i>
+ <node name="redistribute">
+ <properties>
+ <help>Redistribute routes from other protocols into BGP</help>
+ </properties>
+ <children>
+ <node name="connected">
+ <properties>
+ <help>Redistribute connected routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="isis">
+ <properties>
+ <help>Redistribute IS-IS routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="kernel">
+ <properties>
+ <help>Redistribute kernel routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="ospf">
+ <properties>
+ <help>Redistribute OSPF routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="rip">
+ <properties>
+ <help>Redistribute RIP routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="static">
+ <properties>
+ <help>Redistribute static routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <leafNode name="table">
+ <properties>
+ <help>Redistribute non-main Kernel Routing Table</help>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="ipv6-unicast">
+ <properties>
+ <help>IPv6 BGP settings</help>
+ </properties>
+ <children>
+ <tagNode name="aggregate-address">
+ <properties>
+ <help>BGP aggregate network</help>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>Aggregate network</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-aggregate-address.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="network">
+ <properties>
+ <help>BGP network</help>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>Aggregate network</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="path-limit">
+ <properties>
+ <help>AS-path hopcount limit</help>
+ <valueHelp>
+ <format>u32:0-255</format>
+ <description>AS path hop count limit</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-255"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/route-map.xml.i>
+ </children>
+ </tagNode>
+ #include <include/bgp/bgp-afi-maximum-paths.xml.i>
+ <node name="redistribute">
+ <properties>
+ <help>Redistribute routes from other protocols into BGP</help>
+ </properties>
+ <children>
+ <node name="connected">
+ <properties>
+ <help>Redistribute connected routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="kernel">
+ <properties>
+ <help>Redistribute kernel routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="ospfv3">
+ <properties>
+ <help>Redistribute OSPFv3 routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="ripng">
+ <properties>
+ <help>Redistribute RIPng routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <node name="static">
+ <properties>
+ <help>Redistribute static routes into BGP</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-redistribute-metric-route-map.xml.i>
+ </children>
+ </node>
+ <leafNode name="table">
+ <properties>
+ <help>Redistribute non-main Kernel Routing Table</help>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="l2vpn-evpn">
+ <properties>
+ <help>L2VPN EVPN BGP settings</help>
+ </properties>
+ <children>
+ <leafNode name="advertise-all-vni">
+ <properties>
+ <help>Advertise All local VNIs</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ #include <include/bgp/bgp-afi-l2vpn-common.xml.i>
+ <leafNode name="advertise-pip">
+ <properties>
+ <help>EVPN system primary IP</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IP address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="rt-auto-derive">
+ <properties>
+ <help>Auto derivation of Route Target (RFC8365)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="flooding">
+ <properties>
+ <help>Specify handling for BUM packets</help>
+ </properties>
+ <children>
+ <leafNode name="disable">
+ <properties>
+ <help>Do not flood any BUM packets</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="head-end-replication">
+ <properties>
+ <help>Flood BUM packets using head-end replication</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="vni">
+ <properties>
+ <help>VXLAN Network Identifier</help>
+ <valueHelp>
+ <format>u32:1-16777215</format>
+ <description>VNI number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-16777215"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-l2vpn-common.xml.i>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+</node>
+<node name="listen">
+ <properties>
+ <help>Listen for and accept BGP dynamic neighbors from range</help>
+ </properties>
+ <children>
+ <leafNode name="limit">
+ <properties>
+ <help>Maximum number of dynamic neighbors that can be created</help>
+ <valueHelp>
+ <format>u32:1-5000</format>
+ <description>BGP neighbor limit</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-5000"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <tagNode name="range">
+ <properties>
+ <help>BGP dynamic neighbors listen range</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>IPv4 dynamic neighbors listen range</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>IPv6 dynamic neighbors listen range</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ <validator name="ipv6-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-peer-group.xml.i>
+ </children>
+ </tagNode>
+ </children>
+</node>
+<tagNode name="neighbor">
+ <properties>
+ <help>BGP neighbor</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>BGP neighbor IP address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>BGP neighbor IPv6 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
+ <validator name="interface-name"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="address-family">
+ <properties>
+ <help>Parameters relating to IPv4 or IPv6 routes</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-neighbor-afi-ipv4-unicast.xml.i>
+ #include <include/bgp/bgp-neighbor-afi-ipv6-unicast.xml.i>
+ #include <include/bgp/bgp-neighbor-afi-l2vpn-evpn.xml.i>
+ </children>
+ </node>
+ <leafNode name="advertisement-interval">
+ <properties>
+ <help>Minimum interval for sending routing updates</help>
+ <valueHelp>
+ <format>u32:0-600</format>
+ <description>Advertisement interval in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-600"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/bgp/bgp-bfd.xml.i>
+ #include <include/bgp/bgp-capability.xml.i>
+ #include <include/bgp/bgp-description.xml.i>
+ #include <include/bgp/bgp-disable-capability-negotiation.xml.i>
+ #include <include/bgp/bgp-disable-connected-check.xml.i>
+ #include <include/bgp/bgp-ebgp-multihop.xml.i>
+ <node name="interface">
+ <properties>
+ <help>Interface parameters</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-peer-group.xml.i>
+ #include <include/bgp/bgp-remote-as.xml.i>
+ <node name="v6only">
+ <properties>
+ <help>Enable BGP with v6 link-local only</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-peer-group.xml.i>
+ #include <include/bgp/bgp-remote-as.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
+ #include <include/bgp/bgp-local-as.xml.i>
+ #include <include/bgp/bgp-override-capability.xml.i>
+ #include <include/bgp/bgp-passive.xml.i>
+ #include <include/bgp/bgp-password.xml.i>
+ #include <include/bgp/bgp-peer-group.xml.i>
+ <leafNode name="port">
+ <properties>
+ <help>Neighbor BGP port</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>Neighbor BGP port number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/bgp/bgp-remote-as.xml.i>
+ #include <include/bgp/bgp-shutdown.xml.i>
+ <leafNode name="strict-capability-match">
+ <properties>
+ <help>Enable strict capability negotiation</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="timers">
+ <properties>
+ <help>Neighbor timers</help>
+ </properties>
+ <children>
+ <leafNode name="connect">
+ <properties>
+ <help>BGP connect timer for this neighbor</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>Connect timer in seconds</description>
+ </valueHelp>
+ <valueHelp>
+ <format>0</format>
+ <description>Disable connect timer</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/bgp/bgp-timers-holdtime.xml.i>
+ #include <include/bgp/bgp-timers-keepalive.xml.i>
+ </children>
+ </node>
+ #include <include/bgp/bgp-ttl-security.xml.i>
+ #include <include/bgp/bgp-update-source.xml.i>
+ </children>
+</tagNode>
+<node name="parameters">
+ <properties>
+ <help>BGP parameters</help>
+ </properties>
+ <children>
+ <leafNode name="always-compare-med">
+ <properties>
+ <help>Always compare MEDs from different neighbors</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="bestpath">
+ <properties>
+ <help>Default bestpath selection mechanism</help>
+ </properties>
+ <children>
+ <node name="as-path">
+ <properties>
+ <help>AS-path attribute comparison parameters</help>
+ </properties>
+ <children>
+ <leafNode name="confed">
+ <properties>
+ <help>Compare AS-path lengths including confederation sets and sequences</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="ignore">
+ <properties>
+ <help>Ignore AS-path length in selecting a route</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="multipath-relax">
+ <properties>
+ <help>Allow load sharing across routes that have different AS paths (but same length)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="compare-routerid">
+ <properties>
+ <help>Compare the router-id for identical EBGP paths</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="med">
+ <properties>
+ <help>MED attribute comparison parameters</help>
+ </properties>
+ <children>
+ <leafNode name="confed">
+ <properties>
+ <help>Compare MEDs among confederation paths</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="missing-as-worst">
+ <properties>
+ <help>Treat missing route as a MED as the least preferred one</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <leafNode name="cluster-id">
+ <properties>
+ <help>Route-reflector cluster-id</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Route-reflector cluster-id</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <node name="confederation">
+ <properties>
+ <help>AS confederation parameters</help>
+ </properties>
+ <children>
+ <leafNode name="identifier">
+ <properties>
+ <help>Confederation AS identifier [REQUIRED]</help>
+ <valueHelp>
+ <format>u32:1-4294967294</format>
+ <description>Confederation AS id</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967294"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="peers">
+ <properties>
+ <help>Peer ASs in the BGP confederation</help>
+ <valueHelp>
+ <format>u32:1-4294967294</format>
+ <description>Peer AS number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967294"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <node name="dampening">
+ <properties>
+ <help>Enable route-flap dampening</help>
+ </properties>
+ <children>
+ <leafNode name="half-life">
+ <properties>
+ <help>Half-life time for dampening [REQUIRED]</help>
+ <valueHelp>
+ <format>u32:1-45</format>
+ <description>Half-life penalty in minutes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-45"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="max-suppress-time">
+ <properties>
+ <help>Maximum duration to suppress a stable route [REQUIRED]</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Maximum suppress duration in minutes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="re-use">
+ <properties>
+ <help>Threshold to start reusing a route [REQUIRED]</help>
+ <valueHelp>
+ <format>u32:1-20000</format>
+ <description>Re-use penalty points</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-20000"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="start-suppress-time">
+ <properties>
+ <help>When to start suppressing a route [REQUIRED]</help>
+ <valueHelp>
+ <format>u32:1-20000</format>
+ <description>Start-suppress penalty points</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-20000"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <node name="default">
+ <properties>
+ <help>BGP defaults</help>
+ </properties>
+ <children>
+ <leafNode name="local-pref">
+ <properties>
+ <help>Default local preference</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>Local preference</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="no-ipv4-unicast">
+ <properties>
+ <help>Deactivate IPv4 unicast for a peer by default</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="deterministic-med">
+ <properties>
+ <help>Compare MEDs between different peers in the same AS</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="distance">
+ <properties>
+ <help>Administratives distances for BGP routes</help>
+ </properties>
+ <children>
+ <node name="global">
+ <properties>
+ <help>Global administratives distances for BGP routes</help>
+ </properties>
+ <children>
+ <leafNode name="external">
+ <properties>
+ <help>Administrative distance for external BGP routes</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Administrative distance for external BGP routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="internal">
+ <properties>
+ <help>Administrative distance for internal BGP routes</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Administrative distance for internal BGP routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="local">
+ <properties>
+ <help>Administrative distance for local BGP routes</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Administrative distance for internal BGP routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="prefix">
+ <properties>
+ <help>Administrative distance for a specific BGP prefix</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Administrative distance for a specific BGP prefix</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="distance">
+ <properties>
+ <help>Administrative distance for prefix</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Administrative distance for external BGP routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ <leafNode name="ebgp-requires-policy">
+ <properties>
+ <help>Require in and out policy for eBGP peers (RFC8212)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="graceful-restart">
+ <properties>
+ <help>Graceful restart capability parameters</help>
+ </properties>
+ <children>
+ <leafNode name="stalepath-time">
+ <properties>
+ <help>Maximum time to hold onto restarting neighbors stale paths</help>
+ <valueHelp>
+ <format>u32:1-3600</format>
+ <description>Hold time in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-3600"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="graceful-shutdown">
+ <properties>
+ <help>Graceful shutdown</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="log-neighbor-changes">
+ <properties>
+ <help>Log neighbor up/down changes and reset reason</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="network-import-check">
+ <properties>
+ <help>Enable IGP route check for network statements</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="no-client-to-client-reflection">
+ <properties>
+ <help>Disable client to client route reflection</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="no-fast-external-failover">
+ <properties>
+ <help>Disable immediate session reset on peer link down event</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="router-id">
+ <properties>
+ <help>BGP router id</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>BGP router id</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+<tagNode name="peer-group">
+ <properties>
+ <help>BGP peer-group</help>
+ </properties>
+ <children>
+ <node name="address-family">
+ <properties>
+ <help>BGP peer-group address-family parameters</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-neighbor-afi-ipv4-unicast.xml.i>
+ #include <include/bgp/bgp-neighbor-afi-ipv6-unicast.xml.i>
+ #include <include/bgp/bgp-neighbor-afi-l2vpn-evpn.xml.i>
+ </children>
+ </node>
+ #include <include/bgp/bgp-bfd.xml.i>
+ #include <include/bgp/bgp-capability.xml.i>
+ #include <include/bgp/bgp-description.xml.i>
+ #include <include/bgp/bgp-disable-capability-negotiation.xml.i>
+ #include <include/bgp/bgp-disable-connected-check.xml.i>
+ #include <include/bgp/bgp-ebgp-multihop.xml.i>
+ #include <include/bgp/bgp-local-as.xml.i>
+ #include <include/bgp/bgp-override-capability.xml.i>
+ #include <include/bgp/bgp-passive.xml.i>
+ #include <include/bgp/bgp-password.xml.i>
+ #include <include/bgp/bgp-remote-as.xml.i>
+ #include <include/bgp/bgp-shutdown.xml.i>
+ #include <include/bgp/bgp-ttl-security.xml.i>
+ #include <include/bgp/bgp-update-source.xml.i>
+ </children>
+</tagNode>
+#include <include/route-map.xml.i>
+<node name="timers">
+ <properties>
+ <help>BGP protocol timers</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-timers-holdtime.xml.i>
+ #include <include/bgp/bgp-timers-keepalive.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-description.xml.i b/interface-definitions/include/bgp/bgp-description.xml.i
index e1766cb9f..308bbec12 100644
--- a/interface-definitions/include/bgp-description.xml.i
+++ b/interface-definitions/include/bgp/bgp-description.xml.i
@@ -1,7 +1,7 @@
-<!-- included start from bgp-description.xml.i -->
+<!-- include start from bgp-description.xml.i -->
<leafNode name="description">
<properties>
<help>Neighbor specific description</help>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-disable-capability-negotiation.xml.i b/interface-definitions/include/bgp/bgp-disable-capability-negotiation.xml.i
index a43c6e8b9..74c3321d9 100644
--- a/interface-definitions/include/bgp-disable-capability-negotiation.xml.i
+++ b/interface-definitions/include/bgp/bgp-disable-capability-negotiation.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-disable-capability-negotiation.xml.i -->
+<!-- include start from bgp-disable-capability-negotiation.xml.i -->
<leafNode name="disable-capability-negotiation">
<properties>
<help>Disable capability negotiation with this neighbor</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-disable-connected-check.xml.i b/interface-definitions/include/bgp/bgp-disable-connected-check.xml.i
index bb9098bf6..15142b0ac 100644
--- a/interface-definitions/include/bgp-disable-connected-check.xml.i
+++ b/interface-definitions/include/bgp/bgp-disable-connected-check.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-disable-connected-check.xml.i -->
+<!-- include start from bgp-disable-connected-check.xml.i -->
<leafNode name="disable-connected-check">
<properties>
<help>Disable check to see if eBGP peer address is a connected route</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-ebgp-multihop.xml.i b/interface-definitions/include/bgp/bgp-ebgp-multihop.xml.i
index 6459fcf47..48580af3c 100644
--- a/interface-definitions/include/bgp-ebgp-multihop.xml.i
+++ b/interface-definitions/include/bgp/bgp-ebgp-multihop.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-ebgp-multihop.xml.i -->
+<!-- include start from bgp-ebgp-multihop.xml.i -->
<leafNode name="ebgp-multihop">
<properties>
<help>Allow this EBGP neighbor to not be on a directly connected network</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-local-as.xml.i b/interface-definitions/include/bgp/bgp-local-as.xml.i
index cf55ce476..7fc896a31 100644
--- a/interface-definitions/include/bgp-local-as.xml.i
+++ b/interface-definitions/include/bgp/bgp-local-as.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-local-as.xml.i -->
+<!-- include start from bgp-local-as.xml.i -->
<tagNode name="local-as">
<properties>
<help>Local AS number [REQUIRED]</help>
@@ -19,4 +19,4 @@
</leafNode>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i b/interface-definitions/include/bgp/bgp-neighbor-afi-ipv4-unicast.xml.i
index ece277fbf..945483276 100644
--- a/interface-definitions/include/bgp-neighbor-afi-ipv4-unicast.xml.i
+++ b/interface-definitions/include/bgp/bgp-neighbor-afi-ipv4-unicast.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-neighbor-afi-ipv4-unicast.xml.i -->
+<!-- include start from bgp-neighbor-afi-ipv4-unicast.xml.i -->
<node name="ipv4-unicast">
<properties>
<help>IPv4 BGP neighbor parameters</help>
@@ -9,11 +9,11 @@
<help>Advertise capabilities to this neighbor (IPv4)</help>
</properties>
<children>
- #include <include/bgp-afi-capability-orf.xml.i>
+ #include <include/bgp/bgp-afi-capability-orf.xml.i>
</children>
</node>
- #include <include/bgp-afi-ipv4-prefix-list.xml.i>
- #include <include/bgp-afi-common.xml.i>
+ #include <include/bgp/bgp-afi-ipv4-prefix-list.xml.i>
+ #include <include/bgp/bgp-afi-common.xml.i>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i b/interface-definitions/include/bgp/bgp-neighbor-afi-ipv6-unicast.xml.i
index e43c34113..4cd676cb4 100644
--- a/interface-definitions/include/bgp-neighbor-afi-ipv6-unicast.xml.i
+++ b/interface-definitions/include/bgp/bgp-neighbor-afi-ipv6-unicast.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-neighbor-afi-ipv6-unicast.xml.i -->
+<!-- include start from bgp-neighbor-afi-ipv6-unicast.xml.i -->
<node name="ipv6-unicast">
<properties>
<help>IPv6 BGP neighbor parameters</help>
@@ -9,12 +9,12 @@
<help>Advertise capabilities to this neighbor (IPv6)</help>
</properties>
<children>
- #include <include/bgp-afi-capability-orf.xml.i>
+ #include <include/bgp/bgp-afi-capability-orf.xml.i>
</children>
</node>
- #include <include/bgp-afi-ipv6-nexthop-local.xml.i>
- #include <include/bgp-afi-ipv6-prefix-list.xml.i>
- #include <include/bgp-afi-common.xml.i>
+ #include <include/bgp/bgp-afi-ipv6-nexthop-local.xml.i>
+ #include <include/bgp/bgp-afi-ipv6-prefix-list.xml.i>
+ #include <include/bgp/bgp-afi-common.xml.i>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/bgp-neighbor-afi-l2vpn-evpn.xml.i b/interface-definitions/include/bgp/bgp-neighbor-afi-l2vpn-evpn.xml.i
new file mode 100644
index 000000000..0a9c599fa
--- /dev/null
+++ b/interface-definitions/include/bgp/bgp-neighbor-afi-l2vpn-evpn.xml.i
@@ -0,0 +1,16 @@
+<!-- include start from bgp-neighbor-afi-l2vpn-evpn.xml.i -->
+<node name="l2vpn-evpn">
+ <properties>
+ <help>L2VPN EVPN BGP settings</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-allowas-in.xml.i>
+ #include <include/bgp/bgp-afi-attribute-unchanged.xml.i>
+ #include <include/bgp/bgp-afi-nexthop-self.xml.i>
+ #include <include/bgp/bgp-afi-route-map.xml.i>
+ #include <include/bgp/bgp-afi-route-reflector-client.xml.i>
+ #include <include/bgp/bgp-afi-route-server-client.xml.i>
+ #include <include/bgp/bgp-afi-soft-reconfiguration.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-override-capability.xml.i b/interface-definitions/include/bgp/bgp-override-capability.xml.i
index 88c277c8b..1e51a49d5 100644
--- a/interface-definitions/include/bgp-override-capability.xml.i
+++ b/interface-definitions/include/bgp/bgp-override-capability.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-override-capability.xml.i -->
+<!-- include start from bgp-override-capability.xml.i -->
<leafNode name="override-capability">
<properties>
<help>Ignore capability negotiation with specified neighbor</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-passive.xml.i b/interface-definitions/include/bgp/bgp-passive.xml.i
index ada961866..033cf8231 100644
--- a/interface-definitions/include/bgp-passive.xml.i
+++ b/interface-definitions/include/bgp/bgp-passive.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-passive.xml.i -->
+<!-- include start from bgp-passive.xml.i -->
<leafNode name="passive">
<properties>
<help>Do not initiate a session with this neighbor</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-password.xml.i b/interface-definitions/include/bgp/bgp-password.xml.i
index 5b68a2d71..f5878cce9 100644
--- a/interface-definitions/include/bgp-password.xml.i
+++ b/interface-definitions/include/bgp/bgp-password.xml.i
@@ -1,7 +1,7 @@
-<!-- included start from bgp-password.xml.i -->
+<!-- include start from bgp-password.xml.i -->
<leafNode name="password">
<properties>
<help>BGP MD5 password</help>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-peer-group.xml.i b/interface-definitions/include/bgp/bgp-peer-group.xml.i
index 73c80e0e4..8fc50794d 100644
--- a/interface-definitions/include/bgp-peer-group.xml.i
+++ b/interface-definitions/include/bgp/bgp-peer-group.xml.i
@@ -1,11 +1,14 @@
-<!-- included start from bgp-peer-group.xml.i -->
+<!-- include start from bgp-peer-group.xml.i -->
<leafNode name="peer-group">
<properties>
<help>Peer group for this peer</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_bgp_peer_groups.sh</script>
+ </completionHelp>
<valueHelp>
<format>txt</format>
<description>Peer-group name</description>
</valueHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-remote-as.xml.i b/interface-definitions/include/bgp/bgp-remote-as.xml.i
index de3f4d2ad..f036fe13d 100644
--- a/interface-definitions/include/bgp-remote-as.xml.i
+++ b/interface-definitions/include/bgp/bgp-remote-as.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-remote-as.xml.i -->
+<!-- include start from bgp-remote-as.xml.i -->
<leafNode name="remote-as">
<properties>
<help>Neighbor BGP AS number [REQUIRED]</help>
@@ -24,4 +24,4 @@
<constraintErrorMessage>Invalid AS number</constraintErrorMessage>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-route-target.xml.i b/interface-definitions/include/bgp/bgp-route-target.xml.i
index c3df56a74..c05ac5dc2 100644
--- a/interface-definitions/include/bgp-route-target.xml.i
+++ b/interface-definitions/include/bgp/bgp-route-target.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-route-target.xml.i -->
+<!-- include start from bgp-route-target.xml.i -->
<node name="route-target">
<properties>
<help>Route Target</help>
@@ -42,4 +42,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-shutdown.xml.i b/interface-definitions/include/bgp/bgp-shutdown.xml.i
index fefbfcebb..f920e9579 100644
--- a/interface-definitions/include/bgp-shutdown.xml.i
+++ b/interface-definitions/include/bgp/bgp-shutdown.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from bgp-shutdown.xml.i -->
+<!-- include start from bgp-shutdown.xml.i -->
<leafNode name="shutdown">
<properties>
<help>Administratively shut down this neighbor</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-timers-holdtime.xml.i b/interface-definitions/include/bgp/bgp-timers-holdtime.xml.i
index 09924574b..9c16127b5 100644
--- a/interface-definitions/include/bgp-timers-holdtime.xml.i
+++ b/interface-definitions/include/bgp/bgp-timers-holdtime.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-timers-holdtime.xml.i -->
+<!-- include start from bgp-timers-holdtime.xml.i -->
<leafNode name="holdtime">
<properties>
<help>BGP hold timer for this neighbor</help>
@@ -15,4 +15,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-timers-keepalive.xml.i b/interface-definitions/include/bgp/bgp-timers-keepalive.xml.i
index 7d294c9d6..8c3e66c6a 100644
--- a/interface-definitions/include/bgp-timers-keepalive.xml.i
+++ b/interface-definitions/include/bgp/bgp-timers-keepalive.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-timers-keepalive.xml.i -->
+<!-- include start from bgp-timers-keepalive.xml.i -->
<leafNode name="keepalive">
<properties>
<help>BGP keepalive interval for this neighbor</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-ttl-security.xml.i b/interface-definitions/include/bgp/bgp-ttl-security.xml.i
index 3f4d1786d..1fb1c2c55 100644
--- a/interface-definitions/include/bgp-ttl-security.xml.i
+++ b/interface-definitions/include/bgp/bgp-ttl-security.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-ttl-security.xml.i -->
+<!-- include start from bgp-ttl-security.xml.i -->
<node name="ttl-security">
<properties>
<help>Ttl security mechanism</help>
@@ -18,4 +18,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/bgp-update-source.xml.i b/interface-definitions/include/bgp/bgp-update-source.xml.i
index 3bb79598d..f4ccc3553 100644
--- a/interface-definitions/include/bgp-update-source.xml.i
+++ b/interface-definitions/include/bgp/bgp-update-source.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-update-source.xml.i -->
+<!-- include start from bgp-update-source.xml.i -->
<leafNode name="update-source">
<!-- Need to check format interfaces -->
<properties>
@@ -26,4 +26,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/certificate-ca.xml.i b/interface-definitions/include/certificate-ca.xml.i
index df12746aa..b97378658 100644
--- a/interface-definitions/include/certificate-ca.xml.i
+++ b/interface-definitions/include/certificate-ca.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from certificate-ca.xml.i -->
+<!-- include start from certificate-ca.xml.i -->
<leafNode name="ca-cert-file">
<properties>
<help>Certificate Authority in x509 PEM format</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/certificate-key.xml.i b/interface-definitions/include/certificate-key.xml.i
index 924823c76..1db9dd069 100644
--- a/interface-definitions/include/certificate-key.xml.i
+++ b/interface-definitions/include/certificate-key.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from certificate-key.xml.i -->
+<!-- include start from certificate-key.xml.i -->
<leafNode name="key-file">
<properties>
<help>Certificate private key in x509 PEM format</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/certificate.xml.i b/interface-definitions/include/certificate.xml.i
index 724a8a27f..fb5be45cc 100644
--- a/interface-definitions/include/certificate.xml.i
+++ b/interface-definitions/include/certificate.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from certificate.xml.i -->
+<!-- include start from certificate.xml.i -->
<leafNode name="cert-file">
<properties>
<help>Certificate public key in x509 PEM format</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/dhcp-server-domain-search.xml.i b/interface-definitions/include/dhcp-server-domain-search.xml.i
index 9b3568b72..4fc55097b 100644
--- a/interface-definitions/include/dhcp-server-domain-search.xml.i
+++ b/interface-definitions/include/dhcp-server-domain-search.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from dhcp-server-domain-search.xml.i -->
+<!-- include start from dhcp-server-domain-search.xml.i -->
<leafNode name="domain-search">
<properties>
<help>Client Domain Name search list</help>
@@ -9,4 +9,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/generic-disable-node.xml.i b/interface-definitions/include/generic-disable-node.xml.i
index 520383afb..bb4fa5c4b 100644
--- a/interface-definitions/include/generic-disable-node.xml.i
+++ b/interface-definitions/include/generic-disable-node.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from generic-disable-node.xml.i -->
+<!-- include start from generic-disable-node.xml.i -->
<leafNode name="disable">
<properties>
<help>Temporary disable</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-ipv4-options.xml.i b/interface-definitions/include/interface-ipv4-options.xml.i
deleted file mode 100644
index c63f89890..000000000
--- a/interface-definitions/include/interface-ipv4-options.xml.i
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- included start from interface-ipv4-options.xml.i -->
-<node name="ip">
- <properties>
- <help>IPv4 routing parameters</help>
- </properties>
- <children>
- #include <include/interface-arp-cache-timeout.xml.i>
- #include <include/interface-disable-arp-filter.xml.i>
- #include <include/interface-disable-forwarding.xml.i>
- #include <include/interface-enable-arp-accept.xml.i>
- #include <include/interface-enable-arp-announce.xml.i>
- #include <include/interface-enable-arp-ignore.xml.i>
- #include <include/interface-enable-proxy-arp.xml.i>
- #include <include/interface-proxy-arp-pvlan.xml.i>
- #include <include/interface-source-validation.xml.i>
- </children>
-</node>
-<!-- included end -->
diff --git a/interface-definitions/include/interface-ipv6-options.xml.i b/interface-definitions/include/interface-ipv6-options.xml.i
deleted file mode 100644
index a94c6572b..000000000
--- a/interface-definitions/include/interface-ipv6-options.xml.i
+++ /dev/null
@@ -1,12 +0,0 @@
-<!-- included start from interface-ipv6-options.xml.i -->
-<node name="ipv6">
- <properties>
- <help>IPv6 routing parameters</help>
- </properties>
- <children>
- #include <include/ipv6-address.xml.i>
- #include <include/ipv6-disable-forwarding.xml.i>
- #include <include/ipv6-dup-addr-detect-transmits.xml.i>
- </children>
-</node>
-<!-- included end -->
diff --git a/interface-definitions/include/address-ipv4-ipv6-dhcp.xml.i b/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i
index 7805110bc..b9dd59bea 100644
--- a/interface-definitions/include/address-ipv4-ipv6-dhcp.xml.i
+++ b/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from address-ipv4-ipv6-dhcp.xml.i -->
+<!-- include start from address-ipv4-ipv6-dhcp.xml.i -->
<leafNode name="address">
<properties>
<help>IP address</help>
@@ -28,4 +28,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/address-ipv4-ipv6.xml.i b/interface-definitions/include/interface/address-ipv4-ipv6.xml.i
index b11610104..519622050 100644
--- a/interface-definitions/include/address-ipv4-ipv6.xml.i
+++ b/interface-definitions/include/interface/address-ipv4-ipv6.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from address-ipv4-ipv6.xml.i -->
+<!-- include start from address-ipv4-ipv6.xml.i -->
<leafNode name="address">
<properties>
<help>IP address</help>
@@ -16,4 +16,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/dhcp-options.xml.i b/interface-definitions/include/interface/dhcp-options.xml.i
index 774714251..bd327da2d 100644
--- a/interface-definitions/include/dhcp-options.xml.i
+++ b/interface-definitions/include/interface/dhcp-options.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from dhcp-options.xml.i -->
+<!-- include start from interface/dhcp-options.xml.i -->
<node name="dhcp-options">
<properties>
<help>DHCP client settings/options</help>
@@ -39,4 +39,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/dhcpv6-options.xml.i b/interface-definitions/include/interface/dhcpv6-options.xml.i
index 33ba39592..ca478a3eb 100644
--- a/interface-definitions/include/dhcpv6-options.xml.i
+++ b/interface-definitions/include/interface/dhcpv6-options.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from dhcpv6-options.xml.i -->
+<!-- include start from interface/dhcpv6-options.xml.i -->
<node name="dhcpv6-options">
<properties>
<help>DHCPv6 client settings/options</help>
@@ -97,4 +97,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-arp-cache-timeout.xml.i b/interface-definitions/include/interface/interface-arp-cache-timeout.xml.i
index 6dfebfee4..b269fecd8 100644
--- a/interface-definitions/include/interface-arp-cache-timeout.xml.i
+++ b/interface-definitions/include/interface/interface-arp-cache-timeout.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-arp-cache-timeout.xml.i -->
+<!-- include start from interface/interface-arp-cache-timeout.xml.i -->
<leafNode name="arp-cache-timeout">
<properties>
<help>ARP cache entry timeout in seconds</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>30</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-description.xml.i b/interface-definitions/include/interface/interface-description.xml.i
index daf09d8bc..d618b50d2 100644
--- a/interface-definitions/include/interface-description.xml.i
+++ b/interface-definitions/include/interface/interface-description.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-description.xml.i -->
+<!-- include start from interface/interface-description.xml.i -->
<leafNode name="description">
<properties>
<help>Interface specific description</help>
@@ -8,4 +8,4 @@
<constraintErrorMessage>Description too long (limit 256 characters)</constraintErrorMessage>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-dial-on-demand.xml.i b/interface-definitions/include/interface/interface-dial-on-demand.xml.i
index 8fba8099d..66edd9678 100644
--- a/interface-definitions/include/interface-dial-on-demand.xml.i
+++ b/interface-definitions/include/interface/interface-dial-on-demand.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-dial-on-demand.xml.i -->
+<!-- include start from interface/interface-dial-on-demand.xml.i -->
<leafNode name="connect-on-demand">
<properties>
<help>Establishment connection automatically when traffic is sent</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-disable-arp-filter.xml.i b/interface-definitions/include/interface/interface-disable-arp-filter.xml.i
index 4de3ca893..49cddaf76 100644
--- a/interface-definitions/include/interface-disable-arp-filter.xml.i
+++ b/interface-definitions/include/interface/interface-disable-arp-filter.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-disable-arp-filter.xml.i -->
+<!-- include start from interface/interface-disable-arp-filter.xml.i -->
<leafNode name="disable-arp-filter">
<properties>
<help>Disable ARP filter on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-disable-forwarding.xml.i b/interface-definitions/include/interface/interface-disable-forwarding.xml.i
index 7cbb726ec..cb6ef0475 100644
--- a/interface-definitions/include/interface-disable-forwarding.xml.i
+++ b/interface-definitions/include/interface/interface-disable-forwarding.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-disable-forwarding.xml.i -->
+<!-- include start from interface/interface-disable-forwarding.xml.i -->
<leafNode name="disable-forwarding">
<properties>
<help>Disable IPv4 forwarding on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-disable-link-detect.xml.i b/interface-definitions/include/interface/interface-disable-link-detect.xml.i
index 4298b4b5d..c528885b2 100644
--- a/interface-definitions/include/interface-disable-link-detect.xml.i
+++ b/interface-definitions/include/interface/interface-disable-link-detect.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-disable-link-detect.xml.i -->
+<!-- include start from interface/interface-disable-link-detect.xml.i -->
<leafNode name="disable-link-detect">
<properties>
<help>Ignore link state changes</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-disable.xml.i b/interface-definitions/include/interface/interface-disable.xml.i
index 5d73d54ba..d90e6395b 100644
--- a/interface-definitions/include/interface-disable.xml.i
+++ b/interface-definitions/include/interface/interface-disable.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-disable.xml.i -->
+<!-- include start from interface/interface-disable.xml.i -->
<leafNode name="disable">
<properties>
<help>Administratively disable interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-eapol.xml.i b/interface-definitions/include/interface/interface-eapol.xml.i
index 8b33b4acf..92b7a3f35 100644
--- a/interface-definitions/include/interface-eapol.xml.i
+++ b/interface-definitions/include/interface/interface-eapol.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-eapol.xml.i -->
+<!-- include start from interface/interface-eapol.xml.i -->
<node name="eapol">
<properties>
<help>Extensible Authentication Protocol over Local Area Network</help>
@@ -9,4 +9,4 @@
#include <include/certificate-key.xml.i>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-enable-arp-accept.xml.i b/interface-definitions/include/interface/interface-enable-arp-accept.xml.i
index 688b3572e..7c5d51857 100644
--- a/interface-definitions/include/interface-enable-arp-accept.xml.i
+++ b/interface-definitions/include/interface/interface-enable-arp-accept.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-enable-arp-accept.xml.i -->
+<!-- include start from interface/interface-enable-arp-accept.xml.i -->
<leafNode name="enable-arp-accept">
<properties>
<help>Enable ARP accept on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-enable-arp-announce.xml.i b/interface-definitions/include/interface/interface-enable-arp-announce.xml.i
index c84bb7ea9..f44599c54 100644
--- a/interface-definitions/include/interface-enable-arp-announce.xml.i
+++ b/interface-definitions/include/interface/interface-enable-arp-announce.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-enable-arp-announce.xml.i -->
+<!-- include start from interface/interface-enable-arp-announce.xml.i -->
<leafNode name="enable-arp-announce">
<properties>
<help>Enable ARP announce on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-enable-arp-ignore.xml.i b/interface-definitions/include/interface/interface-enable-arp-ignore.xml.i
index 741771a89..3ea39613c 100644
--- a/interface-definitions/include/interface-enable-arp-ignore.xml.i
+++ b/interface-definitions/include/interface/interface-enable-arp-ignore.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-enable-arp-ignore.xml.i -->
+<!-- include start from interface/interface-enable-arp-ignore.xml.i -->
<leafNode name="enable-arp-ignore">
<properties>
<help>Enable ARP ignore on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-enable-proxy-arp.xml.i b/interface-definitions/include/interface/interface-enable-proxy-arp.xml.i
index 08351e673..dbdeeb7a7 100644
--- a/interface-definitions/include/interface-enable-proxy-arp.xml.i
+++ b/interface-definitions/include/interface/interface-enable-proxy-arp.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-enable-proxy-arp.xml.i -->
+<!-- include start from interface/interface-enable-proxy-arp.xml.i -->
<leafNode name="enable-proxy-arp">
<properties>
<help>Enable proxy-arp on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-hw-id.xml.i b/interface-definitions/include/interface/interface-hw-id.xml.i
index 55ef55add..989cd9cb7 100644
--- a/interface-definitions/include/interface-hw-id.xml.i
+++ b/interface-definitions/include/interface/interface-hw-id.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-hw-id.xml.i -->
+<!-- include start from interface/interface-hw-id.xml.i -->
<leafNode name="hw-id">
<properties>
<help>Associate Ethernet Interface with given Media Access Control (MAC) address</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface/interface-ipv4-options.xml.i b/interface-definitions/include/interface/interface-ipv4-options.xml.i
new file mode 100644
index 000000000..c2d0677b7
--- /dev/null
+++ b/interface-definitions/include/interface/interface-ipv4-options.xml.i
@@ -0,0 +1,18 @@
+<!-- include start from interface/interface-ipv4-options.xml.i -->
+<node name="ip">
+ <properties>
+ <help>IPv4 routing parameters</help>
+ </properties>
+ <children>
+ #include <include/interface/interface-arp-cache-timeout.xml.i>
+ #include <include/interface/interface-disable-arp-filter.xml.i>
+ #include <include/interface/interface-disable-forwarding.xml.i>
+ #include <include/interface/interface-enable-arp-accept.xml.i>
+ #include <include/interface/interface-enable-arp-announce.xml.i>
+ #include <include/interface/interface-enable-arp-ignore.xml.i>
+ #include <include/interface/interface-enable-proxy-arp.xml.i>
+ #include <include/interface/interface-proxy-arp-pvlan.xml.i>
+ #include <include/interface/interface-source-validation.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/interface/interface-ipv6-options.xml.i b/interface-definitions/include/interface/interface-ipv6-options.xml.i
new file mode 100644
index 000000000..dcd5a8710
--- /dev/null
+++ b/interface-definitions/include/interface/interface-ipv6-options.xml.i
@@ -0,0 +1,12 @@
+<!-- include start from interface/interface-ipv6-options.xml.i -->
+<node name="ipv6">
+ <properties>
+ <help>IPv6 routing parameters</help>
+ </properties>
+ <children>
+ #include <include/interface/ipv6-address.xml.i>
+ #include <include/interface/ipv6-disable-forwarding.xml.i>
+ #include <include/interface/ipv6-dup-addr-detect-transmits.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mac.xml.i b/interface-definitions/include/interface/interface-mac.xml.i
index 87dc5fb60..d7107ad23 100644
--- a/interface-definitions/include/interface-mac.xml.i
+++ b/interface-definitions/include/interface/interface-mac.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from mac.xml.i -->
+<!-- include start from interface/interface-mac.xml.i -->
<leafNode name="mac">
<properties>
<help>Media Access Control (MAC) address</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mirror.xml.i b/interface-definitions/include/interface/interface-mirror.xml.i
index d34132a9c..b3b45fb43 100644
--- a/interface-definitions/include/interface-mirror.xml.i
+++ b/interface-definitions/include/interface/interface-mirror.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-mirror.xml.i -->
+<!-- include start from interface/interface-mirror.xml.i -->
<node name="mirror">
<properties>
<help>Incoming/outgoing packet mirroring destination</help>
@@ -22,4 +22,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mtu-1200-16000.xml.i b/interface-definitions/include/interface/interface-mtu-1200-16000.xml.i
index 04b5ec8ac..3241ba912 100644
--- a/interface-definitions/include/interface-mtu-1200-16000.xml.i
+++ b/interface-definitions/include/interface/interface-mtu-1200-16000.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-mtu-1200-16000.xml.i -->
+<!-- include start from interface/interface-mtu-1200-16000.xml.i -->
<leafNode name="mtu">
<properties>
<help>Maximum Transmission Unit (MTU)</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>1500</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mtu-1450-16000.xml.i b/interface-definitions/include/interface/interface-mtu-1450-16000.xml.i
index 41dd5fb00..0a35bbbaa 100644
--- a/interface-definitions/include/interface-mtu-1450-16000.xml.i
+++ b/interface-definitions/include/interface/interface-mtu-1450-16000.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-mtu-1450-16000.xml.i -->
+<!-- include start from interface/interface-mtu-1450-16000.xml.i -->
<leafNode name="mtu">
<properties>
<help>Maximum Transmission Unit (MTU)</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>1500</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mtu-64-8024.xml.i b/interface-definitions/include/interface/interface-mtu-64-8024.xml.i
index 0a455bc64..f75de02ba 100644
--- a/interface-definitions/include/interface-mtu-64-8024.xml.i
+++ b/interface-definitions/include/interface/interface-mtu-64-8024.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-mtu-68-8024.xml.i -->
+<!-- include start from interface/interface-mtu-68-8024.xml.i -->
<leafNode name="mtu">
<properties>
<help>Maximum Transmission Unit (MTU)</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>1500</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mtu-68-1500.xml.i b/interface-definitions/include/interface/interface-mtu-68-1500.xml.i
index 78c2c6920..9e6fe8760 100644
--- a/interface-definitions/include/interface-mtu-68-1500.xml.i
+++ b/interface-definitions/include/interface/interface-mtu-68-1500.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-mtu-68-1500.xml.i -->
+<!-- include start from interface/interface-mtu-68-1500.xml.i -->
<leafNode name="mtu">
<properties>
<help>Maximum Transmission Unit (MTU)</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>1500</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-mtu-68-16000.xml.i b/interface-definitions/include/interface/interface-mtu-68-16000.xml.i
index 9f18464bf..83af7bbd4 100644
--- a/interface-definitions/include/interface-mtu-68-16000.xml.i
+++ b/interface-definitions/include/interface/interface-mtu-68-16000.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-mtu-68-16000.xml.i -->
+<!-- include start from interface/interface-mtu-68-16000.xml.i -->
<leafNode name="mtu">
<properties>
<help>Maximum Transmission Unit (MTU)</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>1500</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-parameters-dont-fragment.xml.i b/interface-definitions/include/interface/interface-parameters-dont-fragment.xml.i
index a16cc5dee..166c31115 100644
--- a/interface-definitions/include/interface-parameters-dont-fragment.xml.i
+++ b/interface-definitions/include/interface/interface-parameters-dont-fragment.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-parameters-df.xml.i -->
+<!-- include start from interface/interface-parameters-df.xml.i -->
<leafNode name="dont-fragment">
<properties>
<help>Specifies the usage of the dont fragment (DF) bit</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-parameters-flowlabel.xml.i b/interface-definitions/include/interface/interface-parameters-flowlabel.xml.i
index 0723c4b47..ed075e40d 100644
--- a/interface-definitions/include/interface-parameters-flowlabel.xml.i
+++ b/interface-definitions/include/interface/interface-parameters-flowlabel.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-parameters-flowlabel.xml.i -->
+<!-- include start from interface/interface-parameters-flowlabel.xml.i -->
<leafNode name="flowlabel">
<properties>
<help>Specifies the flow label to use in outgoing packets</help>
@@ -12,4 +12,4 @@
<constraintErrorMessage>Must be 'inherit' or a number</constraintErrorMessage>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-parameters-key.xml.i b/interface-definitions/include/interface/interface-parameters-key.xml.i
index e918ff0e8..1b1d67174 100644
--- a/interface-definitions/include/interface-parameters-key.xml.i
+++ b/interface-definitions/include/interface/interface-parameters-key.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-parameters-key.xml.i -->
+<!-- include start from interface/interface-parameters-key.xml.i -->
<leafNode name="key">
<properties>
<help>Tunnel key</help>
@@ -12,4 +12,4 @@
<constraintErrorMessage>key must be between 0-4294967295</constraintErrorMessage>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-parameters-tos.xml.i b/interface-definitions/include/interface/interface-parameters-tos.xml.i
index ebb537bed..83b4e0671 100644
--- a/interface-definitions/include/interface-parameters-tos.xml.i
+++ b/interface-definitions/include/interface/interface-parameters-tos.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from tunnel-parameters-tos.xml.i -->
+<!-- include start from interface/tunnel-parameters-tos.xml.i -->
<leafNode name="tos">
<properties>
<help>Specifies TOS value to use in outgoing packets</help>
@@ -13,4 +13,4 @@
</properties>
<defaultValue>inherit</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-parameters-ttl.xml.i b/interface-definitions/include/interface/interface-parameters-ttl.xml.i
index 83563ecb1..df193cf24 100644
--- a/interface-definitions/include/interface-parameters-ttl.xml.i
+++ b/interface-definitions/include/interface/interface-parameters-ttl.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-parameters-ttl.xml.i -->
+<!-- include start from interface/interface-parameters-ttl.xml.i -->
<leafNode name="ttl">
<properties>
<help>Specifies TTL value to use in outgoing packets</help>
@@ -17,4 +17,4 @@
</properties>
<defaultValue>0</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-proxy-arp-pvlan.xml.i b/interface-definitions/include/interface/interface-proxy-arp-pvlan.xml.i
index 02b96e353..153dfc072 100644
--- a/interface-definitions/include/interface-proxy-arp-pvlan.xml.i
+++ b/interface-definitions/include/interface/interface-proxy-arp-pvlan.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-proxy-arp-pvlan.xml.i -->
+<!-- include start from interface/interface-proxy-arp-pvlan.xml.i -->
<leafNode name="proxy-arp-pvlan">
<properties>
<help>Enable private VLAN proxy ARP on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-source-validation.xml.i b/interface-definitions/include/interface/interface-source-validation.xml.i
index 32cec464e..70914f2e9 100644
--- a/interface-definitions/include/interface-source-validation.xml.i
+++ b/interface-definitions/include/interface/interface-source-validation.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-source-validation.xml.i -->
+<!-- include start from interface/interface-source-validation.xml.i -->
<leafNode name="source-validation">
<properties>
<help>Source validation by reversed path (RFC3704)</help>
@@ -22,4 +22,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-vrf.xml.i b/interface-definitions/include/interface/interface-vrf.xml.i
index e3d6b53e0..ef6ca1241 100644
--- a/interface-definitions/include/interface-vrf.xml.i
+++ b/interface-definitions/include/interface/interface-vrf.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from interface-vrf.xml.i -->
+<!-- include start from interface/interface-vrf.xml.i -->
<leafNode name="vrf">
<properties>
<help>VRF instance name</help>
@@ -11,4 +11,4 @@
</completionHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface-xdp.xml.i b/interface-definitions/include/interface/interface-xdp.xml.i
index d224c177f..0253f6dad 100644
--- a/interface-definitions/include/interface-xdp.xml.i
+++ b/interface-definitions/include/interface/interface-xdp.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from interface-vrf.xml.i -->
+<!-- include start from interface/interface-xdp.xml.i -->
<leafNode name="xdp">
<properties>
<help>Enable eXpress Data Path</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ipv6-address-autoconf.xml.i b/interface-definitions/include/interface/ipv6-address-autoconf.xml.i
index 580f060d7..cd1483bc1 100644
--- a/interface-definitions/include/ipv6-address-autoconf.xml.i
+++ b/interface-definitions/include/interface/ipv6-address-autoconf.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from ipv6-address-autoconf.xml.i -->
+<!-- include start from interface/ipv6-address-autoconf.xml.i -->
<leafNode name="autoconf">
<properties>
<help>Enable acquisition of IPv6 address using stateless autoconfig (SLAAC)</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ipv6-address-eui64.xml.i b/interface-definitions/include/interface/ipv6-address-eui64.xml.i
index 093a1dc79..7bc1ee2e4 100644
--- a/interface-definitions/include/ipv6-address-eui64.xml.i
+++ b/interface-definitions/include/interface/ipv6-address-eui64.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ipv6-address-eui64.xml.i -->
+<!-- include start from interface/ipv6-address-eui64.xml.i -->
<leafNode name="eui64">
<properties>
<help>Prefix for IPv6 address with MAC-based EUI-64</help>
@@ -12,4 +12,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ipv6-address-no-default-link-local.xml.i b/interface-definitions/include/interface/ipv6-address-no-default-link-local.xml.i
index 1c9e832dc..012490edc 100644
--- a/interface-definitions/include/ipv6-address-no-default-link-local.xml.i
+++ b/interface-definitions/include/interface/ipv6-address-no-default-link-local.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from ipv6-address-no-default-link-local.xml.i -->
+<!-- include start from interface/ipv6-address-no-default-link-local.xml.i -->
<leafNode name="no-default-link-local">
<properties>
<help>Remove the default link-local address from the interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/interface/ipv6-address.xml.i b/interface-definitions/include/interface/ipv6-address.xml.i
new file mode 100644
index 000000000..e1bdf02fd
--- /dev/null
+++ b/interface-definitions/include/interface/ipv6-address.xml.i
@@ -0,0 +1,12 @@
+<!-- include start from interface/ipv6-address.xml.i -->
+<node name="address">
+ <properties>
+ <help>IPv6 address configuration modes</help>
+ </properties>
+ <children>
+ #include <include/interface/ipv6-address-autoconf.xml.i>
+ #include <include/interface/ipv6-address-eui64.xml.i>
+ #include <include/interface/ipv6-address-no-default-link-local.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/ipv6-disable-forwarding.xml.i b/interface-definitions/include/interface/ipv6-disable-forwarding.xml.i
index 14d9eada9..4adb77d1b 100644
--- a/interface-definitions/include/ipv6-disable-forwarding.xml.i
+++ b/interface-definitions/include/interface/ipv6-disable-forwarding.xml.i
@@ -1,8 +1,8 @@
-<!-- included start from ipv6-disable-forwarding.xml.i -->
+<!-- include start from interface/ipv6-disable-forwarding.xml.i -->
<leafNode name="disable-forwarding">
<properties>
<help>Disable IPv6 forwarding on this interface</help>
<valueless/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ipv6-dup-addr-detect-transmits.xml.i b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i
index 61e6669c4..2b5ec0281 100644
--- a/interface-definitions/include/ipv6-dup-addr-detect-transmits.xml.i
+++ b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ipv6-dup-addr-detect-transmits.xml.i -->
+<!-- include start from interface/ipv6-dup-addr-detect-transmits.xml.i -->
<leafNode name="dup-addr-detect-transmits">
<properties>
<help>Number of NS messages to send while performing DAD (default: 1)</help>
@@ -15,4 +15,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/tunnel-remote.xml.i b/interface-definitions/include/interface/tunnel-remote.xml.i
index d5b50d3f6..1ba9b0382 100644
--- a/interface-definitions/include/tunnel-remote.xml.i
+++ b/interface-definitions/include/interface/tunnel-remote.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from tunnel-remote.xml.i -->
+<!-- include start from rip/tunnel-remote.xml.i -->
<leafNode name="remote">
<properties>
<help>Tunnel remote address</help>
@@ -15,4 +15,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/vif-s.xml.i b/interface-definitions/include/interface/vif-s.xml.i
index 01cb59efc..045fd3e24 100644
--- a/interface-definitions/include/vif-s.xml.i
+++ b/interface-definitions/include/interface/vif-s.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from vif-s.xml.i -->
+<!-- include start from interface/vif-s.xml.i -->
<tagNode name="vif-s">
<properties>
<help>QinQ TAG-S Virtual Local Area Network (VLAN) ID</help>
@@ -8,12 +8,12 @@
<constraintErrorMessage>VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
<leafNode name="protocol">
<properties>
<help>Protocol used for service VLAN (default: 802.1ad)</help>
@@ -35,10 +35,10 @@
</properties>
<defaultValue>802.1ad</defaultValue>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
<tagNode name="vif-c">
<properties>
<help>QinQ TAG-C Virtual Local Area Network (VLAN) ID</help>
@@ -48,20 +48,20 @@
<constraintErrorMessage>VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</tagNode>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/vif.xml.i b/interface-definitions/include/interface/vif.xml.i
index bc60dd04d..0355054a4 100644
--- a/interface-definitions/include/vif.xml.i
+++ b/interface-definitions/include/interface/vif.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from vif.xml.i -->
+<!-- include start from interface/vif.xml.i -->
<tagNode name="vif">
<properties>
<help>Virtual Local Area Network (VLAN) ID</help>
@@ -12,13 +12,13 @@
<constraintErrorMessage>VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
<leafNode name="egress-qos">
<properties>
<help>VLAN egress QoS</help>
@@ -43,10 +43,10 @@
<constraintErrorMessage>QoS mapping should be in the format of '0:7 2:3' with numbers 0-9</constraintErrorMessage>
</properties>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ipv6-address.xml.i b/interface-definitions/include/ipv6-address.xml.i
deleted file mode 100644
index 276456248..000000000
--- a/interface-definitions/include/ipv6-address.xml.i
+++ /dev/null
@@ -1,12 +0,0 @@
-<!-- included start from ipv6-address.xml.i -->
-<node name="address">
- <properties>
- <help>IPv6 address configuration modes</help>
- </properties>
- <children>
- #include <include/ipv6-address-autoconf.xml.i>
- #include <include/ipv6-address-eui64.xml.i>
- #include <include/ipv6-address-no-default-link-local.xml.i>
- </children>
-</node>
-<!-- included end -->
diff --git a/interface-definitions/include/isis-redistribute-ipv4.xml.i b/interface-definitions/include/isis-redistribute-ipv4.xml.i
index 97ab64250..774086a81 100644
--- a/interface-definitions/include/isis-redistribute-ipv4.xml.i
+++ b/interface-definitions/include/isis-redistribute-ipv4.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from isis-redistribute-ipv4.xml.i -->
+<!-- include start from isis-redistribute-ipv4.xml.i -->
<node name="level-1">
<properties>
<help>Redistribute into level-1</help>
@@ -53,4 +53,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/listen-address-ipv4.xml.i b/interface-definitions/include/listen-address-ipv4.xml.i
index 530dbf619..ee52cebe8 100644
--- a/interface-definitions/include/listen-address-ipv4.xml.i
+++ b/interface-definitions/include/listen-address-ipv4.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from listen-address-ipv4.xml.i -->
+<!-- include start from listen-address-ipv4.xml.i -->
<leafNode name="listen-address">
<properties>
<help>Local IPv4 addresses for service to listen on</help>
@@ -15,4 +15,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/listen-address.xml.i b/interface-definitions/include/listen-address.xml.i
index 5bfb7eb38..9b86851c7 100644
--- a/interface-definitions/include/listen-address.xml.i
+++ b/interface-definitions/include/listen-address.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from listen-address.xml.i -->
+<!-- include start from listen-address.xml.i -->
<leafNode name="listen-address">
<properties>
<help>Local IP addresses for service to listen on</help>
@@ -20,4 +20,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/nat-address.xml.i b/interface-definitions/include/nat-address.xml.i
index 846ef3dec..a6460ac0f 100644
--- a/interface-definitions/include/nat-address.xml.i
+++ b/interface-definitions/include/nat-address.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from nat-address.xml.i -->
+<!-- include start from nat-address.xml.i -->
<leafNode name="address">
<properties>
<help>IP address, subnet, or range</help>
@@ -36,4 +36,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/nat-interface.xml.i b/interface-definitions/include/nat-interface.xml.i
index e42003530..68969472f 100644
--- a/interface-definitions/include/nat-interface.xml.i
+++ b/interface-definitions/include/nat-interface.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from nat-interface.xml.i -->
+<!-- include start from nat-interface.xml.i -->
<leafNode name="outbound-interface">
<properties>
<help>Outbound interface of NAT traffic</help>
@@ -8,4 +8,4 @@
</completionHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/nat-port.xml.i b/interface-definitions/include/nat-port.xml.i
index 6465c00e9..ebba43712 100644
--- a/interface-definitions/include/nat-port.xml.i
+++ b/interface-definitions/include/nat-port.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from nat-port.xml.i -->
+<!-- include start from nat-port.xml.i -->
<leafNode name="port">
<properties>
<help>Port number</help>
@@ -16,4 +16,4 @@
</valueHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/nat-rule.xml.i b/interface-definitions/include/nat-rule.xml.i
index 7ef90f07e..579d19bdd 100644
--- a/interface-definitions/include/nat-rule.xml.i
+++ b/interface-definitions/include/nat-rule.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from nat-rule.xml.i -->
+<!-- include start from nat-rule.xml.i -->
<tagNode name="rule">
<properties>
<help>Rule number for NAT</help>
@@ -298,4 +298,4 @@
</node>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/nat-translation-port.xml.i b/interface-definitions/include/nat-translation-port.xml.i
index a3e05316f..6e507353c 100644
--- a/interface-definitions/include/nat-translation-port.xml.i
+++ b/interface-definitions/include/nat-translation-port.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from nat-translation-port.xml.i -->
+<!-- include start from nat-translation-port.xml.i -->
<leafNode name="port">
<properties>
<help>Port number</help>
@@ -12,4 +12,4 @@
</valueHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf-authentication.xml.i b/interface-definitions/include/ospf/ospf-authentication.xml.i
index efb29c1f0..322c002e4 100644
--- a/interface-definitions/include/ospf-authentication.xml.i
+++ b/interface-definitions/include/ospf/ospf-authentication.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ospf-authentication.xml.i -->
+<!-- include start from ospf/ospf-authentication.xml.i -->
<node name="authentication">
<properties>
<help>Authentication</help>
@@ -53,4 +53,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf/ospf-common-config.xml.i b/interface-definitions/include/ospf/ospf-common-config.xml.i
new file mode 100644
index 000000000..7316af670
--- /dev/null
+++ b/interface-definitions/include/ospf/ospf-common-config.xml.i
@@ -0,0 +1,761 @@
+<!-- include start from ospf/ospf-common-config.xml.i -->
+<tagNode name="access-list">
+ <properties>
+ <help>Access list to filter networks in routing updates</help>
+ <completionHelp>
+ <path>policy access-list</path>
+ </completionHelp>
+ <valueHelp>
+ <format>u32</format>
+ <description>Access-list number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="export">
+ <properties>
+ <help>Filter for outgoing routing update [REQUIRED]</help>
+ <completionHelp>
+ <list>bgp connected kernel rip static</list>
+ </completionHelp>
+ <valueHelp>
+ <format>bgp</format>
+ <description>Filter BGP routes</description>
+ </valueHelp>
+ <valueHelp>
+ <format>connected</format>
+ <description>Filter connected routes</description>
+ </valueHelp>
+ <valueHelp>
+ <format>isis</format>
+ <description>Filter IS-IS routes</description>
+ </valueHelp>
+ <valueHelp>
+ <format>kernel</format>
+ <description>Filter Kernel routes</description>
+ </valueHelp>
+ <valueHelp>
+ <format>rip</format>
+ <description>Filter RIP routes</description>
+ </valueHelp>
+ <valueHelp>
+ <format>static</format>
+ <description>Filter static routes</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(bgp|connected|isis|kernel|rip|static)$</regex>
+ </constraint>
+ <constraintErrorMessage>Must be bgp, connected, kernel, rip, or static</constraintErrorMessage>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+</tagNode>
+<tagNode name="area">
+ <properties>
+ <help>OSPF Area</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>OSPF area in decimal notation</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>OSPF area in dotted decimal notation</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ <validator name="ip-address"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="area-type">
+ <properties>
+ <help>Area type</help>
+ </properties>
+ <children>
+ <leafNode name="normal">
+ <properties>
+ <help>Normal OSPF area</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <node name="nssa">
+ <properties>
+ <help>Nssa OSPF area</help>
+ </properties>
+ <children>
+ <leafNode name="default-cost">
+ <properties>
+ <help>Summary-default cost of nssa area</help>
+ <valueHelp>
+ <format>u32:0-16777215</format>
+ <description>Summary default cost</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-16777215"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="no-summary">
+ <properties>
+ <help>Do not inject inter-area routes into stub</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="translate">
+ <properties>
+ <help>Configure NSSA-ABR (default: candidate)</help>
+ <completionHelp>
+ <list>always candidate never</list>
+ </completionHelp>
+ <valueHelp>
+ <format>always</format>
+ <description>NSSA-ABR to always translate</description>
+ </valueHelp>
+ <valueHelp>
+ <format>candidate</format>
+ <description>NSSA-ABR for translate election (default)</description>
+ </valueHelp>
+ <valueHelp>
+ <format>never</format>
+ <description>NSSA-ABR to never translate</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(always|candidate|never)$</regex>
+ </constraint>
+ </properties>
+ <defaultValue>candidate</defaultValue>
+ </leafNode>
+ </children>
+ </node>
+ <node name="stub">
+ <properties>
+ <help>Stub OSPF area</help>
+ </properties>
+ <children>
+ <leafNode name="default-cost">
+ <properties>
+ <help>Summary-default cost of nssa area</help>
+ <valueHelp>
+ <format>u32:0-16777215</format>
+ <description>Summary default cost</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-16777215"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="no-summary">
+ <properties>
+ <help>Do not inject inter-area routes into stub</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <leafNode name="authentication">
+ <properties>
+ <help>OSPF area authentication type</help>
+ <completionHelp>
+ <list>plaintext-password md5</list>
+ </completionHelp>
+ <valueHelp>
+ <format>plaintext-password</format>
+ <description>Use plain-text authentication</description>
+ </valueHelp>
+ <valueHelp>
+ <format>md5</format>
+ <description>Use md5 authentication</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(plaintext-password|md5)$</regex>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="network">
+ <properties>
+ <help>OSPF network [REQUIRED]</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>OSPF network [REQUIRED]</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ <multi/>
+ </properties>
+ </leafNode>
+ <tagNode name="range">
+ <properties>
+ <help>Summarize routes matching prefix (border routers only)</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Area range prefix</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="cost">
+ <properties>
+ <help>Metric for this range</help>
+ <valueHelp>
+ <format>u32:0-16777215</format>
+ <description>Metric for this range</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-16777215"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="not-advertise">
+ <properties>
+ <help>Do not advertise this range</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="substitute">
+ <properties>
+ <help>Announce area range as another prefix</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Announce area range as another prefix</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="shortcut">
+ <properties>
+ <help>Area shortcut mode</help>
+ <completionHelp>
+ <list>default disable enable</list>
+ </completionHelp>
+ <valueHelp>
+ <format>default</format>
+ <description>Set default</description>
+ </valueHelp>
+ <valueHelp>
+ <format>disable</format>
+ <description>Disable shortcutting mode</description>
+ </valueHelp>
+ <valueHelp>
+ <format>enable</format>
+ <description>Enable shortcutting mode</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(default|disable|enable)$</regex>
+ </constraint>
+ </properties>
+ </leafNode>
+ <tagNode name="virtual-link">
+ <properties>
+ <help>Virtual link</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>OSPF area in dotted decimal notation</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ <validator name="ip-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-authentication.xml.i>
+ #include <include/ospf/ospf-intervals.xml.i>
+ </children>
+ </tagNode>
+ </children>
+</tagNode>
+<node name="auto-cost">
+ <properties>
+ <help>Calculate OSPF interface cost according to bandwidth (default: 100)</help>
+ </properties>
+ <children>
+ <leafNode name="reference-bandwidth">
+ <properties>
+ <help>Reference bandwidth method to assign OSPF cost</help>
+ <valueHelp>
+ <format>u32:1-4294967</format>
+ <description>Reference bandwidth cost in Mbits/sec</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967"/>
+ </constraint>
+ </properties>
+ <defaultValue>100</defaultValue>
+ </leafNode>
+ </children>
+</node>
+<node name="default-information">
+ <properties>
+ <help>Control distribution of default information</help>
+ </properties>
+ <children>
+ <node name="originate">
+ <properties>
+ <help>Distribute a default route</help>
+ </properties>
+ <children>
+ <leafNode name="always">
+ <properties>
+ <help>Always advertise default route</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ </children>
+</node>
+<leafNode name="default-metric">
+ <properties>
+ <help>Metric of redistributed routes</help>
+ <valueHelp>
+ <format>u32:0-16777214</format>
+ <description>Metric of redistributed routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-16777214"/>
+ </constraint>
+ </properties>
+</leafNode>
+<node name="distance">
+ <properties>
+ <help>Administrative distance</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-distance-global.xml.i>
+ <node name="ospf">
+ <properties>
+ <help>OSPF administrative distance</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-distance-per-protocol.xml.i>
+ </children>
+ </node>
+ </children>
+</node>
+<tagNode name="interface">
+ <properties>
+ <help>Interface related configuration</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-authentication.xml.i>
+ #include <include/ospf/ospf-intervals.xml.i>
+ #include <include/ospf/ospf-interface-common.xml.i>
+ <leafNode name="bandwidth">
+ <properties>
+ <help>Bandwidth of interface (Megabit/sec)</help>
+ <valueHelp>
+ <format>u32:1-100000</format>
+ <description>Bandwidth in Megabit/sec (for calculating OSPF cost)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-100000"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="hello-multiplier">
+ <properties>
+ <help>Hello multiplier factor</help>
+ <valueHelp>
+ <format>u32:1-10</format>
+ <description>Number of Hellos to send each second</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-10"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="network">
+ <properties>
+ <help>Network type</help>
+ <completionHelp>
+ <list>broadcast non-broadcast point-to-multipoint point-to-point</list>
+ </completionHelp>
+ <valueHelp>
+ <format>broadcast</format>
+ <description>Broadcast network type</description>
+ </valueHelp>
+ <valueHelp>
+ <format>non-broadcast</format>
+ <description>Non-broadcast network type</description>
+ </valueHelp>
+ <valueHelp>
+ <format>point-to-multipoint</format>
+ <description>Point-to-multipoint network type</description>
+ </valueHelp>
+ <valueHelp>
+ <format>point-to-point</format>
+ <description>Point-to-point network type</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(broadcast|non-broadcast|point-to-multipoint|point-to-point)$</regex>
+ </constraint>
+ <constraintErrorMessage>Must be broadcast, non-broadcast, point-to-multipoint or point-to-point</constraintErrorMessage>
+ </properties>
+ </leafNode>
+ </children>
+</tagNode>
+<node name="log-adjacency-changes">
+ <properties>
+ <help>Log changes in adjacency state</help>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Log all state changes</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+<node name="max-metric">
+ <properties>
+ <help>OSPF maximum and infinite-distance metric</help>
+ </properties>
+ <children>
+ <node name="router-lsa">
+ <properties>
+ <help>Advertise own Router-LSA with infinite distance (stub router)</help>
+ </properties>
+ <children>
+ <leafNode name="administrative">
+ <properties>
+ <help>Administratively apply, for an indefinite period</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="on-shutdown">
+ <properties>
+ <help>Advertise stub-router prior to full shutdown of OSPF</help>
+ <valueHelp>
+ <format>u32:5-100</format>
+ <description>Time (seconds) to advertise self as stub-router</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 5-100"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="on-startup">
+ <properties>
+ <help>Automatically advertise stub Router-LSA on startup of OSPF</help>
+ <valueHelp>
+ <format>u32:5-86400</format>
+ <description>Time (seconds) to advertise self as stub-router</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 5-86400"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+</node>
+<node name="mpls-te">
+ <properties>
+ <help>MultiProtocol Label Switching-Traffic Engineering (MPLS-TE) parameters</help>
+ </properties>
+ <children>
+ <leafNode name="enable">
+ <properties>
+ <help>Enable MPLS-TE functionality</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="router-address">
+ <properties>
+ <help>Stable IP address of the advertising router</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Stable IP address of the advertising router</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <defaultValue>0.0.0.0</defaultValue>
+ </leafNode>
+ </children>
+</node>
+<tagNode name="neighbor">
+ <properties>
+ <help>Specify neighbor router</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Neighbor IP address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="poll-interval">
+ <properties>
+ <help>Dead neighbor polling interval (default: 60)</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>Seconds between dead neighbor polling interval</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ <defaultValue>60</defaultValue>
+ </leafNode>
+ <leafNode name="priority">
+ <properties>
+ <help>Neighbor priority in seconds (default: 0)</help>
+ <valueHelp>
+ <format>u32:0-255</format>
+ <description>Neighbor priority</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-255"/>
+ </constraint>
+ </properties>
+ <defaultValue>0</defaultValue>
+ </leafNode>
+ </children>
+</tagNode>
+<node name="parameters">
+ <properties>
+ <help>OSPF specific parameters</help>
+ </properties>
+ <children>
+ <leafNode name="abr-type">
+ <properties>
+ <help>OSPF ABR type (default: cisco)</help>
+ <completionHelp>
+ <list>cisco ibm shortcut standard</list>
+ </completionHelp>
+ <valueHelp>
+ <format>cisco</format>
+ <description>Cisco ABR type (default)</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ibm</format>
+ <description>Ibm ABR type</description>
+ </valueHelp>
+ <valueHelp>
+ <format>shortcut</format>
+ <description>Shortcut ABR type</description>
+ </valueHelp>
+ <valueHelp>
+ <format>standard</format>
+ <description>Standard ABR type</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(cisco|ibm|shortcut|standard)$</regex>
+ </constraint>
+ </properties>
+ <defaultValue>cisco</defaultValue>
+ </leafNode>
+ <leafNode name="opaque-lsa">
+ <properties>
+ <help>Enable the Opaque-LSA capability (rfc2370)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="rfc1583-compatibility">
+ <properties>
+ <help>Enable rfc1583 criteria for handling AS external routes</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ #include <include/ospf/ospf-router-id.xml.i>
+ </children>
+</node>
+#include <include/routing-passive-interface-xml.i>
+<leafNode name="passive-interface-exclude">
+ <properties>
+ <help>Interface to exclude when using 'passive-interface default'</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface to exclude when suppressing routing updates</description>
+ </valueHelp>
+ <valueHelp>
+ <format>vlinkN</format>
+ <description>Virtual-link interface to exclude when suppressing routing updates</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ <regex>^(vlink[0-9]+)$</regex>
+ </constraint>
+ <multi/>
+ </properties>
+</leafNode>
+<node name="redistribute">
+ <properties>
+ <help>Redistribute information from another routing protocol</help>
+ </properties>
+ <children>
+ <node name="bgp">
+ <properties>
+ <help>Redistribute BGP routes</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ <node name="connected">
+ <properties>
+ <help>Redistribute connected routes</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ <node name="isis">
+ <properties>
+ <help>Redistribute IS-IS routes</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ <node name="kernel">
+ <properties>
+ <help>Redistribute kernel routes</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ <node name="rip">
+ <properties>
+ <help>Redistribute rip routes</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ <node name="static">
+ <properties>
+ <help>Redistribute static routes</help>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-metric.xml.i>
+ #include <include/ospf/ospf-metric-type.xml.i>
+ #include <include/route-map.xml.i>
+ </children>
+ </node>
+ </children>
+</node>
+<node name="refresh">
+ <properties>
+ <help>Adjust refresh parameters</help>
+ </properties>
+ <children>
+ <leafNode name="timers">
+ <properties>
+ <help>Refresh timer</help>
+ <valueHelp>
+ <format>u32:10-1800</format>
+ <description>Timer value in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 10-1800"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+#include <include/route-map.xml.i>
+<node name="timers">
+ <properties>
+ <help>Adjust routing timers</help>
+ </properties>
+ <children>
+ <node name="throttle">
+ <properties>
+ <help>Throttling adaptive timers</help>
+ </properties>
+ <children>
+ <node name="spf">
+ <properties>
+ <help>OSPF SPF timers</help>
+ </properties>
+ <children>
+ <leafNode name="delay">
+ <properties>
+ <help>Delay from first change received till SPF calculation (default: 200)</help>
+ <valueHelp>
+ <format>u32:0-600000</format>
+ <description>Delay in milliseconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-600000"/>
+ </constraint>
+ </properties>
+ <defaultValue>200</defaultValue>
+ </leafNode>
+ <leafNode name="initial-holdtime">
+ <properties>
+ <help>Initial hold time between consecutive SPF calculations (default: 1000)</help>
+ <valueHelp>
+ <format>u32:0-600000</format>
+ <description>Initial hold time in milliseconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-600000"/>
+ </constraint>
+ </properties>
+ <defaultValue>1000</defaultValue>
+ </leafNode>
+ <leafNode name="max-holdtime">
+ <properties>
+ <help>Maximum hold time (default: 10000)</help>
+ <valueHelp>
+ <format>u32:0-600000</format>
+ <description>Max hold time in milliseconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-600000"/>
+ </constraint>
+ </properties>
+ <defaultValue>10000</defaultValue>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/ospf/ospf-distance-global.xml.i b/interface-definitions/include/ospf/ospf-distance-global.xml.i
new file mode 100644
index 000000000..08cd76cba
--- /dev/null
+++ b/interface-definitions/include/ospf/ospf-distance-global.xml.i
@@ -0,0 +1,14 @@
+<!-- include start from ospf/ospf-distance-global.xml.i -->
+<leafNode name="global">
+ <properties>
+ <help>Administrative distance</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Administrative distance</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/ospf/ospf-distance-per-protocol.xml.i b/interface-definitions/include/ospf/ospf-distance-per-protocol.xml.i
new file mode 100644
index 000000000..d2c4b8b52
--- /dev/null
+++ b/interface-definitions/include/ospf/ospf-distance-per-protocol.xml.i
@@ -0,0 +1,38 @@
+<!-- include start from ospf/ospf-distance-per-protocol.xml.i -->
+<leafNode name="external">
+ <properties>
+ <help>Distance for external routes</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Distance for external routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+</leafNode>
+<leafNode name="inter-area">
+ <properties>
+ <help>Distance for inter-area routes</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Distance for inter-area routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+</leafNode>
+<leafNode name="intra-area">
+ <properties>
+ <help>Distance for intra-area routes</help>
+ <valueHelp>
+ <format>u32:1-255</format>
+ <description>Distance for intra-area routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/ospf-interface-common.xml.i b/interface-definitions/include/ospf/ospf-interface-common.xml.i
index c3493faa3..c0069ccb5 100644
--- a/interface-definitions/include/ospf-interface-common.xml.i
+++ b/interface-definitions/include/ospf/ospf-interface-common.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ospf-interface-common.xml.i -->
+<!-- include start from ospf/ospf-interface-common.xml.i -->
<leafNode name="bfd">
<properties>
<help>Enable Bidirectional Forwarding Detection (BFD) support</help>
@@ -36,4 +36,4 @@
</properties>
<defaultValue>1</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf-intervals.xml.i b/interface-definitions/include/ospf/ospf-intervals.xml.i
index e532bd14b..fe220eceb 100644
--- a/interface-definitions/include/ospf-intervals.xml.i
+++ b/interface-definitions/include/ospf/ospf-intervals.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ospf-intervals.xml.i -->
+<!-- include start from ospf/ospf-intervals.xml.i -->
<leafNode name="dead-interval">
<properties>
<help>Interval after which a neighbor is declared dead (default: 40)</help>
@@ -51,4 +51,4 @@
</properties>
<defaultValue>1</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf-metric-type.xml.i b/interface-definitions/include/ospf/ospf-metric-type.xml.i
index 50f11960c..1e982c4bc 100644
--- a/interface-definitions/include/ospf-metric-type.xml.i
+++ b/interface-definitions/include/ospf/ospf-metric-type.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ospf-metric-type.xml.i -->
+<!-- include start from ospf/ospf-metric-type.xml.i -->
<leafNode name="metric-type">
<properties>
<help>OSPF metric type for default routes (default: 2)</help>
@@ -12,4 +12,4 @@
</properties>
<defaultValue>2</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf-metric.xml.i b/interface-definitions/include/ospf/ospf-metric.xml.i
index 3ce12e877..125aedea7 100644
--- a/interface-definitions/include/ospf-metric.xml.i
+++ b/interface-definitions/include/ospf/ospf-metric.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ospf-metric.xml.i -->
+<!-- include start from ospf/ospf-metric.xml.i -->
<leafNode name="metric">
<properties>
<help>OSPF default metric</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf/ospf-router-id.xml.i b/interface-definitions/include/ospf/ospf-router-id.xml.i
new file mode 100644
index 000000000..5dbb52a36
--- /dev/null
+++ b/interface-definitions/include/ospf/ospf-router-id.xml.i
@@ -0,0 +1,14 @@
+<!-- include start from ospf/ospf-router-id.xml.i -->
+<leafNode name="router-id">
+ <properties>
+ <help>Override the default router identifier</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Override the default router identifier</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/policy-list-action.xml.i b/interface-definitions/include/policy-list-action.xml.i
new file mode 100644
index 000000000..fddbd5a98
--- /dev/null
+++ b/interface-definitions/include/policy-list-action.xml.i
@@ -0,0 +1,21 @@
+<!-- included start from policy-list-action.xml.i -->
+<leafNode name="action">
+ <properties>
+ <help>Action to take on entries matching this rule [REQUIRED]</help>
+ <completionHelp>
+ <list>permit deny</list>
+ </completionHelp>
+ <valueHelp>
+ <format>permit</format>
+ <description>Permit matching entries</description>
+ </valueHelp>
+ <valueHelp>
+ <format>deny</format>
+ <description>Deny matching entries</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(permit|deny)$</regex>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/policy-list-description.xml.i b/interface-definitions/include/policy-list-description.xml.i
new file mode 100644
index 000000000..a50278729
--- /dev/null
+++ b/interface-definitions/include/policy-list-description.xml.i
@@ -0,0 +1,11 @@
+<!-- included start from policy-list-description.xml.i -->
+<leafNode name="description">
+ <properties>
+ <help>Description for this policy</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Description for this policy</description>
+ </valueHelp>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/policy-list-rule-description.xml.i b/interface-definitions/include/policy-list-rule-description.xml.i
new file mode 100644
index 000000000..e22fb7c28
--- /dev/null
+++ b/interface-definitions/include/policy-list-rule-description.xml.i
@@ -0,0 +1,11 @@
+<!-- included start from policy-list-rule-description.xml.i -->
+<leafNode name="description">
+ <properties>
+ <help>Description for this rule</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Description for this rule</description>
+ </valueHelp>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/port-number.xml.i b/interface-definitions/include/port-number.xml.i
index 81c192628..b62aef32b 100644
--- a/interface-definitions/include/port-number.xml.i
+++ b/interface-definitions/include/port-number.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from port-number.xml.i -->
+<!-- include start from port-number.xml.i -->
<leafNode name="port">
<properties>
<help>Port number used by connection</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/radius-server-ipv4-ipv6.xml.i b/interface-definitions/include/radius-server-ipv4-ipv6.xml.i
index c57d39b6b..5b12bec62 100644
--- a/interface-definitions/include/radius-server-ipv4-ipv6.xml.i
+++ b/interface-definitions/include/radius-server-ipv4-ipv6.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from radius-server-ipv4-ipv6.xml.i -->
+<!-- include start from radius-server-ipv4-ipv6.xml.i -->
<node name="radius">
<properties>
<help>RADIUS based user authentication</help>
@@ -49,4 +49,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/radius-server-ipv4.xml.i b/interface-definitions/include/radius-server-ipv4.xml.i
index 15a421b9a..ab4c8e10e 100644
--- a/interface-definitions/include/radius-server-ipv4.xml.i
+++ b/interface-definitions/include/radius-server-ipv4.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from radius-server-ipv4.xml.i -->
+<!-- include start from radius-server-ipv4.xml.i -->
<node name="radius">
<properties>
<help>RADIUS based user authentication</help>
@@ -24,4 +24,4 @@
</tagNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/radius-server-key.xml.i b/interface-definitions/include/radius-server-key.xml.i
index 32a01b402..c6301646b 100644
--- a/interface-definitions/include/radius-server-key.xml.i
+++ b/interface-definitions/include/radius-server-key.xml.i
@@ -1,7 +1,7 @@
-<!-- included start from radius-server-key.xml.i -->
+<!-- include start from radius-server-key.xml.i -->
<leafNode name="key">
<properties>
<help>Shared secret key</help>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/radius-server-port.xml.i b/interface-definitions/include/radius-server-port.xml.i
index 71b6bddb7..4e5d906bc 100644
--- a/interface-definitions/include/radius-server-port.xml.i
+++ b/interface-definitions/include/radius-server-port.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from radius-server-port.xml.i -->
+<!-- include start from radius-server-port.xml.i -->
<leafNode name="port">
<properties>
<help>Authentication port</help>
@@ -12,4 +12,4 @@
</properties>
<defaultValue>1812</defaultValue>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-access-list.xml.i b/interface-definitions/include/rip/rip-access-list.xml.i
index 0db6863e5..00ee9b736 100644
--- a/interface-definitions/include/rip-access-list.xml.i
+++ b/interface-definitions/include/rip/rip-access-list.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-access-list.xml.i -->
+<!-- include start from rip/rip-access-list.xml.i -->
<node name="access-list">
<properties>
<help>Access-list</help>
@@ -36,4 +36,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-access-list6.xml.i b/interface-definitions/include/rip/rip-access-list6.xml.i
index 6a8a37607..9e4298bc0 100644
--- a/interface-definitions/include/rip-access-list6.xml.i
+++ b/interface-definitions/include/rip/rip-access-list6.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-access-list.xml.i -->
+<!-- include start from rip/rip-access-list.xml.i -->
<node name="access-list">
<properties>
<help>Access-list</help>
@@ -36,4 +36,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-default-information.xml.i b/interface-definitions/include/rip/rip-default-information.xml.i
index 22a2f6ac7..28c540c26 100644
--- a/interface-definitions/include/rip-default-information.xml.i
+++ b/interface-definitions/include/rip/rip-default-information.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-default-information.xml.i -->
+<!-- include start from rip/rip-default-information.xml.i -->
<node name="default-information">
<properties>
<help>Control distribution of default route</help>
@@ -12,4 +12,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-default-metric.xml.i b/interface-definitions/include/rip/rip-default-metric.xml.i
index a5e6016d6..297af5af8 100644
--- a/interface-definitions/include/rip-default-metric.xml.i
+++ b/interface-definitions/include/rip/rip-default-metric.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-default-metric.xml.i -->
+<!-- include start from rip/rip-default-metric.xml.i -->
<leafNode name="default-metric">
<properties>
<help>Metric of redistributed routes</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-interface.xml.i b/interface-definitions/include/rip/rip-interface.xml.i
index 6279c16c8..dd3bddd4f 100644
--- a/interface-definitions/include/rip-interface.xml.i
+++ b/interface-definitions/include/rip/rip-interface.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-interface.xml.i -->
+<!-- include start from rip/rip-interface.xml.i -->
<tagNode name="interface">
<properties>
<help>Interface name</help>
@@ -35,4 +35,4 @@
</node>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-prefix-list.xml.i b/interface-definitions/include/rip/rip-prefix-list.xml.i
index 58969a86b..2569a2a09 100644
--- a/interface-definitions/include/rip-prefix-list.xml.i
+++ b/interface-definitions/include/rip/rip-prefix-list.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-prefix-list.xml.i -->
+<!-- include start from rip/rip-prefix-list.xml.i -->
<node name="prefix-list">
<properties>
<help>Prefix-list</help>
@@ -30,4 +30,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-prefix-list6.xml.i b/interface-definitions/include/rip/rip-prefix-list6.xml.i
index f73f77d05..fcf1499e0 100644
--- a/interface-definitions/include/rip-prefix-list6.xml.i
+++ b/interface-definitions/include/rip/rip-prefix-list6.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-prefix-list.xml.i -->
+<!-- include start from rip/rip-prefix-list.xml.i -->
<node name="prefix-list">
<properties>
<help>Prefix-list</help>
@@ -30,4 +30,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/rip-redistribute.xml.i b/interface-definitions/include/rip/rip-redistribute.xml.i
index c7b9d2c09..d7a79b007 100644
--- a/interface-definitions/include/rip-redistribute.xml.i
+++ b/interface-definitions/include/rip/rip-redistribute.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-redistribute.xml.i -->
+<!-- include start from rip/rip-redistribute.xml.i -->
<leafNode name="metric">
<properties>
<help>Metric for redistributed routes</help>
@@ -11,5 +11,5 @@
</constraint>
</properties>
</leafNode>
-#include <include/ospf-route-map.xml.i>
-<!-- included end -->
+#include <include/route-map.xml.i>
+<!-- include end -->
diff --git a/interface-definitions/include/rip-timers.xml.i b/interface-definitions/include/rip/rip-timers.xml.i
index 5ba19bb06..3aaaf8e65 100644
--- a/interface-definitions/include/rip-timers.xml.i
+++ b/interface-definitions/include/rip/rip-timers.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from rip-timers.xml.i -->
+<!-- include start from rip/rip-timers.xml.i -->
<node name="timers">
<properties>
<help>RIPng timer values</help>
@@ -45,4 +45,4 @@
</leafNode>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/ospf-route-map.xml.i b/interface-definitions/include/route-map.xml.i
index 943a477c0..5a1c137b9 100644
--- a/interface-definitions/include/ospf-route-map.xml.i
+++ b/interface-definitions/include/route-map.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from ospf-route-map.xml.i -->
+<!-- include start from route-map.xml.i -->
<leafNode name="route-map">
<properties>
<help>Route map reference</help>
@@ -11,4 +11,4 @@
</completionHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/source-address-ipv4-ipv6.xml.i b/interface-definitions/include/source-address-ipv4-ipv6.xml.i
index 93cfd7c63..af3f9bb68 100644
--- a/interface-definitions/include/source-address-ipv4-ipv6.xml.i
+++ b/interface-definitions/include/source-address-ipv4-ipv6.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from source-address-ipv4-ipv6.xml.i -->
+<!-- include start from source-address-ipv4-ipv6.xml.i -->
<leafNode name="source-address">
<properties>
<help>Source IP address used to initiate connection</help>
@@ -18,4 +18,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/source-address-ipv4.xml.i b/interface-definitions/include/source-address-ipv4.xml.i
index 2dff2c65e..86235df61 100644
--- a/interface-definitions/include/source-address-ipv4.xml.i
+++ b/interface-definitions/include/source-address-ipv4.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from source-address-ipv4.xml.i -->
+<!-- include start from source-address-ipv4.xml.i -->
<leafNode name="source-address">
<properties>
<help>IPv4 source address used to initiiate connection</help>
@@ -14,4 +14,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/source-interface-ethernet.xml.i b/interface-definitions/include/source-interface-ethernet.xml.i
index d641f3cb1..ee04f2cd5 100644
--- a/interface-definitions/include/source-interface-ethernet.xml.i
+++ b/interface-definitions/include/source-interface-ethernet.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from source-interface-ethernet.xml.i -->
+<!-- include start from source-interface-ethernet.xml.i -->
<leafNode name="source-interface">
<properties>
<help>Physical interface the traffic will go through</help>
@@ -11,4 +11,4 @@
</completionHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/source-interface.xml.i b/interface-definitions/include/source-interface.xml.i
index 797206430..a9c2a0f9d 100644
--- a/interface-definitions/include/source-interface.xml.i
+++ b/interface-definitions/include/source-interface.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from source-interface.xml.i -->
+<!-- include start from source-interface.xml.i -->
<leafNode name="source-interface">
<properties>
<help>Interface used to establish connection</help>
@@ -14,4 +14,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route-blackhole.xml.i b/interface-definitions/include/static/static-route-blackhole.xml.i
index d0a0c2079..f2ad23e69 100644
--- a/interface-definitions/include/static-route-blackhole.xml.i
+++ b/interface-definitions/include/static/static-route-blackhole.xml.i
@@ -1,10 +1,10 @@
-<!-- included start from static-route-blackhole.xml.i -->
+<!-- include start from static/static-route-blackhole.xml.i -->
<node name="blackhole">
<properties>
<help>Silently discard packets when matched</help>
</properties>
<children>
- #include <include/static-route-distance.xml.i>
+ #include <include/static/static-route-distance.xml.i>
</children>
</node>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route-distance.xml.i b/interface-definitions/include/static/static-route-distance.xml.i
index d6c0d3d82..a651b98d7 100644
--- a/interface-definitions/include/static-route-distance.xml.i
+++ b/interface-definitions/include/static/static-route-distance.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from static-route-distance.xml.i -->
+<!-- include start from static/static-route-distance.xml.i -->
<leafNode name="distance">
<properties>
<help>Distance for this route</help>
@@ -11,4 +11,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route-interface.xml.i b/interface-definitions/include/static/static-route-interface.xml.i
index 0f10837df..ed4f455e5 100644
--- a/interface-definitions/include/static-route-interface.xml.i
+++ b/interface-definitions/include/static/static-route-interface.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from static-route-interface.xml.i -->
+<!-- include start from static/static-route-interface.xml.i -->
<leafNode name="interface">
<properties>
<help>Gateway interface name</help>
@@ -14,4 +14,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route-map.xml.i b/interface-definitions/include/static/static-route-map.xml.i
index 25542b8b1..af825e043 100644
--- a/interface-definitions/include/static-route-map.xml.i
+++ b/interface-definitions/include/static/static-route-map.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from static-route-map.xml.i -->
+<!-- include start from static/static-route-map.xml.i -->
<leafNode name="route-map">
<properties>
<help>Filter routes installed in local route map</help>
@@ -7,4 +7,4 @@
</completionHelp>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route-vrf.xml.i b/interface-definitions/include/static/static-route-vrf.xml.i
index 70f8b0be8..69aba253c 100644
--- a/interface-definitions/include/static-route-vrf.xml.i
+++ b/interface-definitions/include/static/static-route-vrf.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from static-route-vrf.xml.i -->
+<!-- include start from static/static-route-vrf.xml.i -->
<leafNode name="vrf">
<properties>
<help>VRF to leak route</help>
@@ -16,4 +16,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static/static-route.xml.i
index 21fcbcd3f..254ea3163 100644
--- a/interface-definitions/include/static-route.xml.i
+++ b/interface-definitions/include/static/static-route.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from static-route.xml.i -->
+<!-- include start from static/static-route.xml.i -->
<tagNode name="route">
<properties>
<help>VRF static IPv4 route</help>
@@ -16,7 +16,7 @@
<help>Silently discard pkts when matched</help>
</properties>
<children>
- #include <include/static-route-distance.xml.i>
+ #include <include/static/static-route-distance.xml.i>
<leafNode name="tag">
<properties>
<help>Tag value for this route</help>
@@ -62,8 +62,8 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static-route-distance.xml.i>
- #include <include/static-route-vrf.xml.i>
+ #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-vrf.xml.i>
</children>
</tagNode>
<tagNode name="next-hop">
@@ -79,12 +79,12 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static-route-distance.xml.i>
- #include <include/static-route-interface.xml.i>
- #include <include/static-route-vrf.xml.i>
+ #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-interface.xml.i>
+ #include <include/static/static-route-vrf.xml.i>
</children>
</tagNode>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/static-route6.xml.i b/interface-definitions/include/static/static-route6.xml.i
index fcf97cd03..0ea995588 100644
--- a/interface-definitions/include/static-route6.xml.i
+++ b/interface-definitions/include/static/static-route6.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from static-route6.xml.i -->
+<!-- include start from static/static-route6.xml.i -->
<tagNode name="route6">
<properties>
<help>VRF static IPv6 route</help>
@@ -16,7 +16,7 @@
<help>Silently discard pkts when matched</help>
</properties>
<children>
- #include <include/static-route-distance.xml.i>
+ #include <include/static/static-route-distance.xml.i>
<leafNode name="tag">
<properties>
<help>Tag value for this route</help>
@@ -47,8 +47,8 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static-route-distance.xml.i>
- #include <include/static-route-vrf.xml.i>
+ #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-vrf.xml.i>
</children>
</tagNode>
<tagNode name="next-hop">
@@ -64,12 +64,12 @@
</properties>
<children>
#include <include/generic-disable-node.xml.i>
- #include <include/static-route-distance.xml.i>
- #include <include/static-route-interface.xml.i>
- #include <include/static-route-vrf.xml.i>
+ #include <include/static/static-route-distance.xml.i>
+ #include <include/static/static-route-interface.xml.i>
+ #include <include/static/static-route-vrf.xml.i>
</children>
</tagNode>
</children>
</tagNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/vpn-ipsec-encryption.xml.i b/interface-definitions/include/vpn-ipsec-encryption.xml.i
index 1c1d728fc..041ba9902 100644
--- a/interface-definitions/include/vpn-ipsec-encryption.xml.i
+++ b/interface-definitions/include/vpn-ipsec-encryption.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from vpn-ipsec-encryption.xml.i -->
+<!-- include start from vpn-ipsec-encryption.xml.i -->
<leafNode name="encryption">
<properties>
<help>Encryption algorithm</help>
@@ -230,4 +230,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/vpn-ipsec-hash.xml.i b/interface-definitions/include/vpn-ipsec-hash.xml.i
index ca5976d27..93d57b622 100644
--- a/interface-definitions/include/vpn-ipsec-hash.xml.i
+++ b/interface-definitions/include/vpn-ipsec-hash.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from pn-ipsec-hash.xml.i -->
+<!-- include start from pn-ipsec-hash.xml.i -->
<leafNode name="hash">
<properties>
<help>Hash algorithm</help>
@@ -62,4 +62,4 @@
</constraint>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/include/webproxy-url-filtering.xml.i b/interface-definitions/include/webproxy-url-filtering.xml.i
index 07db0948f..265bbff94 100644
--- a/interface-definitions/include/webproxy-url-filtering.xml.i
+++ b/interface-definitions/include/webproxy-url-filtering.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from webproxy-url-filtering.xml.i -->
+<!-- include start from webproxy-url-filtering.xml.i -->
<leafNode name="allow-category">
<properties>
<help>Category to allow</help>
@@ -116,4 +116,4 @@
<multi/>
</properties>
</leafNode>
-<!-- included end -->
+<!-- include end -->
diff --git a/interface-definitions/interfaces-bonding.xml.in b/interface-definitions/interfaces-bonding.xml.in
index f6ceefcaa..4382433b2 100644
--- a/interface-definitions/interfaces-bonding.xml.in
+++ b/interface-definitions/interfaces-bonding.xml.in
@@ -16,7 +16,7 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
<node name="arp-monitor">
<properties>
<help>ARP link monitoring parameters</help>
@@ -49,13 +49,13 @@
</leafNode>
</children>
</node>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
- #include <include/interface-mirror.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
+ #include <include/interface/interface-mirror.xml.i>
<leafNode name="hash-policy">
<properties>
<help>Bonding transmit hash policy</help>
@@ -81,9 +81,9 @@
</properties>
<defaultValue>layer2</defaultValue>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
<leafNode name="min-links">
<properties>
<help>Minimum number of member interfaces required up before enabling bond</help>
@@ -154,7 +154,7 @@
</leafNode>
</children>
</node>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
<leafNode name="primary">
<properties>
<help>Primary device interface</help>
@@ -163,9 +163,9 @@
</completionHelp>
</properties>
</leafNode>
- #include <include/vif-s.xml.i>
- #include <include/vif.xml.i>
- #include <include/interface-xdp.xml.i>
+ #include <include/interface/vif-s.xml.i>
+ #include <include/interface/vif.xml.i>
+ #include <include/interface/interface-xdp.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-bridge.xml.in b/interface-definitions/interfaces-bridge.xml.in
index 63c543f33..c6de58424 100644
--- a/interface-definitions/interfaces-bridge.xml.in
+++ b/interface-definitions/interfaces-bridge.xml.in
@@ -16,7 +16,7 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
<leafNode name="aging">
<properties>
<help>MAC address aging interval</help>
@@ -34,13 +34,13 @@
</properties>
<defaultValue>300</defaultValue>
</leafNode>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
<leafNode name="forwarding-delay">
<properties>
<help>Forwarding delay</help>
@@ -82,10 +82,10 @@
</leafNode>
</children>
</node>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mirror.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mirror.xml.i>
<leafNode name="enable-vlan">
<properties>
<help>Enable VLAN aware bridge</help>
@@ -202,7 +202,7 @@
<valueless/>
</properties>
</leafNode>
- #include <include/vif.xml.i>
+ #include <include/interface/vif.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-dummy.xml.in b/interface-definitions/interfaces-dummy.xml.in
index 54de43c7a..84c6903c7 100644
--- a/interface-definitions/interfaces-dummy.xml.in
+++ b/interface-definitions/interfaces-dummy.xml.in
@@ -16,18 +16,18 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
<node name="ip">
<properties>
<help>IPv4 routing parameters</help>
</properties>
<children>
- #include <include/interface-source-validation.xml.i>
+ #include <include/interface/interface-source-validation.xml.i>
</children>
</node>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-erspan.xml.in b/interface-definitions/interfaces-erspan.xml.in
index 2394d3534..769899415 100644
--- a/interface-definitions/interfaces-erspan.xml.in
+++ b/interface-definitions/interfaces-erspan.xml.in
@@ -16,12 +16,12 @@
</valueHelp>
</properties>
<children>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-mtu-64-8024.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-mtu-64-8024.xml.i>
#include <include/source-address-ipv4-ipv6.xml.i>
- #include <include/tunnel-remote.xml.i>
+ #include <include/interface/tunnel-remote.xml.i>
<leafNode name="encapsulation">
<properties>
<help>Encapsulation of this tunnel interface</help>
@@ -52,9 +52,9 @@
<help>IPv4 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface-parameters-key.xml.i>
- #include <include/interface-parameters-tos.xml.i>
- #include <include/interface-parameters-ttl.xml.i>
+ #include <include/interface/interface-parameters-key.xml.i>
+ #include <include/interface/interface-parameters-tos.xml.i>
+ #include <include/interface/interface-parameters-ttl.xml.i>
</children>
</node>
<leafNode name="version">
diff --git a/interface-definitions/interfaces-ethernet.xml.in b/interface-definitions/interfaces-ethernet.xml.in
index be44072a6..f00f65364 100644
--- a/interface-definitions/interfaces-ethernet.xml.in
+++ b/interface-definitions/interfaces-ethernet.xml.in
@@ -16,18 +16,18 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
<leafNode name="disable-flow-control">
<properties>
<help>Disable Ethernet flow control (pause frames)</help>
<valueless/>
</properties>
</leafNode>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
<leafNode name="duplex">
<properties>
<help>Duplex mode</help>
@@ -53,13 +53,13 @@
</properties>
<defaultValue>auto</defaultValue>
</leafNode>
- #include <include/interface-eapol.xml.i>
- #include <include/interface-hw-id.xml.i>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
- #include <include/interface-mirror.xml.i>
+ #include <include/interface/interface-eapol.xml.i>
+ #include <include/interface/interface-hw-id.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-mirror.xml.i>
<node name="offload">
<properties>
<help>Configurable offload options</help>
@@ -191,10 +191,10 @@
</leafNode>
</children>
</node>
- #include <include/vif-s.xml.i>
- #include <include/vif.xml.i>
- #include <include/interface-vrf.xml.i>
- #include <include/interface-xdp.xml.i>
+ #include <include/interface/vif-s.xml.i>
+ #include <include/interface/vif.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
+ #include <include/interface/interface-xdp.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-geneve.xml.in b/interface-definitions/interfaces-geneve.xml.in
index 25308c8ef..bdcbc3f5e 100644
--- a/interface-definitions/interfaces-geneve.xml.in
+++ b/interface-definitions/interfaces-geneve.xml.in
@@ -16,13 +16,13 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mtu-1450-16000.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mtu-1450-16000.xml.i>
<node name="parameters">
<properties>
<help>GENEVE tunnel parameters</help>
@@ -33,9 +33,9 @@
<help>IPv4 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface-parameters-dont-fragment.xml.i>
- #include <include/interface-parameters-tos.xml.i>
- #include <include/interface-parameters-ttl.xml.i>
+ #include <include/interface/interface-parameters-dont-fragment.xml.i>
+ #include <include/interface/interface-parameters-tos.xml.i>
+ #include <include/interface/interface-parameters-ttl.xml.i>
</children>
</node>
<node name="ipv6">
@@ -43,12 +43,12 @@
<help>IPv6 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface-parameters-flowlabel.xml.i>
+ #include <include/interface/interface-parameters-flowlabel.xml.i>
</children>
</node>
</children>
</node>
- #include <include/tunnel-remote.xml.i>
+ #include <include/interface/tunnel-remote.xml.i>
#include <include/vni.xml.i>
</children>
</tagNode>
diff --git a/interface-definitions/interfaces-l2tpv3.xml.in b/interface-definitions/interfaces-l2tpv3.xml.in
index 68ac15861..831b9b47a 100644
--- a/interface-definitions/interfaces-l2tpv3.xml.in
+++ b/interface-definitions/interfaces-l2tpv3.xml.in
@@ -16,8 +16,8 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-description.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-description.xml.i>
<leafNode name="destination-port">
<properties>
<help>UDP destination port for L2TPv3 tunnel (default: 5000)</help>
@@ -31,7 +31,7 @@
</properties>
<defaultValue>5000</defaultValue>
</leafNode>
- #include <include/interface-disable.xml.i>
+ #include <include/interface/interface-disable.xml.i>
<leafNode name="encapsulation">
<properties>
<help>Encapsulation type (default: UDP)</help>
@@ -53,10 +53,10 @@
</properties>
<defaultValue>udp</defaultValue>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
#include <include/source-address-ipv4-ipv6.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
<leafNode name="mtu">
<defaultValue>1488</defaultValue>
</leafNode>
@@ -84,8 +84,8 @@
</constraint>
</properties>
</leafNode>
- #include <include/interface-mtu-68-16000.xml.i>
- #include <include/tunnel-remote.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
+ #include <include/interface/tunnel-remote.xml.i>
<leafNode name="session-id">
<properties>
<help>Session identifier</help>
diff --git a/interface-definitions/interfaces-loopback.xml.in b/interface-definitions/interfaces-loopback.xml.in
index 0fd74f302..5d0ca5b0a 100644
--- a/interface-definitions/interfaces-loopback.xml.in
+++ b/interface-definitions/interfaces-loopback.xml.in
@@ -16,14 +16,14 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-description.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-description.xml.i>
<node name="ip">
<properties>
<help>IPv4 routing parameters</help>
</properties>
<children>
- #include <include/interface-source-validation.xml.i>
+ #include <include/interface/interface-source-validation.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/interfaces-macsec.xml.in b/interface-definitions/interfaces-macsec.xml.in
index 3f2e5bb69..fce88b21c 100644
--- a/interface-definitions/interfaces-macsec.xml.in
+++ b/interface-definitions/interfaces-macsec.xml.in
@@ -16,9 +16,9 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
<node name="security">
<properties>
<help>Security/Encryption Settings</help>
@@ -111,14 +111,14 @@
</leafNode>
</children>
</node>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
<leafNode name="mtu">
<defaultValue>1460</defaultValue>
</leafNode>
#include <include/source-interface-ethernet.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-openvpn.xml.in b/interface-definitions/interfaces-openvpn.xml.in
index 527f7fd54..effbdd674 100644
--- a/interface-definitions/interfaces-openvpn.xml.in
+++ b/interface-definitions/interfaces-openvpn.xml.in
@@ -33,7 +33,7 @@
</leafNode>
</children>
</node>
- #include <include/interface-description.xml.i>
+ #include <include/interface/interface-description.xml.i>
<leafNode name="device-type">
<properties>
<help>OpenVPN interface device-type (default: tun)</help>
@@ -54,7 +54,7 @@
</properties>
<defaultValue>tun</defaultValue>
</leafNode>
- #include <include/interface-disable.xml.i>
+ #include <include/interface/interface-disable.xml.i>
<node name="encryption">
<properties>
<help>Data Encryption settings</help>
@@ -171,7 +171,7 @@
</leafNode>
</children>
</node>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
<leafNode name="hash">
<properties>
<help>Hashing Algorithm</help>
@@ -761,7 +761,7 @@
<valueless/>
</properties>
</leafNode>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-pppoe.xml.in b/interface-definitions/interfaces-pppoe.xml.in
index 9bbaae9ea..a8e371f85 100644
--- a/interface-definitions/interfaces-pppoe.xml.in
+++ b/interface-definitions/interfaces-pppoe.xml.in
@@ -42,7 +42,7 @@
</leafNode>
</children>
</node>
- #include <include/interface-dial-on-demand.xml.i>
+ #include <include/interface/interface-dial-on-demand.xml.i>
<leafNode name="default-route">
<properties>
<help>Default route insertion behaviour (default: auto)</help>
@@ -68,10 +68,10 @@
</properties>
<defaultValue>auto</defaultValue>
</leafNode>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
<leafNode name="idle-timeout">
<properties>
<help>Delay before disconnecting idle session (in seconds)</help>
@@ -86,7 +86,7 @@
<help>IPv4 routing parameters</help>
</properties>
<children>
- #include <include/interface-source-validation.xml.i>
+ #include <include/interface/interface-source-validation.xml.i>
</children>
</node>
<node name="ipv6">
@@ -99,7 +99,7 @@
<help>IPv6 address configuration modes</help>
</properties>
<children>
- #include <include/ipv6-address-autoconf.xml.i>
+ #include <include/interface/ipv6-address-autoconf.xml.i>
</children>
</node>
</children>
@@ -124,7 +124,7 @@
</constraint>
</properties>
</leafNode>
- #include <include/interface-mtu-68-1500.xml.i>
+ #include <include/interface/interface-mtu-68-1500.xml.i>
<leafNode name="mtu">
<defaultValue>1492</defaultValue>
</leafNode>
diff --git a/interface-definitions/interfaces-pseudo-ethernet.xml.in b/interface-definitions/interfaces-pseudo-ethernet.xml.in
index 32ba5ea01..9e3e0cb26 100644
--- a/interface-definitions/interfaces-pseudo-ethernet.xml.in
+++ b/interface-definitions/interfaces-pseudo-ethernet.xml.in
@@ -16,17 +16,17 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
#include <include/source-interface-ethernet.xml.i>
- #include <include/interface-mac.xml.i>
+ #include <include/interface/interface-mac.xml.i>
<leafNode name="mode">
<properties>
<help>Receive mode (default: private)</help>
@@ -56,9 +56,9 @@
</properties>
<defaultValue>private</defaultValue>
</leafNode>
- #include <include/interface-mtu-68-16000.xml.i>
- #include <include/vif-s.xml.i>
- #include <include/vif.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
+ #include <include/interface/vif-s.xml.i>
+ #include <include/interface/vif.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in
index 047e06b86..e3aad2719 100644
--- a/interface-definitions/interfaces-tunnel.xml.in
+++ b/interface-definitions/interfaces-tunnel.xml.in
@@ -16,19 +16,19 @@
</valueHelp>
</properties>
<children>
- #include <include/interface-description.xml.i>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-vrf.xml.i>
- #include <include/interface-mtu-64-8024.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
+ #include <include/interface/interface-mtu-64-8024.xml.i>
<leafNode name="mtu">
<defaultValue>1476</defaultValue>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
#include <include/source-address-ipv4-ipv6.xml.i>
- #include <include/tunnel-remote.xml.i>
+ #include <include/interface/tunnel-remote.xml.i>
<leafNode name="source-interface">
<properties>
<help>Physical Interface used for underlaying traffic</help>
@@ -156,9 +156,9 @@
<valueless/>
</properties>
</leafNode>
- #include <include/interface-parameters-key.xml.i>
- #include <include/interface-parameters-tos.xml.i>
- #include <include/interface-parameters-ttl.xml.i>
+ #include <include/interface/interface-parameters-key.xml.i>
+ #include <include/interface/interface-parameters-tos.xml.i>
+ #include <include/interface/interface-parameters-ttl.xml.i>
</children>
</node>
<node name="ipv6">
@@ -168,19 +168,27 @@
<children>
<leafNode name="encaplimit">
<properties>
- <help>Encaplimit field</help>
+ <help>Set fixed encapsulation limit</help>
+ <completionHelp>
+ <list>none</list>
+ </completionHelp>
<valueHelp>
<format>0-255</format>
<description>Encaplimit (default: 4)</description>
</valueHelp>
+ <valueHelp>
+ <format>none</format>
+ <description>Encaplimit disabled</description>
+ </valueHelp>
<constraint>
+ <regex>^(none)$</regex>
<validator name="numeric" argument="--range 0-255"/>
</constraint>
- <constraintErrorMessage>key must be between 0-255</constraintErrorMessage>
+ <constraintErrorMessage>Tunnel encaplimit must be 0-255 or none</constraintErrorMessage>
</properties>
<defaultValue>4</defaultValue>
</leafNode>
- #include <include/interface-parameters-flowlabel.xml.i>
+ #include <include/interface/interface-parameters-flowlabel.xml.i>
<leafNode name="hoplimit">
<properties>
<help>Hoplimit</help>
diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in
index 97a40a9dc..7a286eaf2 100644
--- a/interface-definitions/interfaces-vxlan.xml.in
+++ b/interface-definitions/interfaces-vxlan.xml.in
@@ -16,9 +16,9 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
<leafNode name="group">
<properties>
<help>Multicast group address for VXLAN interface</help>
@@ -35,10 +35,10 @@
</constraint>
</properties>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-mac.xml.i>
- #include <include/interface-mtu-1200-16000.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-mac.xml.i>
+ #include <include/interface/interface-mtu-1200-16000.xml.i>
<leafNode name="mtu">
<defaultValue>1450</defaultValue>
</leafNode>
@@ -52,9 +52,9 @@
<help>IPv4 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface-parameters-dont-fragment.xml.i>
- #include <include/interface-parameters-tos.xml.i>
- #include <include/interface-parameters-ttl.xml.i>
+ #include <include/interface/interface-parameters-dont-fragment.xml.i>
+ #include <include/interface/interface-parameters-tos.xml.i>
+ #include <include/interface/interface-parameters-ttl.xml.i>
<leafNode name="ttl">
<defaultValue>16</defaultValue>
</leafNode>
@@ -65,7 +65,7 @@
<help>IPv6 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface-parameters-flowlabel.xml.i>
+ #include <include/interface/interface-parameters-flowlabel.xml.i>
</children>
</node>
<leafNode name="nolearning">
@@ -91,7 +91,7 @@
</leafNode>
#include <include/source-address-ipv4-ipv6.xml.i>
#include <include/source-interface.xml.i>
- #include <include/tunnel-remote.xml.i>
+ #include <include/interface/tunnel-remote.xml.i>
#include <include/vni.xml.i>
</children>
</tagNode>
diff --git a/interface-definitions/interfaces-wireguard.xml.in b/interface-definitions/interfaces-wireguard.xml.in
index 3f56046c4..378251fed 100644
--- a/interface-definitions/interfaces-wireguard.xml.in
+++ b/interface-definitions/interfaces-wireguard.xml.in
@@ -16,17 +16,17 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6.xml.i>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/address-ipv4-ipv6.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
#include <include/port-number.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
<leafNode name="mtu">
<defaultValue>1420</defaultValue>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
<leafNode name="fwmark">
<properties>
<help>A 32-bit fwmark value set on all outgoing packets</help>
diff --git a/interface-definitions/interfaces-wireless.xml.in b/interface-definitions/interfaces-wireless.xml.in
index f39e5618f..aaeb285f1 100644
--- a/interface-definitions/interfaces-wireless.xml.in
+++ b/interface-definitions/interfaces-wireless.xml.in
@@ -16,7 +16,7 @@
</valueHelp>
</properties>
<children>
- #include <include/address-ipv4-ipv6-dhcp.xml.i>
+ #include <include/interface/address-ipv4-ipv6-dhcp.xml.i>
<node name="capabilities">
<properties>
<help>HT and VHT capabilities for your card</help>
@@ -464,34 +464,34 @@
<constraintErrorMessage>Invalid ISO/IEC 3166-1 Country Code</constraintErrorMessage>
</properties>
</leafNode>
- #include <include/interface-description.xml.i>
- #include <include/dhcp-options.xml.i>
- #include <include/dhcpv6-options.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/dhcp-options.xml.i>
+ #include <include/interface/dhcpv6-options.xml.i>
<leafNode name="disable-broadcast-ssid">
<properties>
<help>Disable broadcast of SSID from access-point</help>
<valueless/>
</properties>
</leafNode>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
<leafNode name="expunge-failing-stations">
<properties>
<help>Disassociate stations based on excessive transmission failures</help>
<valueless/>
</properties>
</leafNode>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
- #include <include/interface-hw-id.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-hw-id.xml.i>
<leafNode name="isolate-stations">
<properties>
<help>Isolate stations on the AP so they cannot see each other</help>
<valueless/>
</properties>
</leafNode>
- #include <include/interface-mac.xml.i>
+ #include <include/interface/interface-mac.xml.i>
<leafNode name="max-stations">
<properties>
<help>Maximum number of wireless radio stations. Excess stations will be rejected upon authentication request.</help>
@@ -775,8 +775,8 @@
</properties>
<defaultValue>monitor</defaultValue>
</leafNode>
- #include <include/vif.xml.i>
- #include <include/vif-s.xml.i>
+ #include <include/interface/vif.xml.i>
+ #include <include/interface/vif-s.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-wirelessmodem.xml.in b/interface-definitions/interfaces-wirelessmodem.xml.in
index 969ff0014..25ac2d6e0 100644
--- a/interface-definitions/interfaces-wirelessmodem.xml.in
+++ b/interface-definitions/interfaces-wirelessmodem.xml.in
@@ -42,9 +42,9 @@
</leafNode>
</children>
</node>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
<leafNode name="device">
<properties>
<help>Serial device </help>
@@ -65,17 +65,17 @@
</constraint>
</properties>
</leafNode>
- #include <include/interface-disable-link-detect.xml.i>
- #include <include/interface-mtu-68-16000.xml.i>
- #include <include/interface-ipv4-options.xml.i>
- #include <include/interface-ipv6-options.xml.i>
+ #include <include/interface/interface-disable-link-detect.xml.i>
+ #include <include/interface/interface-mtu-68-16000.xml.i>
+ #include <include/interface/interface-ipv4-options.xml.i>
+ #include <include/interface/interface-ipv6-options.xml.i>
<leafNode name="no-peer-dns">
<properties>
<help>Do not use peer supplied DNS server information</help>
<valueless/>
</properties>
</leafNode>
- #include <include/interface-dial-on-demand.xml.i>
+ #include <include/interface/interface-dial-on-demand.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/ntp.xml.in b/interface-definitions/ntp.xml.in
index d244b56bb..2bfac900b 100644
--- a/interface-definitions/ntp.xml.in
+++ b/interface-definitions/ntp.xml.in
@@ -82,7 +82,7 @@
</children>
</node>
#include <include/listen-address.xml.i>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/policy-lists.xml.in b/interface-definitions/policy-lists.xml.in
new file mode 100644
index 000000000..0fece6594
--- /dev/null
+++ b/interface-definitions/policy-lists.xml.in
@@ -0,0 +1,1266 @@
+<?xml version="1.0"?>
+<!-- Policy access|prefix|route-map lists -->
+<interfaceDefinition>
+ <node name="npolicy" owner="${vyos_conf_scripts_dir}/policy-lists.py">
+ <properties>
+ <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/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-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>
+ <leafNode name="host">
+ <properties>
+ <help>Single host IP address to match</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Host address to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-host"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="inverse-mask">
+ <properties>
+ <help>Network/netmask to match (requires network be defined)</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Inverse-mask to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="network">
+ <properties>
+ <help>Network/netmask to match (requires inverse-mask be defined)</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Inverse-mask to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-prefix"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </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>
+ <leafNode name="host">
+ <properties>
+ <help>Single host IP address to match</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Host address to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-host"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="inverse-mask">
+ <properties>
+ <help>Network/netmask to match (requires network be defined)</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Inverse-mask to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="network">
+ <properties>
+ <help>Network/netmask to match (requires inverse-mask be defined)</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Inverse-mask to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-prefix"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <!-- END access-list -->
+ <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/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-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>
+ <!-- END access-list6 -->
+ <tagNode name="as-path-list">
+ <properties>
+ <help>Border Gateway Protocol (BGP) autonomous system path filter</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>AS path list name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-description.xml.i>
+ <leafNode name="regex">
+ <properties>
+ <help>Regular expression to match against an AS path</help>
+ <valueHelp>
+ <format>&lt;asn&gt;</format>
+ <description>AS path regular expression (ex: "64501 64502")</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <!-- END as-path-list -->
+ <tagNode name="community-list">
+ <properties>
+ <help>Border Gateway Protocol (BGP) autonomous system path filter</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Border Gateway Protocol (BGP) community-list filter</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-description.xml.i>
+ <leafNode name="regex">
+ <properties>
+ <help>Regular expression to match against a community list</help>
+ <valueHelp>
+ <format>&lt;aa:nn&gt;</format>
+ <description>Community list regular expression or one of: internet, local-AS, no-advertise, no-export</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <!-- END community-list -->
+ <tagNode name="extcommunity-list">
+ <properties>
+ <help>Border Gateway Protocol (BGP) extended community-list filter</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Border Gateway Protocol (BGP) extended community-list filter</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-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>Extended community list regular expression</description>
+ </valueHelp>
+ <valueHelp>
+ <format>&lt;soo aa:nn&gt;</format>
+ <description>Extended community list regular expression</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <!-- END extcommunity-list -->
+ <tagNode name="large-community-list">
+ <properties>
+ <help>Border Gateway Protocol (BGP) large-community-list filter</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Border Gateway Protocol (BGP) large-community-list filter</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-description.xml.i>
+ <leafNode name="regex">
+ <properties>
+ <help>Regular expression to match against a large community list</help>
+ <valueHelp>
+ <format>&lt;aa:nn:nn&gt;</format>
+ <description>Large community list regular expression</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <!-- END large-community-list -->
+ <tagNode name="prefix-list">
+ <properties>
+ <help>IP prefix-list filter</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Prefix list name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-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="ip-prefix"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <!-- END prefix-list -->
+ <tagNode name="prefix-list6">
+ <properties>
+ <help>IPv6 prefix-list filter</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Prefix list name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-action.xml.i>
+ #include <include/policy-list-rule-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>
+ <!-- END prefix-list6 -->
+ <tagNode name="route-map">
+ <properties>
+ <help>IP route-map</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route map name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/policy-list-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-list-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/policy-list-rule-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>
+ <leafNode name="extcommunity">
+ <properties>
+ <help>BGP extended community to match</help>
+ <completionHelp>
+ <path>policy extcommunity-list</path>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="interface">
+ <properties>
+ <help>First hop interface of a route to match</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ <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>
+ </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>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Next-hop IPv4 router address</description>
+ </valueHelp>
+ </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>
+ <node name="route-source">
+ <properties>
+ <help>test</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>
+ </children>
+ </node>
+ <leafNode name="nexthop">
+ <properties>
+ <help>IPv6 next-hop of route to match</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Peer IP address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </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</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>Border Gateway Protocol (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>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </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>
+ <leafNode name="tag">
+ <properties>
+ <help>Route tag to match</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>Route tag</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </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>Border Gateway Protocol (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>
+ <leafNode name="as-path-exclude">
+ <properties>
+ <help>Remove ASN(s) from a Border Gateway Protocol (BGP) AS-path attribute</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>BGP AS path exclude string (ex: "456 64500 45001")</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="as-path-prepend">
+ <properties>
+ <help>as-path-prepend_help</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>BGP AS path prepend string (ex: "64501 64501")</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="atomic-aggregate">
+ <properties>
+ <help>Border Gateway Protocol (BGP) atomic aggregate attribute</help>
+ </properties>
+ </leafNode>
+ <leafNode name="bgp-extcommunity-rt">
+ <properties>
+ <help>Set route target value</help>
+ <valueHelp>
+ <format>&lt;aa:nn&gt;</format>
+ <description>ExtCommunity in format: asn:value</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <node name="comm-list">
+ <properties>
+ <help>Border Gateway Protocol (BGP) communities matching a community-list</help>
+ </properties>
+ <children>
+ <leafNode name="comm-list">
+ <properties>
+ <help>BGP communities with a community-list</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>BGP communities with a community-list</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="delete">
+ <properties>
+ <help>Delete BGP communities matching the community-list</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="community">
+ <properties>
+ <help>community_help</help>
+ <completionHelp>
+ <list>local-AS no-advertise no-export internet additive none</list>
+ </completionHelp>
+ <valueHelp>
+ <format>&lt;aa:nn&gt;</format>
+ <description>Community in 4 octet AS:value format</description>
+ </valueHelp>
+ <valueHelp>
+ <format>local-AS</format>
+ <description>local-AS</description>
+ </valueHelp>
+ <valueHelp>
+ <format>no-advertise</format>
+ <description>no-advertise</description>
+ </valueHelp>
+ <valueHelp>
+ <format>no-export</format>
+ <description>no-export</description>
+ </valueHelp>
+ <valueHelp>
+ <format>internet</format>
+ <description>internet</description>
+ </valueHelp>
+ <valueHelp>
+ <format>additive</format>
+ <description>additive</description>
+ </valueHelp>
+ <valueHelp>
+ <format>none</format>
+ <description>none</description>
+ </valueHelp>
+ <!-- Need to add properly validator
+ <constraint>
+ <regex>^(local-AS|no-advertise|no-export|internet|additive|none)$</regex>
+ </constraint> -->
+ </properties>
+ </leafNode>
+ <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>
+ <leafNode name="extcommunity-rt">
+ <properties>
+ <help>Set route target value</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>ASN:nn_or_IP_address:nn VPN extended community</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="extcommunity-soo">
+ <properties>
+ <help>Set Site of Origin value</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>ASN:nn_or_IP_address:nn VPN extended community</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="ip-next-hop">
+ <properties>
+ <help>Nexthop IP address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IP address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </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>
+ <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>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>IPv6 address and prefix length</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="large-community">
+ <properties>
+ <help>Set BGP large community value</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>ASN:nn:mm BGP large community</description>
+ </valueHelp>
+ <completionHelp>
+ <path>policy large-community-list</path>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="local-preference">
+ <properties>
+ <help>Border Gateway Protocol (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="--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>origin_help</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>Border Gateway Protocol (BGP) originator ID attribute</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Orignator IP address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-host"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="src">
+ <properties>
+ <help>Source address for route</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>IPv6 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-host"/>
+ <validator name="ipv6-host"/>
+ </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>
+ <leafNode name="tag">
+ <properties>
+ <help>Tag value for routing protocol</help>
+ <valueHelp>
+ <format>u32:1-65535</format>
+ <description>Tag value</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="weight">
+ <properties>
+ <help>Border Gateway Protocol (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>
+ <!-- END route-map -->
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in
index afcd8f727..cf897d04f 100644
--- a/interface-definitions/protocols-bgp.xml.in
+++ b/interface-definitions/protocols-bgp.xml.in
@@ -1,844 +1,21 @@
<?xml version="1.0"?>
-<!-- Border Gateway Protocol (BGP) configuration -->
<interfaceDefinition>
<node name="protocols">
<children>
<tagNode name="bgp" owner="${vyos_conf_scripts_dir}/protocols_bgp.py">
<properties>
<help>Border Gateway Protocol (BGP)</help>
+ <priority>820</priority>
<valueHelp>
<format>u32:1-4294967294</format>
- <description>AS number</description>
+ <description>Autonomous System Number</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 1-4294967294"/>
</constraint>
- <priority>820</priority>
</properties>
<children>
- <node name="address-family">
- <properties>
- <help>BGP address-family parameters</help>
- </properties>
- <children>
- <node name="ipv4-unicast">
- <properties>
- <help>IPv4 BGP settings</help>
- </properties>
- <children>
- <tagNode name="aggregate-address">
- <properties>
- <help>BGP aggregate network</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>BGP aggregate network</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- </constraint>
- </properties>
- <children>
- #include <include/bgp-afi-aggregate-address.xml.i>
- </children>
- </tagNode>
- <tagNode name="network">
- <properties>
- <help>BGP network</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>BGP network</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="backdoor">
- <properties>
- <help>Network as a backdoor route</help>
- <valueless/>
- </properties>
- </leafNode>
- #include <include/bgp-route-map.xml.i>
- </children>
- </tagNode>
- #include <include/bgp-afi-maximum-paths.xml.i>
- <node name="redistribute">
- <properties>
- <help>Redistribute routes from other protocols into BGP</help>
- </properties>
- <children>
- <node name="connected">
- <properties>
- <help>Redistribute connected routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="isis">
- <properties>
- <help>Redistribute IS-IS routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="kernel">
- <properties>
- <help>Redistribute kernel routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="ospf">
- <properties>
- <help>Redistribute OSPF routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="rip">
- <properties>
- <help>Redistribute RIP routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="static">
- <properties>
- <help>Redistribute static routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <leafNode name="table">
- <properties>
- <help>Redistribute non-main Kernel Routing Table</help>
- </properties>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- <node name="ipv6-unicast">
- <properties>
- <help>IPv6 BGP settings</help>
- </properties>
- <children>
- <tagNode name="aggregate-address">
- <properties>
- <help>BGP aggregate network</help>
- <valueHelp>
- <format>ipv6net</format>
- <description>Aggregate network</description>
- </valueHelp>
- <constraint>
- <validator name="ipv6-prefix"/>
- </constraint>
- </properties>
- <children>
- #include <include/bgp-afi-aggregate-address.xml.i>
- </children>
- </tagNode>
- <tagNode name="network">
- <properties>
- <help>BGP network</help>
- <valueHelp>
- <format>ipv6net</format>
- <description>Aggregate network</description>
- </valueHelp>
- <constraint>
- <validator name="ipv6-prefix"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="path-limit">
- <properties>
- <help>AS-path hopcount limit</help>
- <valueHelp>
- <format>u32:0-255</format>
- <description>AS path hop count limit</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-255"/>
- </constraint>
- </properties>
- </leafNode>
- #include <include/bgp-route-map.xml.i>
- </children>
- </tagNode>
- #include <include/bgp-afi-maximum-paths.xml.i>
- <node name="redistribute">
- <properties>
- <help>Redistribute routes from other protocols into BGP</help>
- </properties>
- <children>
- <node name="connected">
- <properties>
- <help>Redistribute connected routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="kernel">
- <properties>
- <help>Redistribute kernel routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="ospfv3">
- <properties>
- <help>Redistribute OSPFv3 routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="ripng">
- <properties>
- <help>Redistribute RIPng routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <node name="static">
- <properties>
- <help>Redistribute static routes into BGP</help>
- </properties>
- <children>
- #include <include/bgp-afi-redistribute-metric-route-map.xml.i>
- </children>
- </node>
- <leafNode name="table">
- <properties>
- <help>Redistribute non-main Kernel Routing Table</help>
- </properties>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- <node name="l2vpn-evpn">
- <properties>
- <help>L2VPN EVPN BGP settings</help>
- </properties>
- <children>
- <leafNode name="advertise-all-vni">
- <properties>
- <help>Advertise All local VNIs</help>
- <valueless/>
- </properties>
- </leafNode>
- #include <include/bgp-afi-l2vpn-common.xml.i>
- <leafNode name="advertise-pip">
- <properties>
- <help>EVPN system primary IP</help>
- <valueHelp>
- <format>ipv4</format>
- <description>IP address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="rt-auto-derive">
- <properties>
- <help>Auto derivation of Route Target (RFC8365)</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="flooding">
- <properties>
- <help>Specify handling for BUM packets</help>
- </properties>
- <children>
- <leafNode name="disable">
- <properties>
- <help>Do not flood any BUM packets</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="head-end-replication">
- <properties>
- <help>Flood BUM packets using head-end replication</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- <tagNode name="vni">
- <properties>
- <help>VXLAN Network Identifier</help>
- <valueHelp>
- <format>u32:1-16777215</format>
- <description>VNI number</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-16777215"/>
- </constraint>
- </properties>
- <children>
- #include <include/bgp-afi-l2vpn-common.xml.i>
- </children>
- </tagNode>
- </children>
- </node>
- </children>
- </node>
- <node name="listen">
- <properties>
- <help>Listen for and accept BGP dynamic neighbors from range</help>
- </properties>
- <children>
- <leafNode name="limit">
- <properties>
- <help>Maximum number of dynamic neighbors that can be created</help>
- <valueHelp>
- <format>u32:1-5000</format>
- <description>BGP neighbor limit</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-5000"/>
- </constraint>
- </properties>
- </leafNode>
- <tagNode name="range">
- <properties>
- <help>BGP dynamic neighbors listen range</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>IPv4 dynamic neighbors listen range</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6net</format>
- <description>IPv6 dynamic neighbors listen range</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- <validator name="ipv6-prefix"/>
- </constraint>
- </properties>
- <children>
- #include <include/bgp-peer-group.xml.i>
- </children>
- </tagNode>
- </children>
- </node>
- <tagNode name="neighbor">
- <properties>
- <help>BGP neighbor</help>
- <valueHelp>
- <format>ipv4</format>
- <description>BGP neighbor IP address</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>BGP neighbor IPv6 address</description>
- </valueHelp>
- <valueHelp>
- <format>txt</format>
- <description>Interface name</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- <validator name="ipv6-address"/>
- <validator name="interface-name"/>
- </constraint>
- </properties>
- <children>
- <node name="address-family">
- <properties>
- <help>Parameters relating to IPv4 or IPv6 routes</help>
- </properties>
- <children>
- #include <include/bgp-neighbor-afi-ipv4-unicast.xml.i>
- #include <include/bgp-neighbor-afi-ipv6-unicast.xml.i>
- #include <include/bgp-neighbor-afi-l2vpn-evpn.xml.i>
- </children>
- </node>
- <leafNode name="advertisement-interval">
- <properties>
- <help>Minimum interval for sending routing updates</help>
- <valueHelp>
- <format>u32:0-600</format>
- <description>Advertisement interval in seconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-600"/>
- </constraint>
- </properties>
- </leafNode>
- #include <include/bgp-bfd.xml.i>
- #include <include/bgp-capability.xml.i>
- #include <include/bgp-description.xml.i>
- #include <include/bgp-disable-capability-negotiation.xml.i>
- #include <include/bgp-disable-connected-check.xml.i>
- #include <include/bgp-ebgp-multihop.xml.i>
- <node name="interface">
- <properties>
- <help>Interface parameters</help>
- </properties>
- <children>
- #include <include/bgp-peer-group.xml.i>
- #include <include/bgp-remote-as.xml.i>
- <node name="v6only">
- <properties>
- <help>Enable BGP with v6 link-local only</help>
- </properties>
- <children>
- #include <include/bgp-peer-group.xml.i>
- #include <include/bgp-remote-as.xml.i>
- </children>
- </node>
- </children>
- </node>
- #include <include/bgp-local-as.xml.i>
- #include <include/bgp-override-capability.xml.i>
- #include <include/bgp-passive.xml.i>
- #include <include/bgp-password.xml.i>
- #include <include/bgp-peer-group.xml.i>
- <leafNode name="port">
- <properties>
- <help>Neighbor BGP port</help>
- <valueHelp>
- <format>u32:1-65535</format>
- <description>Neighbor BGP port number</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-65535"/>
- </constraint>
- </properties>
- </leafNode>
- #include <include/bgp-remote-as.xml.i>
- #include <include/bgp-shutdown.xml.i>
- <leafNode name="strict-capability-match">
- <properties>
- <help>Enable strict capability negotiation</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="timers">
- <properties>
- <help>Neighbor timers</help>
- </properties>
- <children>
- <leafNode name="connect">
- <properties>
- <help>BGP connect timer for this neighbor</help>
- <valueHelp>
- <format>u32:1-65535</format>
- <description>Connect timer in seconds</description>
- </valueHelp>
- <valueHelp>
- <format>0</format>
- <description>Disable connect timer</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-65535"/>
- </constraint>
- </properties>
- </leafNode>
- #include <include/bgp-timers-holdtime.xml.i>
- #include <include/bgp-timers-keepalive.xml.i>
- </children>
- </node>
- #include <include/bgp-ttl-security.xml.i>
- #include <include/bgp-update-source.xml.i>
- </children>
- </tagNode>
- <node name="parameters">
- <properties>
- <help>BGP parameters</help>
- </properties>
- <children>
- <leafNode name="always-compare-med">
- <properties>
- <help>Always compare MEDs from different neighbors</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="bestpath">
- <properties>
- <help>Default bestpath selection mechanism</help>
- </properties>
- <children>
- <node name="as-path">
- <properties>
- <help>AS-path attribute comparison parameters</help>
- </properties>
- <children>
- <leafNode name="confed">
- <properties>
- <help>Compare AS-path lengths including confederation sets and sequences</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="ignore">
- <properties>
- <help>Ignore AS-path length in selecting a route</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="multipath-relax">
- <properties>
- <help>Allow load sharing across routes that have different AS paths (but same length)</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- <leafNode name="compare-routerid">
- <properties>
- <help>Compare the router-id for identical EBGP paths</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="med">
- <properties>
- <help>MED attribute comparison parameters</help>
- </properties>
- <children>
- <leafNode name="confed">
- <properties>
- <help>Compare MEDs among confederation paths</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="missing-as-worst">
- <properties>
- <help>Treat missing route as a MED as the least preferred one</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- <leafNode name="cluster-id">
- <properties>
- <help>Route-reflector cluster-id</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Route-reflector cluster-id</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- </leafNode>
- <node name="confederation">
- <properties>
- <help>AS confederation parameters</help>
- </properties>
- <children>
- <leafNode name="identifier">
- <properties>
- <help>Confederation AS identifier [REQUIRED]</help>
- <valueHelp>
- <format>u32:1-4294967294</format>
- <description>Confederation AS id</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-4294967294"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="peers">
- <properties>
- <help>Peer ASs in the BGP confederation</help>
- <valueHelp>
- <format>u32:1-4294967294</format>
- <description>Peer AS number</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-4294967294"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- <node name="dampening">
- <properties>
- <help>Enable route-flap dampening</help>
- </properties>
- <children>
- <leafNode name="half-life">
- <properties>
- <help>Half-life time for dampening [REQUIRED]</help>
- <valueHelp>
- <format>u32:1-45</format>
- <description>Half-life penalty in minutes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-45"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="max-suppress-time">
- <properties>
- <help>Maximum duration to suppress a stable route [REQUIRED]</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Maximum suppress duration in minutes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="re-use">
- <properties>
- <help>Threshold to start reusing a route [REQUIRED]</help>
- <valueHelp>
- <format>u32:1-20000</format>
- <description>Re-use penalty points</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-20000"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="start-suppress-time">
- <properties>
- <help>When to start suppressing a route [REQUIRED]</help>
- <valueHelp>
- <format>u32:1-20000</format>
- <description>Start-suppress penalty points</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-20000"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- <node name="default">
- <properties>
- <help>BGP defaults</help>
- </properties>
- <children>
- <leafNode name="local-pref">
- <properties>
- <help>Default local preference</help>
- <valueHelp>
- <format>u32</format>
- <description>Local preference</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-4294967295"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="no-ipv4-unicast">
- <properties>
- <help>Deactivate IPv4 unicast for a peer by default</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- <leafNode name="deterministic-med">
- <properties>
- <help>Compare MEDs between different peers in the same AS</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="distance">
- <properties>
- <help>Administratives distances for BGP routes</help>
- </properties>
- <children>
- <node name="global">
- <properties>
- <help>Global administratives distances for BGP routes</help>
- </properties>
- <children>
- <leafNode name="external">
- <properties>
- <help>Administrative distance for external BGP routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Administrative distance for external BGP routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="internal">
- <properties>
- <help>Administrative distance for internal BGP routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Administrative distance for internal BGP routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="local">
- <properties>
- <help>Administrative distance for local BGP routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Administrative distance for internal BGP routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- <tagNode name="prefix">
- <properties>
- <help>Administrative distance for a specific BGP prefix</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>Administrative distance for a specific BGP prefix</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="distance">
- <properties>
- <help>Administrative distance for prefix</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Administrative distance for external BGP routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- </children>
- </node>
- <leafNode name="ebgp-requires-policy">
- <properties>
- <help>Require in and out policy for eBGP peers (RFC8212)</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="graceful-restart">
- <properties>
- <help>Graceful restart capability parameters</help>
- </properties>
- <children>
- <leafNode name="stalepath-time">
- <properties>
- <help>Maximum time to hold onto restarting neighbors stale paths</help>
- <valueHelp>
- <format>u32:1-3600</format>
- <description>Hold time in seconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-3600"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- <leafNode name="graceful-shutdown">
- <properties>
- <help>Graceful shutdown</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="log-neighbor-changes">
- <properties>
- <help>Log neighbor up/down changes and reset reason</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="network-import-check">
- <properties>
- <help>Enable IGP route check for network statements</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="no-client-to-client-reflection">
- <properties>
- <help>Disable client to client route reflection</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="no-fast-external-failover">
- <properties>
- <help>Disable immediate session reset on peer link down event</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="router-id">
- <properties>
- <help>BGP router id</help>
- <valueHelp>
- <format>ipv4</format>
- <description>BGP router id</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- <tagNode name="peer-group">
- <properties>
- <help>BGP peer-group</help>
- </properties>
- <children>
- <node name="address-family">
- <properties>
- <help>BGP peer-group address-family parameters</help>
- </properties>
- <children>
- #include <include/bgp-neighbor-afi-ipv4-unicast.xml.i>
- #include <include/bgp-neighbor-afi-ipv6-unicast.xml.i>
- #include <include/bgp-neighbor-afi-l2vpn-evpn.xml.i>
- </children>
- </node>
- #include <include/bgp-bfd.xml.i>
- #include <include/bgp-capability.xml.i>
- #include <include/bgp-description.xml.i>
- #include <include/bgp-disable-capability-negotiation.xml.i>
- #include <include/bgp-disable-connected-check.xml.i>
- #include <include/bgp-ebgp-multihop.xml.i>
- #include <include/bgp-local-as.xml.i>
- #include <include/bgp-override-capability.xml.i>
- #include <include/bgp-passive.xml.i>
- #include <include/bgp-password.xml.i>
- #include <include/bgp-remote-as.xml.i>
- #include <include/bgp-shutdown.xml.i>
- #include <include/bgp-ttl-security.xml.i>
- #include <include/bgp-update-source.xml.i>
- </children>
- </tagNode>
- #include <include/bgp-route-map.xml.i>
- <node name="timers">
- <properties>
- <help>BGP protocol timers</help>
- </properties>
- <children>
- #include <include/bgp-timers-holdtime.xml.i>
- #include <include/bgp-timers-keepalive.xml.i>
- </children>
- </node>
+ #include <include/bgp/bgp-common-config.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/protocols-ospf.xml.in b/interface-definitions/protocols-ospf.xml.in
index b9c9fcc04..d9c3325ec 100644
--- a/interface-definitions/protocols-ospf.xml.in
+++ b/interface-definitions/protocols-ospf.xml.in
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Protocol OSPF configuration -->
<interfaceDefinition>
<node name="protocols">
<children>
@@ -9,822 +8,7 @@
<priority>620</priority>
</properties>
<children>
- <tagNode name="access-list">
- <properties>
- <help>Access list to filter networks in routing updates</help>
- <completionHelp>
- <path>policy access-list</path>
- </completionHelp>
- <valueHelp>
- <format>u32</format>
- <description>Access-list number</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-4294967295"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="export">
- <properties>
- <help>Filter for outgoing routing update [REQUIRED]</help>
- <completionHelp>
- <list>bgp connected kernel rip static</list>
- </completionHelp>
- <valueHelp>
- <format>bgp</format>
- <description>Filter BGP routes</description>
- </valueHelp>
- <valueHelp>
- <format>connected</format>
- <description>Filter connected routes</description>
- </valueHelp>
- <valueHelp>
- <format>isis</format>
- <description>Filter IS-IS routes</description>
- </valueHelp>
- <valueHelp>
- <format>kernel</format>
- <description>Filter Kernel routes</description>
- </valueHelp>
- <valueHelp>
- <format>rip</format>
- <description>Filter RIP routes</description>
- </valueHelp>
- <valueHelp>
- <format>static</format>
- <description>Filter static routes</description>
- </valueHelp>
- <constraint>
- <regex>^(bgp|connected|isis|kernel|rip|static)$</regex>
- </constraint>
- <constraintErrorMessage>Must be bgp, connected, kernel, rip, or static</constraintErrorMessage>
- <multi/>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- <tagNode name="area">
- <properties>
- <help>OSPF Area</help>
- <valueHelp>
- <format>u32</format>
- <description>OSPF area in decimal notation</description>
- </valueHelp>
- <valueHelp>
- <format>ipv4</format>
- <description>OSPF area in dotted decimal notation</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-4294967295"/>
- <validator name="ip-address"/>
- </constraint>
- </properties>
- <children>
- <node name="area-type">
- <properties>
- <help>Area type</help>
- </properties>
- <children>
- <leafNode name="normal">
- <properties>
- <help>Normal OSPF area</help>
- <valueless/>
- </properties>
- </leafNode>
- <node name="nssa">
- <properties>
- <help>Nssa OSPF area</help>
- </properties>
- <children>
- <leafNode name="default-cost">
- <properties>
- <help>Summary-default cost of nssa area</help>
- <valueHelp>
- <format>u32:0-16777215</format>
- <description>Summary default cost</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777215"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="no-summary">
- <properties>
- <help>Do not inject inter-area routes into stub</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="translate">
- <properties>
- <help>Configure NSSA-ABR (default: candidate)</help>
- <completionHelp>
- <list>always candidate never</list>
- </completionHelp>
- <valueHelp>
- <format>always</format>
- <description>NSSA-ABR to always translate</description>
- </valueHelp>
- <valueHelp>
- <format>candidate</format>
- <description>NSSA-ABR for translate election (default)</description>
- </valueHelp>
- <valueHelp>
- <format>never</format>
- <description>NSSA-ABR to never translate</description>
- </valueHelp>
- <constraint>
- <regex>^(always|candidate|never)$</regex>
- </constraint>
- </properties>
- <defaultValue>candidate</defaultValue>
- </leafNode>
- </children>
- </node>
- <node name="stub">
- <properties>
- <help>Stub OSPF area</help>
- </properties>
- <children>
- <leafNode name="default-cost">
- <properties>
- <help>Summary-default cost of nssa area</help>
- <valueHelp>
- <format>u32:0-16777215</format>
- <description>Summary default cost</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777215"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="no-summary">
- <properties>
- <help>Do not inject inter-area routes into stub</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- <leafNode name="authentication">
- <properties>
- <help>OSPF area authentication type</help>
- <completionHelp>
- <list>plaintext-password md5</list>
- </completionHelp>
- <valueHelp>
- <format>plaintext-password</format>
- <description>Use plain-text authentication</description>
- </valueHelp>
- <valueHelp>
- <format>md5</format>
- <description>Use md5 authentication</description>
- </valueHelp>
- <constraint>
- <regex>^(plaintext-password|md5)$</regex>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="network">
- <properties>
- <help>OSPF network [REQUIRED]</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>OSPF network [REQUIRED]</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- </constraint>
- <multi/>
- </properties>
- </leafNode>
- <tagNode name="range">
- <properties>
- <help>Summarize routes matching prefix (border routers only)</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>Area range prefix</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="cost">
- <properties>
- <help>Metric for this range</help>
- <valueHelp>
- <format>u32:0-16777215</format>
- <description>Metric for this range</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777215"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="not-advertise">
- <properties>
- <help>Do not advertise this range</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="substitute">
- <properties>
- <help>Announce area range as another prefix</help>
- <valueHelp>
- <format>ipv4net</format>
- <description>Announce area range as another prefix</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-prefix"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- <leafNode name="shortcut">
- <properties>
- <help>Area shortcut mode</help>
- <completionHelp>
- <list>default disable enable</list>
- </completionHelp>
- <valueHelp>
- <format>default</format>
- <description>Set default</description>
- </valueHelp>
- <valueHelp>
- <format>disable</format>
- <description>Disable shortcutting mode</description>
- </valueHelp>
- <valueHelp>
- <format>enable</format>
- <description>Enable shortcutting mode</description>
- </valueHelp>
- <constraint>
- <regex>^(default|disable|enable)$</regex>
- </constraint>
- </properties>
- </leafNode>
- <tagNode name="virtual-link">
- <properties>
- <help>Virtual link</help>
- <valueHelp>
- <format>ipv4</format>
- <description>OSPF area in dotted decimal notation</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-4294967295"/>
- <validator name="ip-address"/>
- </constraint>
- </properties>
- <children>
- #include <include/ospf-authentication.xml.i>
- #include <include/ospf-intervals.xml.i>
- </children>
- </tagNode>
- </children>
- </tagNode>
- <node name="auto-cost">
- <properties>
- <help>Calculate OSPF interface cost according to bandwidth (default: 100)</help>
- </properties>
- <children>
- <leafNode name="reference-bandwidth">
- <properties>
- <help>Reference bandwidth method to assign OSPF cost</help>
- <valueHelp>
- <format>u32:1-4294967</format>
- <description>Reference bandwidth cost in Mbits/sec</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-4294967"/>
- </constraint>
- </properties>
- <defaultValue>100</defaultValue>
- </leafNode>
- </children>
- </node>
- <node name="default-information">
- <properties>
- <help>Control distribution of default information</help>
- </properties>
- <children>
- <node name="originate">
- <properties>
- <help>Distribute a default route</help>
- </properties>
- <children>
- <leafNode name="always">
- <properties>
- <help>Always advertise default route</help>
- <valueless/>
- </properties>
- </leafNode>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- </children>
- </node>
- <leafNode name="default-metric">
- <properties>
- <help>Metric of redistributed routes</help>
- <valueHelp>
- <format>u32:0-16777214</format>
- <description>Metric of redistributed routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777214"/>
- </constraint>
- </properties>
- </leafNode>
- <node name="distance">
- <properties>
- <help>Administrative distance</help>
- </properties>
- <children>
- <leafNode name="global">
- <properties>
- <help>OSPF administrative distance</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Administrative distance</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <node name="ospf">
- <properties>
- <help>OSPF administrative distance</help>
- </properties>
- <children>
- <leafNode name="external">
- <properties>
- <help>Distance for external routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Distance for external routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="inter-area">
- <properties>
- <help>Distance for inter-area routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Distance for inter-area routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="intra-area">
- <properties>
- <help>Distance for intra-area routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Distance for intra-area routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- <tagNode name="interface">
- <properties>
- <help>Interface related configuration</help>
- <completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
- </completionHelp>
- <valueHelp>
- <format>txt</format>
- <description>Interface name</description>
- </valueHelp>
- <constraint>
- <validator name="interface-name"/>
- </constraint>
- </properties>
- <children>
- #include <include/ospf-authentication.xml.i>
- #include <include/ospf-intervals.xml.i>
- #include <include/ospf-interface-common.xml.i>
- <leafNode name="bandwidth">
- <properties>
- <help>Bandwidth of interface (Megabit/sec)</help>
- <valueHelp>
- <format>u32:1-100000</format>
- <description>Bandwidth in Megabit/sec (for calculating OSPF cost)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-100000"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="hello-multiplier">
- <properties>
- <help>Hello multiplier factor</help>
- <valueHelp>
- <format>u32:1-10</format>
- <description>Number of Hellos to send each second</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-10"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="network">
- <properties>
- <help>Network type</help>
- <completionHelp>
- <list>broadcast non-broadcast point-to-multipoint point-to-point</list>
- </completionHelp>
- <valueHelp>
- <format>broadcast</format>
- <description>Broadcast network type</description>
- </valueHelp>
- <valueHelp>
- <format>non-broadcast</format>
- <description>Non-broadcast network type</description>
- </valueHelp>
- <valueHelp>
- <format>point-to-multipoint</format>
- <description>Point-to-multipoint network type</description>
- </valueHelp>
- <valueHelp>
- <format>point-to-point</format>
- <description>Point-to-point network type</description>
- </valueHelp>
- <constraint>
- <regex>^(broadcast|non-broadcast|point-to-multipoint|point-to-point)$</regex>
- </constraint>
- <constraintErrorMessage>Must be broadcast, non-broadcast, point-to-multipoint or point-to-point</constraintErrorMessage>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- <node name="log-adjacency-changes">
- <properties>
- <help>Log changes in adjacency state</help>
- </properties>
- <children>
- <leafNode name="detail">
- <properties>
- <help>Log all state changes</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- <node name="max-metric">
- <properties>
- <help>OSPF maximum and infinite-distance metric</help>
- </properties>
- <children>
- <node name="router-lsa">
- <properties>
- <help>Advertise own Router-LSA with infinite distance (stub router)</help>
- </properties>
- <children>
- <leafNode name="administrative">
- <properties>
- <help>Administratively apply, for an indefinite period</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="on-shutdown">
- <properties>
- <help>Advertise stub-router prior to full shutdown of OSPF</help>
- <valueHelp>
- <format>u32:5-100</format>
- <description>Time (seconds) to advertise self as stub-router</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-100"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="on-startup">
- <properties>
- <help>Automatically advertise stub Router-LSA on startup of OSPF</help>
- <valueHelp>
- <format>u32:5-86400</format>
- <description>Time (seconds) to advertise self as stub-router</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-86400"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- <node name="mpls-te">
- <properties>
- <help>MultiProtocol Label Switching-Traffic Engineering (MPLS-TE) parameters</help>
- </properties>
- <children>
- <leafNode name="enable">
- <properties>
- <help>Enable MPLS-TE functionality</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="router-address">
- <properties>
- <help>Stable IP address of the advertising router</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Stable IP address of the advertising router</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- <defaultValue>0.0.0.0</defaultValue>
- </leafNode>
- </children>
- </node>
- <tagNode name="neighbor">
- <properties>
- <help>Specify neighbor router</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Neighbor IP address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="poll-interval">
- <properties>
- <help>Dead neighbor polling interval (default: 60)</help>
- <valueHelp>
- <format>u32:1-65535</format>
- <description>Seconds between dead neighbor polling interval</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-65535"/>
- </constraint>
- </properties>
- <defaultValue>60</defaultValue>
- </leafNode>
- <leafNode name="priority">
- <properties>
- <help>Neighbor priority in seconds (default: 0)</help>
- <valueHelp>
- <format>u32:0-255</format>
- <description>Neighbor priority</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-255"/>
- </constraint>
- </properties>
- <defaultValue>0</defaultValue>
- </leafNode>
- </children>
- </tagNode>
- <node name="parameters">
- <properties>
- <help>OSPF specific parameters</help>
- </properties>
- <children>
- <leafNode name="abr-type">
- <properties>
- <help>OSPF ABR type (default: cisco)</help>
- <completionHelp>
- <list>cisco ibm shortcut standard</list>
- </completionHelp>
- <valueHelp>
- <format>cisco</format>
- <description>Cisco ABR type (default)</description>
- </valueHelp>
- <valueHelp>
- <format>ibm</format>
- <description>Ibm ABR type</description>
- </valueHelp>
- <valueHelp>
- <format>shortcut</format>
- <description>Shortcut ABR type</description>
- </valueHelp>
- <valueHelp>
- <format>standard</format>
- <description>Standard ABR type</description>
- </valueHelp>
- <constraint>
- <regex>^(cisco|ibm|shortcut|standard)$</regex>
- </constraint>
- </properties>
- <defaultValue>cisco</defaultValue>
- </leafNode>
- <leafNode name="opaque-lsa">
- <properties>
- <help>Enable the Opaque-LSA capability (rfc2370)</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="rfc1583-compatibility">
- <properties>
- <help>Enable rfc1583 criteria for handling AS external routes</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="router-id">
- <properties>
- <help>Override the default router identifier</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Override the default router identifier</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- #include <include/routing-passive-interface-xml.i>
- <leafNode name="passive-interface-exclude">
- <properties>
- <help>Interface to exclude when using 'passive-interface default'</help>
- <completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
- </completionHelp>
- <valueHelp>
- <format>txt</format>
- <description>Interface to exclude when suppressing routing updates</description>
- </valueHelp>
- <valueHelp>
- <format>vlinkN</format>
- <description>Virtual-link interface to exclude when suppressing routing updates</description>
- </valueHelp>
- <constraint>
- <validator name="interface-name"/>
- <regex>^(vlink[0-9]+)$</regex>
- </constraint>
- <multi/>
- </properties>
- </leafNode>
- <node name="redistribute">
- <properties>
- <help>Redistribute information from another routing protocol</help>
- </properties>
- <children>
- <node name="bgp">
- <properties>
- <help>Redistribute BGP routes</help>
- </properties>
- <children>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- <node name="connected">
- <properties>
- <help>Redistribute connected routes</help>
- </properties>
- <children>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- <node name="isis">
- <properties>
- <help>Redistribute IS-IS routes</help>
- </properties>
- <children>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- <node name="kernel">
- <properties>
- <help>Redistribute kernel routes</help>
- </properties>
- <children>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- <node name="rip">
- <properties>
- <help>Redistribute rip routes</help>
- </properties>
- <children>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- <node name="static">
- <properties>
- <help>Redistribute static routes</help>
- </properties>
- <children>
- #include <include/ospf-metric.xml.i>
- #include <include/ospf-metric-type.xml.i>
- #include <include/ospf-route-map.xml.i>
- </children>
- </node>
- </children>
- </node>
- <node name="refresh">
- <properties>
- <help>Adjust refresh parameters</help>
- </properties>
- <children>
- <leafNode name="timers">
- <properties>
- <help>Refresh timer</help>
- <valueHelp>
- <format>u32:10-1800</format>
- <description>Timer value in seconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 10-1800"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
- #include <include/ospf-route-map.xml.i>
- <node name="timers">
- <properties>
- <help>Adjust routing timers</help>
- </properties>
- <children>
- <node name="throttle">
- <properties>
- <help>Throttling adaptive timers</help>
- </properties>
- <children>
- <node name="spf">
- <properties>
- <help>OSPF SPF timers</help>
- </properties>
- <children>
- <leafNode name="delay">
- <properties>
- <help>Delay from first change received till SPF calculation (default: 200)</help>
- <valueHelp>
- <format>u32:0-600000</format>
- <description>Delay in milliseconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-600000"/>
- </constraint>
- </properties>
- <defaultValue>200</defaultValue>
- </leafNode>
- <leafNode name="initial-holdtime">
- <properties>
- <help>Initial hold time between consecutive SPF calculations (default: 1000)</help>
- <valueHelp>
- <format>u32:0-600000</format>
- <description>Initial hold time in milliseconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-600000"/>
- </constraint>
- </properties>
- <defaultValue>1000</defaultValue>
- </leafNode>
- <leafNode name="max-holdtime">
- <properties>
- <help>Maximum hold time (default: 10000)</help>
- <valueHelp>
- <format>u32:0-600000</format>
- <description>Max hold time in milliseconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-600000"/>
- </constraint>
- </properties>
- <defaultValue>10000</defaultValue>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- </children>
- </node>
+ #include <include/ospf/ospf-common-config.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/protocols-ospfv3.xml.in b/interface-definitions/protocols-ospfv3.xml.in
index 2559e2b03..06787b604 100644
--- a/interface-definitions/protocols-ospfv3.xml.in
+++ b/interface-definitions/protocols-ospfv3.xml.in
@@ -90,59 +90,13 @@
<help>Administrative distance</help>
</properties>
<children>
- <leafNode name="global">
- <properties>
- <help>OSPFv3 administrative distance</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Administrative distance</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/ospf/ospf-distance-global.xml.i>
<node name="ospfv3">
<properties>
<help>OSPFv3 administrative distance</help>
</properties>
<children>
- <leafNode name="external">
- <properties>
- <help>Distance for external routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Distance for external routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="inter-area">
- <properties>
- <help>Distance for inter-area routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Distance for inter-area routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="intra-area">
- <properties>
- <help>Distance for intra-area routes</help>
- <valueHelp>
- <format>u32:1-255</format>
- <description>Distance for intra-area routes</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-255"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/ospf/ospf-distance-per-protocol.xml.i>
</children>
</node>
</children>
@@ -162,8 +116,8 @@
</constraint>
</properties>
<children>
- #include <include/ospf-intervals.xml.i>
- #include <include/ospf-interface-common.xml.i>
+ #include <include/ospf/ospf-intervals.xml.i>
+ #include <include/ospf/ospf-interface-common.xml.i>
<leafNode name="ifmtu">
<properties>
<help>Interface MTU</help>
@@ -222,18 +176,7 @@
<help>OSPFv3 specific parameters</help>
</properties>
<children>
- <leafNode name="router-id">
- <properties>
- <help>Override the default router identifier</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Override the default router identifier</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/ospf/ospf-router-id.xml.i>
</children>
</node>
<node name="redistribute">
@@ -246,7 +189,7 @@
<help>Redistribute BGP routes</help>
</properties>
<children>
- #include <include/ospf-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
<node name="connected">
@@ -254,7 +197,7 @@
<help>Redistribute connected routes</help>
</properties>
<children>
- #include <include/ospf-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
<node name="kernel">
@@ -262,7 +205,7 @@
<help>Redistribute kernel routes</help>
</properties>
<children>
- #include <include/ospf-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
<node name="ripng">
@@ -270,7 +213,7 @@
<help>Redistribute RIPNG routes</help>
</properties>
<children>
- #include <include/ospf-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
<node name="static">
@@ -278,12 +221,12 @@
<help>Redistribute static routes</help>
</properties>
<children>
- #include <include/ospf-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
</children>
</node>
- #include <include/ospf-route-map.xml.i>
+ #include <include/route-map.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/protocols-rip.xml.in b/interface-definitions/protocols-rip.xml.in
index 1ae3bd8f7..6a01fcdac 100644
--- a/interface-definitions/protocols-rip.xml.in
+++ b/interface-definitions/protocols-rip.xml.in
@@ -19,14 +19,14 @@
</constraint>
</properties>
</leafNode>
- #include <include/rip-default-information.xml.i>
- #include <include/rip-default-metric.xml.i>
+ #include <include/rip/rip-default-information.xml.i>
+ #include <include/rip/rip-default-metric.xml.i>
<node name="distribute-list">
<properties>
<help>Filter networks in routing updates</help>
</properties>
<children>
- #include <include/rip-access-list.xml.i>
+ #include <include/rip/rip-access-list.xml.i>
<tagNode name="interface">
<properties>
<help>Apply filtering to an interface</help>
@@ -42,14 +42,14 @@
</constraint>
</properties>
<children>
- #include <include/rip-access-list.xml.i>
- #include <include/rip-prefix-list.xml.i>
+ #include <include/rip/rip-access-list.xml.i>
+ #include <include/rip/rip-prefix-list.xml.i>
</children>
</tagNode>
- #include <include/rip-prefix-list.xml.i>
+ #include <include/rip/rip-prefix-list.xml.i>
</children>
</node>
- #include <include/rip-interface.xml.i>
+ #include <include/rip/rip-interface.xml.i>
<tagNode name="interface">
<children>
<node name="authentication">
@@ -151,7 +151,7 @@
</completionHelp>
</properties>
</leafNode>
- #include <include/static-route-distance.xml.i>
+ #include <include/static/static-route-distance.xml.i>
</children>
</tagNode>
#include <include/routing-passive-interface-xml.i>
@@ -165,7 +165,7 @@
<help>Redistribute BGP routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="connected">
@@ -173,7 +173,7 @@
<help>Redistribute connected routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="isis">
@@ -181,7 +181,7 @@
<help>Redistribute IS-IS routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="kernel">
@@ -189,7 +189,7 @@
<help>Redistribute kernel routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="ospf">
@@ -197,7 +197,7 @@
<help>Redistribute OSPF routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="static">
@@ -205,7 +205,7 @@
<help>Redistribute static routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
</children>
@@ -223,7 +223,7 @@
<multi/>
</properties>
</leafNode>
- #include <include/rip-timers.xml.i>
+ #include <include/rip/rip-timers.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/protocols-ripng.xml.in b/interface-definitions/protocols-ripng.xml.in
index e456c3f3b..1bd52d18e 100644
--- a/interface-definitions/protocols-ripng.xml.in
+++ b/interface-definitions/protocols-ripng.xml.in
@@ -20,14 +20,14 @@
<multi/>
</properties>
</leafNode>
- #include <include/rip-default-information.xml.i>
- #include <include/rip-default-metric.xml.i>
+ #include <include/rip/rip-default-information.xml.i>
+ #include <include/rip/rip-default-metric.xml.i>
<node name="distribute-list">
<properties>
<help>Filter networks in routing updates</help>
</properties>
<children>
- #include <include/rip-access-list6.xml.i>
+ #include <include/rip/rip-access-list6.xml.i>
<tagNode name="interface">
<properties>
<help>Apply filtering to an interface</help>
@@ -43,14 +43,14 @@
</constraint>
</properties>
<children>
- #include <include/rip-access-list6.xml.i>
- #include <include/rip-prefix-list6.xml.i>
+ #include <include/rip/rip-access-list6.xml.i>
+ #include <include/rip/rip-prefix-list6.xml.i>
</children>
</tagNode>
- #include <include/rip-prefix-list6.xml.i>
+ #include <include/rip/rip-prefix-list6.xml.i>
</children>
</node>
- #include <include/rip-interface.xml.i>
+ #include <include/rip/rip-interface.xml.i>
<leafNode name="network">
<properties>
<help>RIPng network</help>
@@ -87,7 +87,7 @@
<help>Redistribute BGP routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="connected">
@@ -95,7 +95,7 @@
<help>Redistribute connected routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="kernel">
@@ -103,7 +103,7 @@
<help>Redistribute kernel routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="ospfv3">
@@ -111,7 +111,7 @@
<help>Redistribute OSPFv3 routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
<node name="static">
@@ -119,7 +119,7 @@
<help>Redistribute static routes</help>
</properties>
<children>
- #include <include/rip-redistribute.xml.i>
+ #include <include/rip/rip-redistribute.xml.i>
</children>
</node>
</children>
@@ -137,8 +137,8 @@
<multi/>
</properties>
</leafNode>
- #include <include/ospf-route-map.xml.i>
- #include <include/rip-timers.xml.i>
+ #include <include/route-map.xml.i>
+ #include <include/rip/rip-timers.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/protocols-static.xml.in b/interface-definitions/protocols-static.xml.in
index 59a7927a5..f614aa063 100644
--- a/interface-definitions/protocols-static.xml.in
+++ b/interface-definitions/protocols-static.xml.in
@@ -7,9 +7,9 @@
<help>Static route parameters</help>
</properties>
<children>
- #include <include/static-route-map.xml.i>
- #include <include/static-route.xml.i>
- #include <include/static-route6.xml.i>
+ #include <include/static/static-route-map.xml.i>
+ #include <include/static/static-route.xml.i>
+ #include <include/static/static-route6.xml.i>
<tagNode name="table">
<properties>
<help>Policy route table number</help>
@@ -22,8 +22,8 @@
</constraint>
</properties>
<children>
- #include <include/static-route.xml.i>
- #include <include/static-route6.xml.i>
+ #include <include/static/static-route.xml.i>
+ #include <include/static/static-route6.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/protocols-vrf.xml.in b/interface-definitions/protocols-vrf.xml.in
deleted file mode 100644
index 77297938b..000000000
--- a/interface-definitions/protocols-vrf.xml.in
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<interfaceDefinition>
- <node name="protocols">
- <children>
- <tagNode name="vrf" owner="${vyos_conf_scripts_dir}/protocols_vrf.py">
- <properties>
- <help>Name of VRF to add route for</help>
- <completionHelp>
- <path>vrf name</path>
- </completionHelp>
- <valueHelp>
- <format>txt</format>
- <description>VRF instance name</description>
- </valueHelp>
- <constraint>
- <validator name="vrf-name"/>
- </constraint>
- <constraintErrorMessage>VRF instance name must be 15 characters or less and can not\nbe named as regular network interfaces.\n</constraintErrorMessage>
- </properties>
- <children>
- <node name="static">
- <properties>
- <help>Static route parameters</help>
- </properties>
- <children>
- #include <include/static-route.xml.i>
- #include <include/static-route6.xml.i>
- </children>
- </node>
- #include <include/vni.xml.i>
- </children>
- </tagNode>
- </children>
- </node>
-</interfaceDefinition>
diff --git a/interface-definitions/service_console-server.xml.in b/interface-definitions/service_console-server.xml.in
index 293ee1ba5..78eb2d0ba 100644
--- a/interface-definitions/service_console-server.xml.in
+++ b/interface-definitions/service_console-server.xml.in
@@ -27,7 +27,7 @@
</constraint>
</properties>
<children>
- #include <include/interface-description.xml.i>
+ #include <include/interface/interface-description.xml.i>
<leafNode name="speed">
<properties>
<help>Serial port baud rate</help>
diff --git a/interface-definitions/service_ipoe-server.xml.in b/interface-definitions/service_ipoe-server.xml.in
index c54de58f5..d0a05aea6 100644
--- a/interface-definitions/service_ipoe-server.xml.in
+++ b/interface-definitions/service_ipoe-server.xml.in
@@ -111,8 +111,8 @@
</leafNode>
</children>
</tagNode>
- #include <include/accel-name-server.xml.i>
- #include <include/accel-client-ipv6-pool.xml.i>
+ #include <include/accel-ppp/name-server.xml.i>
+ #include <include/accel-ppp/client-ipv6-pool.xml.i>
<node name="authentication">
<properties>
<help>Client authentication methods</help>
@@ -198,7 +198,7 @@
</children>
</tagNode>
#include <include/radius-server-ipv4.xml.i>
- #include <include/accel-radius-additions.xml.i>
+ #include <include/accel-ppp/radius-additions.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/service_pppoe-server.xml.in b/interface-definitions/service_pppoe-server.xml.in
index 5c0a66527..1d3e8ba29 100644
--- a/interface-definitions/service_pppoe-server.xml.in
+++ b/interface-definitions/service_pppoe-server.xml.in
@@ -23,14 +23,14 @@
<help>Authentication for remote access PPPoE Server</help>
</properties>
<children>
- #include <include/accel-auth-local-users.xml.i>
- #include <include/accel-auth-mode.xml.i>
- #include <include/accel-auth-protocols.xml.i>
+ #include <include/accel-ppp/auth-local-users.xml.i>
+ #include <include/accel-ppp/auth-mode.xml.i>
+ #include <include/accel-ppp/auth-protocols.xml.i>
#include <include/radius-server-ipv4.xml.i>
- #include <include/accel-radius-additions.xml.i>
+ #include <include/accel-ppp/radius-additions.xml.i>
<node name="radius">
<children>
- #include <include/accel-radius-additions-rate-limit.xml.i>
+ #include <include/accel-ppp/radius-additions-rate-limit.xml.i>
<leafNode name="called-sid-format">
<properties>
<help>Format of Called-Station-Id attribute</help>
@@ -60,12 +60,12 @@
<help>Pool of client IP addresses (must be within a /24)</help>
</properties>
<children>
- #include <include/accel-client-ip-pool-start-stop.xml.i>
- #include <include/accel-client-ip-pool-subnet.xml.i>
+ #include <include/accel-ppp/client-ip-pool-start-stop.xml.i>
+ #include <include/accel-ppp/client-ip-pool-subnet.xml.i>
</children>
</node>
- #include <include/accel-client-ipv6-pool.xml.i>
- #include <include/accel-name-server.xml.i>
+ #include <include/accel-ppp/client-ipv6-pool.xml.i>
+ #include <include/accel-ppp/name-server.xml.i>
<tagNode name="interface">
<properties>
<help>interface(s) to listen on</help>
@@ -95,8 +95,8 @@
</leafNode>
</children>
</tagNode>
- #include <include/accel-gateway-address.xml.i>
- #include <include/accel-mtu-128-16384.xml.i>
+ #include <include/accel-ppp/gateway-address.xml.i>
+ #include <include/accel-ppp/mtu-128-16384.xml.i>
<node name="limits">
<properties>
<help>Limits the connection rate from a single source</help>
@@ -133,7 +133,7 @@
<multi/>
</properties>
</leafNode>
- #include <include/accel-wins-server.xml.i>
+ #include <include/accel-ppp/wins-server.xml.i>
<node name="ppp-options">
<properties>
<help>Advanced protocol options</help>
@@ -161,9 +161,9 @@
<valueless />
</properties>
</leafNode>
- #include <include/accel-ppp-mppe.xml.i>
- #include <include/accel-lcp-echo-interval-failure.xml.i>
- #include <include/accel-lcp-echo-timeout.xml.i>
+ #include <include/accel-ppp/ppp-mppe.xml.i>
+ #include <include/accel-ppp/lcp-echo-interval-failure.xml.i>
+ #include <include/accel-ppp/lcp-echo-timeout.xml.i>
<leafNode name="ipv4">
<properties>
<help>IPv4 (IPCP) negotiation algorithm</help>
diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in
index 3a993ec9c..f57103eac 100644
--- a/interface-definitions/snmp.xml.in
+++ b/interface-definitions/snmp.xml.in
@@ -626,7 +626,7 @@
</tagNode>
</children>
</node>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/ssh.xml.in b/interface-definitions/ssh.xml.in
index a2ce3c1c9..c2d514b09 100644
--- a/interface-definitions/ssh.xml.in
+++ b/interface-definitions/ssh.xml.in
@@ -182,7 +182,7 @@
</constraint>
</properties>
</leafNode>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/system-login.xml.in b/interface-definitions/system-login.xml.in
index 919974eeb..86db3f368 100644
--- a/interface-definitions/system-login.xml.in
+++ b/interface-definitions/system-login.xml.in
@@ -145,7 +145,7 @@
</leafNode>
</children>
</tagNode>
- #include <include/interface-vrf.xml.i>
+ #include <include/interface/interface-vrf.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/vpn_l2tp.xml.in b/interface-definitions/vpn_l2tp.xml.in
index 3a6c8a992..2d8a8503d 100644
--- a/interface-definitions/vpn_l2tp.xml.in
+++ b/interface-definitions/vpn_l2tp.xml.in
@@ -12,7 +12,7 @@
<help>Remote access L2TP VPN</help>
</properties>
<children>
- #include <include/accel-mtu-128-16384.xml.i>
+ #include <include/accel-ppp/mtu-128-16384.xml.i>
<leafNode name="outside-address">
<properties>
<help>External IP address to which VPN clients will connect</help>
@@ -21,8 +21,8 @@
</constraint>
</properties>
</leafNode>
- #include <include/accel-gateway-address.xml.i>
- #include <include/accel-name-server.xml.i>
+ #include <include/accel-ppp/gateway-address.xml.i>
+ #include <include/accel-ppp/name-server.xml.i>
<node name="lns">
<properties>
<help>L2TP Network Server (LNS)</help>
@@ -143,17 +143,17 @@
</leafNode>
</children>
</node>
- #include <include/accel-wins-server.xml.i>
+ #include <include/accel-ppp/wins-server.xml.i>
<node name="client-ip-pool">
<properties>
<help>Pool of client IP addresses (must be within a /24)</help>
</properties>
<children>
- #include <include/accel-client-ip-pool-start-stop.xml.i>
- #include <include/accel-client-ip-pool-subnet.xml.i>
+ #include <include/accel-ppp/client-ip-pool-start-stop.xml.i>
+ #include <include/accel-ppp/client-ip-pool-subnet.xml.i>
</children>
</node>
- #include <include/accel-client-ipv6-pool.xml.i>
+ #include <include/accel-ppp/client-ipv6-pool.xml.i>
<leafNode name="description">
<properties>
<help>Description for L2TP remote-access settings</help>
@@ -209,15 +209,15 @@
<multi />
</properties>
</leafNode>
- #include <include/accel-ppp-mppe.xml.i>
- #include <include/accel-auth-mode.xml.i>
- #include <include/accel-auth-local-users.xml.i>
+ #include <include/accel-ppp/ppp-mppe.xml.i>
+ #include <include/accel-ppp/auth-mode.xml.i>
+ #include <include/accel-ppp/auth-local-users.xml.i>
#include <include/radius-server-ipv4.xml.i>
<node name="radius">
<children>
<tagNode name="server">
<children>
- #include <include/accel-radius-additions-disable-accounting.xml.i>
+ #include <include/accel-ppp/radius-additions-disable-accounting.xml.i>
<leafNode name="fail-time">
<properties>
<help>Mark server unavailable for &lt;n&gt; seconds on failure</help>
@@ -307,7 +307,7 @@
<help>Advanced protocol options</help>
</properties>
<children>
- #include <include/accel-lcp-echo-interval-failure.xml.i>
+ #include <include/accel-ppp/lcp-echo-interval-failure.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/vpn_openconnect.xml.in b/interface-definitions/vpn_openconnect.xml.in
index 054e027fc..f64aa7f23 100644
--- a/interface-definitions/vpn_openconnect.xml.in
+++ b/interface-definitions/vpn_openconnect.xml.in
@@ -190,7 +190,7 @@
</leafNode>
</children>
</node>
- #include <include/accel-name-server.xml.i>
+ #include <include/accel-ppp/name-server.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/vpn_pptp.xml.in b/interface-definitions/vpn_pptp.xml.in
index 72eda8752..7cf584a18 100644
--- a/interface-definitions/vpn_pptp.xml.in
+++ b/interface-definitions/vpn_pptp.xml.in
@@ -12,7 +12,7 @@
<help>Remote access PPTP VPN</help>
</properties>
<children>
- #include <include/accel-mtu-128-16384.xml.i>
+ #include <include/accel-ppp/mtu-128-16384.xml.i>
<leafNode name="outside-address">
<properties>
<help>External IP address to which VPN clients will connect</help>
@@ -34,16 +34,16 @@
<multi/>
</properties>
</leafNode>
- #include <include/accel-wins-server.xml.i>
+ #include <include/accel-ppp/wins-server.xml.i>
<node name="client-ip-pool">
<properties>
<help>Pool of client IP addresses (must be within a /24)</help>
</properties>
<children>
- #include <include/accel-client-ip-pool-start-stop.xml.i>
+ #include <include/accel-ppp/client-ip-pool-start-stop.xml.i>
</children>
</node>
- #include <include/accel-gateway-address.xml.i>
+ #include <include/accel-ppp/gateway-address.xml.i>
<node name="authentication">
<properties>
<help>Authentication for remote access PPTP VPN</help>
@@ -93,7 +93,7 @@
</completionHelp>
</properties>
</leafNode>
- #include <include/accel-auth-mode.xml.i>
+ #include <include/accel-ppp/auth-mode.xml.i>
<node name="local-users">
<properties>
<help>Local user authentication for remote access PPTP VPN</help>
@@ -120,7 +120,7 @@
</children>
</node>
#include <include/radius-server-ipv4.xml.i>
- #include <include/accel-radius-additions.xml.i>
+ #include <include/accel-ppp/radius-additions.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/vpn_sstp.xml.in b/interface-definitions/vpn_sstp.xml.in
index ebcb77db2..e4ade844d 100644
--- a/interface-definitions/vpn_sstp.xml.in
+++ b/interface-definitions/vpn_sstp.xml.in
@@ -13,38 +13,38 @@
<help>Authentication for remote access SSTP Server</help>
</properties>
<children>
- #include <include/accel-auth-local-users.xml.i>
- #include <include/accel-auth-mode.xml.i>
- #include <include/accel-auth-protocols.xml.i>
+ #include <include/accel-ppp/auth-local-users.xml.i>
+ #include <include/accel-ppp/auth-mode.xml.i>
+ #include <include/accel-ppp/auth-protocols.xml.i>
#include <include/radius-server-ipv4.xml.i>
- #include <include/accel-radius-additions.xml.i>
+ #include <include/accel-ppp/radius-additions.xml.i>
<node name="radius">
<children>
- #include <include/accel-radius-additions-rate-limit.xml.i>
+ #include <include/accel-ppp/radius-additions-rate-limit.xml.i>
</children>
</node>
</children>
</node>
- #include <include/interface-mtu-68-1500.xml.i>
- #include <include/accel-gateway-address.xml.i>
- #include <include/accel-name-server.xml.i>
+ #include <include/interface/interface-mtu-68-1500.xml.i>
+ #include <include/accel-ppp/gateway-address.xml.i>
+ #include <include/accel-ppp/name-server.xml.i>
<node name="client-ip-pool">
<properties>
<help>Client IP pools and gateway setting</help>
</properties>
<children>
- #include <include/accel-client-ip-pool-subnet.xml.i>
+ #include <include/accel-ppp/client-ip-pool-subnet.xml.i>
</children>
</node>
- #include <include/accel-client-ipv6-pool.xml.i>
+ #include <include/accel-ppp/client-ipv6-pool.xml.i>
<node name="ppp-options">
<properties>
<help>PPP (Point-to-Point Protocol) settings</help>
</properties>
<children>
- #include <include/accel-ppp-mppe.xml.i>
- #include <include/accel-lcp-echo-interval-failure.xml.i>
- #include <include/accel-lcp-echo-timeout.xml.i>
+ #include <include/accel-ppp/ppp-mppe.xml.i>
+ #include <include/accel-ppp/lcp-echo-interval-failure.xml.i>
+ #include <include/accel-ppp/lcp-echo-timeout.xml.i>
</children>
</node>
<node name="ssl">
diff --git a/interface-definitions/vrf.xml.in b/interface-definitions/vrf.xml.in
index eca9e75a7..fdf7e3444 100644
--- a/interface-definitions/vrf.xml.in
+++ b/interface-definitions/vrf.xml.in
@@ -15,17 +15,61 @@
</leafNode>
<tagNode name="name">
<properties>
- <help>VRF instance name</help>
+ <help>Virtual Routing and Forwarding instance</help>
<constraint>
<validator name="vrf-name"/>
</constraint>
<constraintErrorMessage>VRF instance name must be 15 characters or less and can not\nbe named as regular network interfaces.\n</constraintErrorMessage>
<valueHelp>
<format>txt</format>
- <description>Instance name</description>
+ <description>VRF instance name</description>
</valueHelp>
</properties>
<children>
+ #include <include/interface/interface-description.xml.i>
+ #include <include/interface/interface-disable.xml.i>
+ <node name="protocols">
+ <properties>
+ <help>Routing protocol parameters</help>
+ </properties>
+ <children>
+ <node name="static" owner="${vyos_conf_scripts_dir}/protocols_static.py $VAR(../../@)">
+ <properties>
+ <help>Static route parameters</help>
+ <priority>600</priority>
+ </properties>
+ <children>
+ #include <include/static/static-route.xml.i>
+ #include <include/static/static-route6.xml.i>
+ </children>
+ </node>
+ <tagNode name="bgp" owner="${vyos_conf_scripts_dir}/protocols_bgp.py $VAR(../../@)">
+ <properties>
+ <help>Border Gateway Protocol (BGP)</help>
+ <priority>820</priority>
+ <valueHelp>
+ <format>u32:1-4294967294</format>
+ <description>Autonomous System Number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967294"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-common-config.xml.i>
+ </children>
+ </tagNode>
+ <node name="ospf" owner="${vyos_conf_scripts_dir}/protocols_ospf.py $VAR(../../@)">
+ <properties>
+ <help>Open Shortest Path First (OSPF)</help>
+ <priority>620</priority>
+ </properties>
+ <children>
+ #include <include/ospf/ospf-common-config.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
<leafNode name="table">
<properties>
<help>Routing table associated with this instance</help>
@@ -39,8 +83,6 @@
<constraintErrorMessage>VRF routing table must be in range from 100 to 2147483647</constraintErrorMessage>
</properties>
</leafNode>
- #include <include/interface-description.xml.i>
- #include <include/interface-disable.xml.i>
</children>
</tagNode>
</children>
diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in
index 4b09816f9..084e2e7e3 100644
--- a/op-mode-definitions/nat.xml.in
+++ b/op-mode-definitions/nat.xml.in
@@ -4,19 +4,19 @@
<children>
<node name="nat">
<properties>
- <help>Show Network Address Translation (NAT) information</help>
+ <help>Show IPv4 to IPv4 Network Address Translation (NAT) information</help>
</properties>
<children>
<node name="source">
<properties>
- <help>Show source Network Address Translation (NAT) information</help>
+ <help>Show source IPv4 to IPv4 Network Address Translation (NAT) information</help>
</properties>
<children>
<node name="rules">
<properties>
<help>Show configured source NAT rules</help>
</properties>
- <command>echo To be migrated to Python - Phabricator T2459</command>
+ <command>${vyos_op_scripts_dir}/show_nat_rules.py --source</command>
</node>
<node name="statistics">
<properties>
@@ -51,14 +51,14 @@
</node>
<node name="destination">
<properties>
- <help>Show destination Network Address Translation (NAT) information</help>
+ <help>Show destination IPv4 to IPv4 Network Address Translation (NAT) information</help>
</properties>
<children>
<node name="rules">
<properties>
<help>Show configured destination NAT rules</help>
</properties>
- <command>echo To be migrated to Python - Phabricator T2459</command>
+ <command>${vyos_op_scripts_dir}/show_nat_rules.py --destination</command>
</node>
<node name="statistics">
<properties>
diff --git a/op-mode-definitions/nat66.xml.in b/op-mode-definitions/nat66.xml.in
new file mode 100644
index 000000000..1ec46eb11
--- /dev/null
+++ b/op-mode-definitions/nat66.xml.in
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="nat66">
+ <properties>
+ <help>Show IPv6 to IPv6 Network Address Translation (NAT66) information</help>
+ </properties>
+ <children>
+ <node name="source">
+ <properties>
+ <help>Show source IPv6 to IPv6 Network Address Translation (NAT66) information</help>
+ </properties>
+ <children>
+ <node name="rules">
+ <properties>
+ <help>Show configured source NAT66 rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_rules.py --source</command>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show statistics for configured source NAT66 rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_statistics.py --source</command>
+ </node>
+ <node name="translations">
+ <properties>
+ <help>Show active source NAT66 translations</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show active source NAT66 translations for an IPv6 address</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose --ipaddr="$6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show active source NAT66 translations detail</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source</command>
+ </node>
+ </children>
+ </node>
+ <node name="destination">
+ <properties>
+ <help>Show destination IPv6 to IPv6 Network Address Translation (NAT66) information</help>
+ </properties>
+ <children>
+ <node name="rules">
+ <properties>
+ <help>Show configured destination NAT66 rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_rules.py --destination</command>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show statistics for configured destination NAT66 rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_statistics.py --destination</command>
+ </node>
+ <node name="translations">
+ <properties>
+ <help>Show active destination NAT66 translations</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show active NAT66 destination translations for an IPv6 address</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose --ipaddr="$6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show active destination NAT66 translations detail</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/python/vyos/util.py b/python/vyos/util.py
index 17a7dda91..e4de56cdb 100644
--- a/python/vyos/util.py
+++ b/python/vyos/util.py
@@ -646,7 +646,7 @@ def dict_search(path, dict):
c = c.get(p, {})
return c.get(parts[-1], None)
-def get_json_iface_options(interface):
+def get_interface_config(interface):
""" Returns the used encapsulation protocol for given interface.
If interface does not exist, None is returned.
"""
@@ -655,3 +655,16 @@ def get_json_iface_options(interface):
from json import loads
tmp = loads(cmd(f'ip -d -j link show {interface}'))[0]
return tmp
+
+def get_all_vrfs():
+ """ Return a dictionary of all system wide known VRF instances """
+ from json import loads
+ tmp = loads(cmd('ip -j vrf list'))
+ # Result is of type [{"name":"red","table":1000},{"name":"blue","table":2000}]
+ # so we will re-arrange it to a more nicer representation:
+ # {'red': {'table': 1000}, 'blue': {'table': 2000}}
+ data = {}
+ for entry in tmp:
+ name = entry.pop('name')
+ data[name] = entry
+ return data
diff --git a/smoketest/configs/vrf-bgp b/smoketest/configs/vrf-bgp
new file mode 100644
index 000000000..4ad372a36
--- /dev/null
+++ b/smoketest/configs/vrf-bgp
@@ -0,0 +1,166 @@
+interfaces {
+ ethernet eth0 {
+ address 192.0.2.1/24
+ }
+ ethernet eth1 {
+ vrf black
+ }
+ ethernet eth2 {
+ vrf black
+ }
+}
+protocols {
+ ospf {
+ area 0 {
+ network 192.0.2.0/24
+ }
+ interface eth0 {
+ authentication {
+ md5 {
+ key-id 10 {
+ md5-key ospfkey
+ }
+ }
+ }
+ }
+ log-adjacency-changes {
+ }
+ parameters {
+ abr-type cisco
+ router-id 1.2.3.4
+ }
+ passive-interface default
+ passive-interface-exclude eth0
+ }
+}
+system {
+ config-management {
+ commit-revisions 100
+ }
+ console {
+ device ttyS0 {
+ speed 115200
+ }
+ }
+ host-name vyos
+ login {
+ user vyos {
+ authentication {
+ encrypted-password $6$O5gJRlDYQpj$MtrCV9lxMnZPMbcxlU7.FI793MImNHznxGoMFgm3Q6QP3vfKJyOSRCt3Ka/GzFQyW1yZS4NS616NLHaIPPFHc0
+ plaintext-password ""
+ }
+ }
+ }
+ nt
+ ntp {
+ server 0.pool.ntp.org {
+ }
+ server 1.pool.ntp.org {
+ }
+ server 2.pool.ntp.org {
+ }
+ }
+ syslog {
+ global {
+ facility all {
+ level info
+ }
+ facility protocols {
+ level debug
+ }
+ }
+ }
+ time-zone Europe/Berlin
+}
+vrf {
+ name black {
+ protocols {
+ bgp 65000 {
+ address-family {
+ ipv4-unicast {
+ network 10.0.150.0/23 {
+ }
+ }
+ ipv6-unicast {
+ network 2001:db8:200::/40 {
+ }
+ }
+ }
+ neighbor 10.0.151.222 {
+ disable-send-community {
+ extended
+ standard
+ }
+ address-family {
+ ipv4-unicast {
+ default-originate {
+ }
+ soft-reconfiguration {
+ inbound
+ }
+ }
+ }
+ capability {
+ dynamic
+ }
+ remote-as 65010
+ }
+ neighbor 10.0.151.252 {
+ peer-group VYOSv4
+ }
+ neighbor 10.0.151.254 {
+ peer-group VYOSv4
+ }
+ neighbor 2001:db8:200:ffff::3 {
+ peer-group VYOSv6
+ }
+ neighbor 2001:db8:200:ffff::a {
+ peer-group VYOSv6
+ }
+ neighbor 2001:db8:200:ff::101:2 {
+ remote-as 65010
+ }
+ parameters {
+ default {
+ no-ipv4-unicast
+ }
+ log-neighbor-changes
+ router-id 10.0.151.251
+ }
+ peer-group VYOSv4 {
+ address-family {
+ ipv4-unicast {
+ nexthop-self {
+ }
+ }
+ }
+ capability {
+ dynamic
+ }
+ remote-as 65000
+ update-source dum0
+ }
+ peer-group VYOSv6 {
+ address-family {
+ ipv6-unicast {
+ nexthop-self {
+ }
+ }
+ }
+ capability {
+ dynamic
+ }
+ remote-as 65000
+ update-source dum0
+ }
+ }
+
+ }
+ table 2000
+ }
+}
+
+
+// Warning: Do not remove the following line.
+// vyos-config-version: "broadcast-relay@1:cluster@1:config-management@1:conntrack@2:conntrack-sync@1:dhcp-relay@2:dhcp-server@5:dhcpv6-server@1:dns-forwarding@3:firewall@5:https@2:interfaces@20:ipoe-server@1:ipsec@5:l2tp@3:lldp@1:mdns@1:nat@5:nat66@1:ntp@1:pppoe-server@5:pptp@2:qos@1:quagga@9:rpki@1:salt@1:snmp@2:ssh@2:sstp@3:system@20:vrf@2:vrrp@2:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2:zone-policy@1"
+// Release version: 1.4-rolling-202103130218
diff --git a/smoketest/configs/vrf-ospf b/smoketest/configs/vrf-ospf
new file mode 100644
index 000000000..7855e86bf
--- /dev/null
+++ b/smoketest/configs/vrf-ospf
@@ -0,0 +1,145 @@
+interfaces {
+ ethernet eth0 {
+ address 192.0.2.1/24
+ }
+ ethernet eth1 {
+ vrf red
+ }
+ ethernet eth2 {
+ vrf blue
+ }
+}
+protocols {
+ ospf {
+ area 0 {
+ network 192.0.2.0/24
+ }
+ interface eth0 {
+ authentication {
+ md5 {
+ key-id 10 {
+ md5-key ospfkey
+ }
+ }
+ }
+ }
+ log-adjacency-changes {
+ }
+ parameters {
+ abr-type cisco
+ router-id 1.2.3.4
+ }
+ passive-interface default
+ passive-interface-exclude eth0
+ }
+}
+system {
+ config-management {
+ commit-revisions 100
+ }
+ console {
+ device ttyS0 {
+ speed 115200
+ }
+ }
+ host-name vyos
+ login {
+ user vyos {
+ authentication {
+ encrypted-password $6$O5gJRlDYQpj$MtrCV9lxMnZPMbcxlU7.FI793MImNHznxGoMFgm3Q6QP3vfKJyOSRCt3Ka/GzFQyW1yZS4NS616NLHaIPPFHc0
+ plaintext-password ""
+ }
+ }
+ }
+ nt
+ ntp {
+ server 0.pool.ntp.org {
+ }
+ server 1.pool.ntp.org {
+ }
+ server 2.pool.ntp.org {
+ }
+ }
+ syslog {
+ global {
+ facility all {
+ level info
+ }
+ facility protocols {
+ level debug
+ }
+ }
+ }
+ time-zone Europe/Berlin
+}
+vrf {
+ name blue {
+ protocols {
+ ospf {
+ area 0 {
+ network 172.18.201.0/24
+ }
+ interface eth2 {
+ authentication {
+ md5 {
+ key-id 30 {
+ md5-key vyoskey456
+ }
+ }
+ }
+ dead-interval 40
+ hello-interval 10
+ priority 1
+ retransmit-interval 5
+ transmit-delay 1
+ }
+ log-adjacency-changes {
+ }
+ parameters {
+ abr-type cisco
+ router-id 5.6.7.8
+ }
+ passive-interface default
+ passive-interface-exclude eth2
+ }
+ }
+ table 2000
+ }
+ name red {
+ protocols {
+ ospf {
+ area 0 {
+ network 172.18.202.0/24
+ }
+ interface eth1 {
+ authentication {
+ md5 {
+ key-id 20 {
+ md5-key vyoskey123
+ }
+ }
+ }
+ dead-interval 40
+ hello-interval 10
+ priority 1
+ retransmit-interval 5
+ transmit-delay 1
+ }
+ log-adjacency-changes {
+ }
+ parameters {
+ abr-type cisco
+ router-id 9.10.11.12
+ }
+ passive-interface default
+ passive-interface-exclude eth1
+ }
+ }
+ table 1000
+ }
+}
+
+
+// Warning: Do not remove the following line.
+// vyos-config-version: "broadcast-relay@1:cluster@1:config-management@1:conntrack@2:conntrack-sync@1:dhcp-relay@2:dhcp-server@5:dhcpv6-server@1:dns-forwarding@3:firewall@5:https@2:interfaces@20:ipoe-server@1:ipsec@5:l2tp@3:lldp@1:mdns@1:nat@5:nat66@1:ntp@1:pppoe-server@5:pptp@2:qos@1:quagga@9:rpki@1:salt@1:snmp@2:ssh@2:sstp@3:system@20:vrf@2:vrrp@2:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2:zone-policy@1"
+// Release version: 1.4-rolling-202103130218
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index d038e9cb8..50cfa2607 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -29,7 +29,7 @@ from vyos.util import read_file
from vyos.util import cmd
from vyos.util import dict_search
from vyos.util import process_named_running
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from vyos.validate import is_intf_addr_assigned
from vyos.validate import is_ipv6_link_local
@@ -353,7 +353,7 @@ class BasicInterfaceTest:
for interface in self._interfaces:
for vif_s in self._qinq_range:
- tmp = get_json_iface_options(f'{interface}.{vif_s}')
+ tmp = get_interface_config(f'{interface}.{vif_s}')
self.assertEqual(dict_search('linkinfo.info_data.protocol', tmp), '802.1ad')
for vif_c in self._vlan_range:
diff --git a/smoketest/scripts/cli/test_interfaces_erspan.py b/smoketest/scripts/cli/test_interfaces_erspan.py
index cbb41d0c9..4575c61ce 100755
--- a/smoketest/scripts/cli/test_interfaces_erspan.py
+++ b/smoketest/scripts/cli/test_interfaces_erspan.py
@@ -18,7 +18,7 @@ import unittest
from vyos.configsession import ConfigSession
from vyos.configsession import ConfigSessionError
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from base_interfaces_test import BasicInterfaceTest
@@ -52,7 +52,7 @@ class ERSPanTunnelInterfaceTest(BasicInterfaceTest.BaseTest):
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
self.assertEqual(interface, conf['ifname'])
self.assertEqual(encapsulation, conf['linkinfo']['info_kind'])
self.assertEqual(mtu, conf['mtu'])
@@ -73,7 +73,7 @@ class ERSPanTunnelInterfaceTest(BasicInterfaceTest.BaseTest):
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
self.assertEqual(interface, conf['ifname'])
self.assertEqual(encapsulation, conf['linkinfo']['info_kind'])
self.assertEqual(mtu, conf['mtu'])
diff --git a/smoketest/scripts/cli/test_interfaces_geneve.py b/smoketest/scripts/cli/test_interfaces_geneve.py
index 7edd4528e..e8e8e5a2c 100755
--- a/smoketest/scripts/cli/test_interfaces_geneve.py
+++ b/smoketest/scripts/cli/test_interfaces_geneve.py
@@ -18,7 +18,7 @@ import unittest
from vyos.configsession import ConfigSession
from vyos.ifconfig import Interface
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from base_interfaces_test import BasicInterfaceTest
@@ -51,7 +51,7 @@ class GeneveInterfaceTest(BasicInterfaceTest.BaseTest):
ttl = 20
for interface in self._interfaces:
- options = get_json_iface_options(interface)
+ options = get_interface_config(interface)
vni = options['linkinfo']['info_data']['id']
self.assertIn(f'vni {vni}', self._options[interface])
diff --git a/smoketest/scripts/cli/test_interfaces_macsec.py b/smoketest/scripts/cli/test_interfaces_macsec.py
index 2f1898b6f..31071a0f7 100755
--- a/smoketest/scripts/cli/test_interfaces_macsec.py
+++ b/smoketest/scripts/cli/test_interfaces_macsec.py
@@ -25,7 +25,7 @@ from vyos.configsession import ConfigSessionError
from vyos.ifconfig import Section
from vyos.util import cmd
from vyos.util import read_file
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from vyos.util import process_named_running
def get_config_value(interface, key):
@@ -34,7 +34,7 @@ def get_config_value(interface, key):
return tmp[0]
def get_cipher(interface):
- tmp = get_json_iface_options(interface)
+ tmp = get_interface_config(interface)
return tmp['linkinfo']['info_data']['cipher_suite'].lower()
class MACsecInterfaceTest(BasicInterfaceTest.BaseTest):
diff --git a/smoketest/scripts/cli/test_interfaces_tunnel.py b/smoketest/scripts/cli/test_interfaces_tunnel.py
index cad6764e6..3dddb5ef0 100755
--- a/smoketest/scripts/cli/test_interfaces_tunnel.py
+++ b/smoketest/scripts/cli/test_interfaces_tunnel.py
@@ -18,7 +18,7 @@ import unittest
from vyos.configsession import ConfigSession
from vyos.configsession import ConfigSessionError
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from vyos.template import inc_ip
from base_interfaces_test import BasicInterfaceTest
@@ -84,7 +84,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
# Check if commit is ok
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
if encapsulation not in ['sit', 'gretap']:
self.assertEqual(source_if, conf['link'])
@@ -132,7 +132,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
# Check if commit is ok
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
if encapsulation not in ['ip6gretap']:
self.assertEqual(source_if, conf['link'])
@@ -192,7 +192,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
# Check if commit is ok
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
self.assertEqual(mtu, conf['mtu'])
self.assertEqual(interface, conf['ifname'])
self.assertEqual(encapsulation, conf['linkinfo']['info_kind'])
@@ -214,7 +214,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
# Check if commit is ok
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
self.assertEqual(mtu, conf['mtu'])
self.assertEqual(interface, conf['ifname'])
self.assertEqual(encapsulation, conf['linkinfo']['info_kind'])
@@ -228,7 +228,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
# Check if commit is ok
self.session.commit()
- conf = get_json_iface_options(interface)
+ conf = get_interface_config(interface)
self.assertEqual(new_remote, conf['linkinfo']['info_data']['remote'])
if __name__ == '__main__':
diff --git a/smoketest/scripts/cli/test_interfaces_vxlan.py b/smoketest/scripts/cli/test_interfaces_vxlan.py
index b66315c5e..2a04b0477 100755
--- a/smoketest/scripts/cli/test_interfaces_vxlan.py
+++ b/smoketest/scripts/cli/test_interfaces_vxlan.py
@@ -18,7 +18,7 @@ import unittest
from vyos.configsession import ConfigSession
from vyos.ifconfig import Interface
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from base_interfaces_test import BasicInterfaceTest
@@ -52,7 +52,7 @@ class VXLANInterfaceTest(BasicInterfaceTest.BaseTest):
ttl = 20
for interface in self._interfaces:
- options = get_json_iface_options(interface)
+ options = get_interface_config(interface)
vni = options['linkinfo']['info_data']['id']
self.assertIn(f'vni {vni}', self._options[interface])
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 9aa1541cf..7d397b55e 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -128,17 +128,19 @@ peer_group_config = {
},
}
-def getFRRBGPconfig():
- return cmd(f'vtysh -c "show run" | sed -n "/^router bgp {ASN}/,/^!/p"')
+def getFRRBGPconfig(vrf=None):
+ if vrf:
+ return cmd(f'vtysh -c "show run" | sed -n "/^router bgp {ASN} vrf {vrf}$/,/^!/p"')
+ return cmd(f'vtysh -c "show run" | sed -n "/^router bgp {ASN}$/,/^!/p"')
def getFRRBgpAfiConfig(afi):
- return cmd(f'vtysh -c "show run" | sed -n "/^router bgp {ASN}/,/^!/p" | sed -n "/^ address-family {afi} unicast/,/^ exit-address-family/p"')
+ return cmd(f'vtysh -c "show run" | sed -n "/^router bgp {ASN}$/,/^!/p" | sed -n "/^ address-family {afi} unicast/,/^ exit-address-family/p"')
def getFRRBGPVNIconfig(vni):
- return cmd(f'vtysh -c "show run" | sed -n "/^ vni {vni}/,/^!/p"')
+ return cmd(f'vtysh -c "show run" | sed -n "/^ vni {vni}$/,/^!/p"')
def getFRRRPKIconfig():
- return cmd(f'vtysh -c "show run" | sed -n "/^rpki/,/^!/p"')
+ return cmd(f'vtysh -c "show run" | sed -n "/^rpki$/,/^!/p"')
class TestProtocolsBGP(unittest.TestCase):
def setUp(self):
@@ -551,5 +553,27 @@ class TestProtocolsBGP(unittest.TestCase):
self.assertIn(f' advertise-default-gw', vniconfig)
self.assertIn(f' advertise-svi-ip', vniconfig)
+ def test_bgp_08_vrf_simple(self):
+ router_id = '127.0.0.3'
+ vrfs = ['red', 'green', 'blue']
+ # It is safe to assume that when the basic VRF test works, all
+ # other OSPF related features work, as we entirely inherit the CLI
+ # templates and Jinja2 FRR template.
+ table = '1000'
+ for vrf in vrfs:
+ vrf_base = ['vrf', 'name', vrf]
+ self.session.set(vrf_base + ['table', table])
+ self.session.set(vrf_base + ['protocols', 'bgp', ASN, 'parameters', 'router-id', router_id])
+ table = str(int(table) + 1000)
+
+ self.session.commit()
+
+ for vrf in vrfs:
+ # Verify FRR bgpd configuration
+ frrconfig = getFRRBGPconfig(vrf)
+
+ self.assertIn(f'router bgp {ASN} vrf {vrf}', frrconfig)
+ self.assertIn(f' bgp router-id {router_id}', frrconfig)
+
if __name__ == '__main__':
unittest.main(verbosity=2)
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py
index d9a6c17e4..532d84cc8 100755
--- a/smoketest/scripts/cli/test_protocols_ospf.py
+++ b/smoketest/scripts/cli/test_protocols_ospf.py
@@ -27,8 +27,10 @@ base_path = ['protocols', 'ospf']
route_map = 'foo-bar-baz10'
-def getFRROSPFconfig():
- return cmd('vtysh -c "show run" | sed -n "/^router ospf/,/^!/p"')
+def getFRRconfig(vrf=None):
+ if vrf:
+ return cmd(f'vtysh -c "show run" | sed -n "/^router ospf vrf {vrf}$/,/^!/p"')
+ return cmd('vtysh -c "show run" | sed -n "/^router ospf$/,/^!/p"')
def getFRRInterfaceConfig(interface):
return cmd(f'vtysh -c "show run" | sed -n "/^interface {interface}$/,/^!/p"')
@@ -45,6 +47,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.delete(['policy', 'route-map', route_map])
self.session.delete(base_path)
+
self.session.commit()
del self.session
@@ -54,12 +57,11 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' auto-cost reference-bandwidth 100', frrconfig)
self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults
-
def test_ospf_02_simple(self):
router_id = '127.0.0.1'
abr_type = 'ibm'
@@ -76,7 +78,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' auto-cost reference-bandwidth {bandwidth}', frrconfig)
self.assertIn(f' ospf router-id {router_id}', frrconfig)
@@ -100,7 +102,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults
for ptotocol in protocols:
@@ -121,7 +123,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults
self.assertIn(f' default-information originate metric {metric} metric-type {metric_type} route-map {route_map}', frrconfig)
@@ -131,7 +133,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f' default-information originate always metric {metric} metric-type {metric_type} route-map {route_map}', frrconfig)
@@ -158,7 +160,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' mpls-te on', frrconfig)
self.assertIn(f' mpls-te router-address 0.0.0.0', frrconfig) # default
@@ -173,7 +175,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.set(base_path + ['distance', 'ospf', 'inter-area', inter_area])
self.session.commit()
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f' distance ospf intra-area {intra_area} inter-area {inter_area} external {external}', frrconfig)
@@ -189,7 +191,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
for neighbor in neighbors:
self.assertIn(f' neighbor {neighbor} priority {priority} poll-interval {poll_interval}', frrconfig) # default
@@ -205,7 +207,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
self.assertIn(f' passive-interface default', frrconfig) # default
for interface in interfaces:
@@ -227,7 +229,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
self.assertIn(f'router ospf', frrconfig)
for protocol in redistribute:
if protocol in ['kernel', 'static']:
@@ -235,6 +237,7 @@ class TestProtocolsOSPF(unittest.TestCase):
else:
self.assertIn(f' redistribute {protocol} metric {metric} metric-type {metric_type} route-map {route_map}', frrconfig)
+
def test_ospf_09_virtual_link(self):
networks = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
area = '10'
@@ -257,7 +260,7 @@ class TestProtocolsOSPF(unittest.TestCase):
self.session.commit()
# Verify FRR ospfd configuration
- frrconfig = getFRROSPFconfig()
+ frrconfig = getFRRconfig()
import pprint
# From time to time the CI fails with an error like:
# ======================================================================
@@ -277,6 +280,7 @@ class TestProtocolsOSPF(unittest.TestCase):
for network in networks:
self.assertIn(f' network {network} area {area}', frrconfig)
+
def test_ospf_10_interface_configureation(self):
interfaces = Section.interfaces('ethernet')
password = 'vyos1234'
@@ -308,5 +312,37 @@ class TestProtocolsOSPF(unittest.TestCase):
self.assertIn(f' ip ospf priority {priority}', config)
self.assertIn(f' bandwidth {bandwidth}', config)
+
+ def test_ospf_11_vrfs(self):
+ vrfs = ['red', 'green', 'blue']
+ # It is safe to assume that when the basic VRF test works, all
+ # other OSPF related features work, as we entirely inherit the CLI
+ # templates and Jinja2 FRR template.
+ table = '1000'
+ for vrf in vrfs:
+ vrf_base = ['vrf', 'name', vrf]
+ self.session.set(vrf_base + ['table', table])
+ self.session.set(vrf_base + ['protocols', 'ospf'])
+ table = str(int(table) + 1000)
+
+ # Also set a default VRF OSPF config
+ self.session.set(base_path)
+ self.session.commit()
+
+ # Verify FRR ospfd configuration
+ frrconfig = getFRRconfig()
+ self.assertIn(f'router ospf', frrconfig)
+ self.assertIn(f' auto-cost reference-bandwidth 100', frrconfig)
+ self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults
+
+ for vrf in vrfs:
+ frrconfig = getFRRconfig(vrf)
+ self.assertIn(f'router ospf vrf {vrf}', frrconfig)
+ self.assertIn(f' auto-cost reference-bandwidth 100', frrconfig)
+ self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # defaults
+
+ self.session.delete(['vrf', 'name', vrf])
+
+
if __name__ == '__main__':
unittest.main(verbosity=2)
diff --git a/smoketest/scripts/cli/test_protocols_static.py b/smoketest/scripts/cli/test_protocols_static.py
index cf591f060..28ae5e2dd 100755
--- a/smoketest/scripts/cli/test_protocols_static.py
+++ b/smoketest/scripts/cli/test_protocols_static.py
@@ -21,6 +21,7 @@ from vyos.configsession import ConfigSession
from vyos.configsession import ConfigSessionError
from vyos.template import is_ipv6
from vyos.util import cmd
+from vyos.util import get_interface_config
base_path = ['protocols', 'static']
vrf_path = ['protocols', 'vrf']
@@ -85,7 +86,6 @@ routes = {
},
}
-vrfs = ['red', 'green', 'blue']
tables = ['80', '81', '82']
class StaticRouteTest(unittest.TestCase):
@@ -99,9 +99,6 @@ class StaticRouteTest(unittest.TestCase):
route_type = 'route6'
self.session.delete(base_path + [route_type, route])
- for vrf in vrfs:
- self.session.delete(vrf_path + [vrf])
-
for table in tables:
self.session.delete(base_path + ['table', table])
@@ -290,47 +287,65 @@ class StaticRouteTest(unittest.TestCase):
def test_protocols_vrf_static(self):
- for vrf in vrfs:
+ # Create VRF instances and apply the static routes from above to FRR.
+ # Re-read the configured routes and match them if they are programmed
+ # properly. This also includes VRF leaking
+ vrfs = {
+ 'red' : { 'table' : '1000' },
+ 'green' : { 'table' : '2000' },
+ 'blue' : { 'table' : '3000' },
+ }
+
+ for vrf, vrf_config in vrfs.items():
+ vrf_base_path = ['vrf', 'name', vrf]
+ self.session.set(vrf_base_path + ['table', vrf_config['table']])
+
for route, route_config in routes.items():
route_type = 'route'
if is_ipv6(route):
route_type = 'route6'
- base = vrf_path + [vrf, 'static', route_type, route]
+ route_base_path = vrf_base_path + ['protocols', 'static', route_type, route]
if 'next_hop' in route_config:
for next_hop, next_hop_config in route_config['next_hop'].items():
- self.session.set(base + ['next-hop', next_hop])
+ self.session.set(route_base_path + ['next-hop', next_hop])
if 'disable' in next_hop_config:
- self.session.set(base + ['next-hop', next_hop, 'disable'])
+ self.session.set(route_base_path + ['next-hop', next_hop, 'disable'])
if 'distance' in next_hop_config:
- self.session.set(base + ['next-hop', next_hop, 'distance', next_hop_config['distance']])
+ self.session.set(route_base_path + ['next-hop', next_hop, 'distance', next_hop_config['distance']])
if 'interface' in next_hop_config:
- self.session.set(base + ['next-hop', next_hop, 'interface', next_hop_config['interface']])
+ self.session.set(route_base_path + ['next-hop', next_hop, 'interface', next_hop_config['interface']])
if 'vrf' in next_hop_config:
- self.session.set(base + ['next-hop', next_hop, 'vrf', next_hop_config['vrf']])
+ self.session.set(route_base_path + ['next-hop', next_hop, 'vrf', next_hop_config['vrf']])
if 'interface' in route_config:
for interface, interface_config in route_config['interface'].items():
- self.session.set(base + ['interface', interface])
+ self.session.set(route_base_path + ['interface', interface])
if 'disable' in interface_config:
- self.session.set(base + ['interface', interface, 'disable'])
+ self.session.set(route_base_path + ['interface', interface, 'disable'])
if 'distance' in interface_config:
- self.session.set(base + ['interface', interface, 'distance', interface_config['distance']])
+ self.session.set(route_base_path + ['interface', interface, 'distance', interface_config['distance']])
if 'vrf' in interface_config:
- self.session.set(base + ['interface', interface, 'vrf', interface_config['vrf']])
+ self.session.set(route_base_path + ['interface', interface, 'vrf', interface_config['vrf']])
if 'blackhole' in route_config:
- self.session.set(base + ['blackhole'])
+ self.session.set(route_base_path + ['blackhole'])
if 'distance' in route_config['blackhole']:
- self.session.set(base + ['blackhole', 'distance', route_config['blackhole']['distance']])
+ self.session.set(route_base_path + ['blackhole', 'distance', route_config['blackhole']['distance']])
if 'tag' in route_config['blackhole']:
- self.session.set(base + ['blackhole', 'tag', route_config['blackhole']['tag']])
+ self.session.set(route_base_path + ['blackhole', 'tag', route_config['blackhole']['tag']])
# commit changes
self.session.commit()
- for vrf in vrfs:
+ for vrf, vrf_config in vrfs.items():
+ tmp = get_interface_config(vrf)
+
+ # Compare VRF table ID
+ self.assertEqual(tmp['linkinfo']['info_data']['table'], int(vrf_config['table']))
+ self.assertEqual(tmp['linkinfo']['info_kind'], 'vrf')
+
# Verify FRR bgpd configuration
frrconfig = getFRRCconfig(vrf)
self.assertIn(f'vrf {vrf}', frrconfig)
@@ -380,6 +395,7 @@ class StaticRouteTest(unittest.TestCase):
self.assertIn(tmp, frrconfig)
+ self.session.delete(['vrf'])
if __name__ == '__main__':
unittest.main(verbosity=2)
diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py
index 8e977d407..aac115663 100755
--- a/smoketest/scripts/cli/test_vrf.py
+++ b/smoketest/scripts/cli/test_vrf.py
@@ -33,12 +33,6 @@ from vyos.validate import is_intf_addr_assigned
base_path = ['vrf']
vrfs = ['red', 'green', 'blue', 'foo-bar', 'baz_foo']
-def get_vrf_ipv4_routes(vrf):
- return json.loads(cmd(f'ip -4 -j route show vrf {vrf}'))
-
-def get_vrf_ipv6_routes(vrf):
- return json.loads(cmd(f'ip -6 -j route show vrf {vrf}'))
-
class VRFTest(unittest.TestCase):
_interfaces = []
diff --git a/src/completion/list_bgp_peer_groups.sh b/src/completion/list_bgp_peer_groups.sh
new file mode 100755
index 000000000..4503d608f
--- /dev/null
+++ b/src/completion/list_bgp_peer_groups.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (C) 2021 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Return BGP peer-groups from CLI
+
+declare -a vals
+eval "bgp_as=$(cli-shell-api listNodes protocols bgp)"
+eval "vals=($(cli-shell-api listNodes protocols bgp $bgp_as peer-group))"
+
+echo -n ${vals[@]}
+exit 0
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py
index b63312750..cab94a5b0 100755
--- a/src/conf_mode/interfaces-tunnel.py
+++ b/src/conf_mode/interfaces-tunnel.py
@@ -34,7 +34,7 @@ from vyos.ifconfig import Interface
from vyos.ifconfig import TunnelIf
from vyos.template import is_ipv4
from vyos.template import is_ipv6
-from vyos.util import get_json_iface_options
+from vyos.util import get_interface_config
from vyos.util import dict_search
from vyos import ConfigError
from vyos import airbag
@@ -103,7 +103,7 @@ def apply(tunnel):
# There is no other solution to destroy and recreate the tunnel.
encap = ''
remote = ''
- tmp = get_json_iface_options(interface)
+ tmp = get_interface_config(interface)
if tmp:
encap = dict_search('linkinfo.info_kind', tmp)
remote = dict_search('linkinfo.info_data.remote', tmp)
diff --git a/src/conf_mode/nat66.py b/src/conf_mode/nat66.py
index ce1db316c..e2bd6417d 100755
--- a/src/conf_mode/nat66.py
+++ b/src/conf_mode/nat66.py
@@ -28,7 +28,6 @@ from vyos.util import cmd
from vyos.util import check_kmod
from vyos.util import dict_search
from vyos.template import is_ipv6
-from vyos.template import is_ip_network
from vyos.xml import defaults
from vyos import ConfigError
from vyos import airbag
@@ -80,8 +79,10 @@ def get_config(config=None):
if not conf.exists(base):
nat['helper_functions'] = 'remove'
+ nat['pre_ct_ignore'] = get_handler(condensed_json, 'PREROUTING', 'VYATTA_CT_HELPER')
nat['pre_ct_conntrack'] = get_handler(condensed_json, 'PREROUTING', 'NAT_CONNTRACK')
- nat['out_ct_conntrack'] = get_handler(condensed_json, 'OUTPUT','NAT_CONNTRACK')
+ nat['out_ct_ignore'] = get_handler(condensed_json, 'OUTPUT', 'VYATTA_CT_HELPER')
+ nat['out_ct_conntrack'] = get_handler(condensed_json, 'OUTPUT', 'NAT_CONNTRACK')
nat['deleted'] = ''
return nat
@@ -91,8 +92,10 @@ def get_config(config=None):
nat['helper_functions'] = 'add'
# Retrieve current table handler positions
+ nat['pre_ct_ignore'] = get_handler(condensed_json, 'PREROUTING', 'VYATTA_CT_IGNORE')
nat['pre_ct_conntrack'] = get_handler(condensed_json, 'PREROUTING', 'VYATTA_CT_PREROUTING_HOOK')
- nat['out_ct_conntrack'] = get_handler(condensed_json, 'OUTPUT','VYATTA_CT_OUTPUT_HOOK')
+ nat['out_ct_ignore'] = get_handler(condensed_json, 'OUTPUT', 'VYATTA_CT_IGNORE')
+ nat['out_ct_conntrack'] = get_handler(condensed_json, 'OUTPUT', 'VYATTA_CT_OUTPUT_HOOK')
else:
nat['helper_functions'] = 'has'
diff --git a/src/conf_mode/policy-lists.py b/src/conf_mode/policy-lists.py
new file mode 100755
index 000000000..94a020e7b
--- /dev/null
+++ b/src/conf_mode/policy-lists.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2021 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import os
+
+from sys import exit
+
+from vyos.config import Config
+from vyos.configdict import dict_merge
+from vyos.template import render
+from vyos.template import render_to_string
+from vyos.util import call
+from vyos.util import dict_search
+from vyos import ConfigError
+from vyos import frr
+from vyos import airbag
+from pprint import pprint
+airbag.enable()
+
+config_file = r'/tmp/policy.frr'
+frr_daemon = 'zebra'
+
+DEBUG = os.path.exists('/tmp/policy.debug')
+if DEBUG:
+ import logging
+ lg = logging.getLogger("vyos.frr")
+ lg.setLevel(logging.DEBUG)
+ ch = logging.StreamHandler()
+ lg.addHandler(ch)
+
+def get_config(config=None):
+ if config:
+ conf = config
+ else:
+ conf = Config()
+ base = ['npolicy']
+ policy = conf.get_config_dict(base, key_mangling=('-', '_'))
+
+ # Bail out early if configuration tree does not exist
+ if not conf.exists(base):
+ return policy
+
+ pprint(policy)
+ exit(1)
+ return policy
+
+def verify(policy):
+ if not policy:
+ return None
+
+ return None
+
+def generate(policy):
+ if not policy:
+ policy['new_frr_config'] = ''
+ return None
+
+ # render(config) not needed, its only for debug
+ # render(config_file, 'frr/policy.frr.tmpl', policy)
+ # policy['new_frr_config'] = render_to_string('frr/policy.frr.tmpl')
+
+ return None
+
+def apply(policy):
+ # Save original configuration prior to starting any commit actions
+ # frr_cfg = frr.FRRConfig()
+ # frr_cfg.load_configuration(frr_daemon)
+ # frr_cfg.modify_section(f'ip', '')
+ # frr_cfg.add_before(r'(line vty)', policy['new_frr_config'])
+
+ # Debugging
+ if DEBUG:
+ from pprint import pprint
+ print('')
+ print('--------- DEBUGGING ----------')
+ pprint(dir(frr_cfg))
+ print('Existing config:\n')
+ for line in frr_cfg.original_config:
+ print(line)
+ print(f'Replacement config:\n')
+ print(f'{policy["new_frr_config"]}')
+ print(f'Modified config:\n')
+ print(f'{frr_cfg}')
+
+ # frr_cfg.commit_configuration(frr_daemon)
+
+ # If FRR config is blank, rerun the blank commit x times due to frr-reload
+ # behavior/bug not properly clearing out on one commit.
+ # if policy['new_frr_config'] == '':
+ # for a in range(5):
+ # frr_cfg.commit_configuration(frr_daemon)
+
+
+ return None
+
+if __name__ == '__main__':
+ try:
+ c = get_config()
+ verify(c)
+ generate(c)
+ apply(c)
+ except ConfigError as e:
+ print(e)
+ exit(1)
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 7dede74a1..d5cc169c2 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -17,6 +17,7 @@
import os
from sys import exit
+from sys import argv
from vyos.config import Config
from vyos.configdict import dict_merge
@@ -37,11 +38,24 @@ def get_config(config=None):
conf = config
else:
conf = Config()
- base = ['protocols', 'bgp']
+
+ vrf = None
+ if len(argv) > 1:
+ vrf = argv[1]
+
+ base_path = ['protocols', 'bgp']
+
+ # eqivalent of the C foo ? 'a' : 'b' statement
+ base = vrf and ['vrf', 'name', vrf, 'protocols', 'bgp'] or base_path
bgp = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True)
- # Bail out early if configuration tree does not exist
+ # Assign the name of our VRF context. This MUST be done before the return
+ # statement below, else on deletion we will delete the default instance
+ # instead of the VRF instance.
+ if vrf: bgp.update({'vrf' : vrf})
+
if not conf.exists(base):
+ bgp.update({'deleted' : ''})
return bgp
# We also need some additional information from the config,
@@ -80,11 +94,20 @@ def verify(bgp):
if not bgp:
return None
- # Check if declared more than one ASN
- if len(bgp) > 1:
- raise ConfigError('Only one BGP AS number can be defined!')
+ # FRR bgpd only supports one Autonomous System Number, verify this!
+ asn = 0
+ for key in bgp:
+ if key.isnumeric():
+ asn +=1
+ if asn > 1:
+ raise ConfigError('Only one BGP AS number can be defined!')
for asn, asn_config in bgp.items():
+ # Workaround for https://phabricator.vyos.net/T1711
+ # We also have a vrf, and deleted key now - so we can only veriy "numbers"
+ if not asn.isnumeric():
+ continue
+
# Common verification for both peer-group and neighbor statements
for neighbor in ['neighbor', 'peer_group']:
# bail out early if there is no neighbor or peer-group statement
@@ -166,16 +189,18 @@ def verify(bgp):
# we can not use dict_search() here as prefix contains dots ...
if 'peer_group' not in asn_config['listen']['range'][prefix]:
raise ConfigError(f'Listen range for prefix "{prefix}" has no peer group configured.')
- else:
- peer_group = asn_config['listen']['range'][prefix]['peer_group']
- # the peer group must also exist
- if not dict_search(f'peer_group.{peer_group}', asn_config):
- raise ConfigError(f'Peer-group "{peer_group}" for listen range "{prefix}" does not exist!')
+
+ peer_group = asn_config['listen']['range'][prefix]['peer_group']
+ if 'peer_group' not in asn_config or peer_group not in asn_config['peer_group']:
+ raise ConfigError(f'Peer-group "{peer_group}" for listen range "{prefix}" does not exist!')
+
+ if not verify_remote_as(asn_config['listen']['range'][prefix], asn_config):
+ raise ConfigError(f'Peer-group "{peer_group}" requires remote-as to be set!')
return None
def generate(bgp):
- if not bgp:
+ if not bgp or 'deleted' in bgp:
bgp['new_frr_config'] = ''
return None
@@ -183,6 +208,8 @@ def generate(bgp):
# of the config dict
asn = list(bgp.keys())[0]
bgp[asn]['asn'] = asn
+ if 'vrf' in bgp:
+ bgp[asn]['vrf'] = bgp['vrf']
bgp['new_frr_config'] = render_to_string('frr/bgp.frr.tmpl', bgp[asn])
return None
@@ -191,7 +218,13 @@ def apply(bgp):
# Save original configuration prior to starting any commit actions
frr_cfg = frr.FRRConfig()
frr_cfg.load_configuration(frr_daemon)
- frr_cfg.modify_section(f'^router bgp \d+$', '')
+
+ if 'vrf' in bgp:
+ vrf = bgp['vrf']
+ frr_cfg.modify_section(f'^router bgp \d+ vrf {vrf}$', '')
+ else:
+ frr_cfg.modify_section('^router bgp \d+$', '')
+
frr_cfg.add_before(r'(ip prefix-list .*|route-map .*|line vty)', bgp['new_frr_config'])
frr_cfg.commit_configuration(frr_daemon)
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py
index aefe7c23e..ef2aeda7f 100755
--- a/src/conf_mode/protocols_ospf.py
+++ b/src/conf_mode/protocols_ospf.py
@@ -17,14 +17,17 @@
import os
from sys import exit
+from sys import argv
from vyos.config import Config
from vyos.configdict import dict_merge
+from vyos.configdict import node_changed
from vyos.configverify import verify_route_maps
from vyos.configverify import verify_interface_exists
from vyos.template import render_to_string
from vyos.util import call
from vyos.util import dict_search
+from vyos.util import get_interface_config
from vyos.xml import defaults
from vyos import ConfigError
from vyos import frr
@@ -38,16 +41,33 @@ def get_config(config=None):
conf = config
else:
conf = Config()
- base = ['protocols', 'ospf']
+
+ vrf = None
+ if len(argv) > 1:
+ vrf = argv[1]
+
+ base_path = ['protocols', 'ospf']
+
+ # eqivalent of the C foo ? 'a' : 'b' statement
+ base = vrf and ['vrf', 'name', vrf, 'protocols', 'ospf'] or base_path
ospf = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True)
+ # Assign the name of our VRF context. This MUST be done before the return
+ # statement below, else on deletion we will delete the default instance
+ # instead of the VRF instance.
+ if vrf: ospf['vrf'] = vrf
+
# Bail out early if configuration tree does not exist
if not conf.exists(base):
+ ospf.update({'deleted' : ''})
return ospf
# We have gathered the dict representation of the CLI, but there are default
# options which we need to update into the dictionary retrived.
- default_values = defaults(base)
+ # XXX: Note that we can not call defaults(base), as defaults does not work
+ # on an instance of a tag node. As we use the exact same CLI definition for
+ # both the non-vrf and vrf version this is absolutely safe!
+ default_values = defaults(base_path)
# We have to cleanup the default dict, as default values could enable features
# which are not explicitly enabled on the CLI. Example: default-information
@@ -99,6 +119,14 @@ def get_config(config=None):
ospf['interface'][interface] = dict_merge(default_values,
ospf['interface'][interface])
+ # As we no re-use this Python handler for both VRF and non VRF instances for
+ # OSPF we need to find out if any interfaces changed so properly adjust
+ # the FRR configuration and not by acctident change interfaces from a
+ # different VRF.
+ interfaces_removed = node_changed(conf, base + ['interface'])
+ if interfaces_removed:
+ ospf['interface_removed'] = list(interfaces_removed)
+
# We also need some additional information from the config, prefix-lists
# and route-maps for instance. They will be used in verify()
base = ['policy']
@@ -121,12 +149,22 @@ def verify(ospf):
# time. FRR will only activate the last option set via CLI.
if {'hello_multiplier', 'dead_interval'} <= set(ospf['interface'][interface]):
raise ConfigError(f'Can not use hello-multiplier and dead-interval ' \
- f'concurrently for "{interface}"!')
+ f'concurrently for {interface}!')
+
+ if 'vrf' in ospf:
+ # If interface specific options are set, we must ensure that the
+ # interface is bound to our requesting VRF. Due to the VyOS/Vyatta
+ # priorities the interface is bound to the VRF after creation of
+ # the VRF itself, and before any routing protocol is configured.
+ vrf = ospf['vrf']
+ tmp = get_interface_config(interface)
+ if 'master' not in tmp or tmp['master'] != vrf:
+ raise ConfigError(f'Interface {interface} is not a member of VRF {vrf}!')
return None
def generate(ospf):
- if not ospf:
+ if not ospf or 'deleted' in ospf:
ospf['new_frr_config'] = ''
return None
@@ -137,8 +175,19 @@ def apply(ospf):
# Save original configuration prior to starting any commit actions
frr_cfg = frr.FRRConfig()
frr_cfg.load_configuration(frr_daemon)
- frr_cfg.modify_section(r'^interface \S+', '')
- frr_cfg.modify_section('^router ospf$', '')
+
+ if 'vrf' in ospf:
+ vrf = ospf['vrf']
+ frr_cfg.modify_section(f'^router ospf vrf {vrf}$', '')
+ else:
+ frr_cfg.modify_section('^router ospf$', '')
+
+ for key in ['interface', 'interface_removed']:
+ if key not in ospf:
+ continue
+ for interface in ospf[key]:
+ frr_cfg.modify_section(f'^interface {interface}$', '')
+
frr_cfg.add_before(r'(ip prefix-list .*|route-map .*|line vty)', ospf['new_frr_config'])
frr_cfg.commit_configuration(frr_daemon)
diff --git a/src/conf_mode/protocols_static.py b/src/conf_mode/protocols_static.py
index 5d101b33e..51b4acfc8 100755
--- a/src/conf_mode/protocols_static.py
+++ b/src/conf_mode/protocols_static.py
@@ -17,6 +17,7 @@
import os
from sys import exit
+from sys import argv
from vyos.config import Config
from vyos.template import render_to_string
@@ -34,8 +35,19 @@ def get_config(config=None):
conf = config
else:
conf = Config()
- base = ['protocols', 'static']
+
+ vrf = None
+ if len(argv) > 1:
+ vrf = argv[1]
+
+ base_path = ['protocols', 'static']
+ # eqivalent of the C foo ? 'a' : 'b' statement
+ base = vrf and ['vrf', 'name', vrf, 'protocols', 'static'] or base_path
static = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True)
+
+ # Assign the name of our VRF context
+ if vrf: static['vrf'] = vrf
+
return static
def verify(static):
@@ -50,8 +62,14 @@ def apply(static):
# Save original configuration prior to starting any commit actions
frr_cfg = frr.FRRConfig()
frr_cfg.load_configuration(frr_daemon)
- frr_cfg.modify_section(r'^ip route .*', '')
- frr_cfg.modify_section(r'^ipv6 route .*', '')
+
+ if 'vrf' in static:
+ vrf = static['vrf']
+ frr_cfg.modify_section(f'^vrf {vrf}$', '')
+ else:
+ frr_cfg.modify_section(r'^ip route .*', '')
+ frr_cfg.modify_section(r'^ipv6 route .*', '')
+
frr_cfg.add_before(r'(interface .*|line vty)', static['new_frr_config'])
frr_cfg.commit_configuration(frr_daemon)
diff --git a/src/conf_mode/protocols_vrf.py b/src/conf_mode/protocols_vrf.py
deleted file mode 100755
index 227e7d5e1..000000000
--- a/src/conf_mode/protocols_vrf.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2021 VyOS maintainers and contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 or later as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import os
-
-from sys import exit
-
-from vyos.config import Config
-from vyos.template import render_to_string
-from vyos.util import call
-from vyos import ConfigError
-from vyos import frr
-from vyos import airbag
-airbag.enable()
-
-frr_daemon = 'staticd'
-
-def get_config(config=None):
- if config:
- conf = config
- else:
- conf = Config()
- base = ['protocols', 'vrf']
- vrf = conf.get_config_dict(base, key_mangling=('-', '_'))
- return vrf
-
-def verify(vrf):
-
- return None
-
-def generate(vrf):
- vrf['new_frr_config'] = render_to_string('frr/vrf.frr.tmpl', vrf)
- return None
-
-def apply(vrf):
- # Save original configuration prior to starting any commit actions
- frr_cfg = frr.FRRConfig()
- frr_cfg.load_configuration(frr_daemon)
- frr_cfg.modify_section(r'vrf \S+', '')
- frr_cfg.add_before(r'(ip prefix-list .*|route-map .*|line vty)', vrf['new_frr_config'])
- frr_cfg.commit_configuration(frr_daemon)
-
- # If FRR config is blank, rerun the blank commit x times due to frr-reload
- # behavior/bug not properly clearing out on one commit.
- if vrf['new_frr_config'] == '':
- for a in range(5):
- frr_cfg.commit_configuration(frr_daemon)
-
- return None
-
-if __name__ == '__main__':
- try:
- c = get_config()
- verify(c)
- generate(c)
- apply(c)
- except ConfigError as e:
- print(e)
- exit(1)
diff --git a/src/conf_mode/service_console-server.py b/src/conf_mode/service_console-server.py
index 6e94a19ae..51050e702 100755
--- a/src/conf_mode/service_console-server.py
+++ b/src/conf_mode/service_console-server.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2018-2020 VyOS maintainers and contributors
+# Copyright (C) 2018-2021 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -17,6 +17,7 @@
import os
from sys import exit
+from psutil import process_iter
from vyos.config import Config
from vyos.configdict import dict_merge
@@ -60,14 +61,19 @@ def verify(proxy):
if not proxy:
return None
+ processes = process_iter(['name', 'cmdline'])
if 'device' in proxy:
- for device in proxy['device']:
- if 'speed' not in proxy['device'][device]:
- raise ConfigError(f'Serial port speed must be defined for "{device}"!')
+ for device, device_config in proxy['device'].items():
+ for process in processes:
+ if 'agetty' in process.name() and device in process.cmdline():
+ raise ConfigError(f'Port "{device}" already provides a '\
+ 'console used by "system console"!')
+
+ if 'speed' not in device_config:
+ raise ConfigError(f'Port "{device}" requires speed to be set!')
- if 'ssh' in proxy['device'][device]:
- if 'port' not in proxy['device'][device]['ssh']:
- raise ConfigError(f'SSH port must be defined for "{device}"!')
+ if 'ssh' in device_config and 'port' not in device_config['ssh']:
+ raise ConfigError(f'Port "{device}" requires SSH port to be set!')
return None
@@ -77,13 +83,13 @@ def generate(proxy):
render(config_file, 'conserver/conserver.conf.tmpl', proxy)
if 'device' in proxy:
- for device in proxy['device']:
- if 'ssh' not in proxy['device'][device]:
+ for device, device_config in proxy['device'].items():
+ if 'ssh' not in device_config:
continue
tmp = {
'device' : device,
- 'port' : proxy['device'][device]['ssh']['port'],
+ 'port' : device_config['ssh']['port'],
}
render(dropbear_systemd_file.format(**tmp),
'conserver/dropbear@.service.tmpl', tmp)
@@ -102,10 +108,10 @@ def apply(proxy):
call('systemctl restart conserver-server.service')
if 'device' in proxy:
- for device in proxy['device']:
- if 'ssh' not in proxy['device'][device]:
+ for device, device_config in proxy['device'].items():
+ if 'ssh' not in device_config:
continue
- port = proxy['device'][device]['ssh']['port']
+ port = device_config['ssh']['port']
call(f'systemctl restart dropbear@{port}.service')
return None
diff --git a/src/migration-scripts/vrf/1-to-2 b/src/migration-scripts/vrf/1-to-2
new file mode 100755
index 000000000..20128e957
--- /dev/null
+++ b/src/migration-scripts/vrf/1-to-2
@@ -0,0 +1,61 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2021 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# - T3344: migrate routing options from "protocols vrf" to "vrf <name> protocols"
+
+from sys import argv
+from sys import exit
+from vyos.configtree import ConfigTree
+
+if (len(argv) < 2):
+ print("Must specify file name!")
+ exit(1)
+
+file_name = argv[1]
+
+with open(file_name, 'r') as f:
+ config_file = f.read()
+
+base = ['protocols', 'vrf']
+config = ConfigTree(config_file)
+
+if not config.exists(base):
+ # Nothing to do
+ exit(0)
+
+vrf_base = ['vrf', 'name']
+config.set(vrf_base)
+config.set_tag(vrf_base)
+
+# Copy all existing static routes to the new base node under "vrf name <name> protocols static"
+for vrf in config.list_nodes(base):
+ static_base = base + [vrf, 'static']
+ if not config.exists(static_base):
+ continue
+
+ new_static_base = vrf_base + [vrf, 'protocols']
+ config.set(new_static_base)
+ config.copy(static_base, new_static_base + ['static'])
+
+# Now delete the old configuration
+config.delete(base)
+
+try:
+ with open(file_name, 'w') as f:
+ f.write(config.to_string())
+except OSError as e:
+ print("Failed to save the modified config: {}".format(e))
+ exit(1)
diff --git a/src/op_mode/ppp-server-ctrl.py b/src/op_mode/ppp-server-ctrl.py
index 171107b4a..8a4e846b2 100755
--- a/src/op_mode/ppp-server-ctrl.py
+++ b/src/op_mode/ppp-server-ctrl.py
@@ -59,7 +59,10 @@ def main():
output, err = popen(cmd_dict['cmd_base'].format(cmd_dict['vpn_types'][args.proto]) + args.action + ses_pattern, stderr=DEVNULL, decode='utf-8')
if not err:
- print(output)
+ try:
+ print(output)
+ except BrokenPipeError:
+ sys.exit(0)
else:
print("{} server is not running".format(args.proto))
diff --git a/src/op_mode/show_nat66_rules.py b/src/op_mode/show_nat66_rules.py
new file mode 100755
index 000000000..cbab2d03b
--- /dev/null
+++ b/src/op_mode/show_nat66_rules.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2021 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import jmespath
+import json
+
+from argparse import ArgumentParser
+from jinja2 import Template
+from sys import exit
+from vyos.util import cmd
+from vyos.util import dict_search
+
+parser = ArgumentParser()
+group = parser.add_mutually_exclusive_group()
+group.add_argument("--source", help="Show statistics for configured source NAT rules", action="store_true")
+group.add_argument("--destination", help="Show statistics for configured destination NAT rules", action="store_true")
+args = parser.parse_args()
+
+if args.source or args.destination:
+ tmp = cmd('sudo nft -j list table ip6 nat')
+ tmp = json.loads(tmp)
+
+ format_nat66_rule = '%-10s %-50s %-50s %-10s'
+ print(format_nat66_rule % ("Rule", "Source" if args.source else "Destination", "Translation", "Outbound Interface" if args.source else "Inbound Interface"))
+ print(format_nat66_rule % ("----", "------" if args.source else "-----------", "-----------", "------------------" if args.source else "-----------------"))
+
+ data_json = jmespath.search('nftables[?rule].rule[?chain]', tmp)
+ for idx in range(0, len(data_json)):
+ data = data_json[idx]
+ comment = data['comment']
+ chain = data['chain']
+ if not (args.source and chain == 'POSTROUTING') or (not args.source and chain == 'PREROUTING'):
+ exit(0)
+ interface = dict_search('match.right', data['expr'][0])
+ srcdest = dict_search('match.right.prefix.addr', data['expr'][2])
+ if srcdest:
+ addr_tmp = dict_search('match.right.prefix.len', data['expr'][2])
+ if addr_tmp:
+ srcdest = srcdest + '/' + str(addr_tmp)
+ else:
+ srcdest = dict_search('match.right', data['expr'][2])
+ tran_addr = dict_search('snat.addr.prefix.addr' if args.source else 'dnat.addr.prefix.addr', data['expr'][3])
+ if tran_addr:
+ addr_tmp = dict_search('snat.addr.prefix.len' if args.source else 'dnat.addr.prefix.len', data['expr'][3])
+ if addr_tmp:
+ srcdest = srcdest + '/' + str(addr_tmp)
+ else:
+ if 'masquerade' in data['expr'][3]:
+ tran_addr = 'masquerade'
+ elif 'log' in data['expr'][3]:
+ continue
+ else:
+ tran_addr = dict_search('snat.addr' if args.source else 'dnat.addr', data['expr'][3])
+
+ print(format_nat66_rule % (comment, srcdest, tran_addr, interface))
+
+ exit(0)
+else:
+ parser.print_help()
+ exit(1)
+
diff --git a/src/op_mode/show_nat66_statistics.py b/src/op_mode/show_nat66_statistics.py
new file mode 100755
index 000000000..0f0b05978
--- /dev/null
+++ b/src/op_mode/show_nat66_statistics.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2018 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import jmespath
+import json
+
+from argparse import ArgumentParser
+from jinja2 import Template
+from sys import exit
+from vyos.util import cmd
+
+OUT_TMPL_SRC="""
+rule pkts bytes interface
+---- ---- ----- ---------
+{% for r in output %}
+{% if r.comment %}
+{% set packets = r.counter.packets %}
+{% set bytes = r.counter.bytes %}
+{% set interface = r.interface %}
+{# remove rule comment prefix #}
+{% set comment = r.comment | replace('SRC-NAT-', '') | replace('DST-NAT-', '') | replace(' tcp_udp', '') %}
+{{ "%-4s" | format(comment) }} {{ "%9s" | format(packets) }} {{ "%12s" | format(bytes) }} {{ interface }}
+{% endif %}
+{% endfor %}
+"""
+
+parser = ArgumentParser()
+group = parser.add_mutually_exclusive_group()
+group.add_argument("--source", help="Show statistics for configured source NAT rules", action="store_true")
+group.add_argument("--destination", help="Show statistics for configured destination NAT rules", action="store_true")
+args = parser.parse_args()
+
+if args.source or args.destination:
+ tmp = cmd('sudo nft -j list table ip6 nat')
+ tmp = json.loads(tmp)
+
+ source = r"nftables[?rule.chain=='POSTROUTING'].rule.{chain: chain, handle: handle, comment: comment, counter: expr[].counter | [0], interface: expr[].match.right | [0] }"
+ destination = r"nftables[?rule.chain=='PREROUTING'].rule.{chain: chain, handle: handle, comment: comment, counter: expr[].counter | [0], interface: expr[].match.right | [0] }"
+ data = {
+ 'output' : jmespath.search(source if args.source else destination, tmp),
+ 'direction' : 'source' if args.source else 'destination'
+ }
+
+ tmpl = Template(OUT_TMPL_SRC, lstrip_blocks=True)
+ print(tmpl.render(data))
+ exit(0)
+else:
+ parser.print_help()
+ exit(1)
+
diff --git a/src/op_mode/show_nat66_translations.py b/src/op_mode/show_nat66_translations.py
new file mode 100755
index 000000000..045d64065
--- /dev/null
+++ b/src/op_mode/show_nat66_translations.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2020 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+'''
+show nat translations
+'''
+
+import os
+import sys
+import ipaddress
+import argparse
+import xmltodict
+
+from vyos.util import popen
+from vyos.util import DEVNULL
+
+conntrack = '/usr/sbin/conntrack'
+
+verbose_format = "%-20s %-18s %-20s %-18s"
+normal_format = "%-20s %-20s %-4s %-8s %s"
+
+
+def headers(verbose, pipe):
+ if verbose:
+ return verbose_format % ('Pre-NAT src', 'Pre-NAT dst', 'Post-NAT src', 'Post-NAT dst')
+ return normal_format % ('Pre-NAT', 'Post-NAT', 'Prot', 'Timeout', 'Type' if pipe else '')
+
+
+def command(srcdest, proto, ipaddr):
+ command = f'{conntrack} -o xml -L -f ipv6'
+
+ if proto:
+ command += f' -p {proto}'
+
+ if srcdest == 'source':
+ command += ' -n'
+ if ipaddr:
+ command += f' --orig-src {ipaddr}'
+ if srcdest == 'destination':
+ command += ' -g'
+ if ipaddr:
+ command += f' --orig-dst {ipaddr}'
+
+ return command
+
+
+def run(command):
+ xml, code = popen(command,stderr=DEVNULL)
+ if code:
+ sys.exit('conntrack failed')
+ return xml
+
+
+def content(xmlfile):
+ xml = ''
+ with open(xmlfile,'r') as r:
+ xml += r.read()
+ return xml
+
+
+def pipe():
+ xml = ''
+ while True:
+ line = sys.stdin.readline()
+ xml += line
+ if '</conntrack>' in line:
+ break
+
+ sys.stdin = open('/dev/tty')
+ return xml
+
+
+def process(data, stats, protocol, pipe, verbose, flowtype=''):
+ if not data:
+ return
+
+ parsed = xmltodict.parse(data)
+
+ print(headers(verbose, pipe))
+
+ # to help the linter to detect typos
+ ORIGINAL = 'original'
+ REPLY = 'reply'
+ INDEPENDANT = 'independent'
+ SPORT = 'sport'
+ DPORT = 'dport'
+ SRC = 'src'
+ DST = 'dst'
+
+ for rule in parsed['conntrack']['flow']:
+ src, dst, sport, dport, proto = {}, {}, {}, {}, {}
+ packet_count, byte_count = {}, {}
+ timeout, use = 0, 0
+
+ rule_type = rule.get('type', '')
+
+ for meta in rule['meta']:
+ # print(meta)
+ direction = meta['@direction']
+
+ if direction in (ORIGINAL, REPLY):
+ if 'layer3' in meta:
+ l3 = meta['layer3']
+ src[direction] = l3[SRC]
+ dst[direction] = l3[DST]
+
+ if 'layer4' in meta:
+ l4 = meta['layer4']
+ sp = l4.get(SPORT, '')
+ dp = l4.get(DPORT, '')
+ if sp:
+ sport[direction] = sp
+ if dp:
+ dport[direction] = dp
+ proto[direction] = l4.get('@protoname','')
+
+ if stats and 'counters' in meta:
+ packet_count[direction] = meta['packets']
+ byte_count[direction] = meta['bytes']
+ continue
+
+ if direction == INDEPENDANT:
+ timeout = meta['timeout']
+ use = meta['use']
+ continue
+
+ in_src = '%s:%s' % (src[ORIGINAL], sport[ORIGINAL]) if ORIGINAL in sport else src[ORIGINAL]
+ in_dst = '%s:%s' % (dst[ORIGINAL], dport[ORIGINAL]) if ORIGINAL in dport else dst[ORIGINAL]
+
+ # inverted the the perl code !!?
+ out_dst = '%s:%s' % (dst[REPLY], dport[REPLY]) if REPLY in dport else dst[REPLY]
+ out_src = '%s:%s' % (src[REPLY], sport[REPLY]) if REPLY in sport else src[REPLY]
+
+ if flowtype == 'source':
+ v = ORIGINAL in sport and REPLY in dport
+ f = '%s:%s' % (src[ORIGINAL], sport[ORIGINAL]) if v else src[ORIGINAL]
+ t = '%s:%s' % (dst[REPLY], dport[REPLY]) if v else dst[REPLY]
+ else:
+ v = ORIGINAL in dport and REPLY in sport
+ f = '%s:%s' % (dst[ORIGINAL], dport[ORIGINAL]) if v else dst[ORIGINAL]
+ t = '%s:%s' % (src[REPLY], sport[REPLY]) if v else src[REPLY]
+
+ # Thomas: I do not believe proto should be an option
+ p = proto.get('original', '')
+ if protocol and p != protocol:
+ continue
+
+ if verbose:
+ msg = verbose_format % (in_src, in_dst, out_dst, out_src)
+ p = f'{p}: ' if p else ''
+ msg += f'\n {p}{f} ==> {t}'
+ msg += f' timeout: {timeout}' if timeout else ''
+ msg += f' use: {use} ' if use else ''
+ msg += f' type: {rule_type}' if rule_type else ''
+ print(msg)
+ else:
+ print(normal_format % (f, t, p, timeout, rule_type if rule_type else ''))
+
+ if stats:
+ for direction in ('original', 'reply'):
+ if direction in packet_count:
+ print(' %-8s: packets %s, bytes %s' % direction, packet_count[direction], byte_count[direction])
+
+
+def main():
+ parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
+ parser.add_argument('--verbose', help='provide more details about the flows', action='store_true')
+ parser.add_argument('--proto', help='filter by protocol', default='', type=str)
+ parser.add_argument('--file', help='read the conntrack xml from a file', type=str)
+ parser.add_argument('--stats', help='add usage statistics', action='store_true')
+ parser.add_argument('--type', help='NAT type (source, destination)', required=True, type=str)
+ parser.add_argument('--ipaddr', help='source ip address to filter on', type=ipaddress.ip_address)
+ parser.add_argument('--pipe', help='read conntrack xml data from stdin', action='store_true')
+
+ arg = parser.parse_args()
+
+ if arg.type not in ('source', 'destination'):
+ sys.exit('Unknown NAT type!')
+
+ if arg.pipe:
+ process(pipe(), arg.stats, arg.proto, arg.pipe, arg.verbose, arg.type)
+ elif arg.file:
+ process(content(arg.file), arg.stats, arg.proto, arg.pipe, arg.verbose, arg.type)
+ else:
+ try:
+ process(run(command(arg.type, arg.proto, arg.ipaddr)), arg.stats, arg.proto, arg.pipe, arg.verbose, arg.type)
+ except:
+ pass
+
+if __name__ == '__main__':
+ main()
diff --git a/src/op_mode/show_nat_rules.py b/src/op_mode/show_nat_rules.py
new file mode 100755
index 000000000..0ddb7ddd4
--- /dev/null
+++ b/src/op_mode/show_nat_rules.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2021 VyOS maintainers and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or later as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import jmespath
+import json
+
+from argparse import ArgumentParser
+from jinja2 import Template
+from sys import exit
+from vyos.util import cmd
+from vyos.util import dict_search
+
+parser = ArgumentParser()
+group = parser.add_mutually_exclusive_group()
+group.add_argument("--source", help="Show statistics for configured source NAT rules", action="store_true")
+group.add_argument("--destination", help="Show statistics for configured destination NAT rules", action="store_true")
+args = parser.parse_args()
+
+if args.source or args.destination:
+ tmp = cmd('sudo nft -j list table ip nat')
+ tmp = json.loads(tmp)
+
+ format_nat66_rule = '%-10s %-50s %-50s %-10s'
+ print(format_nat66_rule % ("Rule", "Source" if args.source else "Destination", "Translation", "Outbound Interface" if args.source else "Inbound Interface"))
+ print(format_nat66_rule % ("----", "------" if args.source else "-----------", "-----------", "------------------" if args.source else "-----------------"))
+
+ data_json = jmespath.search('nftables[?rule].rule[?chain]', tmp)
+ for idx in range(0, len(data_json)):
+ data = data_json[idx]
+ comment = data['comment']
+ chain = data['chain']
+ if not (args.source and chain == 'POSTROUTING') or (not args.source and chain == 'PREROUTING'):
+ exit(0)
+ interface = dict_search('match.right', data['expr'][0])
+ srcdest = dict_search('match.right.prefix.addr', data['expr'][1])
+ if srcdest:
+ addr_tmp = dict_search('match.right.prefix.len', data['expr'][1])
+ if addr_tmp:
+ srcdest = srcdest + '/' + str(addr_tmp)
+ else:
+ srcdest = dict_search('match.right', data['expr'][1])
+ tran_addr = dict_search('snat.addr.prefix.addr' if args.source else 'dnat.addr.prefix.addr', data['expr'][3])
+ if tran_addr:
+ addr_tmp = dict_search('snat.addr.prefix.len' if args.source else 'dnat.addr.prefix.len', data['expr'][3])
+ if addr_tmp:
+ srcdest = srcdest + '/' + str(addr_tmp)
+ else:
+ if 'masquerade' in data['expr'][3]:
+ tran_addr = 'masquerade'
+ elif 'log' in data['expr'][3]:
+ continue
+ else:
+ tran_addr = dict_search('snat.addr' if args.source else 'dnat.addr', data['expr'][3])
+
+ print(format_nat66_rule % (comment, srcdest, tran_addr, interface))
+
+ exit(0)
+else:
+ parser.print_help()
+ exit(1)
+
diff --git a/src/op_mode/show_nat_statistics.py b/src/op_mode/show_nat_statistics.py
index 482993d06..c568c8305 100755
--- a/src/op_mode/show_nat_statistics.py
+++ b/src/op_mode/show_nat_statistics.py
@@ -44,7 +44,7 @@ group.add_argument("--destination", help="Show statistics for configured destina
args = parser.parse_args()
if args.source or args.destination:
- tmp = cmd('sudo nft -j list table nat')
+ tmp = cmd('sudo nft -j list table ip nat')
tmp = json.loads(tmp)
source = r"nftables[?rule.chain=='POSTROUTING'].rule.{chain: chain, handle: handle, comment: comment, counter: expr[].counter | [0], interface: expr[].match.right | [0] }"