aboutsummaryrefslogtreecommitdiff
path: root/tests/idltest.ovsschema
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-02-08 14:09:41 -0800
committerBen Pfaff <blp@nicira.com>2010-02-08 14:16:19 -0800
commit0d0f05b909b6428d44eb147bd4edd73782d2a137 (patch)
treec64d595c7df2281b6a69d00dc2a4f73d37986a40 /tests/idltest.ovsschema
parentbd76d25d8b3b7d11c5a326e91d784ad2cdeecd45 (diff)
ovsdb: Add support for referential integrity in the database itself.
Diffstat (limited to 'tests/idltest.ovsschema')
-rw-r--r--tests/idltest.ovsschema134
1 files changed, 109 insertions, 25 deletions
diff --git a/tests/idltest.ovsschema b/tests/idltest.ovsschema
index 239a3433..545242be 100644
--- a/tests/idltest.ovsschema
+++ b/tests/idltest.ovsschema
@@ -1,25 +1,109 @@
-{"name": "idltest",
- "tables": {
- "simple": {
- "columns": {
- "i": {"type": "integer"},
- "r": {"type": "real"},
- "b": {"type": "boolean"},
- "s": {"type": "string"},
- "u": {"type": "uuid"},
- "ia": {"type": {"key": "integer", "min": 0, "max": "unlimited"}},
- "ra": {"type": {"key": "real", "min": 0, "max": "unlimited"}},
- "ba": {"type": {"key": "boolean", "min": 0, "max": "unlimited"}},
- "sa": {"type": {"key": "string", "min": 0, "max": "unlimited"}},
- "ua": {"type": {"key": "uuid", "min": 0, "max": "unlimited"}}}},
- "link1": {
- "columns": {
- "i": {"type": "integer"},
- "k": {"type": {"key": "uuid"}},
- "ka": {"type": {"key": "uuid",
- "min": 0, "max": "unlimited"}},
- "l2": {"type": {"key": "uuid", "min": 0, "max": 1}}}},
- "link2": {
- "columns": {
- "i": {"type": "integer"},
- "l1": {"type": {"key": "uuid", "min": 0, "max": 1}}}}}}
+{
+ "name": "idltest",
+ "tables": {
+ "link1": {
+ "columns": {
+ "i": {
+ "type": "integer"
+ },
+ "k": {
+ "type": {
+ "key": {
+ "type": "uuid",
+ "refTable": "link1"
+ }
+ }
+ },
+ "ka": {
+ "type": {
+ "key": {
+ "type": "uuid",
+ "refTable": "link1"
+ },
+ "max": "unlimited",
+ "min": 0
+ }
+ },
+ "l2": {
+ "type": {
+ "key": {
+ "type": "uuid",
+ "refTable": "link2"
+ },
+ "min": 0
+ }
+ }
+ }
+ },
+ "link2": {
+ "columns": {
+ "i": {
+ "type": "integer"
+ },
+ "l1": {
+ "type": {
+ "key": {
+ "type": "uuid",
+ "refTable": "link1"
+ },
+ "min": 0
+ }
+ }
+ }
+ },
+ "simple": {
+ "columns": {
+ "b": {
+ "type": "boolean"
+ },
+ "ba": {
+ "type": {
+ "key": "boolean",
+ "max": "unlimited",
+ "min": 0
+ }
+ },
+ "i": {
+ "type": "integer"
+ },
+ "ia": {
+ "type": {
+ "key": "integer",
+ "max": "unlimited",
+ "min": 0
+ }
+ },
+ "r": {
+ "type": "real"
+ },
+ "ra": {
+ "type": {
+ "key": "real",
+ "max": "unlimited",
+ "min": 0
+ }
+ },
+ "s": {
+ "type": "string"
+ },
+ "sa": {
+ "type": {
+ "key": "string",
+ "max": "unlimited",
+ "min": 0
+ }
+ },
+ "u": {
+ "type": "uuid"
+ },
+ "ua": {
+ "type": {
+ "key": "uuid",
+ "max": "unlimited",
+ "min": 0
+ }
+ }
+ }
+ }
+ }
+}