qapi: expose all schema features to code
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 5 Feb 2025 12:35:50 +0000 (12:35 +0000)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 10 Feb 2025 14:45:04 +0000 (15:45 +0100)
commit2ebb09f34ffff152dda6d2b5d9a2348f3fefc6d3
tree6aa65d06a207844348101396a1923c6d8fad6709
parentba27dccc04f16e143cbf59afec5402198d69be30
qapi: expose all schema features to code

This replaces use of the constants from the QapiSpecialFeatures
enum, with constants from the auto-generate QapiFeatures enum
in qapi-features.h

The 'deprecated' and 'unstable' features still have a little bit of
special handling, being force defined to be the 1st + 2nd features
in the enum, regardless of whether they're used in the schema. This
retains compatibility with common code that references the features
via the QapiSpecialFeatures constants.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250205123550.2754387-5-berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Imports tidied up with isort]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
13 files changed:
meson.build
scripts/qapi/commands.py
scripts/qapi/features.py [new file with mode: 0644]
scripts/qapi/gen.py
scripts/qapi/main.py
scripts/qapi/schema.py
scripts/qapi/types.py
scripts/qapi/visit.py
tests/meson.build
tests/qapi-schema/features-too-many.err [new file with mode: 0644]
tests/qapi-schema/features-too-many.json [new file with mode: 0644]
tests/qapi-schema/features-too-many.out [new file with mode: 0644]
tests/qapi-schema/meson.build