Created
July 10, 2014 19:44
-
-
Save Mierdin/13f93376fc9eac80d66a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public boolean checkSchema() throws IOException, ExecutionException, InterruptedException, TimeoutException { | |
| if (this.ovs == null) { | |
| this.ovs = getTestConnection(); | |
| HardwareVtepSchemaSuiteIT.setOvsdbClient(this.ovs); | |
| //retrieve list of databases from OVSDB server | |
| ListenableFuture<List<String>> databases = ovs.getDatabases(); | |
| List<String> dbNames = databases.get(); | |
| Assert.assertNotNull(dbNames); | |
| //verify that HW VTEP schema is in the list of supported databases | |
| boolean hasHardwareVTEPSchema = false; | |
| for (String dbName : dbNames) { | |
| if (dbName.equals(HARDWARE_VTEP_SCHEMA)) { | |
| hasHardwareVTEPSchema = true; | |
| break; | |
| } | |
| } | |
| Assert.assertTrue(HARDWARE_VTEP_SCHEMA + " schema is not supported by the switch", hasHardwareVTEPSchema); | |
| return hasHardwareVTEPSchema; | |
| } else { | |
| Assert.fail("Error retrieving schema"); | |
| return false; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment