• J
    xenconfig: support vif bandwidth in xm and xl parser and formatter · ec63000a
    Jim Fehlig 提交于
    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: NJim Fehlig <jfehlig@suse.com>
    ec63000a
test-vif-rate.xml 1.9 KB