The 'command-features' pragma allows for defining additional special features that are unique to a particular QAPI schema instance and its implementation.
Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- scripts/qapi/parser.py | 2 ++ scripts/qapi/source.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 7b13a583ac..36a9046243 100644 --- a/scripts/qapi/parser.py +++ b/scripts/qapi/parser.py @@ -243,6 +243,8 @@ def check_list_str(name: str, value: object) -> List[str]: pragma.documentation_exceptions = check_list_str(name, value) elif name == 'member-name-exceptions': pragma.member_name_exceptions = check_list_str(name, value) + elif name == 'command-features': + pragma.command_features = check_list_str(name, value) else: raise QAPISemError(info, "unknown pragma '%s'" % name) diff --git a/scripts/qapi/source.py b/scripts/qapi/source.py index 7b379fdc92..07c2958ac4 100644 --- a/scripts/qapi/source.py +++ b/scripts/qapi/source.py @@ -28,6 +28,8 @@ def __init__(self) -> None: self.documentation_exceptions: List[str] = [] # Types whose member names may violate case conventions self.member_name_exceptions: List[str] = [] + # Arbitrary extra features recorded against commands + self.command_features: List[str] = [] class QAPISourceInfo: -- 2.45.1