/* create dnsmasq config file appropriate for this network */
- /* Don't forget to update networkxml2xmltest :-) */
+ /* Don't forget to update networkxmlconftest :-) */
virBufferAsprintf(&configbuf,
"##WARNING: THIS IS AN AUTO-GENERATED FILE. "
"CHANGES TO IT ARE LIKELY TO BE\n"
if conf.has('WITH_NETWORK')
tests += [
{ 'name': 'networkxml2firewalltest', 'include': [ network_inc_dir ], 'link_with': [ network_driver_impl ] },
- { 'name': 'networkxml2xmltest', 'include': [ network_inc_dir ], 'link_with': [ network_driver_impl ], },
+ { 'name': 'networkxmlconftest', 'include': [ network_inc_dir ], 'link_with': [ network_driver_impl ], },
]
endif
+++ /dev/null
-<network>
- <name>local</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='route'/>
- <bridge name='virbr1' stp='on' delay='0'/>
- <mac address='12:34:56:78:9A:BC'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- <dhcp>
- <host id='0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63' ip='2001:db8:ac10:fd01::1:20'/>
- <host name='paul' ip='2001:db8:ac10:fd01::1:21'/>
- <host id='0:3:0:1:0:16:3e:11:22:33' name='peter.xyz' ip='2001:db8:ac10:fd01::1:22'/>
- <host id='0:3:0:1:0:16:3e:44:55:33' ip='2001:db8:ac10:fd01::1:23'/>
- <host id='0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66' name='badbob' ip='2001:db8:ac10:fd01::1:24'/>
- </dhcp>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>private</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name='virbr2' stp='on' delay='0'/>
- <mac address='52:54:00:17:3F:37'/>
- <ip address='192.168.152.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.152.2' end='192.168.152.254'/>
- </dhcp>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
- <forward dev='eth0' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <dns>
- <forwarder addr='8.8.8.8'/>
- <forwarder addr='8.8.4.4'/>
- <forwarder domain='example.com' addr='192.168.1.1'/>
- <forwarder domain='example2.com' addr='192.168.2.1' port='1234'/>
- <forwarder domain='www.example.com'/>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
- <forward dev='eth0' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <domain name="example.com"/>
- <dns forwardPlainNames='no'>
- <host ip='192.168.122.1'>
- <hostname>host</hostname>
- <hostname>gateway</hostname>
- </host>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <mtu size='7000'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>netboot</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward mode='nat'/>
- <bridge name='virbr1' stp='off' delay='1'/>
- <domain name='example.com'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <bootp file='pxeboot.img'/>
- </dhcp>
- <tftp root='/var/lib/tftproot'/>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>netboot</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward mode='nat'/>
- <bridge name='virbr1' stp='off' delay='1'/>
- <domain name='example.com'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <bootp file='pxeboot.img' server='10.20.30.40'/>
- </dhcp>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>open</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward mode='open'/>
- <bridge name='virbr1' stp='on' delay='0'/>
- <mac address='12:34:56:78:9A:BC'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>local</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='route'/>
- <bridge name='virbr1' stp='on' delay='0'/>
- <mac address='12:34:56:78:9A:BC'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- <range start='192.168.122.2' end='192.168.122.254'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- <dhcp>
- <range start='2001:db8:ac10:fd01::1:10' end='2001:db8:ac10:fd01::1:ff'/>
- <host id='0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63' ip='2001:db8:ac10:fd01::1:20'/>
- <host name='paul' ip='2001:db8:ac10:fd01::1:21'/>
- <host id='0:3:0:1:0:16:3e:11:22:33' name='peter.xyz' ip='2001:db8:ac10:fd01::1:22'/>
- <host id='0:3:0:1:0:16:3e:44:55:33' ip='2001:db8:ac10:fd01::1:23'/>
- <host id='0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66' name='badbob' ip='2001:db8:ac10:fd01::1:24'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <domain name='mynet'/>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- <dhcp>
- <range start='2001:db8:ac10:fd01::1:10' end='2001:db8:ac10:fd01::1:ff'/>
- <host id='0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63' ip='2001:db8:ac10:fd01::1:20'/>
- <host name='paul' ip='2001:db8:ac10:fd01::1:21'/>
- <host id='0:3:0:1:0:16:3e:11:22:33' name='peter.xyz' ip='2001:db8:ac10:fd01::1:22'/>
- <host id='0:3:0:1:0:16:3e:44:55:33' ip='2001:db8:ac10:fd01::1:23'/>
- <host id='0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66' name='badbob' ip='2001:db8:ac10:fd01::1:24'/>
- </dhcp>
- </ip>
-</network>
+++ /dev/null
-<network xmlns:dnsmasq="http://libvirt.org/schemas/network/dnsmasq/1.0">
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name="virbr0"/>
- <forward mode="nat" dev="eth1"/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
- <dhcp>
- <range start="192.168.122.2" end="192.168.122.254"/>
- </dhcp>
- </ip>
- <dnsmasq:options>
- <dnsmasq:option value="foo=bar"/>
- <dnsmasq:option value="cname=*.cloudapps.example.com,master.example.com"/>
- </dnsmasq:options>
-</network>
+++ /dev/null
-../networkxml2confdata/leasetime-hours.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2confdata/leasetime-infinite.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2confdata/leasetime-minutes.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2confdata/leasetime-seconds.xml
\ No newline at end of file
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
- <forward dev='eth0' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0' />
- <dns forwardPlainNames='yes'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
- <forward mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <dns>
- <forwarder domain='example.com' addr='192.168.1.1'/>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
- <forward dev='eth0' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0' />
- <domain name='example.com' localOnly='yes'/>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'>
- <interface dev='eth1'/>
- </forward>
- <bridge name='virbr0' stp='on' delay='0'/>
- <dns>
- <srv service='name' protocol='tcp'/>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
- </ip>
- <ip family='ipv6' address='fc00:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'>
- <interface dev='eth1'/>
- </forward>
- <bridge name='virbr0' stp='on' delay='0'/>
- <dns>
- <srv service='name' protocol='tcp' domain='test-domain-name' target='.' port='1024' priority='10' weight='10'/>
- <srv service='name2' protocol='udp' target='test2.example.com' port='2222' priority='22' weight='222'/>
- <srv service='name3' protocol='tcp' domain='test3.com' target='test3.example.com' port='3333' priority='33'/>
- <srv service='name4' protocol='tcp' domain='test4.com' target='test4.example.com' port='4444'/>
- <srv service='name5' protocol='udp' target='test5.example.com' priority='55' weight='555'/>
- <srv service='name6' protocol='tcp' domain='test6.com' target='test6.example.com' port='6666' weight='666'/>
- <srv service='name7' protocol='tcp' domain='test7.com' target='test7.example.com' weight='777'/>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <dns>
- <txt name='example' value='example value'/>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-<network>
- <name>default"with"quotes"</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'>
- <interface dev='eth1'/>
- </forward>
- <bridge name='virbr0' stp='on' delay='0'/>
- <dns>
- <srv service='name' protocol='tcp'/>
- </dns>
- <ip address='192.168.122.1' netmask='255.255.255.0'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
- </ip>
- <ip family='ipv6' address='fc00:db8:ac10:fe01::1' prefix='64'>
- </ip>
- <ip family='ipv6' address='fc00:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-../networkxml2confdata/netboot-tftp.xml
\ No newline at end of file
+++ /dev/null
-<network>
- <name>default</name>
- <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <forward dev='eth1' mode='nat'/>
- <bridge name='virbr0' stp='on' delay='0'/>
- <ip address='192.168.122.1' netmask='255.255.255.0' localPtr='yes'>
- <dhcp>
- <range start='192.168.122.2' end='192.168.122.254'/>
- <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
- <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
- </dhcp>
- </ip>
- <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0' localPtr='no'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64' localPtr='yes'>
- </ip>
- <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
- </ip>
- <ip family='ipv4' address='10.24.10.1'>
- </ip>
-</network>
+++ /dev/null
-../networkxml2xmlin/leasetime-hours.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2xmlin/leasetime-infinite.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2xmlin/leasetime-minutes.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2xmlin/leasetime-seconds.xml
\ No newline at end of file
+++ /dev/null
-../networkxml2confdata/netboot-tftp.xml
\ No newline at end of file
g_autofree char *updatexml = NULL;
g_autofree char *outxml = NULL;
- netxml = g_strdup_printf("%s/networkxml2xmlin/%s.xml",
+ netxml = g_strdup_printf("%s/networkxmlconfdata/%s.xml",
abs_srcdir, info->netxml);
updatexml = g_strdup_printf("%s/networkxml2xmlupdatein/%s.xml",
abs_srcdir, info->updatexml);
--- /dev/null
+leasetime-hours.xml
\ No newline at end of file
--- /dev/null
+leasetime-infinite.xml
\ No newline at end of file
--- /dev/null
+leasetime-minutes.xml
\ No newline at end of file
--- /dev/null
+leasetime-seconds.xml
\ No newline at end of file
--- /dev/null
+netboot-tftp.xml
\ No newline at end of file
info->expectResult = expectResult;
info->xmlopt = xmlopt;
info->caps = caps;
- info->inxml = g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcdir, name);
- info->outxml = g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_srcdir, name);
- /* Temporarily use conf files from networkxml2confdata/ */
- info->outconf = g_strdup_printf("%s/networkxml2confdata/%s.conf", abs_srcdir, name);
- info->outhostsfile = g_strdup_printf("%s/networkxml2confdata/%s.hostsfile", abs_srcdir, name);
+ info->inxml = g_strdup_printf("%s/networkxmlconfdata/%s.xml", abs_srcdir, name);
+ info->outxml = g_strdup_printf("%s/networkxmlconfdata/%s.expect.xml", abs_srcdir, name);
+ info->outconf = g_strdup_printf("%s/networkxmlconfdata/%s.conf", abs_srcdir, name);
+ info->outhostsfile = g_strdup_printf("%s/networkxmlconfdata/%s.hostsfile", abs_srcdir, name);
virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLFiles, info);
/* name of the fake network shall be constructed as:
* NETWORKXMLNAME;NETWORKPORTXMLNAME
* where:
- * NETWORKXMLNAME resolves to abs_srcdir/networkxml2xmlin/NETWORKXMLNAME.xml
+ * NETWORKXMLNAME resolves to abs_srcdir/networkxmlconfdata/NETWORKXMLNAME.xml
* NETWORKPORTXMLNAME resolves to abs_srcdir/virnetworkportxml2xmldata/NETWORKPORTXMLNAME.xml
*/
static virNetworkPtr
return NULL;
}
- path = g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netname);
+ path = g_strdup_printf(abs_srcdir "/networkxmlconfdata/%s.xml", netname);
if (!virFileExists(path)) {
virReportError(VIR_ERR_NO_NETWORK, "fake network '%s' not found", path);
*(strchr(netname, ';')) = '\0';
- path = g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netname);
+ path = g_strdup_printf(abs_srcdir "/networkxmlconfdata/%s.xml", netname);
if (virFileReadAll(path, 4 * 1024, &xml) < 0)
return NULL;
static const struct testSchemaEntry schemaNetwork[] = {
{ .dir = "src/network" },
- { .dir = "tests/networkxml2xmlin" },
- { .dir = "tests/networkxml2xmlout" },
- { .dir = "tests/networkxml2confdata" },
+ { .dir = "tests/networkxmlconfdata" },
{ .dir = "examples/xml/test/",
.dirRegex = "testnet.*" },
{ .dir = "tests/networkxml2xmlupdateout" },