Skip to content

Commit

Permalink
Merge pull request #4290 from jestabro/wildcard-transclude
Browse files Browse the repository at this point in the history
xml: T7029: allow wildcard in include directive
  • Loading branch information
dmbaturin authored Jan 8, 2025
2 parents 7bf02bf + 7dfaf94 commit 4ca6177
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 50 deletions.
50 changes: 1 addition & 49 deletions interface-definitions/xml-component-version.xml.in
Original file line number Diff line number Diff line change
@@ -1,52 +1,4 @@
<?xml version="1.0"?>
<interfaceDefinition>
#include <include/version/bgp-version.xml.i>
#include <include/version/broadcast-relay-version.xml.i>
#include <include/version/cluster-version.xml.i>
#include <include/version/config-management-version.xml.i>
#include <include/version/conntrack-sync-version.xml.i>
#include <include/version/conntrack-version.xml.i>
#include <include/version/container-version.xml.i>
#include <include/version/dhcp-relay-version.xml.i>
#include <include/version/dhcp-server-version.xml.i>
#include <include/version/dhcpv6-server-version.xml.i>
#include <include/version/dns-dynamic-version.xml.i>
#include <include/version/dns-forwarding-version.xml.i>
#include <include/version/firewall-version.xml.i>
#include <include/version/flow-accounting-version.xml.i>
#include <include/version/https-version.xml.i>
#include <include/version/interfaces-version.xml.i>
#include <include/version/ids-version.xml.i>
#include <include/version/ipoe-server-version.xml.i>
#include <include/version/ipsec-version.xml.i>
#include <include/version/openvpn-version.xml.i>
#include <include/version/isis-version.xml.i>
#include <include/version/l2tp-version.xml.i>
#include <include/version/lldp-version.xml.i>
#include <include/version/mdns-version.xml.i>
#include <include/version/monitoring-version.xml.i>
#include <include/version/nat66-version.xml.i>
#include <include/version/nat-version.xml.i>
#include <include/version/ntp-version.xml.i>
#include <include/version/openconnect-version.xml.i>
#include <include/version/ospf-version.xml.i>
#include <include/version/pim-version.xml.i>
#include <include/version/policy-version.xml.i>
#include <include/version/pppoe-server-version.xml.i>
#include <include/version/pptp-version.xml.i>
#include <include/version/qos-version.xml.i>
#include <include/version/quagga-version.xml.i>
#include <include/version/rip-version.xml.i>
#include <include/version/rpki-version.xml.i>
#include <include/version/salt-version.xml.i>
#include <include/version/snmp-version.xml.i>
#include <include/version/ssh-version.xml.i>
#include <include/version/sstp-version.xml.i>
#include <include/version/system-version.xml.i>
#include <include/version/vrf-version.xml.i>
#include <include/version/vrrp-version.xml.i>
#include <include/version/vyos-accel-ppp-version.xml.i>
#include <include/version/wanloadbalance-version.xml.i>
#include <include/version/webproxy-version.xml.i>
#include <include/version/reverseproxy-version.xml.i>
#include <include/version/*>
</interfaceDefinition>
5 changes: 4 additions & 1 deletion scripts/transclude-template
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import os
import re
import sys
import glob

regexp = re.compile(r'^ *#include <(.+)>$')

Expand All @@ -34,7 +35,9 @@ def parse_file(filename):
if line:
result = regexp.match(line)
if result:
lines += parse_file(os.path.join(directory, result.group(1)))
res = os.path.join(directory, result.group(1))
for g in sorted(glob.glob(res)):
lines += parse_file(g)
else:
lines += line
else:
Expand Down

0 comments on commit 4ca6177

Please sign in to comment.