diff options
author | Laine Stump <laine@laine.org> | 2010-11-17 13:36:19 -0500 |
---|---|---|
committer | Laine Stump <laine@laine.org> | 2010-12-23 15:53:55 -0500 |
commit | a950dd2a312b7263e221927f99f1e0e3f15eccc9 (patch) | |
tree | 9c04928588c19e8308d276ce591e9a4d2b24ac62 /tests/networkxml2xmlin | |
parent | make the <dhcp> element optional in network.rng (diff) | |
download | libvirt-a950dd2a312b7263e221927f99f1e0e3f15eccc9.tar.gz libvirt-a950dd2a312b7263e221927f99f1e0e3f15eccc9.tar.bz2 libvirt-a950dd2a312b7263e221927f99f1e0e3f15eccc9.zip |
Change virtual network XML parsing/formatting to support IPv6
This commit adds support for IPv6 parsing and formatting to the
virtual network XML parser, including moving around data definitions
to allow for multiple <ip> elements on a single network, but only
changes the consumers of this API to accommodate for the changes in
API/structure, not to add any actual IPv6 functionality. That will
come in a later patch - this patch attempts to maintain the same final
functionality in both drivers that use the network XML parser - vbox
and "bridge" (the Linux bridge-based driver used by the qemu
hypervisor driver).
* src/libvirt_private.syms: Add new private API functions.
* src/conf/network_conf.[ch]: Change C data structure and
parsing/formatting.
* src/network/bridge_driver.c: Update to use new parser/formatter.
* src/vbox/vbox_tmpl.c: update to use new parser/formatter
* docs/schemas/network.rng: changes to the schema -
* there can now be more than one <ip> element.
* ip address is now an ip-addr (ipv4 or ipv6) rather than ipv4-addr
* new optional "prefix" attribute that can be used in place of "netmask"
* new optional "family" attribute - "ipv4" or "ipv6"
(will default to ipv4)
* define data types for the above
* tests/networkxml2xml(in|out)/nat-network.xml: add multiple <ip> elements
(including IPv6) to a single network definition to verify they are being
correctly parsed and formatted.
Diffstat (limited to 'tests/networkxml2xmlin')
-rw-r--r-- | tests/networkxml2xmlin/nat-network.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/networkxml2xmlin/nat-network.xml b/tests/networkxml2xmlin/nat-network.xml index 93ab18616..23f7fcb1b 100644 --- a/tests/networkxml2xmlin/nat-network.xml +++ b/tests/networkxml2xmlin/nat-network.xml @@ -10,4 +10,12 @@ <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> |