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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
xml2sexpr-curmem.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-curmem.xml xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
xml2sexpr-escape.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-escape.xml xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
xml2sexpr-fv-usbtablet.sexpr Xen: Fix <clock> handling 2012-04-02 09:33:54 -06:00
xml2sexpr-fv-usbtablet.xml xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
xml2sexpr-fv.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-fv.xml xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
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 xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00
xml2sexpr-pv.sexpr Xen: tests: use latest XEND_CONFIG_VERSION in xml2sexpr tests 2015-12-17 21:22:34 -07:00
xml2sexpr-pv.xml xml: output memory unit for clarity 2012-03-07 18:24:43 -07:00