• K
    qcow2: Use visitor for options in qcow2_create() · b76b4f60
    Kevin Wolf 提交于
    Instead of manually creating the BlockdevCreateOptions object, use a
    visitor to parse the given options into the QAPI object.
    
    This involves translation from the old command line syntax to the syntax
    mandated by the QAPI schema. Option names are still checked against
    qcow2_create_opts, so only the old option names are allowed on the
    command line, even if they are translated in qcow2_create().
    
    In contrast, new option values are optionally recognised besides the old
    values: 'compat' accepts 'v2'/'v3' as an alias for '0.10'/'1.1', and
    'encrypt.format' accepts 'qcow' as an alias for 'aes' now.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NMax Reitz <mreitz@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    b76b4f60
112.out 5.6 KB