aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/parser.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-06-20 17:57:36 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-07-02 06:58:27 +0200
commita35f8577a0789fe883047afb13a45ecfae4f0107 (patch)
tree6ac61fc30445c8e37b45af4a779bfc49416e9540 /scripts/qapi/parser.py
parent3e3ead554d99ca02d74be84f3427044cb138c9df (diff)
downloadqemu-a35f8577a0789fe883047afb13a45ecfae4f0107.zip
qemu-a35f8577a0789fe883047afb13a45ecfae4f0107.tar.gz
qemu-a35f8577a0789fe883047afb13a45ecfae4f0107.tar.bz2
include/hw: add macros for deprecation & removal of versioned machines
Versioned machines live for a long time to provide back compat for incoming migration and restore of saved images. To guide users away from usage of old machines, however, we want to deprecate any older than 3 years (equiv of 9 releases), and delete any older than 6 years (equiva of 18 releases). To get a standardized deprecation message and avoid having to remember to manually add it after three years, this introduces two macros to be used by targets when defining versioned machines. * MACHINE_VER_DEPRECATION(major, minor) Automates the task of setting the 'deprecation_reason' field on the machine, if-and-only-if the major/minor version is older than 3 years. * MACHINE_VER_DELETION(major, minor) Simulates the deletion of by skipping registration of the QOM type for a versioned machine, if-and-only-if the major/minor version is older than 6 years. By using these two macros there is no longer any manual work required per-release to deprecate old machines. By preventing the use of machines that have reached their deletion date, it is also not necessary to manually delete machines per-release. Deletion can be batched up once a year or whenever makes most sense. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240620165742.1711389-9-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'scripts/qapi/parser.py')
0 files changed, 0 insertions, 0 deletions