• K
    qapi-visit.py: Implement 'base' for unions · 0aef92b9
    Kevin Wolf 提交于
    This implements the visitor part of base types for unions. Parsed into
    QMP, this example schema definition...
    
        { 'type': 'BlockOptionsBase', 'data': { 'read-only': 'bool' } }
        { 'type': 'BlockOptionsQcow2, 'data': { 'lazy-refcounts': 'bool' } }
    
        { 'union': 'BlockOptions',
          'base': 'BlockOptionsBase',
          'data': {
              'raw': 'BlockOptionsRaw'
              'qcow2': 'BlockOptionsQcow2'
          } }
    
    ...would describe the following JSON object:
    
        { "type": "qcow2",
          "read-only": true,
          "data": { "lazy-refcounts": false } }
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    0aef92b9
qapi-visit.py 10.2 KB