Brian O'Connor

Quick fix for the broken build caused by

  > Change-Id: I000f2b802420e4f47ce320f6ed021049bd2fd83e

Change-Id: I0445613144e3126bba24d28047d565f99602ae31
...@@ -376,7 +376,8 @@ public class DefaultOvsdbClient ...@@ -376,7 +376,8 @@ public class DefaultOvsdbClient
376 .getTable(dbSchema, ovsTableRows.get(uuid), 376 .getTable(dbSchema, ovsTableRows.get(uuid),
377 OvsdbTable.OPENVSWITCH); 377 OvsdbTable.OPENVSWITCH);
378 378
379 - if (((TableSchema) ovs.getTbSchema()).name().equals(dbName)) { 379 + // FIXME This is a quick hack to fix the build. Functionality/logic not verified. (BOC)
380 + if (ovs.dbSchema().name().equals(dbName)) {
380 return uuid; 381 return uuid;
381 } 382 }
382 } 383 }
...@@ -652,7 +653,7 @@ public class DefaultOvsdbClient ...@@ -652,7 +653,7 @@ public class DefaultOvsdbClient
652 * 653 *
653 * @param childTableName child table name 654 * @param childTableName child table name
654 * @param childColumnName child column name 655 * @param childColumnName child column name
655 - * @param childRowUuid child row uuid 656 + * @param childUuid child row uuid
656 * @param parentTableName parent table name 657 * @param parentTableName parent table name
657 * @param parentColumnName parent column 658 * @param parentColumnName parent column
658 * 659 *
...@@ -720,22 +721,22 @@ public class DefaultOvsdbClient ...@@ -720,22 +721,22 @@ public class DefaultOvsdbClient
720 /** 721 /**
721 * Insert transact config. 722 * Insert transact config.
722 * 723 *
723 - * @param childTable child table name 724 + * @param childTableName child table name
724 * @param childColumnName child column name 725 * @param childColumnName child column name
725 - * @param childRowUuid child row uuid
726 * @param parentTableName parent table name 726 * @param parentTableName parent table name
727 * @param parentColumnName parent column 727 * @param parentColumnName parent column
728 + * @param parentUuid parent uuid
728 * @param row the config data 729 * @param row the config data
729 * 730 *
730 * @return uuid, empty if no uuid is find 731 * @return uuid, empty if no uuid is find
731 */ 732 */
732 - private String insertConfig(String childtableName, String childColumnName, 733 + private String insertConfig(String childTableName, String childColumnName,
733 String parentTableName, String parentColumnName, 734 String parentTableName, String parentColumnName,
734 String parentUuid, Row row) { 735 String parentUuid, Row row) {
735 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME); 736 DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
736 - TableSchema tableSchema = dbSchema.getTableSchema(childtableName); 737 + TableSchema tableSchema = dbSchema.getTableSchema(childTableName);
737 738
738 - String namedUuid = childtableName; 739 + String namedUuid = childTableName;
739 Insert insert = new Insert(tableSchema, namedUuid, row); 740 Insert insert = new Insert(tableSchema, namedUuid, row);
740 741
741 ArrayList<Operation> operations = Lists.newArrayList(); 742 ArrayList<Operation> operations = Lists.newArrayList();
...@@ -760,7 +761,7 @@ public class DefaultOvsdbClient ...@@ -760,7 +761,7 @@ public class DefaultOvsdbClient
760 Mutate op = new Mutate(parentTableSchema, conditions, mutations); 761 Mutate op = new Mutate(parentTableSchema, conditions, mutations);
761 operations.add(op); 762 operations.add(op);
762 } 763 }
763 - if (childtableName.equalsIgnoreCase(OvsdbConstant.PORT)) { 764 + if (childTableName.equalsIgnoreCase(OvsdbConstant.PORT)) {
764 log.info("Handle port insert"); 765 log.info("Handle port insert");
765 Insert intfInsert = handlePortInsertTable(OvsdbConstant.INTERFACE, 766 Insert intfInsert = handlePortInsertTable(OvsdbConstant.INTERFACE,
766 row); 767 row);
...@@ -805,7 +806,8 @@ public class DefaultOvsdbClient ...@@ -805,7 +806,8 @@ public class DefaultOvsdbClient
805 .getTableSchema(OvsdbConstant.PORT); 806 .getTableSchema(OvsdbConstant.PORT);
806 ColumnSchema portColumnSchema = portTableSchema.getColumnSchema("name"); 807 ColumnSchema portColumnSchema = portTableSchema.getColumnSchema("name");
807 808
808 - String portName = (String) portRow.getColumn(portColumnSchema).data(); 809 + // FIXME This is a quick hack to fix the build. Functionality not verified. (BOC)
810 + String portName = (String) portRow.getColumn(portColumnSchema.toString()).data();
809 811
810 Interface inf = (Interface) TableGenerator 812 Interface inf = (Interface) TableGenerator
811 .createTable(dbSchema, OvsdbTable.INTERFACE); 813 .createTable(dbSchema, OvsdbTable.INTERFACE);
......
...@@ -397,12 +397,12 @@ public class OvsdbControllerImpl implements OvsdbController { ...@@ -397,12 +397,12 @@ public class OvsdbControllerImpl implements OvsdbController {
397 */ 397 */
398 private class InternalMonitorCallBack implements Callback { 398 private class InternalMonitorCallBack implements Callback {
399 @Override 399 @Override
400 - public void update(UpdateNotification upadateNotification) { 400 + public void update(UpdateNotification updateNotification) {
401 - Object key = upadateNotification.context(); 401 + Object key = updateNotification.jsonValue();
402 OvsdbClientService ovsdbClient = requestNotification.get(key); 402 OvsdbClientService ovsdbClient = requestNotification.get(key);
403 403
404 String dbName = requestDbName.get(key); 404 String dbName = requestDbName.get(key);
405 - JsonNode updatesJson = upadateNotification.tbUpdatesJsonNode(); 405 + JsonNode updatesJson = updateNotification.tbUpdatesJsonNode();
406 DatabaseSchema dbSchema = ovsdbClient.getDatabaseSchema(dbName); 406 DatabaseSchema dbSchema = ovsdbClient.getDatabaseSchema(dbName);
407 TableUpdates updates = FromJsonUtil 407 TableUpdates updates = FromJsonUtil
408 .jsonNodeToTableUpdates(updatesJson, dbSchema); 408 .jsonNodeToTableUpdates(updatesJson, dbSchema);
......