ovsdb: Add support for multiple databases to the protocol.
[sliver-openvswitch.git] / tests / ovsdb-idl.at
index 6fc57f3..9b90b03 100644 (file)
@@ -38,7 +38,8 @@ OVSDB_CHECK_IDL([simple idl, initially empty, no ops],
 
 OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
   [],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "simple",
        "row": {"i": 1,
                "r": 2.0,
@@ -54,15 +55,18 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
       {"op": "insert",
        "table": "simple",
        "row": {}}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "simple",
        "where": [],
        "row": {"b": true}}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "simple",
        "where": [],
        "row": {"r": 123.5}}]' \
-    '[{"op": "insert",
+    '["idltest",
+      {"op": "insert",
        "table": "simple",
        "row": {"i": -1,
                "r": 125,
@@ -73,11 +77,13 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
                "ba": ["set", [false]],
                "sa": ["set", []], 
                "ua": ["set", []]}}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "simple",
        "where": [["i", "<", 1]],
        "row": {"s": "newstring"}}]' \
-    '[{"op": "delete",
+    '["idltest",
+      {"op": "delete",
        "table": "simple",
        "where": [["i", "==", 0]]}]' \
     'reconnect']],
@@ -109,7 +115,8 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
 ]])
 
 OVSDB_CHECK_IDL([simple idl, initially populated],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "simple",
        "row": {"i": 1,
                "r": 2.0,
@@ -125,7 +132,8 @@ OVSDB_CHECK_IDL([simple idl, initially populated],
       {"op": "insert",
        "table": "simple",
        "row": {}}]']],
-  [['[{"op": "update",
+  [['["idltest",
+      {"op": "update",
        "table": "simple",
        "where": [],
        "row": {"b": true}}]']],
@@ -138,7 +146,8 @@ OVSDB_CHECK_IDL([simple idl, initially populated],
 ]])
 
 OVSDB_CHECK_IDL([simple idl, writing via IDL],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "simple",
        "row": {"i": 1,
                "r": 2.0,
@@ -168,7 +177,8 @@ OVSDB_CHECK_IDL([simple idl, writing via IDL],
 ]])
 
 OVSDB_CHECK_IDL([simple idl, increment operation],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "simple",
        "row": {}}]']],
   [['set 0 r 2.0, increment simple i']],
@@ -180,11 +190,13 @@ OVSDB_CHECK_IDL([simple idl, increment operation],
 
 OVSDB_CHECK_IDL([self-linking idl, consistent ops],
   [],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "link1",
        "row": {"i": 0, "k": ["named-uuid", "self"]},
        "uuid-name": "self"}]' \
-    '[{"op": "insert",
+    '["idltest",
+      {"op": "insert",
        "table": "link1",
        "row": {"i": 1, "k": ["named-uuid", "row2"]},
        "uuid-name": "row1"},
@@ -192,11 +204,13 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops],
        "table": "link1",
        "row": {"i": 2, "k": ["named-uuid", "row1"]},
        "uuid-name": "row2"}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "link1",
        "where": [["i", "==", 1]],
        "row": {"k": ["uuid", "#1#"]}}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "link1",
        "where": [],
        "row": {"k": ["uuid", "#0#"]}}]']],
@@ -220,27 +234,33 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops],
 
 OVSDB_CHECK_IDL([self-linking idl, inconsistent ops],
   [],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "link1",
        "row": {"i": 0, "k": ["uuid", "cf197cc5-c8c9-42f5-82d5-c71a9f2cb96b"]}}]' \
-    '+[{"op": "insert",
+    '+["idltest",
+      {"op": "insert",
        "table": "link1",
        "uuid-name": "one",
        "row": {"i": 1, "k": ["named-uuid", "one"]}},
       {"op": "insert",
        "table": "link1",
        "row": {"i": 2, "k": ["named-uuid", "one"]}}]' \
-     '[{"op": "update",
+     '["idltest",
+      {"op": "update",
        "table": "link1",
        "where": [],
        "row": {"k": ["uuid", "c2fca39a-e69a-42a4-9c56-5eca85839ce9"]}}]' \
-     '+[{"op": "delete",
+     '+["idltest",
+      {"op": "delete",
        "table": "link1",
        "where": [["_uuid", "==", ["uuid", "#1#"]]]}]' \
-     '+[{"op": "delete",
+     '+["idltest",
+      {"op": "delete",
        "table": "link1",
        "where": [["_uuid", "==", ["uuid", "#2#"]]]}]' \
-     '[{"op": "delete",
+     '["idltest",
+      {"op": "delete",
        "table": "link1",
        "where": []}]' \
 ]],
@@ -260,7 +280,8 @@ OVSDB_CHECK_IDL([self-linking idl, inconsistent ops],
 
 OVSDB_CHECK_IDL([self-linking idl, sets],
   [],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "link1",
        "row": {"i": 0, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i0"]]]},
        "uuid-name": "i0"},
@@ -276,15 +297,18 @@ OVSDB_CHECK_IDL([self-linking idl, sets],
        "table": "link1",
        "row": {"i": 3, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i3"]]]},
        "uuid-name": "i3"}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "link1",
        "where": [],
        "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "#1#"], ["uuid", "#2#"], ["uuid", "#3#"]]]}}]' \
-    '[{"op": "update",
+    '["idltest",
+      {"op": "update",
        "table": "link1",
        "where": [],
        "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "88702e78-845b-4a6e-ad08-cf68922ae84a"], ["uuid", "#2#"], ["uuid", "1ac2b12e-b767-4805-a55d-43976e40c465"]]]}}]' \
-    '+[{"op": "delete",
+    '+["idltest",
+      {"op": "delete",
        "table": "link1",
        "where": []}]']],
   [[000: empty
@@ -306,7 +330,8 @@ OVSDB_CHECK_IDL([self-linking idl, sets],
 
 OVSDB_CHECK_IDL([external-linking idl, consistent ops],
   [],
-  [['[{"op": "insert",
+  [['["idltest",
+      {"op": "insert",
        "table": "link2",
        "row": {"i": 0},
        "uuid-name": "row0"},