public abstract class Response {
Object error;
+ Object details;
public Object getError() {
return error;
public void setError(Object error) {
this.error = error;
}
+
+ public Object getDetails() {
+ return details;
+ }
+
+ public void setDetails(Object details) {
+ this.details = details;
+ }
+
}
MonitorRequestBuilder monitorReq = new MonitorRequestBuilder();
for (Table<?> table : Tables.getTables()) {
- monitorReq.monitor(table);
+ if (databaseSchema.getTables().keySet().contains(table.getTableName().getName())) {
+ monitorReq.monitor(table);
+ } else {
+ logger.warn("We know about table {} but it is not in the schema of {}", table.getTableName().getName(), connection.getNode().getNodeIDString());
+ }
}
ListenableFuture<TableUpdates> monResponse = connection.getRpc().monitor(monitorReq);
TableUpdates updates = monResponse.get();
+ if (updates.getError() != null) {
+ logger.error("Error configuring monitor, error : {}, details : {}",
+ updates.getError(),
+ updates.getDetails());
+ /* FIXME: This should be cause for alarm */
+ throw new RuntimeException("Failed to setup a monitor in OVSDB");
+ }
UpdateNotification monitor = new UpdateNotification();
monitor.setUpdate(updates);
this.update(connection.getNode(), monitor);