Home
last modified time | relevance | path

Searched full:schema (Results 1 – 25 of 90) sorted by relevance

1234

/qemu/scripts/qapi/
H A Dbackend.py10 from .schema import QAPISchema
20 schema: QAPISchema,
27 Generate code for the given schema into the target directory.
29 :param schema: The primary QAPI schema object.
43 schema: QAPISchema,
50 Generate C code for the given schema into the target directory.
52 :param schema_file: The primary QAPI schema file.
60 gen_types(schema, output_dir, prefix, builtins)
61 gen_features(schema, output_dir, prefix)
62 gen_visit(schema, output_dir, prefix, builtins)
[all …]
H A Dfeatures.py14 from .schema import QAPISchema, QAPISchemaFeature
22 ' * Schema-defined QAPI features',
27 def visit_begin(self, schema: QAPISchema) -> None:
28 self.features = schema.features()
43 def gen_features(schema: QAPISchema,
47 schema.visit(vis)
H A Dschema.py3 # QAPI schema internal representation
74 A schema entity.
92 def check(self, schema: QAPISchema) -> None:
100 self, schema: QAPISchema, info: Optional[QAPISourceInfo]
104 self._module = schema.module_by_fname(fname)
107 def set_module(self, schema: QAPISchema) -> None:
108 self._set_module(schema, self.info)
141 def check(self, schema: QAPISchema) -> None:
143 super().check(schema)
168 def visit_begin(self, schema: QAPISchema) -> None:
[all …]
H A Dmain.py7 This is the main entry point for generating C code from the QAPI schema.
18 from .schema import QAPISchema
68 description='Generate code from a QAPI schema')
88 parser.add_argument('schema', action='store')
98 schema = QAPISchema(args.schema)
100 backend.generate(schema,
H A Dexpr.py17 Normalize and validate (context-free) QAPI schema expression structures.
19 `QAPISchemaParser` parses a QAPI schema into abstract syntax trees
24 The QAPI schema expression language allows for certain syntactic sugar;
30 See `schema.QAPISchema` for processing into native Python data
80 :param info: QAPI schema source file information.
103 :param info: QAPI schema source file information.
125 :param info: QAPI schema source file information.
147 :param info: QAPI schema source file information.
168 :param info: QAPI schema source file information.
195 :param info: QAPI schema source file information.
[all …]
H A Dtypes.py20 from .schema import (
285 prefix, 'qapi-types', ' * Schema-defined QAPI types',
316 def visit_begin(self, schema: QAPISchema) -> None:
318 objects_seen.add(schema.the_empty_object_type.name)
382 def gen_types(schema: QAPISchema,
387 schema.visit(vis)
H A Dintrospect.py28 from .schema import (
68 # These types are based on structures defined in QEMU's schema, so we
175 ' * QAPI/QMP schema introspection', __doc__)
188 def visit_begin(self, schema: QAPISchema) -> None:
189 self._schema = schema
389 def gen_introspect(schema: QAPISchema, output_dir: str, prefix: str,
392 schema.visit(vis)
H A Dparser.py3 # QAPI schema parser
39 # TODO: Remove cycle. [schema -> expr -> parser -> schema]
40 from .schema import QAPISchemaFeature, QAPISchemaMember
59 """Error class for all QAPI schema parsing errors."""
72 Parse QAPI schema source.
74 Parse a JSON-esque schema file and process directives. See
75 qapi-code-gen.rst section "Schema Syntax" for the exact syntax.
89 :raise OSError: For problems reading the root schema document.
90 :raise QAPIError: For errors in the schema source.
118 Parse the QAPI schema document.
H A Devents.py19 from .schema import (
181 ' * Schema-defined QAPI/QMP events', None, __doc__)
246 def gen_events(schema: QAPISchema,
250 schema.visit(vis)
/qemu/tests/qtest/
H A Dqmp-cmd-test.c133 static void qmp_schema_init(QmpSchema *schema) in qmp_schema_init() argument
142 resp = qtest_qmp(qts, "{ 'execute': 'query-qmp-schema' }"); in qmp_schema_init()
145 visit_type_SchemaInfoList(qiv, NULL, &schema->list, &error_abort); in qmp_schema_init()
151 schema->hash = g_hash_table_new(g_str_hash, g_str_equal); in qmp_schema_init()
153 /* Build @schema: hash table mapping entity name to SchemaInfo */ in qmp_schema_init()
154 for (tail = schema->list; tail; tail = tail->next) { in qmp_schema_init()
155 g_hash_table_insert(schema->hash, tail->value->name, tail->value); in qmp_schema_init()
159 static SchemaInfo *qmp_schema_lookup(QmpSchema *schema, const char *name) in qmp_schema_lookup() argument
161 return g_hash_table_lookup(schema->hash, name); in qmp_schema_lookup()
164 static void qmp_schema_cleanup(QmpSchema *schema) in qmp_schema_cleanup() argument
[all …]
/qemu/storage-daemon/qapi/
H A Dqapi-schema.json4 # Note that modules are shared with the QEMU main schema under the assumption
5 # that the storage daemon schema is a subset of the main schema. For the shared
7 # from the main schema.
9 # If you wish to extend the storage daemon schema to contain things that are
10 # not in the main schema, be aware that array types of types defined in shared
12 # in the main schema. Therefore, if you use such arrays, you may need to define
13 # the array type in the main schema, even if it is unused outside of the
45 # stable order, it's best to include each sub-schema just once, or
/qemu/monitor/
H A Dqmp-cmds-control.c182 static SchemaInfoList *zap_deprecated(SchemaInfoList *schema) in zap_deprecated() argument
188 schema = split_off_generic_list(schema, is_entity_deprecated, &to_zap); in zap_deprecated()
191 for (tail = schema; tail; tail = tail->next) { in zap_deprecated()
201 return schema; in zap_deprecated()
208 SchemaInfoList *schema = NULL; in qmp_query_qmp_schema() local
211 visit_type_SchemaInfoList(v, NULL, &schema, &error_abort); in qmp_query_qmp_schema()
212 g_assert(schema); in qmp_query_qmp_schema()
218 return zap_deprecated(schema); in qmp_query_qmp_schema()
220 return schema; in qmp_query_qmp_schema()
/qemu/docs/devel/
H A Dqapi-code-gen.rst26 we generate C code from a QAPI schema. This document describes the
27 QAPI schema language, and how it gets mapped to the Client JSON
32 The QAPI schema language
35 The QAPI schema defines the Client JSON Protocol's commands and
39 It is permissible for the schema to contain additional types not used
49 Schema syntax
66 a correctly structured QAPI schema. We provide a grammar for this
90 A QAPI schema consists of a series of top-level expressions::
92 SCHEMA = TOP-LEVEL-EXPR...
95 documentation is generated in schema definition order. Code order
[all …]
/qemu/stats/
H A Dstats-hmp-cmds.c77 StatsSchemaList *schema) in print_stats_results() argument
79 /* Find provider schema */ in print_stats_results()
81 find_schema_value_list(schema, result->provider, target); in print_stats_results()
85 monitor_printf(mon, "failed to find schema list for %s\n", in print_stats_results()
103 /* Find schema entry */ in print_stats_results()
106 monitor_printf(mon, "failed to find schema entry for %s\n", in print_stats_results()
199 g_autoptr(StatsSchemaList) schema = NULL; in hmp_info_stats()
217 schema = qmp_query_stats_schemas(provider_str ? true : false, in hmp_info_stats()
243 print_stats_results(mon, target, provider_str == NULL, entry->value, schema); in hmp_info_stats()
/qemu/tests/
H A Dmeson.build44 input: files('qapi-schema/qapi-schema-test.json',
45 'qapi-schema/include/sub-module.json',
46 'qapi-schema/sub-sub-module.json'),
87 subdir('qapi-schema')
/qemu/gdbstub/
H A Dgdbstub.c889 static int cmd_parse_params(const char *data, const char *schema, in cmd_parse_params() argument
894 g_assert(schema); in cmd_parse_params()
897 curr_schema = schema; in cmd_parse_params()
974 if (cmd->schema) { in process_string_cmd()
976 cmd->schema, params)) { in process_string_cmd()
1468 .schema = "s0"
1475 .schema = "l0"
1491 .schema = "s,L,L0"
1497 .schema = "l0"
1503 .schema = "l,L,L0"
[all …]
/qemu/docs/sphinx/
H A Dqapidoc.py15 in QAPI schema files, and insert them all into the current document.
19 pathname of the schema file to process, relative to the source tree.
45 from qapi.schema import (
463 """A QAPI schema visitor which adds Sphinx dependencies each module
467 schema file associated with each module in the QAPI input.
516 def transmogrify(self, schema: QAPISchema) -> nodes.Element:
526 for doc in schema.docs:
533 ent = schema.lookup_entity(doc.symbol)
593 def legacy(self, schema: QAPISchema) -> nodes.Element:
595 vis.visit_begin(schema)
[all …]
/qemu/qapi/
H A Dintrospect.json17 # @query-qmp-schema:
19 # Command query-qmp-schema exposes the QMP wire ABI as an array of
26 # the QAPI schema.
44 # .. note:: The QAPI schema is also used to help define *internal*
50 { 'command': 'query-qmp-schema',
85 # name defined in the QAPI schema. Unlike command and event
182 # @name: the member's name, as defined in the QAPI schema.
236 # @name: the member's name, as defined in the QAPI schema.
H A Dstats.json202 # Schema for a single statistic.
204 # @name: name of the statistic; each element of the schema is uniquely
238 # Schema for all available statistics for a provider and target.
257 # Return the schema for all available runtime-collected statistics.
/qemu/include/gdbstub/
H A Dcommands.h35 * @schema: Each schema for the command parameter entry consists of 2 chars,
39 * Currently supported schema types:
64 const char *schema; member
/qemu/tests/qapi-schema/
H A Dmissing-schema.err1 can't read schema file 'missing-schema.json': No such file or directory
H A Ddoc-good.rst2 Test Sphinx manual that pulls in the test schema file. We will generate
5 .. qapi-doc:: tests/qapi-schema/doc-good.json
H A Devent-args-if-unboxed.err1 tests/qapi-schema/event-args-if-unboxed.json: In event 'TEST_IF_EVENT':
2 tests/qapi-schema/event-args-if-unboxed.json:1: event's 'data' members may have 'if' conditions onl…
H A Dmeson.build150 'qapi-schema-test.json',
215 # Intentionally missing schema file test -- not passed through files():
216 schemas += [meson.current_source_dir() / 'missing-schema.json']
221 test('QAPI schema regression tests', python,
223 env: test_env, suite: ['qapi-schema', 'qapi-frontend'])
241 # Test the document-comment document generation code by running a test schema
293 suite: ['qapi-schema', 'qapi-doc'])
H A Dtest-qapi.py22 from qapi.schema import QAPISchema, QAPISchemaVisitor
111 schema = QAPISchema(fname)
112 schema.visit(QAPISchemaTestVisitor())
114 for doc in schema.docs:
196 description='QAPI schema tester')

1234