From f965e8fea6a915343d160ba6043deb75710d8df1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 17 Mar 2020 12:54:50 +0100 Subject: qapi: New special feature flag "deprecated" Unlike regular feature flags, the new special feature flag "deprecated" is recognized by the QAPI generator. For now, it's only permitted with commands, events, and struct members. It will be put to use shortly. Signed-off-by: Markus Armbruster Message-Id: <20200317115459.31821-26-armbru@redhat.com> Reviewed-by: Eric Blake [Doc typo fixed] --- scripts/qapi/schema.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/qapi') diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index 6ee3677215..78309a00f0 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -193,6 +193,12 @@ class QAPISchemaType(QAPISchemaEntity): return None return self.name + def check(self, schema): + QAPISchemaEntity.check(self, schema) + if 'deprecated' in [f.name for f in self.features]: + raise QAPISemError( + self.info, "feature 'deprecated' is not supported for types") + def describe(self): assert self.meta return "%s type '%s'" % (self.meta, self.name) -- cgit v1.2.3-55-g7522