Skip to content
Snippets Groups Projects
  • Markus Armbruster's avatar
    91fa93e5
    qapi: Implement deprecated-output=hide for QMP command results · 91fa93e5
    Markus Armbruster authored
    
    This policy suppresses deprecated bits in output, and thus permits
    "testing the future".  Implement it for QMP command results.  Example:
    when QEMU is run with -compat deprecated-output=hide, then
    
        {"execute": "query-cpus-fast"}
    
    yields
    
        {"return": [{"thread-id": 9805, "props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, "target": "x86_64"}]}
    
    instead of
    
        {"return": [{"arch": "x86", "thread-id": 22436, "props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, "target": "x86_64"}]}
    
    Note the suppression of deprecated member "arch".
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20210318155519.1224118-4-armbru@redhat.com>
    91fa93e5
    History
    qapi: Implement deprecated-output=hide for QMP command results
    Markus Armbruster authored
    
    This policy suppresses deprecated bits in output, and thus permits
    "testing the future".  Implement it for QMP command results.  Example:
    when QEMU is run with -compat deprecated-output=hide, then
    
        {"execute": "query-cpus-fast"}
    
    yields
    
        {"return": [{"thread-id": 9805, "props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, "target": "x86_64"}]}
    
    instead of
    
        {"return": [{"arch": "x86", "thread-id": 22436, "props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, "target": "x86_64"}]}
    
    Note the suppression of deprecated member "arch".
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20210318155519.1224118-4-armbru@redhat.com>