1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00
libvirt/tests/xml2sexprdata
Jim Fehlig 1dd34bbb4b xenconfig: support vif bandwidth in sexpr parser and formatter
The xen sexpr config format has long supported specifying vif rate
limiting, e.g.

  (device
    (vif
      (mac '00:16:3e:1b:b1:47')
      (rate '10240KB/s')
      ...
    )
  )

Add support for mapping rate to and from <bandwidth> in the xenconfig
sexpr parser and formatter. rate is mapped to the required 'average'
attribute of the <outbound> element, e.g.

  <interface type='bridge'>
    ...
    <bandwidth>
      <outbound average='10240'/>
    </bandwidth>
  </interface>

Also add unit tests to check the conversion logic.

This patch benefits both the old xen driver and the libxl driver.
Both drivers gain support for vif bandwidth when converting to/from
domXML and xen-sxpr. In addition, the old xen driver will now be
able to handle vif 'rate' setting when communicating with xend.
2016-01-08 18:56:00 -07:00
..
xml2sexpr-boot-grub.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-boot-grub.xml
xml2sexpr-bridge-ipaddr.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-bridge-ipaddr.xml
xml2sexpr-curmem.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-curmem.xml
xml2sexpr-disk-block-shareable.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-block-shareable.xml
xml2sexpr-disk-block.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-block.xml
xml2sexpr-disk-drv-blkback.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-blkback.xml
xml2sexpr-disk-drv-blktap2-raw.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-blktap2-raw.xml
xml2sexpr-disk-drv-blktap2.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-blktap2.xml
xml2sexpr-disk-drv-blktap-qcow.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-blktap-qcow.xml
xml2sexpr-disk-drv-blktap-raw.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-blktap-raw.xml
xml2sexpr-disk-drv-blktap.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-blktap.xml
xml2sexpr-disk-drv-loop.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-drv-loop.xml
xml2sexpr-disk-file.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-disk-file.xml
xml2sexpr-escape.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-escape.xml
xml2sexpr-fv-force-hpet.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-force-hpet.xml
xml2sexpr-fv-force-nohpet.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-force-nohpet.xml
xml2sexpr-fv-kernel.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-kernel.xml
xml2sexpr-fv-localtime.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-localtime.xml
xml2sexpr-fv-net-netfront.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-net-netfront.xml
xml2sexpr-fv-net-rate.sexpr xenconfig: support vif bandwidth in sexpr parser and formatter 2016-01-08 18:56:00 -07:00
xml2sexpr-fv-net-rate.xml xenconfig: support vif bandwidth in sexpr parser and formatter 2016-01-08 18:56:00 -07:00
xml2sexpr-fv-parallel-tcp.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-parallel-tcp.xml
xml2sexpr-fv-serial-dev-2-ports.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-dev-2-ports.xml
xml2sexpr-fv-serial-dev-2nd-port.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-dev-2nd-port.xml
xml2sexpr-fv-serial-file.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-file.xml
xml2sexpr-fv-serial-null.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-null.xml
xml2sexpr-fv-serial-pipe.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-pipe.xml
xml2sexpr-fv-serial-pty.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-pty.xml
xml2sexpr-fv-serial-stdio.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-stdio.xml
xml2sexpr-fv-serial-tcp-telnet.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-tcp-telnet.xml
xml2sexpr-fv-serial-tcp.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-tcp.xml
xml2sexpr-fv-serial-udp.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-udp.xml
xml2sexpr-fv-serial-unix.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-serial-unix.xml
xml2sexpr-fv-sound.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-sound.xml
xml2sexpr-fv-usbmouse.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-usbmouse.xml
xml2sexpr-fv-usbtablet.sexpr
xml2sexpr-fv-usbtablet.xml
xml2sexpr-fv-utc.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-utc.xml
xml2sexpr-fv-v2.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-vncunused.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv-vncunused.xml
xml2sexpr-fv.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv.xml
xml2sexpr-net-bridged.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-net-bridged.xml
xml2sexpr-net-e1000.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-net-e1000.xml
xml2sexpr-net-routed.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-net-routed.xml
xml2sexpr-no-source-cdrom.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-no-source-cdrom.xml
xml2sexpr-pci-devs.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pci-devs.xml
xml2sexpr-pv-bootloader-cmdline.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv-bootloader-cmdline.xml
xml2sexpr-pv-bootloader.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv-bootloader.xml
xml2sexpr-pv-localtime.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv-localtime.xml
xml2sexpr-pv-vcpus.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv-vcpus.xml
xml2sexpr-pv-vfb-new-auto.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv-vfb-new-auto.xml
xml2sexpr-pv-vfb-new.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv-vfb-new.xml
xml2sexpr-pv.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv.xml