root / qapi-schema-test.json @ 2e679780
History | View | Annotate | Download (1.3 kB)
1 | 501e5104 | Michael Roth | # *-*- Mode: Python -*-* |
---|---|---|---|
2 | 501e5104 | Michael Roth | |
3 | 501e5104 | Michael Roth | # for testing enums |
4 | 501e5104 | Michael Roth | { 'enum': 'EnumOne', |
5 | 501e5104 | Michael Roth | 'data': [ 'value1', 'value2', 'value3' ] } |
6 | 501e5104 | Michael Roth | { 'type': 'NestedEnumsOne', |
7 | 501e5104 | Michael Roth | 'data': { 'enum1': 'EnumOne', '*enum2': 'EnumOne', 'enum3': 'EnumOne', '*enum4': 'EnumOne' } } |
8 | 501e5104 | Michael Roth | |
9 | 501e5104 | Michael Roth | # for testing nested structs |
10 | 501e5104 | Michael Roth | { 'type': 'UserDefOne', |
11 | 9e9eace8 | Paolo Bonzini | 'data': { 'integer': 'int', 'string': 'str', '*enum1': 'EnumOne' } } |
12 | 501e5104 | Michael Roth | |
13 | 501e5104 | Michael Roth | { 'type': 'UserDefTwo', |
14 | 501e5104 | Michael Roth | 'data': { 'string': 'str', |
15 | 501e5104 | Michael Roth | 'dict': { 'string': 'str', |
16 | 501e5104 | Michael Roth | 'dict': { 'userdef': 'UserDefOne', 'string': 'str' }, |
17 | 501e5104 | Michael Roth | '*dict2': { 'userdef': 'UserDefOne', 'string': 'str' } } } } |
18 | 501e5104 | Michael Roth | |
19 | f294f82a | Luiz Capitulino | { 'type': 'UserDefNested', |
20 | f294f82a | Luiz Capitulino | 'data': { 'string0': 'str', |
21 | f294f82a | Luiz Capitulino | 'dict1': { 'string1': 'str', |
22 | f294f82a | Luiz Capitulino | 'dict2': { 'userdef1': 'UserDefOne', 'string2': 'str' }, |
23 | f294f82a | Luiz Capitulino | '*dict3': { 'userdef2': 'UserDefOne', 'string3': 'str' } } } } |
24 | f294f82a | Luiz Capitulino | |
25 | dc8fb6df | Paolo Bonzini | # for testing unions |
26 | dc8fb6df | Paolo Bonzini | { 'type': 'UserDefA', |
27 | dc8fb6df | Paolo Bonzini | 'data': { 'boolean': 'bool' } } |
28 | dc8fb6df | Paolo Bonzini | |
29 | dc8fb6df | Paolo Bonzini | { 'type': 'UserDefB', |
30 | dc8fb6df | Paolo Bonzini | 'data': { 'integer': 'int' } } |
31 | dc8fb6df | Paolo Bonzini | |
32 | dc8fb6df | Paolo Bonzini | { 'union': 'UserDefUnion', |
33 | dc8fb6df | Paolo Bonzini | 'data': { 'a' : 'UserDefA', 'b' : 'UserDefB' } } |
34 | dc8fb6df | Paolo Bonzini | |
35 | 501e5104 | Michael Roth | # testing commands |
36 | 501e5104 | Michael Roth | { 'command': 'user_def_cmd', 'data': {} } |
37 | 501e5104 | Michael Roth | { 'command': 'user_def_cmd1', 'data': {'ud1a': 'UserDefOne'} } |
38 | 501e5104 | Michael Roth | { 'command': 'user_def_cmd2', 'data': {'ud1a': 'UserDefOne', 'ud1b': 'UserDefOne'}, 'returns': 'UserDefTwo' } |