mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 00:01:55 +00:00
ec63000a62
Both xm and xl config have long supported specifying vif rate limiting, e.g. vif = [ 'mac=00:16:3E:74:3d:76,bridge=br0,rate=10MB/s' ] Add support for mapping rate to and from <bandwidth> in the xenconfig 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 a unit test to check the conversion logic. Signed-off-by: Jim Fehlig <jfehlig@suse.com>