|
@@ -921,7 +921,8 @@ def check_exprs(exprs):
|
|
|
elif 'command' in expr:
|
|
|
meta = 'command'
|
|
|
check_keys(expr_elem, 'command', [],
|
|
|
- ['data', 'returns', 'gen', 'success-response', 'boxed'])
|
|
|
+ ['data', 'returns', 'gen', 'success-response',
|
|
|
+ 'boxed', 'allow-oob'])
|
|
|
elif 'event' in expr:
|
|
|
meta = 'event'
|
|
|
check_keys(expr_elem, 'event', [], ['data', 'boxed'])
|
|
@@ -1044,7 +1045,7 @@ def visit_alternate_type(self, name, info, variants):
|
|
|
pass
|
|
|
|
|
|
def visit_command(self, name, info, arg_type, ret_type,
|
|
|
- gen, success_response, boxed):
|
|
|
+ gen, success_response, boxed, allow_oob):
|
|
|
pass
|
|
|
|
|
|
def visit_event(self, name, info, arg_type, boxed):
|
|
@@ -1421,7 +1422,7 @@ def is_empty(self):
|
|
|
|
|
|
class QAPISchemaCommand(QAPISchemaEntity):
|
|
|
def __init__(self, name, info, doc, arg_type, ret_type,
|
|
|
- gen, success_response, boxed):
|
|
|
+ gen, success_response, boxed, allow_oob):
|
|
|
QAPISchemaEntity.__init__(self, name, info, doc)
|
|
|
assert not arg_type or isinstance(arg_type, str)
|
|
|
assert not ret_type or isinstance(ret_type, str)
|
|
@@ -1432,6 +1433,7 @@ def __init__(self, name, info, doc, arg_type, ret_type,
|
|
|
self.gen = gen
|
|
|
self.success_response = success_response
|
|
|
self.boxed = boxed
|
|
|
+ self.allow_oob = allow_oob
|
|
|
|
|
|
def check(self, schema):
|
|
|
if self._arg_type_name:
|
|
@@ -1455,7 +1457,8 @@ def check(self, schema):
|
|
|
def visit(self, visitor):
|
|
|
visitor.visit_command(self.name, self.info,
|
|
|
self.arg_type, self.ret_type,
|
|
|
- self.gen, self.success_response, self.boxed)
|
|
|
+ self.gen, self.success_response,
|
|
|
+ self.boxed, self.allow_oob)
|
|
|
|
|
|
|
|
|
class QAPISchemaEvent(QAPISchemaEntity):
|
|
@@ -1674,6 +1677,7 @@ def _def_command(self, expr, info, doc):
|
|
|
gen = expr.get('gen', True)
|
|
|
success_response = expr.get('success-response', True)
|
|
|
boxed = expr.get('boxed', False)
|
|
|
+ allow_oob = expr.get('allow-oob', False)
|
|
|
if isinstance(data, OrderedDict):
|
|
|
data = self._make_implicit_object_type(
|
|
|
name, info, doc, 'arg', self._make_members(data, info))
|
|
@@ -1681,7 +1685,8 @@ def _def_command(self, expr, info, doc):
|
|
|
assert len(rets) == 1
|
|
|
rets = self._make_array_type(rets[0], info)
|
|
|
self._def_entity(QAPISchemaCommand(name, info, doc, data, rets,
|
|
|
- gen, success_response, boxed))
|
|
|
+ gen, success_response,
|
|
|
+ boxed, allow_oob))
|
|
|
|
|
|
def _def_event(self, expr, info, doc):
|
|
|
name = expr['event']
|