Adding Javadocs comments to the different tests for OVSDB library and plugins. 52/10052/1
authorSrini Seetharaman <srini.seetharaman@gmail.com>
Tue, 19 Aug 2014 07:53:27 +0000 (00:53 -0700)
committerSrini Seetharaman <srini.seetharaman@gmail.com>
Tue, 19 Aug 2014 07:53:27 +0000 (00:53 -0700)
Removing redundant test_schema.json, which is already available in the resources directory.

Change-Id: I914da1dcb761b60bf9bd56b33abb90d67f73a186
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
library/src/test/java/org/opendaylight/ovsdb/lib/OvsdbClientTestIT.java
library/src/test/java/org/opendaylight/ovsdb/lib/OvsdbClientTestITTyped.java
library/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java
library/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/TestClient.java
library/src/test/java/org/opendaylight/ovsdb/lib/notation/VersionTest.java [changed mode: 0644->0755]
library/src/test/java/org/opendaylight/ovsdb/lib/schema/OvsdbSchemaTest.java
library/src/test/java/org/opendaylight/ovsdb/lib/schema/test_schema.json [deleted file]
plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigBridgeTestCases.java
plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigManagerTestCases.java
plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigPortTestCases.java
plugin/src/test/java/org/opendaylight/ovsdb/plugin/TearDown.java

index bcad3ab6090a6c2b308a63d557f43481bc497395..adb0654132e6b2cf01bcb9e7977ab01eecebd445 100644 (file)
@@ -56,6 +56,12 @@ public class OvsdbClientTestIT extends OvsdbTestBase {
     DatabaseSchema dbSchema = null;
     static String testBridgeName = "br-test";
     static UUID testBridgeUuid = null;
+
+    /**
+     * Test general OVSDB transactions (viz., insert, select, update,
+     * mutate, comment, delete, where, commit) as well as the special
+     * transactions (viz., abort and assert)
+     */
     @Test
     public void testTransact() throws IOException, InterruptedException, ExecutionException {
         Assert.assertNotNull(dbSchema);
@@ -67,6 +73,11 @@ public class OvsdbClientTestIT extends OvsdbTestBase {
         assertTransaction();
     }
 
+    /**
+     * Test OVS monitor request and reply, with and without specific column filters,
+     * for the Bridge table in the OVSDB. The setup involves creating a test bridge with 5
+     * flood_vlans and 2 key-value pairs, and monitoring the DB update.
+     */
     @Test
     public void testMonitorRequest() throws ExecutionException, InterruptedException, IOException {
         Assert.assertNotNull(dbSchema);
index 39f3194ac4203c816cb8beedb33a4cbddc99efce..fe46bf80252c21569f893a689a7d62e7fcecf1fd 100644 (file)
@@ -49,6 +49,12 @@ public class OvsdbClientTestITTyped extends OvsdbTestBase {
     static String testBridgeName = "br_test";
     static UUID testBridgeUuid = null;
 
+    /**
+     * Test creation of statically typed bridge table as defined in
+     * ovs-vswitchd.conf.db with get/set for all relevant columns. The
+     * SETDATA methods for "name", "status" and "flood_vlans" columns
+     * are verified.
+     */
     @Test
     public void testTypedBridgeCreate() throws IOException, InterruptedException, ExecutionException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
         TestBridge rBridge = ovs.createTypedRowWrapper(TestBridge.class);
index a6cf060f0a29422786a7364ed645796d503de821..492d286fc1443edc422573c42789398debb7d625 100644 (file)
@@ -45,6 +45,11 @@ public class JsonRpcDecoderTest {
         prettyTestJson = Resources.toString(prettyTestJsoUrl, Charsets.UTF_8);
     }
 
+    /**
+     * Test decoding the Stringified Json text in test.json to
+     * individual Json node objects.
+     * @throws Exception
+     */
     @Test
     public void testDecode() throws Exception {
         for (int i = 0; i < 10; i++) {
@@ -55,6 +60,11 @@ public class JsonRpcDecoderTest {
         ch.finish();
     }
 
+    /**
+     * Test decoding the Stringified Json text in pretty-test.json to
+     * individual Json node objects.
+     * @throws Exception
+     */
     @Test
     public void testDecodePrettyJson() throws Exception {
         ch.writeInbound(copiedBuffer(prettyTestJson, CharsetUtil.UTF_8));
@@ -63,6 +73,11 @@ public class JsonRpcDecoderTest {
         ch.finish();
     }
 
+    /**
+     * Test decoding the Stringified Json text with large spaces to
+     * individual Json node objects.
+     * @throws Exception
+     */
     @Test
     public void testDecodeSkipSpaces() throws Exception {
         ch.writeInbound(copiedBuffer(PREAMBLE + testJson + PREAMBLE + testJson, CharsetUtil.UTF_8));
@@ -71,6 +86,12 @@ public class JsonRpcDecoderTest {
         ch.finish();
     }
 
+    /**
+     * Test whether phased decoding is allowed with JsonRpcDecoder by
+     * writing Json string over two separate iterations, and checking if
+     * the decoder collates the record appropriately.
+     * @throws Exception
+     */
     @Test
     public void testDecodePartial() throws Exception {
         ch.writeInbound(copiedBuffer(PARTIAL_START, CharsetUtil.UTF_8));
@@ -82,12 +103,24 @@ public class JsonRpcDecoderTest {
         ch.finish();
     }
 
+    /**
+     * Test whether decoder throws appropriate DecoderException when
+     * passing a Json string using an unsupported (i.e., UTF-16)
+     * character set.
+     * @throws Exception
+     */
     @Test(expected= DecoderException.class)
     public void testDecodeInvalidEncoding() throws Exception {
         ch.writeInbound(copiedBuffer(testJson, CharsetUtil.UTF_16));
         ch.finish();
     }
 
+    /**
+     * Test whether decoder throws appropriate TooLongFrameException
+     * when passing a Json string longer than the decoder's maximum
+     * frame length.
+     * @throws Exception
+     */
     @Test(expected=TooLongFrameException.class)
     public void testDecodeFrameLengthExceed() {
         decoder = new JsonRpcDecoder(testJson_BYTES -1);
@@ -95,4 +128,4 @@ public class JsonRpcDecoderTest {
         ch.writeInbound(copiedBuffer(testJson, CharsetUtil.UTF_8));
         ch.finish();
     }
-}
\ No newline at end of file
+}
index f72bae16a85dc5e15f495c04e673c566f8d4bdd4..39cd1a1b247301e5de09e1d9d7630f6c87c97aff 100644 (file)
@@ -36,11 +36,17 @@ public class TestClient extends TestCase {
             bootstrapper.stopServer();
         }
 
+        /**
+         * Testing appropriate ChannelHandler integration for
+         * JsonRpcDecoder, so that Json strings written using an
+         * OutputStream connected to a ServerSocket of a Netty
+         * ServerBootstrap can be decoder properly.
+         */
+
         @Test
         public void testBasicFlow() throws Exception {
             setupServer();
-            Socket socket = socket = new Socket(serverurl, serverport);
-
+            Socket socket = new Socket(serverurl, serverport);
             OutputStream outputStream = socket.getOutputStream();
 
             int records = 20;
@@ -61,7 +67,7 @@ public class TestClient extends TestCase {
     static int counter = 0;
 
     /*
-       create and a json of specified size
+       create and write a json string for specified number of times
      */
     private void writeJson(OutputStream outputStream, int times) throws IOException {
         outputStream.write("{".getBytes("UTF-8"));
old mode 100644 (file)
new mode 100755 (executable)
index f36744d..e0560f8
@@ -17,12 +17,23 @@ import static org.junit.Assert.assertTrue;
 
 public class VersionTest {
 
+    /**
+     * Test to verify if Version object can be constructed from a string
+     * and to verify if Version.toString() yields original string used
+     * during construction of the object.
+     * @throws Exception
+     */
     @Test
     public void testToString() throws Exception {
         Version a = Version.fromString("1.2.3");
         assertEquals("1.2.3", a.toString());
     }
 
+    /**
+     * Test to verify if equals() and hashCode() methods work
+     * for the Version object.
+     * @throws Exception
+     */
     @Test
     public void testEquals() throws Exception {
         Version a = Version.fromString("1.2.3");
@@ -33,6 +44,11 @@ public class VersionTest {
         assertTrue(b.hashCode() == Version.fromString("0.0.0").hashCode());
     }
 
+    /**
+     * Test to verify compareTo() function works for the
+     * X.Y.Z semantics of the version number.
+     * @throws Exception
+     */
     @Test
     public void testCompareTo() throws Exception {
         Version a = Version.fromString("1.2.27");
@@ -49,6 +65,8 @@ public class VersionTest {
 
     }
 
+    /* TODO: Incomplete compare test
+     */
     @Test
     public void testCompare() throws Exception {
         Version a = Version.fromString("6.9.3");
index bb5337e55da2fdd99638a6338dacfab844b27cc6..c9f436353b278a8a5a83e7f3523f85a9c145d37c 100644 (file)
@@ -22,6 +22,13 @@ import java.io.InputStream;
 
 public class OvsdbSchemaTest {
 
+     /**
+      * Test OVSDB schema construction from JSON text in
+      * test_schema.json. Following tables are used: "Port", "Manager",
+      * "Bridge", "Interface", "SSL", "Open_vSwitch", "Queue",
+      * "NetFlow", "Mirror", "QoS", "Controller", "Flow_Table", "sFlow"
+      * tables.
+      */
     @Test
     public void testSchema() throws IOException {
         InputStream resourceAsStream = OvsdbSchemaTest.class.getResourceAsStream("test_schema.json");
diff --git a/library/src/test/java/org/opendaylight/ovsdb/lib/schema/test_schema.json b/library/src/test/java/org/opendaylight/ovsdb/lib/schema/test_schema.json
deleted file mode 100644 (file)
index f7f8405..0000000
+++ /dev/null
@@ -1,1150 +0,0 @@
-{
-  "id": 0,
-  "result": {
-    "tables": {
-      "Port": {
-        "columns": {
-          "name": {
-            "mutable": false,
-            "type": "string"
-          },
-          "statistics": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "integer",
-              "max": "unlimited"
-            }
-          },
-          "vlan_mode": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "access",
-                    "native-tagged",
-                    "native-untagged",
-                    "trunk"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "qos": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "QoS"
-              },
-              "min": 0
-            }
-          },
-          "status": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "trunks": {
-            "type": {
-              "key": {
-                "maxInteger": 4095,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0,
-              "max": 4096
-            }
-          },
-          "mac": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "interfaces": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "Interface"
-              },
-              "max": "unlimited"
-            }
-          },
-          "bond_downdelay": {
-            "type": "integer"
-          },
-          "bond_mode": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "active-backup",
-                    "balance-slb",
-                    "balance-tcp",
-                    "stable"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "bond_updelay": {
-            "type": "integer"
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "tag": {
-            "type": {
-              "key": {
-                "maxInteger": 4095,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "bond_fake_iface": {
-            "type": "boolean"
-          },
-          "fake_bridge": {
-            "type": "boolean"
-          },
-          "lacp": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "active",
-                    "off",
-                    "passive"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          }
-        },
-        "indexes": [
-          [
-            "name"
-          ]
-        ]
-      },
-      "Manager": {
-        "columns": {
-          "is_connected": {
-            "ephemeral": true,
-            "type": "boolean"
-          },
-          "target": {
-            "type": "string"
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "max_backoff": {
-            "type": {
-              "key": {
-                "minInteger": 1000,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "connection_mode": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "in-band",
-                    "out-of-band"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "status": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "inactivity_probe": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          }
-        },
-        "indexes": [
-          [
-            "target"
-          ]
-        ]
-      },
-      "Bridge": {
-        "columns": {
-          "name": {
-            "mutable": false,
-            "type": "string"
-          },
-          "flood_vlans": {
-            "type": {
-              "key": {
-                "maxInteger": 4095,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0,
-              "max": 4096
-            }
-          },
-          "netflow": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "NetFlow"
-              },
-              "min": 0
-            }
-          },
-          "mirrors": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "Mirror"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "status": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "datapath_id": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "controller": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "Controller"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "protocols": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "OpenFlow10",
-                    "OpenFlow12",
-                    "OpenFlow13"
-                  ]
-                ]
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "fail_mode": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "secure",
-                    "standalone"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "ports": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "Port"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "flow_tables": {
-            "type": {
-              "key": {
-                "maxInteger": 254,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0,
-              "value": {
-                "type": "uuid",
-                "refTable": "Flow_Table"
-              },
-              "max": "unlimited"
-            }
-          },
-          "sflow": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "sFlow"
-              },
-              "min": 0
-            }
-          },
-          "datapath_type": {
-            "type": "string"
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "stp_enable": {
-            "type": "boolean"
-          }
-        },
-        "indexes": [
-          [
-            "name"
-          ]
-        ]
-      },
-      "Interface": {
-        "columns": {
-          "options": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "name": {
-            "mutable": false,
-            "type": "string"
-          },
-          "statistics": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "integer",
-              "max": "unlimited"
-            }
-          },
-          "link_speed": {
-            "ephemeral": true,
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "mtu": {
-            "ephemeral": true,
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "mac_in_use": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "type": {
-            "type": "string"
-          },
-          "ingress_policing_rate": {
-            "type": {
-              "key": {
-                "minInteger": 0,
-                "type": "integer"
-              }
-            }
-          },
-          "cfm_remote_opstate": {
-            "ephemeral": true,
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "down",
-                    "up"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "status": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "mac": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "ofport": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "cfm_fault_status": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "duplex": {
-            "ephemeral": true,
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "full",
-                    "half"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "lacp_current": {
-            "ephemeral": true,
-            "type": {
-              "key": "boolean",
-              "min": 0
-            }
-          },
-          "cfm_fault": {
-            "ephemeral": true,
-            "type": {
-              "key": "boolean",
-              "min": 0
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "admin_state": {
-            "ephemeral": true,
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "down",
-                    "up"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "link_state": {
-            "ephemeral": true,
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "down",
-                    "up"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "cfm_remote_mpids": {
-            "ephemeral": true,
-            "type": {
-              "key": "integer",
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "cfm_mpid": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "ofport_request": {
-            "type": {
-              "key": {
-                "maxInteger": 65279,
-                "minInteger": 1,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "ingress_policing_burst": {
-            "type": {
-              "key": {
-                "minInteger": 0,
-                "type": "integer"
-              }
-            }
-          },
-          "cfm_health": {
-            "ephemeral": true,
-            "type": {
-              "key": {
-                "maxInteger": 100,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "link_resets": {
-            "ephemeral": true,
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          }
-        },
-        "indexes": [
-          [
-            "name"
-          ]
-        ]
-      },
-      "SSL": {
-        "columns": {
-          "ca_cert": {
-            "type": "string"
-          },
-          "private_key": {
-            "type": "string"
-          },
-          "bootstrap_ca_cert": {
-            "type": "boolean"
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "certificate": {
-            "type": "string"
-          }
-        },
-        "maxRows": 1
-      },
-      "Open_vSwitch": {
-        "columns": {
-          "ovs_version": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "system_version": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "bridges": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "Bridge"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "statistics": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "next_cfg": {
-            "type": "integer"
-          },
-          "manager_options": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "Manager"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "system_type": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "ssl": {
-            "type": {
-              "key": {
-                "type": "uuid",
-                "refTable": "SSL"
-              },
-              "min": 0
-            }
-          },
-          "db_version": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "cur_cfg": {
-            "type": "integer"
-          }
-        },
-        "maxRows": 1,
-        "isRoot": true
-      },
-      "Queue": {
-        "columns": {
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "dscp": {
-            "type": {
-              "key": {
-                "maxInteger": 63,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          }
-        },
-        "isRoot": true
-      },
-      "NetFlow": {
-        "columns": {
-          "engine_type": {
-            "type": {
-              "key": {
-                "maxInteger": 255,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "targets": {
-            "type": {
-              "key": "string",
-              "max": "unlimited"
-            }
-          },
-          "add_id_to_interface": {
-            "type": "boolean"
-          },
-          "active_timeout": {
-            "type": {
-              "key": {
-                "minInteger": -1,
-                "type": "integer"
-              }
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "engine_id": {
-            "type": {
-              "key": {
-                "maxInteger": 255,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          }
-        }
-      },
-      "Mirror": {
-        "columns": {
-          "name": {
-            "type": "string"
-          },
-          "output_port": {
-            "type": {
-              "key": {
-                "refType": "weak",
-                "type": "uuid",
-                "refTable": "Port"
-              },
-              "min": 0
-            }
-          },
-          "output_vlan": {
-            "type": {
-              "key": {
-                "maxInteger": 4095,
-                "minInteger": 1,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "statistics": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "integer",
-              "max": "unlimited"
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "select_dst_port": {
-            "type": {
-              "key": {
-                "refType": "weak",
-                "type": "uuid",
-                "refTable": "Port"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "select_all": {
-            "type": "boolean"
-          },
-          "select_vlan": {
-            "type": {
-              "key": {
-                "maxInteger": 4095,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0,
-              "max": 4096
-            }
-          },
-          "select_src_port": {
-            "type": {
-              "key": {
-                "refType": "weak",
-                "type": "uuid",
-                "refTable": "Port"
-              },
-              "min": 0,
-              "max": "unlimited"
-            }
-          }
-        }
-      },
-      "QoS": {
-        "columns": {
-          "queues": {
-            "type": {
-              "key": {
-                "maxInteger": 4294967295,
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0,
-              "value": {
-                "type": "uuid",
-                "refTable": "Queue"
-              },
-              "max": "unlimited"
-            }
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "type": {
-            "type": "string"
-          }
-        },
-        "isRoot": true
-      },
-      "Controller": {
-        "columns": {
-          "is_connected": {
-            "ephemeral": true,
-            "type": "boolean"
-          },
-          "enable_async_messages": {
-            "type": {
-              "key": "boolean",
-              "min": 0
-            }
-          },
-          "controller_rate_limit": {
-            "type": {
-              "key": {
-                "minInteger": 100,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "target": {
-            "type": "string"
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "other_config": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "local_netmask": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "local_gateway": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "max_backoff": {
-            "type": {
-              "key": {
-                "minInteger": 1000,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          },
-          "local_ip": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "connection_mode": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "in-band",
-                    "out-of-band"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "status": {
-            "ephemeral": true,
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "role": {
-            "ephemeral": true,
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "master",
-                    "other",
-                    "slave"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "inactivity_probe": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "controller_burst_limit": {
-            "type": {
-              "key": {
-                "minInteger": 25,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          }
-        }
-      },
-      "Flow_Table": {
-        "columns": {
-          "groups": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "max": "unlimited"
-            }
-          },
-          "name": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "overflow_policy": {
-            "type": {
-              "key": {
-                "type": "string",
-                "enum": [
-                  "set",
-                  [
-                    "evict",
-                    "refuse"
-                  ]
-                ]
-              },
-              "min": 0
-            }
-          },
-          "flow_limit": {
-            "type": {
-              "key": {
-                "minInteger": 0,
-                "type": "integer"
-              },
-              "min": 0
-            }
-          }
-        }
-      },
-      "sFlow": {
-        "columns": {
-          "polling": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "targets": {
-            "type": {
-              "key": "string",
-              "max": "unlimited"
-            }
-          },
-          "header": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          },
-          "agent": {
-            "type": {
-              "key": "string",
-              "min": 0
-            }
-          },
-          "external_ids": {
-            "type": {
-              "key": "string",
-              "min": 0,
-              "value": "string",
-              "max": "unlimited"
-            }
-          },
-          "sampling": {
-            "type": {
-              "key": "integer",
-              "min": 0
-            }
-          }
-        }
-      }
-    },
-    "cksum": "2180939265 17455",
-    "name": "Open_vSwitch",
-    "version": "6.12.0"
-  },
-  "error": null
-}
index 1a63a0713c010c3acdd4422afaf09ed717901f4c..673c2396e7cf87827d35154e0e719713d8acecfe 100644 (file)
@@ -19,7 +19,6 @@ import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstant
 import org.opendaylight.ovsdb.plugin.impl.ConfigurationServiceImpl;
 import org.opendaylight.ovsdb.plugin.impl.ConnectionServiceImpl;
 import org.opendaylight.ovsdb.plugin.impl.InventoryServiceImpl;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -27,6 +26,12 @@ public class BridgeDomainConfigBridgeTestCases extends PluginTestBase {
     private static final Logger logger = LoggerFactory
             .getLogger(BridgeDomainConfigBridgeTestCases.class);
 
+    /**
+     * Add OVS bridge "JUNIT_TEST_BRIDGE" for all other test
+     * Ex. ovs-vsctl add-br br0
+     *
+     * @throws Throwable
+     */
     @Test
     public void addBridge() throws Throwable{
 
@@ -44,6 +49,12 @@ public class BridgeDomainConfigBridgeTestCases extends PluginTestBase {
         configurationService.createBridgeDomain(node, BRIDGE_NAME, null);
     }
 
+    /**
+     * List all bridge domains on this OVS bridge
+     * Ex. ovs-vsctl show
+     *
+     * @throws Throwable
+     */
     @Test
     public void getBridgeDomains() throws Throwable{
 
@@ -62,6 +73,12 @@ public class BridgeDomainConfigBridgeTestCases extends PluginTestBase {
         List<String> ls = configurationService.getBridgeDomains(node);
     }
 
+    /**
+     * Register self node as the bridge's OpenFlow controller
+     * e.g., ovs-vsctl set-controller br0 <node>
+     *
+     * @throws Throwable
+     */
     @Test
     public void setController() throws Throwable{
         TestObjects testObjects = getTestConnection();
@@ -69,9 +86,14 @@ public class BridgeDomainConfigBridgeTestCases extends PluginTestBase {
 
         ConfigurationServiceImpl configurationService = testObjects.configurationService;
         configurationService.setBridgeOFController(node, BRIDGE_NAME);
-
     }
 
+    /**
+     * Test the assignment of "external ID" key/value pairs on bridge
+     * e.g., ovs-vsctl br−set−external−id br0 <key> <value>
+     *
+     * @throws Throwable
+     */
     @Test
     public void setBridgeConfig() throws Throwable{
         TestObjects testObjects = getTestConnection();
index 94037f1607a939352576602e67b10c3154d79f20..b21233fe65fb256abf8052c8ac6a9112e87e174b 100644 (file)
@@ -12,7 +12,6 @@ package org.opendaylight.ovsdb.plugin;
 import org.junit.Test;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.ovsdb.plugin.impl.ConfigurationServiceImpl;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,6 +19,12 @@ public class BridgeDomainConfigManagerTestCases extends PluginTestBase {
     private static final Logger logger = LoggerFactory
             .getLogger(BridgeDomainConfigManagerTestCases.class);
 
+    /**
+     * Set manager for the OVS node
+     * Ex. ovs-vsctl set-manager tcp:192.168.254.254:6634
+     *
+     * @throws Throwable
+     */
     @Test
     public void setManager() throws Throwable{
         TestObjects testObjects = getTestConnection();
@@ -43,4 +48,4 @@ public class BridgeDomainConfigManagerTestCases extends PluginTestBase {
         configurationService.setManager(node, manager);
     }
 
-}
\ No newline at end of file
+}
index 94765c0b48c6fbb65b04f4581ae464671f244825..b2ea84c7e993f6959625442a52b5dee1b5ff7943 100644 (file)
@@ -35,12 +35,12 @@ public class BridgeDomainConfigPortTestCases extends PluginTestBase {
         props = loadProperties();
     }
 
-
     /**
      * Create a Port and attach it to a Bridge
      * Ex. ovs-vsctl add-port br0 vif0
+     *
+     * @throws Throwable
      */
-
     @Test
     public void addPort() throws Throwable{
         TestObjects testObjects = getTestConnection();
@@ -52,8 +52,9 @@ public class BridgeDomainConfigPortTestCases extends PluginTestBase {
 
     /**
      * Create a Port with a user defined VLAN, and attach it to the specified bridge.
-     *
      * Ex. ovs-vsctl add-port JUNIT_BRIDGE_TEST Jvlanvif0 tag=100
+     *
+     * @throws Throwable
      */
     @Test
     public void addPortVlan() throws Throwable{
@@ -77,6 +78,8 @@ public class BridgeDomainConfigPortTestCases extends PluginTestBase {
      *
      * Ex. ovs-vsctl add-port br0 vxlan1 (cont)
      * -- set interface vxlan1 type=vxlan options:remote_ip=192.168.1.11
+     *
+     * @throws Throwable
      */
 
     @Test
@@ -100,6 +103,8 @@ public class BridgeDomainConfigPortTestCases extends PluginTestBase {
     /**
      * Deletes an existing port from an existing bridge
      * Ex. ovs-vsctl del-port ovsbr0 tap0
+     *
+     * @throws Throwable
      */
     @Test
     public void deletePort() throws Throwable{
@@ -111,4 +116,4 @@ public class BridgeDomainConfigPortTestCases extends PluginTestBase {
         configurationService.deletePort(node, BRIDGE_NAME, PORT_NAME);
     }
 
-}
\ No newline at end of file
+}
index 75f9a4276d603808311d70faad499e8a6091917e..e7a29cd655bd9fbe90903c21392ad56f12617efc 100644 (file)
@@ -22,7 +22,7 @@ public class TearDown extends PluginTestBase {
             .getLogger(TearDown.class);
 
     /**
-     * Final Cleanup. Delete the test Bridge.
+     * Final Cleanup. Delete the test Bridge "JUNIT_TEST_BRIDGE".
      */
 
     @Test