mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 07:35:47 +00:00
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 <armbru@redhat.com> Message-Id: <20200317115459.31821-26-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Doc typo fixed]
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user