1 AT_BANNER([OVSDB -- tables])
3 OVSDB_CHECK_POSITIVE_CPY([non-root table with one column],
4 [[parse-table mytable '{"columns": {"name": {"type": "string"}}}']],
5 [[{"columns":{"name":{"type":"string"}}}]])
7 OVSDB_CHECK_POSITIVE_CPY([immutable table with one column],
8 [[parse-table mytable \
9 '{"columns": {"name": {"type": "string"}},
11 [[{"columns":{"name":{"type":"string"}},"mutable":false}]])
13 OVSDB_CHECK_POSITIVE_CPY([root table with one column],
14 [[parse-table mytable \
15 '{"columns": {"name": {"type": "string"}},
17 [[{"columns":{"name":{"type":"string"}},"isRoot":true}]])
19 OVSDB_CHECK_POSITIVE_CPY([non-root table with default_is_root=true],
20 [[parse-table mytable '{"columns": {"name": {"type": "string"}}}' true]],
21 [[{"columns":{"name":{"type":"string"}},"isRoot":false}]])
23 OVSDB_CHECK_POSITIVE_CPY([root table with default_is_root=true],
24 [[parse-table mytable \
25 '{"columns": {"name": {"type": "string"}},
26 "isRoot": true}' true]],
27 [[{"columns":{"name":{"type":"string"}}}]])
29 OVSDB_CHECK_POSITIVE_CPY([table with maxRows of 2],
30 [[parse-table mytable '{"columns": {"name": {"type": "string"}},
32 [[{"columns":{"name":{"type":"string"}},"maxRows":2}]])
34 OVSDB_CHECK_NEGATIVE_CPY([column names may not begin with _],
35 [[parse-table mytable \
36 '{"columns": {"_column": {"type": "integer"}}}']],
37 [[names beginning with "_" are reserved]],
40 OVSDB_CHECK_NEGATIVE_CPY([table must have at least one column (1)],
41 [[parse-table mytable '{}']],
42 [[Parsing table schema for table mytable failed: Required 'columns' member is missing.]])
44 OVSDB_CHECK_NEGATIVE_CPY([table must have at least one column (2)],
45 [[parse-table mytable '{"columns": {}}']],
46 [[table must have at least one column]])
48 OVSDB_CHECK_NEGATIVE_CPY([table maxRows must be positive],
49 [[parse-table mytable '{"columns": {"name": {"type": "string"}},
51 [[syntax "{"columns":{"name":{"type":"string"}},"maxRows":0}": syntax error: maxRows must be at least 1]])