1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00
libvirt/tests/lxcxml2xmldata
Laine Stump 98fa8f3ef6 conf: support host-side IP/route information in <interface>
This is place as a sub-element of <source>, where other aspects of the
host-side connection to the network device are located (network or
bridge name, udp listen port, etc). It's a bit odd that the interface
we're configuring with this info is itself named in <target dev='x'/>,
but that ship sailed long ago:

    <interface type='ethernet'>
      <mac address='00:16:3e:0f:ef:8a'/>
      <source>
        <ip address='192.168.122.12' family='ipv4'
            prefix='24' peer='192.168.122.1'/>
        <ip address='192.168.122.13' family='ipv4' prefix='24'/>
        <route family='ipv4' address='0.0.0.0'
               gateway='192.168.122.1'/>
        <route family='ipv4' address='192.168.124.0' prefix='24'
               gateway='192.168.124.1'/>
      </source>
    </interface>

In practice, this will likely only be useful for type='ethernet', so
its presence in any other type of interface is currently forbidden in
the generic device Validate function (but it's been put into the
general population of virDomainNetDef rather than the
ethernet-specific union member so that 1) we can more easily add the
capability to other types if needed, and 2) we can retain the info
when set to an invalid interface type all the way through to
validation and report a proper error, rather than just ignoring it
(which is currently what happens for many other type-specific
settings).

(NB: The already-existing configuration of IP info for the guest-side
of interfaces is in subelements directly under <interface>, and the
name of the guest-side interface (when configurable) is in <guest
dev='x'/>).

(This patch had been pushed earlier in
commit fe6a77898a, but was reverted in
commit d658456530 because it had been
accidentally pushed during the freeze for release 2.0.0)
2016-07-01 21:13:30 -04:00
..
lxc-capabilities.xml Domain config: write <features/> if some capabilities are set. 2014-07-30 14:21:55 +02:00
lxc-disk-formats.xml Add 'nbd' as a valid filesystem driver type 2013-05-13 13:15:19 +01:00
lxc-ethernet-hostip.xml conf: support host-side IP/route information in <interface> 2016-07-01 21:13:30 -04:00
lxc-ethernet.xml lxc: support <interface type='ethernet'> 2016-05-24 15:21:05 -04:00
lxc-filesystem-ram.xml Allow root directory in filesystem source dir schema 2013-11-07 18:43:15 +01:00
lxc-filesystem-root.xml Allow root directory in filesystem source dir schema 2013-11-07 18:43:15 +01:00
lxc-hostdev.xml Use the network route definitions for domains 2015-01-16 10:14:03 +01:00
lxc-idmap.xml Use the network route definitions for domains 2015-01-16 10:14:03 +01:00
lxc-sharenet.xml lxc: Inherit namespace feature 2015-08-26 11:28:30 +01:00
lxc-systemd.xml virCaps: get rid of emulatorRequired 2013-04-04 22:42:38 +02:00