qapi: rename 'special_features' to 'features'

This updates the QAPI code generation to refer to 'features' instead
of 'special_features', in preparation for generalizing their exposure.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250205123550.2754387-4-berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Imports tidied up with isort]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2025-02-05 12:35:49 +00:00 committed by Markus Armbruster
parent 696ae1ac91
commit ba27dccc04
4 changed files with 18 additions and 26 deletions

View file

@ -41,10 +41,10 @@ from .schema import (
from .source import QAPISourceInfo
def gen_special_features(features: Sequence[QAPISchemaFeature]) -> str:
special_features = [f"1u << {c_enum_const('qapi', feat.name)}"
for feat in features if feat.is_special()]
return ' | '.join(special_features) or '0'
def gen_features(features: Sequence[QAPISchemaFeature]) -> str:
featenum = [f"1u << {c_enum_const('qapi', feat.name)}"
for feat in features if feat.is_special()]
return ' | '.join(featenum) or '0'
class QAPIGen: