private void handleOpenVSwitchSpecialCase(final Node node, final String databaseName, final String tableName, final UUID uuid) { if (OvsVswitchdSchemaConstants.shouldConfigureController(databaseName, tableName)) { Runnable updateControllerRunnable = new Runnable() { @Override public void run() { try { if (ovsdbConfigurationService != null) { ovsdbConfigurationService.setOFController(node, uuid.toString()); } } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } } }; executor.execute(updateControllerRunnable); } }
public String getSpecialCaseParentUUID(Node node, String databaseName, String childTableName) { if (!databaseName.equals(OvsVswitchdSchemaConstants.DATABASE_NAME)) return null; String[] parentColumn = OvsVswitchdSchemaConstants.getParentColumnToMutate(childTableName); if (parentColumn != null && parentColumn[0].equals(OvsVswitchdSchemaConstants.DATABASE_NAME)) { Connection connection = connectionService.getConnection(node); OpenVSwitch openVSwitch = connection.getClient().getTypedRowWrapper(OpenVSwitch.class, null); ConcurrentMap<String, Row> row = this.getRows(node, openVSwitch.getSchema().getName()); if (row == null || row.size() == 0) return null; return (String)row.keySet().toArray()[0]; } return null; }
OvsdbClient client = connection.getClient(); String[] parentColumn = OvsVswitchdSchemaConstants.getParentColumnToMutate(tableName); if (parentColumn == null) { parentColumn = new String[]{null, null};
@Override @Deprecated public StatusWithUuid insertRow(Node node, String tableName, String parentUuid, Row<GenericTableSchema> row) { String[] parentColumn = OvsVswitchdSchemaConstants.getParentColumnToMutate(tableName); if (parentColumn == null) { parentColumn = new String[]{null, null};