Merge "Updating fix for bug 3989 based on discussion in OVSDB meeting"
authorSam Hague <shague@redhat.com>
Wed, 9 Sep 2015 20:54:57 +0000 (20:54 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 9 Sep 2015 20:54:57 +0000 (20:54 +0000)
177 files changed:
README
commons/integrationtest/pom.xml
commons/parent/pom.xml
commons/pom.xml
features/ovsdb/pom.xml
features/ovsdb/src/main/features/features.xml
features/pom.xml
integrationtest/pom.xml
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/ConfigurationBundles.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/OvsdbIntegrationTestBase.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/plugin/OvsdbPluginIT.java
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/plugin/OvsdbPluginV3IT.java
karaf/pom.xml
library/artifacts/pom.xml [new file with mode: 0644]
library/features/pom.xml [new file with mode: 0644]
library/features/src/main/features/features.xml [new file with mode: 0644]
library/impl/pom.xml [new file with mode: 0644]
library/impl/src/main/config/default-config.xml [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/ConfigActivator.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/EchoServiceCallbackFilters.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/EchoServiceCallbackFilters.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/LockAquisitionCallback.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/LockAquisitionCallback.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/LockStolenCallback.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/LockStolenCallback.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/MonitorCallBack.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/MonitorCallBack.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/MonitorHandle.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/MonitorHandle.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/OvsdbClient.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/OvsdbClient.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnection.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnection.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnectionInfo.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnectionInfo.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnectionListener.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/OvsdbConnectionListener.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/BadSchemaException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/BadSchemaException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/ColumnSchemaNotFoundException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/ColumnSchemaNotFoundException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/InvalidEncodingException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/InvalidEncodingException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/ParsingException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/ParsingException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/SchemaVersionMismatchException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/SchemaVersionMismatchException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/TableSchemaNotFoundException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/TableSchemaNotFoundException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/TyperException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/TyperException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/UnexpectedResultException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/UnexpectedResultException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/UnsupportedArgumentException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/UnsupportedArgumentException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/error/UnsupportedMethodException.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/error/UnsupportedMethodException.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/ChannelConnectionHandler.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/impl/ChannelConnectionHandler.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/FutureTransformUtils.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/impl/FutureTransformUtils.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/LibraryProvider.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbClientImpl.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbClientImpl.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/ExceptionHandler.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/ExceptionHandler.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpc10Request.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpc10Request.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpc10Response.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpc10Response.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEncoder.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEncoder.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEndpoint.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcEndpoint.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcServiceBinderHandler.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcServiceBinderHandler.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonUtils.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonUtils.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/Params.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/Params.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/EchoResponse.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/EchoResponse.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/MonitorRequest.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/MonitorRequest.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/MonitorRequestBuilder.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/MonitorRequestBuilder.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/MonitorSelect.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/MonitorSelect.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/OvsdbRPC.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/OvsdbRPC.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/Response.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/Response.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/TableUpdate.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/TableUpdate.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/TableUpdates.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/TableUpdates.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/TransactBuilder.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/TransactBuilder.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/TransactResponse.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/TransactResponse.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/message/UpdateNotification.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/message/UpdateNotification.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Column.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Column.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Condition.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Condition.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Function.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Function.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Mutation.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Mutation.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Mutator.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Mutator.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/OvsdbMap.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/OvsdbMap.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/OvsdbSet.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/OvsdbSet.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/ReferencedRow.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/ReferencedRow.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/ResultSet.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/ResultSet.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Row.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Row.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/UUID.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/UUID.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/Version.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/Version.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/ConditionSerializer.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/ConditionSerializer.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/Converter.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/Converter.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/MutationSerializer.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/MutationSerializer.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbMapSerializer.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbMapSerializer.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbSetSerializer.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbSetSerializer.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbTypesIdResolver.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbTypesIdResolver.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/RowSerializer.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/RowSerializer.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/UUIDSerializer.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/UUIDSerializer.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/UUIDStringConverter.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/notation/json/UUIDStringConverter.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Abort.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Abort.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Assert.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Assert.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Comment.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Comment.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Commit.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Commit.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/ConditionalOperation.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/ConditionalOperation.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Delete.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Delete.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Insert.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Insert.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Mutate.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Mutate.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Operation.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Operation.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/OperationResult.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/OperationResult.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Operations.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Operations.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Select.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Select.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/TransactionBuilder.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/TransactionBuilder.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Update.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Update.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/operations/Where.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/operations/Where.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/BaseType.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/BaseType.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/ColumnSchema.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/ColumnSchema.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/ColumnType.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/ColumnType.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/DatabaseSchema.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/DatabaseSchema.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/GenericTableSchema.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/GenericTableSchema.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/TableSchema.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/TableSchema.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/MethodType.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/MethodType.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedBaseTable.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedBaseTable.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedColumn.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedColumn.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedTable.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedTable.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TyperUtils.java [moved from library/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TyperUtils.java with 100% similarity]
library/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModule.java [new file with mode: 0644]
library/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleFactory.java [new file with mode: 0644]
library/impl/src/main/yang/library-impl.yang [new file with mode: 0644]
library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java [moved from library/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java with 100% similarity]
library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/NettyBootStrapper.java [moved from library/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/NettyBootStrapper.java with 100% similarity]
library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/TestClient.java [moved from library/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/TestClient.java with 100% similarity]
library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/TestTokens.java [moved from library/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/TestTokens.java with 100% similarity]
library/impl/src/test/java/org/opendaylight/ovsdb/lib/notation/VersionTest.java [moved from library/src/test/java/org/opendaylight/ovsdb/lib/notation/VersionTest.java with 100% similarity]
library/impl/src/test/java/org/opendaylight/ovsdb/lib/schema/OvsdbSchemaTest.java [moved from library/src/test/java/org/opendaylight/ovsdb/lib/schema/OvsdbSchemaTest.java with 100% similarity]
library/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleFactoryTest.java [new file with mode: 0644]
library/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleTest.java [new file with mode: 0644]
library/impl/src/test/resources/logback.xml [moved from library/src/test/resources/logback.xml with 100% similarity]
library/impl/src/test/resources/org/opendaylight/ovsdb/lib/jsonrpc/pretty-test.json [moved from library/src/test/resources/org/opendaylight/ovsdb/lib/jsonrpc/pretty-test.json with 100% similarity]
library/impl/src/test/resources/org/opendaylight/ovsdb/lib/jsonrpc/test.json [moved from library/src/test/resources/org/opendaylight/ovsdb/lib/jsonrpc/test.json with 100% similarity]
library/impl/src/test/resources/org/opendaylight/ovsdb/lib/message/monitor_response1.json [moved from library/src/test/resources/org/opendaylight/ovsdb/lib/message/monitor_response1.json with 100% similarity]
library/impl/src/test/resources/org/opendaylight/ovsdb/lib/message/monitor_response_sample.json [moved from library/src/test/resources/org/opendaylight/ovsdb/lib/message/monitor_response_sample.json with 100% similarity]
library/impl/src/test/resources/org/opendaylight/ovsdb/lib/schema/test_schema.json [moved from library/src/test/resources/org/opendaylight/ovsdb/lib/schema/test_schema.json with 100% similarity]
library/it/pom.xml [new file with mode: 0644]
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/hardwarevtep/HardwareVTEPIT.java [moved from integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/hardwarevtep/HardwareVTEPIT.java with 87% similarity]
library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/openvswitch/OpenVSwitchIT.java [moved from integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/openvswitch/OpenVSwitchIT.java with 95% similarity]
library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIT.java [moved from integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/library/OvsdbLibraryIT.java with 71% similarity]
library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestBase.java [new file with mode: 0644]
library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestUtils.java [new file with mode: 0644]
library/karaf/pom.xml [new file with mode: 0644]
library/pom.xml [changed mode: 0755->0644]
library/src/main/java/org/opendaylight/ovsdb/lib/osgi/Activator.java [deleted file]
northbound/pom.xml
openstack/net-virt-it/pom.xml
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/AbstractConfigTestBase.java [deleted file]
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/AbstractMdsalTestBase.java [deleted file]
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java
openstack/net-virt-providers/pom.xml
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/PipelineOrchestratorImpl.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/ArpResponderService.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/L3ForwardingService.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/RoutingService.java
openstack/net-virt/pom.xml
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/Southbound.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/SouthboundImpl.java
openstack/pom.xml
ovs-sfc/pom.xml
ovsdb-artifacts/pom.xml
ovsdb-plugin-compatibility-layer/pom.xml
plugin-mdsal-adapter/pom.xml
plugin-shell/pom.xml
plugin/pom.xml
pom.xml
schemas/hardwarevtep/pom.xml
schemas/openvswitch/pom.xml
schemas/pom.xml
southbound/pom.xml
southbound/southbound-api/pom.xml
southbound/southbound-artifacts/pom.xml
southbound/southbound-features/pom.xml
southbound/southbound-impl/pom.xml
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstanceTest.java [new file with mode: 0644]
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java [new file with mode: 0644]
southbound/southbound-it/pom.xml
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/AbstractConfigTestBase.java [deleted file]
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/AbstractMdsalTestBase.java [deleted file]
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java
southbound/southbound-karaf/pom.xml
utils/config/pom.xml
utils/mdsal-node/pom.xml
utils/mdsal-openflow/pom.xml
utils/servicehelper/pom.xml

diff --git a/README b/README
index dbd624950385ff532a85f60f012eae2a8db09e6d..34539ffc98a8597250f163fab641aa3ac05bd014 100644 (file)
--- a/README
+++ b/README
@@ -126,7 +126,7 @@ Pre-requisites : JDK 1.7+, Maven 3+
       deployment needs.
 
    2. From the features/ directory, execute "mvn clean install"
-      This will generate a kar file such as "features/target/ovsdb-features-1.2.0-SNAPSHOT.kar"
+      This will generate a kar file such as "features/target/ovsdb-features-1.2.1-SNAPSHOT.kar"
 
    3. Download (or build from controller project) the Karaf distribution :
       http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/controller/distribution.opendaylight-karaf/
@@ -143,14 +143,14 @@ Pre-requisites : JDK 1.7+, Maven 3+
    opendaylight-user@root>kar:list
    KAR Name
    -----------------------------
-   ovsdb-features-1.2.0-SNAPSHOT
+   ovsdb-features-1.2.1-SNAPSHOT
 
    opendaylight-user@root>feature:list | grep ovsdb
-   odl-ovsdb-all | 1.2.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OpenDaylight :: OVSDB :: all
-   odl-ovsdb-library | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OVSDB :: Library
-   odl-ovsdb-schema-openvswitch | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OVSDB :: Schema :: Open_vSwitch
-   odl-ovsdb-schema-hardwarevtep | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OVSDB :: Schema :: hardware_vtep
-   odl-ovsdb-plugin | 1.0.0-SNAPSHOT | x | ovsdb-1.2.0-SNAPSHOT | OpenDaylight :: OVSDB :: Plugin
+   odl-ovsdb-all | 1.2.1-SNAPSHOT | x | ovsdb-1.2.1-SNAPSHOT | OpenDaylight :: OVSDB :: all
+   odl-ovsdb-library | 1.0.0-SNAPSHOT | x | ovsdb-1.2.1-SNAPSHOT | OVSDB :: Library
+   odl-ovsdb-schema-openvswitch | 1.0.0-SNAPSHOT | x | ovsdb-1.2.1-SNAPSHOT | OVSDB :: Schema :: Open_vSwitch
+   odl-ovsdb-schema-hardwarevtep | 1.0.0-SNAPSHOT | x | ovsdb-1.2.1-SNAPSHOT | OVSDB :: Schema :: hardware_vtep
+   odl-ovsdb-plugin | 1.0.0-SNAPSHOT | x | ovsdb-1.2.1-SNAPSHOT | OpenDaylight :: OVSDB :: Plugin
 
    opendaylight-user@root>bundle:list | grep OVSDB
    186 | Active | 80 | 1.0.0.SNAPSHOT | OVSDB Library
index fc51f72729819e7a6560a95a98312fb948062611..84265c6d5f787883097df26b4ff099f566e12e13 100644 (file)
@@ -752,7 +752,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>properties-maven-plugin</artifactId>
-        <version>${propertymavenplugin.version}</version>
         <executions>
           <execution>
             <goals>
index c9c7ee12e3dc1754d518b8c4b3309b2541b1dc27..bd48626709d0c5da854a46df48a0e19774b5e2bd 100644 (file)
@@ -54,21 +54,21 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <!-- Surefire/Failsafe Arguments -->
     <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
     <!-- OVSDB Component Versions -->
-    <openstack.netvirt.version>1.2.0-SNAPSHOT</openstack.netvirt.version>
-    <openstack.netvirt.providers.version>1.2.0-SNAPSHOT</openstack.netvirt.providers.version>
-    <ovsdb.features.version>1.2.0-SNAPSHOT</ovsdb.features.version>
-    <ovsdb.library.version>1.2.0-SNAPSHOT</ovsdb.library.version>
+    <openstack.netvirt.version>1.2.1-SNAPSHOT</openstack.netvirt.version>
+    <openstack.netvirt.providers.version>1.2.1-SNAPSHOT</openstack.netvirt.providers.version>
+    <ovsdb.features.version>1.2.1-SNAPSHOT</ovsdb.features.version>
+    <ovsdb.library.version>1.2.1-SNAPSHOT</ovsdb.library.version>
     <ovsdb.northbound.version>0.8.0-SNAPSHOT</ovsdb.northbound.version>
-    <ovsdb.plugin.version>1.2.0-SNAPSHOT</ovsdb.plugin.version>
-    <ovsdb.plugin.compatibility.layer.version>1.2.0-SNAPSHOT</ovsdb.plugin.compatibility.layer.version>
+    <ovsdb.plugin.version>1.2.1-SNAPSHOT</ovsdb.plugin.version>
+    <ovsdb.plugin.compatibility.layer.version>1.2.1-SNAPSHOT</ovsdb.plugin.compatibility.layer.version>
     <ovsdb.ovssfc.version>0.2.0-SNAPSHOT</ovsdb.ovssfc.version>
-    <ovsdb.utils.config.version>1.2.0-SNAPSHOT</ovsdb.utils.config.version>
-    <ovsdb.utils.mdsal.node.version>1.2.0-SNAPSHOT</ovsdb.utils.mdsal.node.version>
-    <ovsdb.utils.mdsal.openflow.version>1.2.0-SNAPSHOT</ovsdb.utils.mdsal.openflow.version>
-    <ovsdb.utils.servicehelper.version>1.2.0-SNAPSHOT</ovsdb.utils.servicehelper.version>
-    <plugin.shell.version>1.2.0-SNAPSHOT</plugin.shell.version>
-    <schema.hardwarevtep.version>1.2.0-SNAPSHOT</schema.hardwarevtep.version>
-    <schema.openvswitch.version>1.2.0-SNAPSHOT</schema.openvswitch.version>
+    <ovsdb.utils.config.version>1.2.1-SNAPSHOT</ovsdb.utils.config.version>
+    <ovsdb.utils.mdsal.node.version>1.2.1-SNAPSHOT</ovsdb.utils.mdsal.node.version>
+    <ovsdb.utils.mdsal.openflow.version>1.2.1-SNAPSHOT</ovsdb.utils.mdsal.openflow.version>
+    <ovsdb.utils.servicehelper.version>1.2.1-SNAPSHOT</ovsdb.utils.servicehelper.version>
+    <plugin.shell.version>1.2.1-SNAPSHOT</plugin.shell.version>
+    <schema.hardwarevtep.version>1.2.1-SNAPSHOT</schema.hardwarevtep.version>
+    <schema.openvswitch.version>1.2.1-SNAPSHOT</schema.openvswitch.version>
     <!-- Skip Coverage and IT by default -->
     <skip.coverage>true</skip.coverage>
     <skip.distribution>false</skip.distribution>
@@ -446,7 +446,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <plugin>
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
-          <version>${jacoco.version}</version>
           <configuration>
             <skip>${skip.coverage}</skip>
           </configuration>
index 26afb3a2805785dc928d12eb6367d4cf4e75752f..54170414a3ba04eeb85794e57f15cdd3e0866e9d 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>parents</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
index e69008352b478e411bf781e9202521d63862719f..8fcb70cc93ac80da0ae1266a7c4225f17d0f8b23 100644 (file)
@@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>features-ovsdb</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
@@ -50,20 +50,21 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
     <io.netty.version>3.8.0.Final</io.netty.version>
     <networkconfig.neutron.version>0.6.0-SNAPSHOT</networkconfig.neutron.version>
-    <ovsdb.library.version>1.2.0-SNAPSHOT</ovsdb.library.version>
-    <openstack.netvirt.version>1.2.0-SNAPSHOT</openstack.netvirt.version>
-    <openstack.netvirt.providers.version>1.2.0-SNAPSHOT</openstack.netvirt.providers.version>
-    <ovsdb.plugin.version>1.2.0-SNAPSHOT</ovsdb.plugin.version>
-    <ovsdb.plugin.compatibility.layer.version>1.2.0-SNAPSHOT</ovsdb.plugin.compatibility.layer.version>
-    <ovsdb.utils.servicehelper.version>1.2.0-SNAPSHOT</ovsdb.utils.servicehelper.version>
-    <plugin.shell.version>1.2.0-SNAPSHOT</plugin.shell.version>
-    <schema.hardwarevtep.version>1.2.0-SNAPSHOT</schema.hardwarevtep.version>
-    <schema.openvswitch.version>1.2.0-SNAPSHOT</schema.openvswitch.version>
+    <ovsdb.library.version>1.2.1-SNAPSHOT</ovsdb.library.version>
+    <openstack.netvirt.version>1.2.1-SNAPSHOT</openstack.netvirt.version>
+    <openstack.netvirt.providers.version>1.2.1-SNAPSHOT</openstack.netvirt.providers.version>
+    <ovsdb.plugin.version>1.2.1-SNAPSHOT</ovsdb.plugin.version>
+    <ovsdb.plugin.compatibility.layer.version>1.2.1-SNAPSHOT</ovsdb.plugin.compatibility.layer.version>
+    <ovsdb.utils.servicehelper.version>1.2.1-SNAPSHOT</ovsdb.utils.servicehelper.version>
+    <plugin.shell.version>1.2.1-SNAPSHOT</plugin.shell.version>
+    <schema.hardwarevtep.version>1.2.1-SNAPSHOT</schema.hardwarevtep.version>
+    <schema.openvswitch.version>1.2.1-SNAPSHOT</schema.openvswitch.version>
     <openflowplugin.version>0.2.0-SNAPSHOT</openflowplugin.version>
     <sal.version>0.10.0-SNAPSHOT</sal.version>
     <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
     <dlux.core.version>0.3.0-SNAPSHOT</dlux.core.version>
     <ovsdb.ui.version>0.1.0-SNAPSHOT</ovsdb.ui.version>
+    <config.version>0.4.0-SNAPSHOT</config.version>
   </properties>
 
   <dependencyManagement>
@@ -246,11 +247,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.ovsdb</groupId>
-      <artifactId>library</artifactId>
-      <version>${ovsdb.library.version}</version>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.ovsdb</groupId>
       <artifactId>openstack.net-virt</artifactId>
@@ -327,5 +323,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>library-features</artifactId>
+      <version>${ovsdb.library.version}</version>
+      <type>xml</type>
+      <classifier>features</classifier>
+    </dependency>
   </dependencies>
 </project>
index aea37b92a769086845f6992f3844a63be7ddde69..03f5c9b4d0955003aeb0b98b15ab6fe16e6491d1 100644 (file)
@@ -5,8 +5,9 @@
   <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin-extension/${openflowplugin.version}/xml/features</repository>
   <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin/${openflowplugin.version}/xml/features</repository>
   <repository>mvn:org.opendaylight.neutron/features-neutron/${networkconfig.neutron.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.ovsdb/southbound-features/1.2.0-SNAPSHOT/xml/features</repository>
+  <repository>mvn:org.opendaylight.ovsdb/southbound-features/1.2.1-SNAPSHOT/xml/features</repository>
   <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.ovsdb/library-features/${ovsdb.library.version}/xml/features</repository>
 
   <feature name="odl-ovsdb-all" description="OpenDaylight :: OVSDB :: all"
            version='${project.version}'>
     <feature version="${ovsdb.plugin.version}">odl-ovsdb-plugin</feature>
   </feature>
 
-  <feature name="odl-ovsdb-library" description="OVSDB :: Library"
-           version='${ovsdb.library.version}'>
-    <bundle>mvn:org.osgi/org.osgi.compendium/${osgi.compendium.version}</bundle>
-    <bundle>mvn:org.apache.felix/org.apache.felix.dependencymanager/${felix.dependencymanager.version}</bundle>
-    <bundle>mvn:org.apache.felix/org.apache.felix.dependencymanager.shell/${felix.dependencymanager.shell.version}</bundle>
-    <bundle>mvn:org.opendaylight.controller/dummy-console/1.3.0-SNAPSHOT</bundle>
-    <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
-    <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
-    <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
-    <bundle start="true">mvn:com.google.guava/guava/${guava.version}</bundle>
-    <bundle>wrap:mvn:io.netty/netty-buffer/${netty.version}</bundle>
-    <bundle>wrap:mvn:io.netty/netty-codec/${netty.version}</bundle>
-    <bundle>wrap:mvn:io.netty/netty-transport/${netty.version}</bundle>
-    <bundle>wrap:mvn:io.netty/netty-common/${netty.version}</bundle>
-    <bundle>wrap:mvn:io.netty/netty-handler/${netty.version}</bundle>
-    <bundle>wrap:mvn:io.netty/netty-codec-http/${netty.version}</bundle>
-    <bundle>mvn:io.netty/netty/${io.netty.version}</bundle>
-    <bundle>mvn:org.apache.commons/commons-lang3/${commons.lang3.version}</bundle>
-    <bundle>mvn:org.osgi/org.osgi.core/${osgi.core.version}</bundle>
-    <bundle>mvn:com.google.code.gson/gson/${gson.version}</bundle>
-    <bundle>mvn:org.opendaylight.ovsdb/library/${ovsdb.library.version}</bundle>
-  </feature>
-
   <feature name="odl-ovsdb-schema-openvswitch" description="OVSDB :: Schema :: Open_vSwitch"
            version='${schema.openvswitch.version}'>
     <feature version="${ovsdb.library.version}">odl-ovsdb-library</feature>
@@ -55,6 +33,9 @@
     <feature version="${ovsdb.library.version}">odl-ovsdb-library</feature>
     <feature version="${schema.openvswitch.version}">odl-ovsdb-schema-openvswitch</feature>
     <feature version="${schema.hardwarevtep.version}">odl-ovsdb-schema-hardwarevtep</feature>
+    <bundle>mvn:org.apache.felix/org.apache.felix.dependencymanager/${felix.dependencymanager.version}</bundle>
+    <bundle>mvn:org.apache.felix/org.apache.felix.dependencymanager.shell/${felix.dependencymanager.shell.version}</bundle>
+    <bundle>mvn:org.osgi/org.osgi.compendium/${osgi.compendium.version}</bundle>
     <bundle>mvn:org.opendaylight.ovsdb/plugin/${ovsdb.plugin.version}</bundle>
     <bundle>mvn:org.opendaylight.ovsdb/plugin-shell/${plugin.shell.version}</bundle>
   </feature>
@@ -64,7 +45,7 @@
     <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
     <feature version="${openflowplugin.version}">odl-openflowplugin-nsf-model</feature>
     <feature version="${networkconfig.neutron.version}">odl-neutron-service</feature>
-    <feature version="1.2.0-SNAPSHOT">odl-ovsdb-southbound-impl-ui</feature>
+    <feature version="1.2.1-SNAPSHOT">odl-ovsdb-southbound-impl-ui</feature>
     <feature version="${openflowplugin.version}">odl-openflowplugin-flow-services</feature>
     <feature version="${openflowplugin.version}">odl-openflowplugin-nxm-extensions</feature>
     <bundle>mvn:org.opendaylight.ovsdb/utils.servicehelper/${ovsdb.utils.servicehelper.version}</bundle>
index b6755c9ced4d7b4b7c35873fd6c33ebe14dafcac..4ecf374e6becb6d1f520999ed2e6829086eeb0ae 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>features</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
index 4e64f336d0191c43676362cd7f02ad3a82052aaa..c6a9c3debb2110355de2b5dcd1933d57be6b2e8e 100644 (file)
@@ -75,10 +75,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <!-- Should be in a parent POM -->
       <version>4.4.0</version>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.ovsdb</groupId>
-      <artifactId>library</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
       <artifactId>org.osgi.core</artifactId>
@@ -163,7 +159,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
-        <version>${failsafe.version}</version>
         <executions>
           <execution>
             <id>failsafe-integration-tests</id>
@@ -193,37 +188,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           <groupId>org.ops4j.pax.exam</groupId>
           <artifactId>pax-exam-container-native</artifactId>
         </dependency>
-        <dependency>
-          <groupId>org.ops4j.pax.exam</groupId>
-          <artifactId>pax-exam-container-karaf</artifactId>
-          <scope>compile</scope>
-        </dependency>
       </dependencies>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-failsafe-plugin</artifactId>
-            <version>${failsafe.version}</version>
-            <configuration>
-            </configuration>
-            <executions>
-              <execution>
-                <id>failsafe-integration-tests</id>
-                <phase>integration-test</phase>
-                <goals>
-                  <goal>integration-test</goal>
-                </goals>
-                <configuration>
-                  <classpathDependencyExcludes>
-                    <classpathDependencyExcludes>org.ops4j.pax.exam:pax-exam-container-karaf</classpathDependencyExcludes>
-                  </classpathDependencyExcludes>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
     </profile>
     <profile>
       <id>karafit</id>
index 262bea79965084c9b53e64ba00740875fd34b841..0708a9c2d7f7ad430b33b7e0bdaf3788c36e1f55 100644 (file)
@@ -44,118 +44,7 @@ public class ConfigurationBundles {
         );
     }
 
-    public static Option controllerNorthboundBundles() {
-        return new DefaultCompositeOption(
-                mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(),
-
-                // setting default level. Jersey bundles will need to be started
-                // earlier.
-                systemProperty("osgi.bundles.defaultStartLevel").value("4"),
-                mavenBundle("com.fasterxml.jackson.jaxrs", "jackson-jaxrs-base").versionAsInProject(),
-                mavenBundle("com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider").versionAsInProject(),
-                mavenBundle("com.fasterxml.jackson.module", "jackson-module-jaxb-annotations").versionAsInProject(),
-                mavenBundle("com.sun.jersey", "jersey-client").versionAsInProject(),
-                mavenBundle("com.sun.jersey", "jersey-core").versionAsInProject().startLevel(2),
-                mavenBundle("com.sun.jersey", "jersey-server").versionAsInProject().startLevel(2),
-                mavenBundle("commons-codec", "commons-codec").versionAsInProject(),
-                mavenBundle("commons-fileupload", "commons-fileupload").versionAsInProject(),
-                mavenBundle("commons-io", "commons-io").versionAsInProject(),
-                mavenBundle("eclipselink", "javax.persistence").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "javax.servlet.jsp").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.eclipse.equinox.cm").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.eclipse.equinox.launcher").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.eclipse.osgi.services").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.gemini.web.core").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.gemini.web.extender").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.gemini.web.tomcat").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.kernel.equinox.extensions").versionAsInProject().noStart(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.util.common").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.util.io").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.util.math").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.util.osgi").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.util.osgi.manifest").versionAsInProject(),
-                mavenBundle("geminiweb", "org.eclipse.virgo.util.parser.manifest").versionAsInProject(),
-                mavenBundle("orbit", "javax.activation").versionAsInProject(),
-                mavenBundle("orbit", "javax.annotation").versionAsInProject(),
-                mavenBundle("orbit", "javax.ejb").versionAsInProject(),
-                mavenBundle("orbit", "javax.el").versionAsInProject(),
-                mavenBundle("orbit", "javax.mail.glassfish").versionAsInProject(),
-                mavenBundle("orbit", "javax.servlet.jsp.jstl").versionAsInProject(),
-                mavenBundle("orbit", "javax.servlet.jsp.jstl.impl").versionAsInProject(),
-                mavenBundle("orbit", "javax.xml.rpc").versionAsInProject(),
-                mavenBundle("orbit", "javax.xml.rpc").versionAsInProject(),
-                mavenBundle("orbit", "org.apache.catalina").versionAsInProject(),
-                mavenBundle("orbit", "org.apache.catalina.ha").versionAsInProject().noStart(),
-                mavenBundle("orbit", "org.apache.catalina.tribes").versionAsInProject().noStart(),
-                mavenBundle("orbit", "org.apache.coyote").versionAsInProject().noStart(),
-                mavenBundle("orbit", "org.apache.el").versionAsInProject(),
-                mavenBundle("orbit", "org.apache.jasper").versionAsInProject().noStart(),
-                mavenBundle("orbit", "org.apache.juli.extras").versionAsInProject(),
-                mavenBundle("orbit", "org.apache.tomcat.api").versionAsInProject(),
-                mavenBundle("orbit", "org.apache.tomcat.util").versionAsInProject().noStart(),
-                mavenBundle("org.aopalliance", "com.springsource.org.aopalliance").versionAsInProject(),
-                mavenBundle("org.apache.felix", "org.apache.felix.fileinstall").versionAsInProject(),
-                mavenBundle("org.codehaus.jettison", "jettison").versionAsInProject(),
-                mavenBundle("org.jboss.spec.javax.transaction", "jboss-transaction-api_1.1_spec").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "clustering.services").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "clustering.services-implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "configuration").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "containermanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "containermanager.it.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "sal").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "sal.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "bundlescanner").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "bundlescanner.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "commons.httpclient").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "commons.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "configuration.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "flowprogrammer.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "forwarding.staticrouting").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "forwarding.staticrouting.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "forwardingrulesmanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "hosttracker").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "hosttracker.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "hosttracker.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "logging.bridge").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "routing.dijkstra_implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "security").versionAsInProject().noStart(),
-                mavenBundle("org.opendaylight.controller", "statistics.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "statisticsmanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "subnets.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "switchmanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "switchmanager.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "switchmanager.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "topology.northbound").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "topologymanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "usermanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "usermanager.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller.thirdparty", "com.sun.jersey.jersey-servlet").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller.thirdparty", "net.sf.jung2").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller.thirdparty", "org.apache.catalina.filters.CorsFilter").versionAsInProject().noStart(),
-                mavenBundle("org.ow2.asm", "asm-all").versionAsInProject(),
-                mavenBundle("org.ow2.chameleon.management", "chameleon-mbeans").versionAsInProject(),
-                mavenBundle("org.slf4j", "jcl-over-slf4j").versionAsInProject(),
-                mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.aop").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.asm").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.beans").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.context").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.context.support").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.core").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.expression").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.transaction").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.web").versionAsInProject(),
-                mavenBundle("org.springframework", "org.springframework.web.servlet").versionAsInProject(),
-                mavenBundle("org.springframework.security", "spring-security-config").versionAsInProject(),
-                mavenBundle("org.springframework.security", "spring-security-core").versionAsInProject(),
-                mavenBundle("org.springframework.security", "spring-security-taglibs").versionAsInProject(),
-                mavenBundle("org.springframework.security", "spring-security-web").versionAsInProject(),
-                mavenBundle("virgomirror", "org.eclipse.jdt.core.compiler.batch").versionAsInProject(),
-                mavenBundle("org.yaml", "snakeyaml").versionAsInProject()
-                );
-    }
-
-    public static Option ovsdbLibraryBundles() {
+        public static Option ovsdbLibraryBundles() {
         return new DefaultCompositeOption(
                 mavenBundle("io.netty", "netty-buffer").versionAsInProject(),
                 mavenBundle("io.netty", "netty-codec").versionAsInProject(),
@@ -186,20 +75,13 @@ public class ConfigurationBundles {
         );
     }
 
-    public static Option ovsdbNeutronBundles() {
-        return new DefaultCompositeOption(
-                mavenBundle("commons-net", "commons-net").versionAsInProject(),
-                mavenBundle("org.opendaylight.neutron", "neutron-spi").versionAsInProject(),
-                mavenBundle("org.opendaylight.ovsdb", "openstack.net-virt").versionAsInProject()
-        );
-    }
-
-    public static Option mdsalBundles() {
+        public static Option mdsalBundles() {
         return new DefaultCompositeOption(
                 TestHelper.configMinumumBundles(),
                 TestHelper.baseModelBundles(),
                 TestHelper.flowCapableModelBundles(),
-                TestHelper.junitAndMockitoBundles()
+                TestHelper.junitAndMockitoBundles(),
+                TestHelper.bindingAwareSalBundles()
         );
     }
 }
index bb101eb4d798beb2856c371a561da312885cbcdd..3febeb32d9d40dbaab47f4c56c7196742126e66a 100644 (file)
@@ -9,31 +9,21 @@
  */
 package org.opendaylight.ovsdb.integrationtest;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.IOException;
-import java.net.InetAddress;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.ovsdb.lib.OvsdbClient;
-import org.opendaylight.ovsdb.lib.OvsdbConnection;
-import org.opendaylight.ovsdb.lib.OvsdbConnectionListener;
 import org.opendaylight.ovsdb.plugin.api.ConnectionConstants;
 import org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService;
 
@@ -58,12 +48,9 @@ public abstract class OvsdbIntegrationTestBase {
     protected final static String DEFAULT_SERVER_PORT = "6640";
 
     private static boolean bundlesReady = false;
-    public final static String OPEN_VSWITCH_SCHEMA = "Open_vSwitch";
-    public final static String HARDWARE_VTEP = "hardware_vtep";
 
     public Properties loadProperties() {
-        Properties props = new Properties(System.getProperties());
-        return props;
+        return System.getProperties();
     }
 
     public Node getPluginTestConnection() throws IOException, InterruptedException, ExecutionException, TimeoutException {
@@ -81,7 +68,7 @@ public abstract class OvsdbIntegrationTestBase {
                 fail(usage());
             }
 
-            Map<ConnectionConstants, String> params = new HashMap<ConnectionConstants, String>();
+            Map<ConnectionConstants, String> params = new HashMap<>();
             params.put(ConnectionConstants.ADDRESS, addressStr);
             params.put(ConnectionConstants.PORT, portStr);
             node = connection.connect(IDENTIFIER, params);
@@ -102,77 +89,12 @@ public abstract class OvsdbIntegrationTestBase {
         return node;
     }
 
-    public OvsdbClient getTestConnection() throws IOException, InterruptedException, ExecutionException, TimeoutException {
-        Properties props = loadProperties();
-        String addressStr = props.getProperty(SERVER_IPADDRESS);
-        String portStr = props.getProperty(SERVER_PORT, DEFAULT_SERVER_PORT);
-        String connectionType = props.getProperty(CONNECTION_TYPE, "active");
-
-        // If the connection type is active, controller connects to the ovsdb-server
-        if (connectionType.equalsIgnoreCase(CONNECTION_TYPE_ACTIVE)) {
-            if (addressStr == null) {
-                fail(usage());
-            }
-
-            InetAddress address;
-            try {
-                address = InetAddress.getByName(addressStr);
-            } catch (Exception e) {
-                System.out.println("Unable to resolve " + addressStr);
-                e.printStackTrace();
-                return null;
-            }
-
-            Integer port;
-            try {
-                port = Integer.parseInt(portStr);
-            } catch (NumberFormatException e) {
-                System.out.println("Invalid port number : " + portStr);
-                e.printStackTrace();
-                return null;
-            }
-
-            OvsdbConnection connection = (OvsdbConnection)ServiceHelper.getGlobalInstance(OvsdbConnection.class, this);
-            return connection.connect(address, port);
-        } else if (connectionType.equalsIgnoreCase(CONNECTION_TYPE_PASSIVE)) {
-            ExecutorService executor = Executors.newFixedThreadPool(1);
-            Future<OvsdbClient> passiveConnection = executor.submit(new PassiveListener());
-            return passiveConnection.get(60, TimeUnit.SECONDS);
-        }
-        fail("Connection parameter ("+CONNECTION_TYPE+") must be either active or passive");
-        return null;
-    }
-
     protected String usage() {
         return "Integration Test needs a valid connection configuration as follows :\n" +
                "active connection : mvn -Pintegrationtest -Dovsdbserver.ipaddress=x.x.x.x -Dovsdbserver.port=yyyy verify\n"+
                "passive connection : mvn -Pintegrationtest -Dovsdbserver.connection=passive verify\n";
     }
 
-    public class PassiveListener implements Callable<OvsdbClient>, OvsdbConnectionListener {
-        OvsdbClient client = null;
-        @Override
-        public OvsdbClient call() throws Exception {
-            OvsdbConnection connection = (OvsdbConnection)ServiceHelper.getGlobalInstance(OvsdbConnection.class, this);
-            connection.registerConnectionListener(this);
-            while (client == null) {
-                Thread.sleep(500);
-            }
-            return client;
-        }
-
-        @Override
-        public void connected(OvsdbClient client) {
-            this.client = client;
-        }
-
-        @Override
-        public void disconnected(OvsdbClient client) {
-            assertEquals(this.client.getConnectionInfo(), client.getConnectionInfo());
-            this.client = null;
-        }
-    }
-
     public String stateToString(int state) {
         switch (state) {
             case Bundle.ACTIVE:
index f15f26fbf853915b159e1d2d12394a01ad184a56..41582a7c6b4eba076c94cc6b3ec9df4af7e3cfcd 100644 (file)
@@ -20,6 +20,7 @@ import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
 import org.junit.After;
+import org.junit.Ignore;
 import org.opendaylight.ovsdb.integrationtest.ConfigurationBundles;
 import org.opendaylight.ovsdb.integrationtest.OvsdbIntegrationTestBase;
 import org.opendaylight.ovsdb.lib.OvsdbClient;
@@ -66,6 +67,7 @@ import java.util.concurrent.ConcurrentMap;
 
 import javax.inject.Inject;
 
+@Ignore
 @RunWith(PaxExam.class)
 public class OvsdbPluginIT extends OvsdbIntegrationTestBase {
     private static final Logger LOG = LoggerFactory.getLogger(OvsdbPluginIT.class);
index c330f3273545e5360a5b892bc8beb4d4061a0aac..6c3370d24bf7201554a8f4cc88b19e991f2c4fa0 100644 (file)
@@ -30,6 +30,7 @@ import javax.inject.Inject;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
@@ -67,6 +68,7 @@ import org.slf4j.LoggerFactory;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Sets;
 
+@Ignore
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerSuite.class)
 public class OvsdbPluginV3IT extends OvsdbIntegrationTestBase {
index 50bf1b210dc08d23b4a83e9997dfb761b4ca7fbd..536535cd2f049625fa91546fba964bf6915f862c 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>karaf</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <prerequisites>
     <maven>3.1.1</maven>
diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml
new file mode 100644 (file)
index 0000000..bdd4296
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <artifactId>library-artifacts</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>library</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>library-features</artifactId>
+        <version>${project.version}</version>
+        <classifier>features</classifier>
+        <type>xml</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+</project>
diff --git a/library/features/pom.xml b/library/features/pom.xml
new file mode 100644 (file)
index 0000000..49fc0f9
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved. and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>features-parent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <artifactId>library-features</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <properties>
+    <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
+    <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
+    <dlux.version>0.3.0-SNAPSHOT</dlux.version>
+    <configfile.directory>etc/opendaylight/karaf</configfile.directory>
+  </properties>
+  <dependencyManagement>
+    <dependencies>
+      <!-- project specific dependencies -->
+      <dependency>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>${mdsal.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>features-yangtools</artifactId>
+      <classifier>features</classifier>
+      <version>${yangtools.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-mdsal</artifactId>
+      <classifier>features</classifier>
+      <version>${mdsal.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-restconf</artifactId>
+      <classifier>features</classifier>
+      <version>${mdsal.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.dlux</groupId>
+      <artifactId>features-dlux</artifactId>
+      <classifier>features</classifier>
+      <version>${dlux.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>library</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>library</artifactId>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>config</classifier>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/library/features/src/main/features/features.xml b/library/features/src/main/features/features.xml
new file mode 100644 (file)
index 0000000..5681b92
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<features name="odl-ovsdb-library-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+  <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.controller/features-restconf/${mdsal.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.version}/xml/features</repository>
+  <feature name='odl-ovsdb-library' version='${project.version}' description='OpenDaylight :: library'>
+    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
+    <feature version='${yangtools.version}'>odl-yangtools-models</feature>
+    <bundle>mvn:org.opendaylight.ovsdb/library/${project.version}</bundle>
+    <!-- Test only (move to another feature) -->
+    <bundle>mvn:org.opendaylight.ovsdb/utils.servicehelper/${project.version}</bundle>
+    <bundle>mvn:org.opendaylight.ovsdb/schema.openvswitch/${project.version}</bundle>
+    <!-- Test only ends -->
+    <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
+    <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
+    <bundle start="true">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
+    <configfile finalname="${configfile.directory}/library.xml">mvn:org.opendaylight.ovsdb/library/${project.version}/xml/config</configfile>
+  </feature>
+</features>
diff --git a/library/impl/pom.xml b/library/impl/pom.xml
new file mode 100644 (file)
index 0000000..04e0b5e
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: --><!--
+Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <artifactId>library</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-annotations</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.netty</groupId>
+      <artifactId>netty-all</artifactId>
+      <version>4.0.26.Final</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>config-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal-binding-api</artifactId>
+    </dependency>
+
+    <!-- Testing Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <testResources>
+      <testResource>
+        <filtering>true</filtering>
+        <directory>src/test/resources</directory>
+      </testResource>
+    </testResources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/library/impl/src/main/config/default-config.xml b/library/impl/src/main/config/default-config.xml
new file mode 100644 (file)
index 0000000..e8b159f
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<snapshot>
+  <required-capabilities>
+      <capability>urn:opendaylight:params:xml:ns:yang:library:impl?module=library&amp;revision=2014-12-10</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+  </required-capabilities>
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:library:impl">prefix:library</type>
+          <name>library-default</name>
+          <broker>
+            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
+            <name>binding-osgi-broker</name>
+          </broker>
+        </module>
+      </modules>
+    </data>
+  </configuration>
+</snapshot>
diff --git a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/ConfigActivator.java b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/ConfigActivator.java
new file mode 100644 (file)
index 0000000..1092ccd
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.ovsdb.lib;
+
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * "Configuration" activator for the OVSDB library.
+ */
+public class ConfigActivator implements BundleActivator {
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(ConfigActivator.class);
+
+    /**
+     * Parent provider context.
+     */
+    private final BindingAwareBroker.ProviderContext providerContext;
+
+    /**
+     * Creates an instance of the activator.
+     *
+     * @param providerContext The parent provider context.
+     */
+    public ConfigActivator(BindingAwareBroker.ProviderContext providerContext) {
+        LOG.info("OVSDB library ConfigActivator created.");
+        this.providerContext = providerContext;
+    }
+
+    @Override
+    public void start(BundleContext context) throws Exception {
+        LOG.info("OVSDB library ConfigActivator starting.");
+        context.registerService(OvsdbConnection.class, new OvsdbConnectionService(), null);
+        // TODO Need to indicate that OvsdbConnectionListeners should register with the connection service
+        // (if I've understood correctly, the old dependency manager would call registerConnectionListener()
+        // whenever an instance of OvsdbConnection is retrieved, and unregisterConnectionListener() when it
+        // is no longer used)
+        // (All current users register manually...)
+    }
+
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        LOG.info("OVSDB library ConfigActivator stopping.");
+    }
+}
diff --git a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/LibraryProvider.java b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/LibraryProvider.java
new file mode 100644 (file)
index 0000000..63c5783
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.ovsdb.lib.impl;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
+import org.opendaylight.ovsdb.lib.ConfigActivator;
+import org.opendaylight.ovsdb.lib.OvsdbConnection;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LibraryProvider implements BindingAwareProvider, AutoCloseable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LibraryProvider.class);
+    private final BundleContext bundleContext;
+    private DataBroker dataBroker;
+    private ConfigActivator activator;
+
+    public LibraryProvider(BundleContext bundleContext) {
+        LOG.info("LibraryProvider: bundleContext: {}", bundleContext);
+        this.bundleContext = bundleContext;
+    }
+
+    @Override
+    public void onSessionInitiated(ProviderContext providerContext) {
+        LOG.info("LibraryProvider Session Initiated");
+        dataBroker = providerContext.getSALService(DataBroker.class);
+        LOG.info("LibraryProvider: onSessionInitiated dataBroker: {}", dataBroker);
+        this.activator = new ConfigActivator(providerContext);
+        try {
+            activator.start(bundleContext);
+        } catch (Exception e) {
+            LOG.warn("Failed to start LibraryProvider: ", e);
+        }
+    }
+
+    @Override
+    public void close() throws Exception {
+        LOG.info("LibraryProvider Closed");
+        if (activator != null) {
+            activator.stop(bundleContext);
+        }
+    }
+
+}
diff --git a/library/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModule.java b/library/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModule.java
new file mode 100644 (file)
index 0000000..8fc9039
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210;
+
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
+import org.opendaylight.ovsdb.lib.impl.LibraryProvider;
+import org.osgi.framework.BundleContext;
+
+import com.google.common.base.Preconditions;
+
+public class LibraryModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210.AbstractLibraryModule {
+    private BundleContext bundleContext;
+
+    public LibraryModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public LibraryModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, LibraryModule oldModule, AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void customValidation() {
+        // add custom validation form module attributes here.
+        Preconditions.checkNotNull(bundleContext);
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        LibraryProvider provider = new LibraryProvider(bundleContext);
+        getBrokerDependency().registerProvider(provider);
+        return provider;
+    }
+
+    public void setBundleContext(BundleContext bundleContext) {
+        this.bundleContext = bundleContext;
+    }
+}
diff --git a/library/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleFactory.java b/library/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleFactory.java
new file mode 100644 (file)
index 0000000..21e88f5
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+/*
+* Generated file
+*
+* Generated from: yang module name: library yang module local name: library
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Fri Jan 02 13:49:24 CST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210;
+
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.osgi.framework.BundleContext;
+
+public class LibraryModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210.AbstractLibraryModuleFactory {
+    @Override
+    public LibraryModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
+        LibraryModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
+        module.setBundleContext(bundleContext);
+        return module;
+    }
+
+    @Override
+    public LibraryModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, LibraryModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
+        LibraryModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, bundleContext);
+        module.setBundleContext(bundleContext);
+        return module;
+    }
+}
diff --git a/library/impl/src/main/yang/library-impl.yang b/library/impl/src/main/yang/library-impl.yang
new file mode 100644 (file)
index 0000000..97b0f08
--- /dev/null
@@ -0,0 +1,35 @@
+module library {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:library:impl";
+    prefix "library";
+
+    import config { prefix config; revision-date 2013-04-05; }
+    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
+
+    description
+        "Service definition for library project";
+
+    revision "2014-12-10" {
+        description
+            "Initial revision";
+    }
+
+    identity library {
+        base config:module-type;
+        config:java-name-prefix Library;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case library {
+            when "/config:modules/config:module/config:type = 'library'";
+            container broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/library/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleFactoryTest.java b/library/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleFactoryTest.java
new file mode 100644 (file)
index 0000000..d7b9693
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210;
+
+import org.junit.Test;
+
+public class LibraryModuleFactoryTest {
+    @Test
+    public void testFactoryConstructor() {
+        // ensure no exceptions on construction
+        new LibraryModuleFactory();
+    }
+}
diff --git a/library/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleTest.java b/library/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/library/impl/rev141210/LibraryModuleTest.java
new file mode 100644 (file)
index 0000000..fe4d007
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.library.impl.rev141210;
+
+import org.junit.Test;
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.opendaylight.controller.config.api.JmxAttribute;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.ovsdb.lib.impl.LibraryProvider;
+import org.osgi.framework.BundleContext;
+
+import javax.management.ObjectName;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class LibraryModuleTest {
+    @Test
+    public void testCustomValidation() {
+        LibraryModule module = new LibraryModule(mock(ModuleIdentifier.class), mock(DependencyResolver.class));
+        module.setBundleContext(mock(BundleContext.class));
+
+        // ensure no exceptions on validation
+        // currently this method is empty
+        module.customValidation();
+    }
+
+    // TODO Need to migrate all users to SAL RPC
+    @Test
+    public void testCreateInstance() throws Exception {
+        // configure mocks
+        DependencyResolver dependencyResolver = mock(DependencyResolver.class);
+        BindingAwareBroker broker = mock(BindingAwareBroker.class);
+        when(dependencyResolver.resolveInstance(eq(BindingAwareBroker.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(broker);
+
+        // create instance of module with injected mocks
+        LibraryModule module = new LibraryModule(mock(ModuleIdentifier.class), dependencyResolver);
+        module.setBundleContext(mock(BundleContext.class));
+
+        // getInstance calls resolveInstance to get the broker dependency and then calls createInstance
+        AutoCloseable closeable = module.getInstance();
+
+        // verify that the module registered the returned provider with the broker
+        verify(broker).registerProvider((LibraryProvider)closeable);
+
+        // ensure no exceptions on close
+        closeable.close();
+    }
+}
diff --git a/library/it/pom.xml b/library/it/pom.xml
new file mode 100644 (file)
index 0000000..dbf32fb
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>mdsal-it-parent</artifactId>
+    <version>1.3.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <artifactId>library-it</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <properties>
+    <karaf.distro.groupId>org.opendaylight.ovsdb</karaf.distro.groupId>
+    <karaf.distro.artifactId>library-karaf</karaf.distro.artifactId>
+    <karaf.distro.version>1.2.1-SNAPSHOT</karaf.distro.version>
+    <karaf.distro.type>zip</karaf.distro.type>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>library-features</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.ovsdb</groupId>
+      <artifactId>schema.openvswitch</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.ovsdb</groupId>
+      <artifactId>schema.hardwarevtep</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.ovsdb</groupId>
+      <artifactId>library</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.ovsdb</groupId>
+      <artifactId>utils.servicehelper</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>default</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <skipITs>true</skipITs>
+      </properties>
+    </profile>
+    <profile>
+      <id>integrationtest</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <skipITs>false</skipITs>
+      </properties>
+    </profile>
+  </profiles>
+
+</project>
\ No newline at end of file
similarity index 87%
rename from integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/hardwarevtep/HardwareVTEPIT.java
rename to library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/hardwarevtep/HardwareVTEPIT.java
index 4dfcacf8f0cd7dc0fd220705d7bcc3b0aed68439..1768f6088ec1fdbd44fa17b122cd110c20260208 100644 (file)
@@ -16,10 +16,6 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
@@ -35,10 +31,10 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.opendaylight.ovsdb.integrationtest.ConfigurationBundles;
-import org.opendaylight.ovsdb.integrationtest.OvsdbIntegrationTestBase;
 import org.opendaylight.ovsdb.lib.MonitorCallBack;
 import org.opendaylight.ovsdb.lib.OvsdbClient;
+import org.opendaylight.ovsdb.lib.it.LibraryIntegrationTestBase;
+import org.opendaylight.ovsdb.lib.it.LibraryIntegrationTestUtils;
 import org.opendaylight.ovsdb.lib.message.MonitorRequest;
 import org.opendaylight.ovsdb.lib.message.MonitorRequestBuilder;
 import org.opendaylight.ovsdb.lib.message.MonitorSelect;
@@ -56,19 +52,16 @@ import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
 import org.opendaylight.ovsdb.schema.hardwarevtep.Global;
 import org.opendaylight.ovsdb.schema.hardwarevtep.Manager;
 import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
-import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerSuite;
-import org.ops4j.pax.exam.util.PathUtils;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerSuite.class)
-public class HardwareVTEPIT  extends OvsdbIntegrationTestBase {
+public class HardwareVTEPIT  extends LibraryIntegrationTestBase {
     private static final Logger LOG = LoggerFactory.getLogger(HardwareVTEPIT.class);
     private static boolean monitorReady = false;
     private static boolean schemaSupported = false;
@@ -96,33 +89,13 @@ public class HardwareVTEPIT  extends OvsdbIntegrationTestBase {
     @Inject
     private BundleContext bc;
 
-    @Configuration
-    public Option[] config() throws Exception {
-        return options(
-                systemProperty("logback.configurationFile").value(
-                        "file:" + PathUtils.getBaseDir()
-                                + "/src/test/resources/logback.xml"
-                ),
-                // To start OSGi console for inspection remotely
-                systemProperty("osgi.console").value("2401"),
-
-                propagateSystemProperty("ovsdbserver.ipaddress"),
-                propagateSystemProperty("ovsdbserver.port"),
-
-                ConfigurationBundles.mdsalBundles(),
-                ConfigurationBundles.controllerBundles(),
-                ConfigurationBundles.ovsdbLibraryBundles(),
-                ConfigurationBundles.ovsdbDefaultSchemaBundles()
-        );
-    }
-
     @Before
-    public void setUp () throws ExecutionException, InterruptedException, IOException {
-        areWeReady(bc);
-        assumeTrue(HARDWARE_VTEP + " is required.", checkSchema(HARDWARE_VTEP));
+    public void set() throws Exception {
+        super.setup();
+        assumeTrue(LibraryIntegrationTestUtils.HARDWARE_VTEP + " is required.", checkSchema(LibraryIntegrationTestUtils.HARDWARE_VTEP));
         assertTrue("Failed to monitor tables", monitorTables());
-        LOG.info("{} schema version = {}", OPEN_VSWITCH_SCHEMA,
-                getClient().getDatabaseSchema(OPEN_VSWITCH_SCHEMA).getVersion());
+        LOG.info("{} schema version = {}", LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA,
+                getClient().getDatabaseSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).getVersion());
     }
 
     public boolean checkSchema (String schema) {
@@ -131,7 +104,7 @@ public class HardwareVTEPIT  extends OvsdbIntegrationTestBase {
             return true;
         }
         try {
-            ovsdbClient = getTestConnection();
+            ovsdbClient = LibraryIntegrationTestUtils.getTestConnection(this);
             assertNotNull("Invalid Client. Check connection params", ovsdbClient);
             //Thread.sleep(3000); // Wait for a few seconds to get the Schema exchange done
             if (isSchemaSupported(ovsdbClient, schema)) {
@@ -176,11 +149,7 @@ public class HardwareVTEPIT  extends OvsdbIntegrationTestBase {
         ListenableFuture<List<String>> databases = client.getDatabases();
         List<String> dbNames = databases.get();
         assertNotNull(dbNames);
-        if (dbNames.contains(schema)) {
-            return true;
-        } else {
-            return false;
-        }
+        return dbNames.contains(schema);
     }
 
     /**
@@ -290,7 +259,7 @@ public class HardwareVTEPIT  extends OvsdbIntegrationTestBase {
      */
     public void managerInsert () throws ExecutionException, InterruptedException {
         //Ensure test only proceeds if HW VTEP is supported
-        assumeTrue(isSchemaSupported(getClient(), HARDWARE_VTEP));
+        assumeTrue(isSchemaSupported(getClient(), LibraryIntegrationTestUtils.HARDWARE_VTEP));
 
         //proceed only if schema was already retrieved successfully
         Assert.assertNotNull(getDbSchema());
@@ -330,7 +299,7 @@ public class HardwareVTEPIT  extends OvsdbIntegrationTestBase {
     }
 
     public void managerDelete () throws ExecutionException, InterruptedException {
-        assumeTrue(isSchemaSupported(getClient(), HARDWARE_VTEP));
+        assumeTrue(isSchemaSupported(getClient(), LibraryIntegrationTestUtils.HARDWARE_VTEP));
 
         Manager manager = getClient().getTypedRowWrapper(Manager.class, null);
         Global global = getClient().getTypedRowWrapper(Global.class, null);
similarity index 95%
rename from integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/openvswitch/OpenVSwitchIT.java
rename to library/it/src/test/java/org/opendaylight/ovsdb/integrationtest/schema/openvswitch/OpenVSwitchIT.java
index e98074cc486b491dea69cdcb3f4f525a71c93813..65fffb54cfa889175ced05c175513da85b2da9d1 100644 (file)
@@ -19,10 +19,6 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -40,11 +36,11 @@ import javax.inject.Inject;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.opendaylight.ovsdb.integrationtest.ConfigurationBundles;
-import org.opendaylight.ovsdb.integrationtest.OvsdbIntegrationTestBase;
 import org.opendaylight.ovsdb.lib.MonitorCallBack;
 import org.opendaylight.ovsdb.lib.OvsdbClient;
 import org.opendaylight.ovsdb.lib.error.SchemaVersionMismatchException;
+import org.opendaylight.ovsdb.lib.it.LibraryIntegrationTestBase;
+import org.opendaylight.ovsdb.lib.it.LibraryIntegrationTestUtils;
 import org.opendaylight.ovsdb.lib.message.MonitorRequest;
 import org.opendaylight.ovsdb.lib.message.MonitorRequestBuilder;
 import org.opendaylight.ovsdb.lib.message.MonitorSelect;
@@ -75,19 +71,17 @@ import org.opendaylight.ovsdb.schema.openvswitch.Qos;
 import org.opendaylight.ovsdb.schema.openvswitch.Queue;
 import org.opendaylight.ovsdb.schema.openvswitch.SFlow;
 import org.opendaylight.ovsdb.schema.openvswitch.SSL;
-import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerSuite;
-import org.ops4j.pax.exam.util.PathUtils;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerSuite.class)
-public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
+public class OpenVSwitchIT extends LibraryIntegrationTestBase {
     private static final Logger LOG = LoggerFactory.getLogger(OpenVSwitchIT.class);
     private static boolean monitorReady = false;
     private static boolean schemaSupported = false;
@@ -138,33 +132,31 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
     @Inject
     private BundleContext bc;
 
-    @Configuration
-    public Option[] config() throws Exception {
-        return options(
-                systemProperty("logback.configurationFile").value(
-                        "file:" + PathUtils.getBaseDir()
-                                + "/src/test/resources/logback.xml"
-                ),
-                // To start OSGi console for inspection remotely
-                systemProperty("osgi.console").value("2401"),
-
-                propagateSystemProperty("ovsdbserver.ipaddress"),
-                propagateSystemProperty("ovsdbserver.port"),
-
-                ConfigurationBundles.mdsalBundles(),
-                ConfigurationBundles.controllerBundles(),
-                ConfigurationBundles.ovsdbLibraryBundles(),
-                ConfigurationBundles.ovsdbDefaultSchemaBundles()
-        );
-    }
-
     @Before
-    public void setUp () throws ExecutionException, InterruptedException, IOException {
-        areWeReady(bc);
-        assertTrue(OPEN_VSWITCH_SCHEMA + " is required.", checkSchema(OPEN_VSWITCH_SCHEMA));
+    public void areWeReady() throws InterruptedException, IOException, ExecutionException {
+        assertNotNull(bc);
+        boolean debugit = false;
+        Bundle b[] = bc.getBundles();
+        for (Bundle element : b) {
+            int state = element.getState();
+            if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
+                LOG.info("Bundle: {} state: {}", element.getSymbolicName(),
+                        LibraryIntegrationTestUtils.bundleStateToString(state));
+                debugit = true;
+            }
+        }
+        if (debugit) {
+            LOG.debug("Do some debugging because some bundle is unresolved");
+            Thread.sleep(600000);
+        }
+
+        // Assert if true, if false we are good to go!
+        assertFalse(debugit);
+
+        assertTrue(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA + " is required.", checkSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA));
         assertTrue("Failed to monitor tables", monitorTables());
-        schemaVersion = getClient().getDatabaseSchema(OPEN_VSWITCH_SCHEMA).getVersion();
-        LOG.info("{} schema version = {}", OPEN_VSWITCH_SCHEMA, schemaVersion);
+        schemaVersion = getClient().getDatabaseSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).getVersion();
+        LOG.info("{} schema version = {}", LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA, schemaVersion);
     }
 
     public boolean checkSchema (String schema) {
@@ -173,7 +165,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
             return true;
         }
         try {
-            ovsdbClient = getTestConnection();
+            ovsdbClient = LibraryIntegrationTestUtils.getTestConnection(this);
             assertNotNull("Invalid Client. Check connection params", ovsdbClient);
             //Thread.sleep(3000); // Wait for a few seconds to get the Schema exchange done
             if (isSchemaSupported(ovsdbClient, schema)) {
@@ -207,11 +199,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
         ListenableFuture<List<String>> databases = client.getDatabases();
         List<String> dbNames = databases.get();
         assertNotNull(dbNames);
-        if (dbNames.contains(schema)) {
-            return true;
-        } else {
-            return false;
-        }
+        return dbNames.contains(schema);
     }
 
     /**
@@ -428,7 +416,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
                 .add(op.comment("Bridge: Mutating controller2 " + controller2.getTargetColumn().getData()));
 
         operationResults = executeTransaction(transactionBuilder,
-                new String("Controller: Insert & Mutate operation results for controller2"));
+                "Controller: Insert & Mutate operation results for controller2");
         testController2Uuid = operationResults.get(0).getUuid();
         assertNotNull(ASSERT_TRANS_UUID, testController2Uuid);
 
@@ -445,7 +433,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
     private void controllerDelete () throws ExecutionException, InterruptedException {
         Controller controller = getClient().getTypedRowWrapper(Controller.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(controller.getSchema())
@@ -489,7 +477,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
 
         boolean isExceptionRaised = false;
         try {
-            FlowSampleCollectorSet flowSampleCollectorSet = getClient().createTypedRowWrapper(FlowSampleCollectorSet.class);
+            getClient().createTypedRowWrapper(FlowSampleCollectorSet.class);
         } catch (SchemaVersionMismatchException e) {
             isExceptionRaised = true;
         }
@@ -502,7 +490,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
 
         FlowSampleCollectorSet flowSampleCollectorSet =
                 getClient().createTypedRowWrapper(FlowSampleCollectorSet.class);
-        flowSampleCollectorSet.setId(Long.valueOf(1));
+        flowSampleCollectorSet.setId(1L);
         flowSampleCollectorSet.setExternalIds(ImmutableMap.of("I <3", "ovs"));
         flowSampleCollectorSet.setBridge(testBridgeUuid);
 
@@ -559,7 +547,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
 
         boolean isExceptionRaised = false;
         try {
-            FlowTable flowTable = getClient().createTypedRowWrapper(FlowTable.class);
+            getClient().createTypedRowWrapper(FlowTable.class);
         } catch (SchemaVersionMismatchException e) {
             isExceptionRaised = true;
         }
@@ -651,7 +639,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
 
         boolean isExceptionRaised = false;
         try {
-            IPFIX ipfix = getClient().createTypedRowWrapper(IPFIX.class);
+            getClient().createTypedRowWrapper(IPFIX.class);
         } catch (SchemaVersionMismatchException e) {
             isExceptionRaised = true;
         }
@@ -801,7 +789,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
         String mirrorUuidStr = "testMirror";
         String mirrorName = "my_name_is_mirror";
         Long outputVid = 1024L;
-        Long selectVid = Long.valueOf(2048);
+        Long selectVid = 2048L;
 
         Mirror mirror = getClient().createTypedRowWrapper(Mirror.class);
         mirror.setName(ImmutableSet.of(mirrorName));
@@ -838,7 +826,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
     private void mirrorDelete () throws ExecutionException, InterruptedException {
         Mirror mirror = getClient().getTypedRowWrapper(Mirror.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(mirror.getSchema())
@@ -905,7 +893,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
     private void netFlowDelete () throws ExecutionException, InterruptedException {
         NetFlow netFlow = getClient().getTypedRowWrapper(NetFlow.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(netFlow.getSchema())
@@ -1002,7 +990,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
         Port port = getClient().getTypedRowWrapper(Port.class, null);
         Interface intf = getClient().getTypedRowWrapper(Interface.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(port.getSchema())
@@ -1114,7 +1102,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
         Interface intf = getClient().getTypedRowWrapper(Interface.class, null);
         Qos qos = getClient().getTypedRowWrapper(Qos.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(port.getSchema())
@@ -1159,7 +1147,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
          * since it wouldn't add any conceivable value.
          */
         String queueUuidStr = "queueUuidStr";
-        Long dscpVal = Long.valueOf(4);
+        Long dscpVal = 4L;
         Queue queue = getClient().createTypedRowWrapper(Queue.class);
         // Example of explicit ImmutableSet/Map Attribute declaration
         ImmutableSet<Long> dscp = ImmutableSet.of(dscpVal);
@@ -1204,7 +1192,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
     private void queueDelete () throws ExecutionException, InterruptedException {
         Queue queue = getClient().getTypedRowWrapper(Queue.class, null);
         Qos qos = getClient().getTypedRowWrapper(Qos.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(queue.getSchema())
@@ -1278,7 +1266,7 @@ public class OpenVSwitchIT extends OvsdbIntegrationTestBase {
     private void sFlowDelete () throws ExecutionException, InterruptedException {
         SFlow sFlow = getClient().getTypedRowWrapper(SFlow.class, null);
         Bridge bridge = getClient().getTypedRowWrapper(Bridge.class, null);
-        DatabaseSchema dbSchema = getClient().getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = getClient().getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
 
         TransactionBuilder transactionBuilder = getClient().transactBuilder(dbSchema)
                 .add(op.delete(sFlow.getSchema())
similarity index 71%
rename from integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/library/OvsdbLibraryIT.java
rename to library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIT.java
index a134e812ebd7ba0a082c5a6e9fcc5bb3fb949b4b..6325114e9cfab1f391b34fcc040a9b78b7f69024 100644 (file)
@@ -1,13 +1,11 @@
 /*
- * Copyright (c) 2014 Red Hat, Inc. and others.  All rights reserved.
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Madhu Venugopal
  */
-package org.opendaylight.ovsdb.integrationtest.library;
+package org.opendaylight.ovsdb.lib.it;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -15,9 +13,6 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
 import static org.opendaylight.ovsdb.lib.operations.Operations.op;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
@@ -30,8 +25,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.opendaylight.ovsdb.integrationtest.ConfigurationBundles;
-import org.opendaylight.ovsdb.integrationtest.OvsdbIntegrationTestBase;
 import org.opendaylight.ovsdb.lib.OvsdbClient;
 import org.opendaylight.ovsdb.lib.notation.Mutator;
 import org.opendaylight.ovsdb.lib.notation.UUID;
@@ -40,10 +33,9 @@ import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
 import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
 import org.opendaylight.ovsdb.schema.openvswitch.Bridge;
 import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
-import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.util.PathUtils;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerSuite;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
@@ -54,33 +46,14 @@ import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ListenableFuture;
 
 @RunWith(PaxExam.class)
-public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
-    private static final Logger LOG = LoggerFactory.getLogger(OvsdbLibraryIT.class);
+@ExamReactorStrategy(PerSuite.class)
+public class LibraryIT extends LibraryIntegrationTestBase {
+    private static final Logger LOG = LoggerFactory.getLogger(LibraryIT.class);
+
     @Inject
     private BundleContext bc;
     private OvsdbClient client = null;
 
-    @Configuration
-    public Option[] config() {
-        return options(
-            //
-            systemProperty("logback.configurationFile").value(
-                    "file:" + PathUtils.getBaseDir()
-                    + "/src/test/resources/logback.xml"
-            ),
-            // To start OSGi console for inspection remotely
-            systemProperty("osgi.console").value("2401"),
-
-            propagateSystemProperty("ovsdbserver.ipaddress"),
-            propagateSystemProperty("ovsdbserver.port"),
-
-            ConfigurationBundles.mdsalBundles(),
-            ConfigurationBundles.controllerBundles(),
-            ConfigurationBundles.ovsdbLibraryBundles(),
-            ConfigurationBundles.ovsdbDefaultSchemaBundles()
-        );
-    }
-
     @Before
     public void areWeReady() throws InterruptedException {
         assertNotNull(bc);
@@ -89,7 +62,8 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
         for (Bundle element : b) {
             int state = element.getState();
             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
-                LOG.info("Bundle: {} state: {}", element.getSymbolicName(), stateToString(state));
+                LOG.info("Bundle: {} state: {}", element.getSymbolicName(),
+                        LibraryIntegrationTestUtils.bundleStateToString(state));
                 debugit = true;
             }
         }
@@ -101,7 +75,7 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
         // Assert if true, if false we are good to go!
         assertFalse(debugit);
         try {
-            client = getTestConnection();
+            client = LibraryIntegrationTestUtils.getTestConnection(this);
         } catch (Exception e) {
             fail("Exception : "+e.getMessage());
         }
@@ -119,7 +93,7 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
     private void createTypedBridge(DatabaseSchema dbSchema) throws IOException, InterruptedException, ExecutionException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
         Bridge bridge = client.createTypedRowWrapper(Bridge.class);
         bridge.setName(testBridgeName);
-        bridge.setStatus(ImmutableMap.of("key","value"));
+        bridge.setStatus(ImmutableMap.of("key", "value"));
         bridge.setFloodVlans(Sets.newHashSet(34L));
 
         OpenVSwitch openVSwitch = client.createTypedRowWrapper(OpenVSwitch.class);
@@ -138,7 +112,7 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
                         .and(bridge.getNameColumn().getSchema().opEqual(bridge.getName())).build())
                 .add(op.mutate(openVSwitch.getSchema())
                         .addMutation(openVSwitch.getBridgesColumn().getSchema(), Mutator.INSERT,
-                                     openVSwitch.getBridgesColumn().getData()));
+                                openVSwitch.getBridgesColumn().getData()));
 
         ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
         List<OperationResult> operationResults = results.get();
@@ -157,21 +131,21 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
     public void tableTest() throws Exception {
         assertNotNull("Invalid Client. Check connection params", client);
         Thread.sleep(3000); // Wait for a few seconds to get the Schema exchange done
-        if (isSchemaSupported(OPEN_VSWITCH_SCHEMA)) {
-            DatabaseSchema dbSchema = client.getSchema(OPEN_VSWITCH_SCHEMA).get();
+        if (isSchemaSupported(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA)) {
+            DatabaseSchema dbSchema = client.getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
             assertNotNull(dbSchema);
-            System.out.println(OPEN_VSWITCH_SCHEMA + " schema in "+ client.getConnectionInfo() +
-                                                     " with Tables : " + dbSchema.getTables());
+            System.out.println(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA + " schema in "+ client.getConnectionInfo() +
+                    " with Tables : " + dbSchema.getTables());
 
             // A simple Typed Test to make sure a Typed wrapper bundle can coexist in an OSGi environment
             createTypedBridge(dbSchema);
         }
 
-        if (isSchemaSupported(HARDWARE_VTEP)) {
-            DatabaseSchema dbSchema = client.getSchema(HARDWARE_VTEP).get();
+        if (isSchemaSupported(LibraryIntegrationTestUtils.HARDWARE_VTEP)) {
+            DatabaseSchema dbSchema = client.getSchema(LibraryIntegrationTestUtils.HARDWARE_VTEP).get();
             assertNotNull(dbSchema);
-            System.out.println(HARDWARE_VTEP + " schema in "+ client.getConnectionInfo() +
-                                               " with Tables : " + dbSchema.getTables());
+            System.out.println(LibraryIntegrationTestUtils.HARDWARE_VTEP + " schema in "+ client.getConnectionInfo() +
+                    " with Tables : " + dbSchema.getTables());
         }
     }
 
@@ -179,7 +153,7 @@ public class OvsdbLibraryIT extends OvsdbIntegrationTestBase {
     public void tearDown() throws InterruptedException, ExecutionException {
         Bridge bridge = client.getTypedRowWrapper(Bridge.class, null);
         OpenVSwitch openVSwitch = client.getTypedRowWrapper(OpenVSwitch.class, null);
-        DatabaseSchema dbSchema = client.getSchema(OPEN_VSWITCH_SCHEMA).get();
+        DatabaseSchema dbSchema = client.getSchema(LibraryIntegrationTestUtils.OPEN_VSWITCH_SCHEMA).get();
         ListenableFuture<List<OperationResult>> results = client.transactBuilder(dbSchema)
                 .add(op.delete(bridge.getSchema())
                         .where(bridge.getNameColumn().getSchema().opEqual(testBridgeName))
diff --git a/library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestBase.java b/library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestBase.java
new file mode 100644 (file)
index 0000000..f46b5d6
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.ovsdb.lib.it;
+
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperties;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
+import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.karaf.options.LogLevelOption;
+import org.ops4j.pax.exam.options.MavenUrlReference;
+
+/**
+ * Base class for library IT.
+ */
+public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
+    @Override
+    public String getModuleName() {
+        return "library";
+    }
+
+    @Override
+    public String getInstanceName() {
+        return "library-default";
+    }
+
+    @Override
+    public MavenUrlReference getFeatureRepo() {
+        return maven()
+                .groupId("org.opendaylight.ovsdb")
+                .artifactId("library-features")
+                .classifier("features")
+                .type("xml")
+                .versionAsInProject();
+    }
+
+    @Override
+    public String getFeatureName() {
+        return "odl-ovsdb-library";
+    }
+
+    @Configuration
+    @Override
+    public Option[] config() {
+        Option[] parentOptions = super.config();
+        Option[] propertiesOptions = getPropertiesOptions();
+        Option[] options = new Option[parentOptions.length + propertiesOptions.length];
+        System.arraycopy(parentOptions, 0, options, 0, parentOptions.length);
+        System.arraycopy(propertiesOptions, 0, options, parentOptions.length, propertiesOptions.length);
+        return options;
+    }
+
+    public Option[] getPropertiesOptions() {
+        return new Option[] {
+                propagateSystemProperties(
+                        LibraryIntegrationTestUtils.SERVER_IPADDRESS,
+                        LibraryIntegrationTestUtils.SERVER_PORT,
+                        LibraryIntegrationTestUtils.CONNECTION_TYPE),
+        };
+    }
+
+    @Override
+    public Option getLoggingOption() {
+        Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
+                logConfiguration(getClass()),
+                LogLevelOption.LogLevel.INFO.name());
+        option = composite(option, super.getLoggingOption());
+        return option;
+    }
+}
diff --git a/library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestUtils.java b/library/it/src/test/java/org/opendaylight/ovsdb/lib/it/LibraryIntegrationTestUtils.java
new file mode 100644 (file)
index 0000000..e326f9c
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.ovsdb.lib.it;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
+import org.opendaylight.ovsdb.lib.OvsdbClient;
+import org.opendaylight.ovsdb.lib.OvsdbConnection;
+import org.opendaylight.ovsdb.lib.OvsdbConnectionListener;
+import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper;
+import org.osgi.framework.Bundle;
+
+/**
+ * Utilities for OVSDB integration tests.
+ */
+public final class LibraryIntegrationTestUtils {
+    public static final String SERVER_IPADDRESS = "ovsdbserver.ipaddress";
+    public static final String SERVER_PORT = "ovsdbserver.port";
+    public static final String CONNECTION_TYPE = "ovsdbserver.connection";
+    public final static String OPEN_VSWITCH_SCHEMA = "Open_vSwitch";
+    public final static String HARDWARE_VTEP = "hardware_vtep";
+    private static final String CONNECTION_TYPE_ACTIVE = "active";
+    private static final String CONNECTION_TYPE_PASSIVE = "passive";
+    private static final String DEFAULT_SERVER_PORT = "6640";
+
+    /**
+     * Prevent instantiation of a utility class.
+     */
+    private LibraryIntegrationTestUtils() {
+        // Nothing to do
+    }
+
+    public static OvsdbClient getTestConnection(BindingAwareProvider provider) throws IOException, InterruptedException, ExecutionException, TimeoutException {
+        Properties props = System.getProperties();
+        String addressStr = props.getProperty(SERVER_IPADDRESS);
+        String portStr = props.getProperty(SERVER_PORT, DEFAULT_SERVER_PORT);
+        String connectionType = props.getProperty(CONNECTION_TYPE, "active");
+
+        // If the connection type is active, controller connects to the ovsdb-server
+        if (connectionType.equalsIgnoreCase(CONNECTION_TYPE_ACTIVE)) {
+            if (addressStr == null) {
+                throw new IllegalArgumentException(usage());
+            }
+
+            InetAddress address;
+            try {
+                address = InetAddress.getByName(addressStr);
+            } catch (Exception e) {
+                System.out.println("Unable to resolve " + addressStr);
+                e.printStackTrace();
+                return null;
+            }
+
+            Integer port;
+            try {
+                port = Integer.parseInt(portStr);
+            } catch (NumberFormatException e) {
+                System.out.println("Invalid port number : " + portStr);
+                e.printStackTrace();
+                return null;
+            }
+
+            OvsdbConnection connection = (OvsdbConnection) ServiceHelper.getGlobalInstance(OvsdbConnection.class, provider);
+            return connection.connect(address, port);
+        } else if (connectionType.equalsIgnoreCase(CONNECTION_TYPE_PASSIVE)) {
+            ExecutorService executor = Executors.newFixedThreadPool(1);
+            Future<OvsdbClient> passiveConnection = executor.submit(new PassiveListener());
+            return passiveConnection.get(60, TimeUnit.SECONDS);
+        }
+        throw new IllegalArgumentException("Connection parameter (" + CONNECTION_TYPE + ") must be either active or passive");
+    }
+
+    public static String bundleStateToString(int state) {
+        switch (state) {
+            case Bundle.ACTIVE:
+                return "ACTIVE";
+            case Bundle.INSTALLED:
+                return "INSTALLED";
+            case Bundle.RESOLVED:
+                return "RESOLVED";
+            case Bundle.UNINSTALLED:
+                return "UNINSTALLED";
+            default:
+                return "Not CONVERTED";
+        }
+    }
+
+    private static String usage() {
+        return "Integration Test needs a valid connection configuration as follows :\n" +
+                "active connection : mvn -Pintegrationtest -Dovsdbserver.ipaddress=x.x.x.x -Dovsdbserver.port=yyyy verify\n"+
+                "passive connection : mvn -Pintegrationtest -Dovsdbserver.connection=passive verify\n";
+    }
+
+    private static class PassiveListener implements Callable<OvsdbClient>, OvsdbConnectionListener {
+        OvsdbClient client = null;
+        @Override
+        public OvsdbClient call() throws Exception {
+            OvsdbConnection connection = (OvsdbConnection)ServiceHelper.getGlobalInstance(OvsdbConnection.class, this);
+            connection.registerConnectionListener(this);
+            while (client == null) {
+                Thread.sleep(500);
+            }
+            return client;
+        }
+
+        @Override
+        public void connected(OvsdbClient client) {
+            this.client = client;
+        }
+
+        @Override
+        public void disconnected(OvsdbClient client) {
+            if (!Objects.equals(this.client.getConnectionInfo(), client.getConnectionInfo())) {
+                throw new IllegalStateException("disconnected unexpected client");
+            }
+            this.client = null;
+        }
+    }
+
+}
diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml
new file mode 100644 (file)
index 0000000..787a6c9
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright Â© 2015 Red Hat, Inc. and others. All rights reserved. and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>karaf-parent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <artifactId>library-karaf</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <properties>
+    <karaf.localFeature>odl-ovsdb-library</karaf.localFeature>
+  </properties>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>library-artifacts</artifactId>
+        <version>${project.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <!-- scope is compile so all features (there is only one) are installed
+      into startup.properties and the feature repo itself is not installed -->
+      <groupId>org.apache.karaf.features</groupId>
+      <artifactId>framework</artifactId>
+      <type>kar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>library-features</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+  <!-- DO NOT install or deploy the karaf artifact -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
old mode 100755 (executable)
new mode 100644 (file)
index 5f8f023..7149615
@@ -1,26 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright (C) 2014 Red Hat, Inc. and others. All rights reserved.
-
+Copyright Â© 2014, 2015 Red Hat, Inc. and others. All rights reserved.
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>org.opendaylight.ovsdb</groupId>
-    <artifactId>commons</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
-    <relativePath>../commons/parent</relativePath>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>odlparent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
   </parent>
 
-  <artifactId>library</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <artifactId>library-aggregator</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <name>library</name>
+  <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
   <licenses>
@@ -29,119 +27,40 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <url>http://www.eclipse.org/legal/epl-v10.html</url>
     </license>
   </licenses>
-  <developers>
-    <developer>
-      <name>Sam Hague</name>
-      <email>shague@gmail.com</email>
-      <url>https://github.com/shague</url>
-    </developer>
-  </developers>
-  <scm>
-    <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
-    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
-    <tag>HEAD</tag>
-    <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
-  </scm>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.dependencymanager</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>io.netty</groupId>
-      <artifactId>netty-all</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <modules>
+    <module>impl</module>
+    <module>karaf</module>
+    <module>features</module>
+    <module>artifacts</module>
+    <module>it</module>
+  </modules>
+  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
   <build>
-    <testResources>
-      <testResource>
-        <filtering>true</filtering>
-        <directory>src/test/resources</directory>
-      </testResource>
-    </testResources>
     <plugins>
       <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.4.0</version>
-        <extensions>true</extensions>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
         <configuration>
-          <instructions>
-            <Import-Package>org.apache.commons.lang3.builder,
-                org.apache.commons.lang3.tuple,
-                org.apache.felix.dm,
-                org.slf4j,
-                org.eclipse.osgi.framework.console,
-                org.osgi.framework,
-                javax.net.ssl,
-                *</Import-Package>
-            <Embed-Transitive>true</Embed-Transitive>
-            <Bundle-Activator>org.opendaylight.ovsdb.lib.osgi.Activator</Bundle-Activator>
-            <Export-Package>
-                org.opendaylight.ovsdb.lib,
-                org.opendaylight.ovsdb.lib.impl,
-                org.opendaylight.ovsdb.lib.error,
-                org.opendaylight.ovsdb.lib.jsonrpc,
-                org.opendaylight.ovsdb.lib.notation,
-                org.opendaylight.ovsdb.lib.operations,
-                org.opendaylight.ovsdb.lib.message,
-                org.opendaylight.ovsdb.lib.schema,
-                org.opendaylight.ovsdb.lib.schema.typed</Export-Package>
-          </instructions>
-          <manifestLocation>${project.basedir}/META-INF</manifestLocation>
+          <skip>true</skip>
         </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
+        <artifactId>maven-install-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
       </plugin>
     </plugins>
   </build>
+
+  <scm>
+    <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
+    <tag>HEAD</tag>
+    <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
+  </scm>
 </project>
diff --git a/library/src/main/java/org/opendaylight/ovsdb/lib/osgi/Activator.java b/library/src/main/java/org/opendaylight/ovsdb/lib/osgi/Activator.java
deleted file mode 100644 (file)
index d1b66a3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2013, 2015 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.ovsdb.lib.osgi;
-
-import org.apache.felix.dm.DependencyActivatorBase;
-import org.apache.felix.dm.DependencyManager;
-import org.opendaylight.ovsdb.lib.OvsdbConnection;
-import org.opendaylight.ovsdb.lib.OvsdbConnectionListener;
-import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
-import org.osgi.framework.BundleContext;
-
-/**
- * OVSDB Library OSGi Activator
- */
-public class Activator extends DependencyActivatorBase {
-
-    @Override
-    public void init(BundleContext context, DependencyManager manager) throws Exception {
-        manager.add(createComponent()
-            .setInterface(OvsdbConnection.class.getName(), null)
-            .setImplementation(OvsdbConnectionService.class)
-            .add(createServiceDependency()
-                            .setService(OvsdbConnectionListener.class)
-                            .setCallbacks("registerConnectionListener", "unregisterConnectionListener")
-                            .setRequired(false)
-            )
-        );
-    }
-
-    @Override
-    public void destroy(BundleContext context, DependencyManager manager) throws Exception {}
-}
index 2a44f37d51186f19280799d0db5ca6091e9af663..73ad141f1015d65678f2ddb760e4b4ce340ed28a 100644 (file)
@@ -124,11 +124,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
-            <Export-Package></Export-Package>
             <Import-Package>org.opendaylight.controller.sal.utils,
               org.opendaylight.controller.northbound.commons,
               org.opendaylight.controller.northbound.commons.exception,
@@ -151,7 +149,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
               org.slf4j,
               org.apache.catalina.filters,
               !org.codehaus.enunciate.jaxrs,*</Import-Package>
-            <Export-Package></Export-Package>
+            <Export-Package/>
             <Web-ContextPath>/ovsdb/nb</Web-ContextPath>
             <Jaxrs-Resources>,${classes;ANNOTATION;javax.ws.rs.Path}</Jaxrs-Resources>
           </instructions>
index a2c1d9e3fad271ca5a05c3c3fdd89234f7d42181..95d4f75c3f3081f3cd52abb29461ce5a3fb16996 100644 (file)
@@ -10,14 +10,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <parent>
     <groupId>org.opendaylight.controller</groupId>
-    <artifactId>config-parent</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <artifactId>mdsal-it-parent</artifactId>
+    <version>1.3.0-SNAPSHOT</version>
     <relativePath/>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>openstack.net-virt-it</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
@@ -83,7 +83,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>features-ovsdb</artifactId>
-      <version>1.2.0-SNAPSHOT</version>
+      <version>1.2.1-SNAPSHOT</version>
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
diff --git a/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/AbstractConfigTestBase.java b/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/AbstractConfigTestBase.java
deleted file mode 100644 (file)
index e08c32e..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (C) 2015 Red Hat, Inc. and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.ovsdb.openstack.netvirt.it;
-
-import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
-
-import com.google.common.collect.ObjectArrays;
-import java.io.File;
-import java.lang.management.ManagementFactory;
-import java.util.Calendar;
-import javax.management.InstanceNotFoundException;
-import org.junit.Rule;
-import org.junit.internal.AssumptionViolatedException;
-import org.junit.rules.TestRule;
-import org.junit.rules.TestWatcher;
-import org.junit.runner.Description;
-import org.opendaylight.controller.config.api.ConfigRegistry;
-import org.opendaylight.controller.config.util.ConfigRegistryJMXClient;
-import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
-import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
-import org.ops4j.pax.exam.options.MavenUrlReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-//import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
-
-/**
- * @author Sam Hague (shague@redhat.com)
- */
-public abstract class AbstractConfigTestBase {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractConfigTestBase.class);
-
-    /*
-     * Wait up to 10s for our configured module to come up
-     */
-    private static final int MODULE_TIMEOUT = 10000;
-    private static int configTimes = 0;
-
-    public abstract String getModuleName();
-
-    public abstract String getInstanceName();
-
-    public abstract MavenUrlReference getFeatureRepo();
-
-    public abstract String getFeatureName();
-
-    public Option[] getLoggingOptions() {
-        Option[] options = new Option[] {
-                editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
-                        logConfiguration(AbstractConfigTestBase.class),
-                        LogLevel.INFO.name())
-        };
-        return options;
-    }
-
-    public String logConfiguration(Class<?> klazz) {
-        return "log4j.logger." + klazz.getPackage().getName();
-    }
-
-    public Option[] getFeaturesOptions() {
-        return new Option[]{};
-    }
-
-    public Option[] getPropertiesOptions() {
-        return new Option[]{};
-    }
-
-    public MavenArtifactUrlReference getKarafDistro() {
-        MavenArtifactUrlReference karafUrl;
-        /*karafUrl = maven()
-                .groupId("org.opendaylight.controller")
-                .artifactId("opendaylight-karaf-empty")
-                .version("1.5.0-SNAPSHOT")
-                .type("zip");*/
-
-        karafUrl = maven()
-                .groupId("org.opendaylight.ovsdb")
-                .artifactId("karaf")
-                .versionAsInProject()
-                .type("zip");
-
-        return karafUrl;
-    }
-
-    @Configuration
-    public Option[] config() {
-        LOG.info("Calling config, configTimes: {}", configTimes);
-        configTimes++;
-        Option[] options = new Option[] {
-                //KarafDistributionOption.debugConfiguration("5005", true),
-                karafDistributionConfiguration()
-                        .frameworkUrl(getKarafDistro())
-                        .unpackDirectory(new File("target/exam"))
-                        .useDeployFolder(false),
-                keepRuntimeFolder(),
-                //features(getFeatureRepo() , getFeatureName())
-        };
-        options = ObjectArrays.concat(options, getFeaturesOptions(), Option.class);
-        options = ObjectArrays.concat(options, getLoggingOptions(), Option.class);
-        options = ObjectArrays.concat(options, getPropertiesOptions(), Option.class);
-        return options;
-    }
-
-    public void setup() throws Exception {
-        LOG.info("Module: {} Instance: {} attempting to configure.",
-                getModuleName(),getInstanceName());
-        Calendar start = Calendar.getInstance();
-        ConfigRegistry configRegistryClient = new ConfigRegistryJMXClient(ManagementFactory
-                .getPlatformMBeanServer());
-        for (int timer = 0;timer < MODULE_TIMEOUT;timer++) {
-            try {
-                configRegistryClient.lookupConfigBean(getModuleName(), getInstanceName());
-                Thread.sleep(100);
-            } catch (InstanceNotFoundException e) {
-                if (timer >= MODULE_TIMEOUT) {
-                    throw e;
-                }
-            } catch (InterruptedException e) {
-                LOG.error("Exception: ",e);
-            }
-        }
-        Calendar stop = Calendar.getInstance();
-        LOG.info("Module: {} Instance: {} configured after {} ms",
-                getModuleName(),getInstanceName(),
-                stop.getTimeInMillis() - start.getTimeInMillis());
-    }
-
-    @Rule
-    public TestRule watcher = new TestWatcher() {
-        @Override
-        protected void starting(Description description) {
-            LOG.info("TestWatcher: Starting test:\n{}", description.getDisplayName());
-        }
-
-        @Override
-        protected void finished(Description description) {
-            LOG.info("TestWatcher: Finished test:\n{}", description.getDisplayName());
-        }
-
-        @Override
-        protected void succeeded(Description description) {
-            LOG.info("TestWatcher: Test succeeded:\n{}", description.getDisplayName());
-        }
-
-        @Override
-        protected void failed(Throwable ex, Description description) {
-            LOG.info("TestWatcher: Test failed:\n{} ", description.getDisplayName(), ex);
-        }
-
-        @Override
-        protected void skipped(AssumptionViolatedException ex, Description description) {
-            LOG.info("TestWatcher: Test skipped:\n{} ", description.getDisplayName(), ex);
-        }
-    };
-}
diff --git a/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/AbstractMdsalTestBase.java b/openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/AbstractMdsalTestBase.java
deleted file mode 100644 (file)
index c2526c9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2015 Red Hat, Inc. and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.ovsdb.openstack.netvirt.it;
-
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-
-import com.google.common.collect.ObjectArrays;
-import java.util.Calendar;
-import javax.inject.Inject;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
-import org.ops4j.pax.exam.util.Filter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AbstractMdsalTestBase extends AbstractConfigTestBase implements BindingAwareProvider {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractMdsalTestBase.class);
-    private static final int REGISTRATION_TIMEOUT = 10000;
-    @Inject @Filter(timeout = 120000)
-    private BindingAwareBroker broker;
-    private ProviderContext session = null;
-
-    public ProviderContext getSession() {
-        return session;
-    }
-
-    @Override
-    public void onSessionInitiated(ProviderContext session) {
-        LOG.info("Session Initiated: {}",session);
-        this.session = session;
-    }
-
-    @Override
-    public void setup() throws Exception {
-        super.setup();
-        Calendar start = Calendar.getInstance();
-        broker.registerProvider(this);
-        for (int timer = 0;timer < REGISTRATION_TIMEOUT;timer++) {
-            if (session != null) {
-                Calendar stop = Calendar.getInstance();
-                LOG.info("Registered with the MD-SAL after {} ms",
-                        stop.getTimeInMillis() - start.getTimeInMillis());
-                return;
-            } else {
-                Thread.sleep(1);
-            }
-        }
-        throw new RuntimeException("Session not initiated after " + REGISTRATION_TIMEOUT + " ms");
-    }
-
-    @Override
-    public Option[] getLoggingOptions() {
-        Option[] options = new Option[] {
-                editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
-                        logConfiguration(AbstractMdsalTestBase.class),
-                        LogLevel.INFO.name()),
-        };
-        options = ObjectArrays.concat(options, super.getLoggingOptions(), Option.class);
-        return options;
-    }
-
-}
index 06cd44113631fd52309c026b8a2b68fbe680e78a..9d8cab55e70c7495006d1891a895e212004ebd80 100644 (file)
@@ -8,12 +8,19 @@
 package org.opendaylight.ovsdb.openstack.netvirt.it;
 
 import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.when;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
 
 import com.google.common.collect.ImmutableBiMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.ObjectArrays;
+
+import java.io.File;
 import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.net.UnknownHostException;
@@ -30,6 +37,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound;
 import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
@@ -54,6 +62,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.options.KarafDistributionOption;
 import org.ops4j.pax.exam.karaf.options.LogLevelOption;
 import org.ops4j.pax.exam.options.MavenUrlReference;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
@@ -83,12 +92,42 @@ public class NetvirtIT extends AbstractMdsalTestBase {
     private static final String NETVIRT = "org.opendaylight.ovsdb.openstack.net-virt";
     private static final String NETVIRTPROVIDERS = "org.opendaylight.ovsdb.openstack.net-virt-providers";
 
+    // TODO Constants copied frmo AbstractConfigTestBase, need to be removed (see TODO below)
+    private static final String PAX_EXAM_UNPACK_DIRECTORY = "target/exam";
+    private static final String KARAF_DEBUG_PORT = "5005";
+    private static final String KARAF_DEBUG_PROP = "karaf.debug";
+    private static final String KEEP_UNPACK_DIRECTORY_PROP = "karaf.keep.unpack";
+
     @Inject
     private BundleContext bundleContext;
 
     @Configuration
     public Option[] config() {
-        return super.config();
+        // TODO Figure out how to use the parent Karaf setup, then just use super.config()
+        Option[] options = new Option[] {
+                when(Boolean.getBoolean(KARAF_DEBUG_PROP))
+                        .useOptions(KarafDistributionOption.debugConfiguration(KARAF_DEBUG_PORT, true)),
+                karafDistributionConfiguration().frameworkUrl(getKarafDistro())
+                        .unpackDirectory(new File(PAX_EXAM_UNPACK_DIRECTORY))
+                        .useDeployFolder(false),
+                when(Boolean.getBoolean(KEEP_UNPACK_DIRECTORY_PROP)).useOptions(keepRuntimeFolder()),
+                // Works only if we don't specify the feature repo and name
+                getLoggingOption()};
+        Option[] propertyOptions = getPropertiesOptions();
+        Option[] combinedOptions = new Option[options.length + propertyOptions.length];
+        System.arraycopy(options, 0, combinedOptions, 0, options.length);
+        System.arraycopy(propertyOptions, 0, combinedOptions, options.length, propertyOptions.length);
+        return combinedOptions;
+    }
+
+    @Override
+    public String getKarafDistro() {
+        return maven()
+                .groupId("org.opendaylight.ovsdb")
+                .artifactId("karaf")
+                .versionAsInProject()
+                .type("zip")
+                .getURL();
     }
 
     @Override
@@ -123,32 +162,21 @@ public class NetvirtIT extends AbstractMdsalTestBase {
     }
 
     @Override
-    public Option[] getFeaturesOptions() {
-        return new Option[]{};
-    }
-
-    @Override
-    public Option[] getLoggingOptions() {
-        Option[] options;
-
-        options = new Option[] {
-            editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
-                    "log4j.logger.org.opendaylight.ovsdb",
-                    LogLevelOption.LogLevel.DEBUG.name()),
-            editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
-                    "log4j.logger.org.opendaylight.ovsdb.lib",
-                    LogLevelOption.LogLevel.INFO.name()),
+    public Option getLoggingOption() {
+        return composite(
+                editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
+                        "log4j.logger.org.opendaylight.ovsdb",
+                        LogLevelOption.LogLevel.DEBUG.name()),
+                editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
+                        "log4j.logger.org.opendaylight.ovsdb.lib",
+                        LogLevelOption.LogLevel.INFO.name()),
+                super.getLoggingOption());
             /*editConfigurationFilePut(NetvirtITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
                     "log4j.logger.org.opendaylight.ovsdb.openstack.net-virt",
                     LogLevelOption.LogLevel.DEBUG.name())*/
-        };
-
-        options = ObjectArrays.concat(options, super.getLoggingOptions(), Option.class);
-        return options;
     }
 
-    @Override
-    public Option[] getPropertiesOptions() {
+    private Option[] getPropertiesOptions() {
         Properties props = new Properties(System.getProperties());
         String addressStr = props.getProperty(NetvirtITConstants.SERVER_IPADDRESS,
                 NetvirtITConstants.DEFAULT_SERVER_IPADDRESS);
@@ -172,7 +200,8 @@ public class NetvirtIT extends AbstractMdsalTestBase {
     }
 
     @Before
-    public void setUp() throws InterruptedException {
+    @Override
+    public void setup() throws InterruptedException {
         if (setup.get()) {
             LOG.info("Skipping setUp, already initialized");
             return;
index b0eea3a9edb420cd1bdf35956744bba6a59fea3b..733710c09a61eb76346d52f1cca31d38d12f46e8 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>openstack.net-virt-providers</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
@@ -47,9 +47,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <networkconfig.neutron.version>0.6.0-SNAPSHOT</networkconfig.neutron.version>
     <openflowjava-nicira.version>0.2.0-SNAPSHOT</openflowjava-nicira.version>
     <openflowplugin.version>0.2.0-SNAPSHOT</openflowplugin.version>
-    <ovsdb.utils.config.version>1.2.0-SNAPSHOT</ovsdb.utils.config.version>
-    <ovsdb.utils.mdsal.openflow.version>1.2.0-SNAPSHOT</ovsdb.utils.mdsal.openflow.version>
-    <ovsdb.utils.servicehelper.version>1.2.0-SNAPSHOT</ovsdb.utils.servicehelper.version>
+    <ovsdb.utils.config.version>1.2.1-SNAPSHOT</ovsdb.utils.config.version>
+    <ovsdb.utils.mdsal.openflow.version>1.2.1-SNAPSHOT</ovsdb.utils.mdsal.openflow.version>
+    <ovsdb.utils.servicehelper.version>1.2.1-SNAPSHOT</ovsdb.utils.servicehelper.version>
     <powermock.version>1.5.2</powermock.version>
     <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
     <liblldp.version>0.9.1-SNAPSHOT</liblldp.version>
index 144ba14e8d3ab3ece2627702a8a590e061dc7a65..87b3dee1d364fc815c22884b9af81ac0231f06dc 100644 (file)
@@ -8,18 +8,17 @@
 
 package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.LinkedBlockingQueue;
-import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound;
+
 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
 import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheListener;
 import org.opendaylight.ovsdb.openstack.netvirt.api.NodeCacheManager;
+import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.ConfigInterface;
 import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
@@ -28,6 +27,9 @@ import org.osgi.framework.ServiceReference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
 public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListener, PipelineOrchestrator {
     private static final Logger LOG = LoggerFactory.getLogger(PipelineOrchestratorImpl.class);
     private List<Service> staticPipeline = Lists.newArrayList(
@@ -88,14 +90,7 @@ public class PipelineOrchestratorImpl implements ConfigInterface, NodeCacheListe
                 try {
                     while (true) {
                         Node node = queue.take();
-                        /*
-                         * Since we are hooking on OpendaylightInventoryListener and as observed in
-                         * Bug 1997 multiple Threads trying to write to a same table at the same time
-                         * causes programming issues. Hence delaying the programming by a second to
-                         * avoid the clash. This hack/workaround should be removed once Bug 1997 is resolved.
-                         */
                         LOG.info(">>>>> dequeue: {}", node);
-                        Thread.sleep(1000);
                         for (Service service : staticPipeline) {
                             AbstractServiceInstance serviceInstance = getServiceInstance(service);
                             //LOG.info("pipeline: {} - {}", service, serviceInstance);
index b14399af57b33463c8690f982cdce8fff05ec659..86dac260d4eec658e90a42996f02788b275d7e63 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
 
 import java.math.BigInteger;
+import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.util.List;
 
@@ -40,12 +41,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeCon
 //import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Lists;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
 public class ArpResponderService extends AbstractServiceInstance implements ArpProvider, ConfigInterface {
+    private static final Logger LOG = LoggerFactory.getLogger(ArpResponderService.class);
+
     public ArpResponderService() {
         super(Service.ARP_RESPONDER);
     }
@@ -81,6 +86,14 @@ public class ArpResponderService extends AbstractServiceInstance implements ArpP
             }
         }
 
+        if (ipAddress instanceof Inet6Address) {
+            // WORKAROUND: For now ipv6 is not supported
+            // TODO: implement ipv6 case
+            LOG.debug("ipv6 address case is not implemented yet. dpid {} segmentationId {} macAddressStr, ipAddress {} action {}",
+                      dpid, segmentationId, macAddressStr, ipAddress, action);
+            return new Status(StatusCode.NOTIMPLEMENTED);
+        }
+
         MatchUtils.createEtherTypeMatch(matchBuilder, new EtherType(Constants.ARP_ETHERTYPE));
         MatchUtils.createArpDstIpv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(ipAddress.getHostAddress()));
 
index 807791d7c806c3932af9b43c474151a1324cb298..919fe6746e01051777d95835aea18bb65ef8fffe 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services;
 
 import java.math.BigInteger;
+import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.util.List;
 
@@ -33,12 +34,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instru
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Lists;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
 public class L3ForwardingService extends AbstractServiceInstance implements L3ForwardingProvider, ConfigInterface {
+    private static final Logger LOG = LoggerFactory.getLogger(L3ForwardingService.class);
+
     public L3ForwardingService() {
         super(Service.L3_FORWARDING);
     }
@@ -60,6 +65,14 @@ public class L3ForwardingService extends AbstractServiceInstance implements L3Fo
         List<Instruction> instructions = Lists.newArrayList();
         InstructionBuilder ib = new InstructionBuilder();
 
+        if (ipAddress instanceof Inet6Address) {
+            // WORKAROUND: For now ipv6 is not supported
+            // TODO: implement ipv6 case
+            LOG.debug("ipv6 address is not implemented yet. dpid {} segmentationId {} ipAddress {} macAddress {} Action {}",
+                      dpid, segmentationId, ipAddress, macAddress, action);
+            return new Status(StatusCode.NOTIMPLEMENTED);
+        }
+
         MatchUtils.createTunnelIDMatch(matchBuilder, new BigInteger(segmentationId));
         MatchUtils.createDstL3IPv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(ipAddress.getHostAddress()));
 
index 152becc3e5a41978f8922e327f6cf70344507cce..38fc4702b73ce823047fd82d7b3131761fda313b 100644 (file)
@@ -88,7 +88,7 @@ public class RoutingService extends AbstractServiceInstance implements RoutingPr
             // TODO: implement ipv6 case
             LOG.debug("ipv6 address is not implemented yet. address {}",
                       address);
-            new Status(StatusCode.NOTIMPLEMENTED);
+            return new Status(StatusCode.NOTIMPLEMENTED);
         }
         final String prefixString = address.getHostAddress() + "/" + mask;
         MatchUtils.createDstL3IPv4Match(matchBuilder, new Ipv4Prefix(prefixString));
index 0b8e46ec59cc36bb7e087f030e35b98f291f3d99..8109a517bb765b132c209717f8ccc8e8c3be8201 100644 (file)
@@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>openstack.net-virt</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
@@ -46,8 +46,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <properties>
     <networkconfig.neutron.version>0.6.0-SNAPSHOT</networkconfig.neutron.version>
-    <ovsdb.utils.config.version>1.2.0-SNAPSHOT</ovsdb.utils.config.version>
-    <ovsdb.utils.servicehelper.version>1.2.0-SNAPSHOT</ovsdb.utils.servicehelper.version>
+    <ovsdb.utils.config.version>1.2.1-SNAPSHOT</ovsdb.utils.config.version>
+    <ovsdb.utils.servicehelper.version>1.2.1-SNAPSHOT</ovsdb.utils.servicehelper.version>
     <powermock.version>1.5.2</powermock.version>
     <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
     <root.directory>${env.PWD}</root.directory>
@@ -90,7 +90,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>org.opendaylight.ovsdb</groupId>
       <artifactId>southbound-api</artifactId>
-      <version>1.2.0-SNAPSHOT</version>
+      <version>1.2.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.ovsdb</groupId>
index b0a59fd40d2cf47e7d7787a28b021156aa19c6b2..7a8f6e6a593255e785777a743b0ea77d6993c657 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.api;
 
 import java.util.List;
 import java.util.Map;
+
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbNodeAugmentation;
@@ -76,4 +77,5 @@ public interface Southbound {
     Long getOFPort(OvsdbTerminationPointAugmentation port);
     Long getOFPort(Node bridgeNode, String portName);
     DataBroker getDatabroker();
+    OvsdbBridgeAugmentation getBridgeFromConfig(Node ovsdbNode, String bridgeName);
 }
index 81e8b21e3c3ec0b1dfecab3f0bb5969cc32abbc8..a9e84bad2dc9f657b07c9c55433393d50818aa49 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.impl;
 
 import org.opendaylight.neutron.spi.NeutronNetwork;
 import org.opendaylight.ovsdb.openstack.netvirt.ConfigInterface;
+import org.opendaylight.ovsdb.openstack.netvirt.MdsalHelper;
 import org.opendaylight.ovsdb.openstack.netvirt.NetworkHandler;
 import org.opendaylight.ovsdb.openstack.netvirt.api.BridgeConfigurationManager;
 import org.opendaylight.ovsdb.openstack.netvirt.api.ConfigurationService;
@@ -457,7 +458,8 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
      */
     private boolean addBridge(Node ovsdbNode, String bridgeName) throws Exception {
         boolean rv = true;
-        if (!southbound.isBridgeOnOvsdbNode(ovsdbNode, bridgeName)) {
+        if ((!southbound.isBridgeOnOvsdbNode(ovsdbNode, bridgeName)) ||
+                (southbound.getBridgeFromConfig(ovsdbNode, bridgeName) == null)) {
             rv = southbound.addBridge(ovsdbNode, bridgeName, getControllerTarget(ovsdbNode));
         }
         return rv;
index 0f68198c7338433bf5c17dab3498ebf4ce77c4e5..22934ea40965811109523cd7fe0f8dcfc4b02e6e 100644 (file)
@@ -721,4 +721,14 @@ public class SouthboundImpl implements Southbound {
         }
         return ofPort;
     }
+    public OvsdbBridgeAugmentation getBridgeFromConfig(Node node, String bridge) {
+        OvsdbBridgeAugmentation ovsdbBridgeAugmentation = null;
+        InstanceIdentifier<Node> bridgeIid =
+                MdsalHelper.createInstanceIdentifier(node.getKey(), bridge);
+        Node bridgeNode = mdsalUtils.read(LogicalDatastoreType.CONFIGURATION, bridgeIid);
+        if (bridgeNode != null) {
+            ovsdbBridgeAugmentation = bridgeNode.getAugmentation(OvsdbBridgeAugmentation.class);
+        }
+        return ovsdbBridgeAugmentation;
+    }
 }
index 3986f4a3ea1561b6c76becd33db34d400c287cf4..8205e4ed34d74b3dcfdea87ee085645ec7307e51 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>openstack</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
index 213aeb4441a91aa7fc49442a02ad71c65d55fb5e..bf94ad81992c312032d6a97df49b983da59baf3c 100644 (file)
@@ -150,7 +150,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 0cd4c03f0486f98fa81db923eec9c0716c1ec290..62b622c9777986544a6a7620f4d850a9068bc0ed 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>ovsdb-artifacts</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index f4f5873af0056b2fe47b96de84e729d68b8a01b1..0f13ac20710a4d8ea1899dc7f0433e613fe37e97 100755 (executable)
@@ -11,7 +11,7 @@
   </parent>
 
   <artifactId>ovsdb-plugin-compatibility-layer</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
index 6b1868ca7d88c638166182b486ddc4917464954c..6b06de526c0d487f187e0e0f5f326d067e075564 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>plugin-mdsal-adapter</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
   <dependencies>
index 898f7308d5d474481cb9e6f2fd79159831e8d42a..8744245d421fb5d00ef6ca5d06a06ecb7c7d9728 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>plugin-shell</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index 9cf0895ad1c088533863bfadcff1e91bd0a4d792..027ed1f9294fc98c8377c53eb70e8c3aff0a81c3 100755 (executable)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>plugin</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
diff --git a/pom.xml b/pom.xml
index 28bda5d94801381871c1f286521709cdc5508318..0b15ee812d56d54544b6e11593d09f705dfc1eb2 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>ovsdb</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name> <!-- Used by Sonar to set project name -->
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
@@ -52,10 +52,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <!-- Parent POM files -->
     <module>commons</module>
 
+    <module>library</module>
+    <!-- Aggregations -->
     <module>features</module>
     <module>karaf</module>
     <!-- OVSDB Components -->
-    <module>library</module>
     <module>southbound</module>
     <module>northbound</module>
     <module>openstack</module>
index 16600aac972dc932833fe7ea603ee7f79aafb2a1..7d16d57142e9a1438c13bc0534d82de5b7e9a7de 100755 (executable)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>schema.hardwarevtep</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index f9a6915fbfaf378d338034b2540b058b495f9df5..17d75d96dd4354070407e5efe745155b79cba965 100755 (executable)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>schema.openvswitch</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index 60452e9510118a75df1d323ce482de8f4303ce95..61b9d28c4aca1c5754781815e72020caf23a1de0 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>schemas</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
index 06849a6959a3c6c27a38d17db36bd08fc0972f85..2b187e59792e62e5bd2ff97b9864fde4c288d43e 100644 (file)
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2014 Cisco Systems and others. All rights reserved.\r
-This program and the accompanying materials are made available under the\r
-terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
-and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL\r
--->\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-  <groupId>org.opendaylight.ovsdb</groupId>\r
-  <parent>\r
-    <artifactId>commons</artifactId>\r
-    <groupId>org.opendaylight.ovsdb</groupId>\r
-    <version>1.4.0-SNAPSHOT</version>\r
-    <relativePath>../commons/parent</relativePath>\r
-  </parent>\r
-  <artifactId>southbound-aggregator</artifactId>\r
-  <version>1.2.0-SNAPSHOT</version>\r
-  <name>${project.artifactId}</name>\r
-  <packaging>pom</packaging>\r
-  <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>\r
-  <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>\r
-  <licenses>\r
-    <license>\r
-      <name>Eclipse Public License v1.0</name>\r
-      <url>http://www.eclipse.org/legal/epl-v10.html</url>\r
-    </license>\r
-  </licenses>\r
-  <developers>\r
-    <developer>\r
-      <name>Sam Hague</name>\r
-      <email>shague@gmail.com</email>\r
-      <url>https://github.com/shague</url>\r
-    </developer>\r
-  </developers>\r
-  <scm>\r
-    <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>\r
-    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>\r
-    <tag>HEAD</tag>\r
-    <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>\r
-  </scm>\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <prerequisites>\r
-    <maven>3.1.1</maven>\r
-  </prerequisites>\r
-  <modules>\r
-    <module>southbound-api</module>\r
-    <module>southbound-impl</module>\r
-    <module>southbound-karaf</module>\r
-    <module>southbound-features</module>\r
-    <module>southbound-artifacts</module>\r
-    <module>southbound-it</module>\r
-  </modules>\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2014 Cisco Systems and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <groupId>org.opendaylight.ovsdb</groupId>
+  <parent>
+    <artifactId>commons</artifactId>
+    <groupId>org.opendaylight.ovsdb</groupId>
+    <version>1.4.0-SNAPSHOT</version>
+    <relativePath>../commons/parent</relativePath>
+  </parent>
+  <artifactId>southbound-aggregator</artifactId>
+  <version>1.2.1-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <packaging>pom</packaging>
+  <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
+  <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
+  <licenses>
+    <license>
+      <name>Eclipse Public License v1.0</name>
+      <url>http://www.eclipse.org/legal/epl-v10.html</url>
+    </license>
+  </licenses>
+  <developers>
+    <developer>
+      <name>Sam Hague</name>
+      <email>shague@gmail.com</email>
+      <url>https://github.com/shague</url>
+    </developer>
+  </developers>
+  <scm>
+    <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
+    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
+    <tag>HEAD</tag>
+    <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
+  </scm>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <modules>
+    <module>southbound-api</module>
+    <module>southbound-impl</module>
+    <module>southbound-karaf</module>
+    <module>southbound-features</module>
+    <module>southbound-artifacts</module>
+    <module>southbound-it</module>
+  </modules>
+</project>
index 4aa55b3dc9656073ae26a2a69be643a094cf9e7b..4df423ff2e45d80701e6c5dc22b6a514cc37a5d5 100644 (file)
@@ -17,7 +17,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>southbound-api</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index 1b55eabd1824c99a2c3412f388780d4542b0b203..cf8895115e32a2c775a88950745053d945c50815 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>southbound-artifacts</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index dbbea718daef3b63f1b4c232dfe32df0978131b2..478c469137770e3875b528971802976f2152f82b 100644 (file)
@@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   </parent>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>southbound-features</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <modelVersion>4.0.0</modelVersion>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
index 0276059354f8438a5f04fab602f91305ff5f3b00..8796ccf3f1bdc6cfc56703af1afa43d5f4a0c3c0 100644 (file)
@@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>southbound-impl</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstanceTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstanceTest.java
new file mode 100644 (file)
index 0000000..39087b8
--- /dev/null
@@ -0,0 +1,313 @@
+package org.opendaylight.ovsdb.southbound;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.opendaylight.ovsdb.lib.EchoServiceCallbackFilters;
+import org.opendaylight.ovsdb.lib.LockAquisitionCallback;
+import org.opendaylight.ovsdb.lib.LockStolenCallback;
+import org.opendaylight.ovsdb.lib.MonitorCallBack;
+import org.opendaylight.ovsdb.lib.MonitorHandle;
+import org.opendaylight.ovsdb.lib.OvsdbClient;
+import org.opendaylight.ovsdb.lib.OvsdbConnectionInfo;
+import org.opendaylight.ovsdb.lib.message.MonitorRequest;
+import org.opendaylight.ovsdb.lib.message.MonitorRequestBuilder;
+import org.opendaylight.ovsdb.lib.message.MonitorSelect;
+import org.opendaylight.ovsdb.lib.message.TableUpdates;
+import org.opendaylight.ovsdb.lib.operations.OperationResult;
+import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
+import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
+import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
+import org.opendaylight.ovsdb.southbound.ovsdb.transact.TransactCommand;
+import org.opendaylight.ovsdb.southbound.ovsdb.transact.TransactInvoker;
+import org.opendaylight.ovsdb.southbound.transactions.md.TransactionInvoker;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfo;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.api.support.membermodification.MemberMatcher;
+import org.powermock.api.support.membermodification.MemberModifier;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.reflect.Whitebox;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+@PrepareForTest({OvsdbConnectionInstance.class, MonitorRequestBuilder.class})
+@RunWith(PowerMockRunner.class)
+
+public class OvsdbConnectionInstanceTest {
+    @Mock private OvsdbConnectionInstance ovsdbConnectionInstance;
+    @Mock private OvsdbClient client;
+    @Mock private ConnectionInfo connectionInfo;
+    @Mock private TransactionInvoker txInvoker;
+    @Mock private MonitorCallBack callback;
+    @Mock private ConnectionInfo key;
+    @Mock private InstanceIdentifier<Node> instanceIdentifier;
+    private Map<DatabaseSchema,TransactInvoker> transactInvokers;
+
+    @Before
+    public void setUp() throws Exception {
+        ovsdbConnectionInstance = PowerMockito.mock(OvsdbConnectionInstance.class, Mockito.CALLS_REAL_METHODS);
+        MemberModifier.field(OvsdbConnectionInstance.class, "txInvoker").set(ovsdbConnectionInstance, txInvoker);
+        MemberModifier.field(OvsdbConnectionInstance.class, "key").set(ovsdbConnectionInstance, key);
+        MemberModifier.field(OvsdbConnectionInstance.class, "connectionInfo").set(ovsdbConnectionInstance, key);
+        MemberModifier.field(OvsdbConnectionInstance.class, "instanceIdentifier").set(ovsdbConnectionInstance, instanceIdentifier);
+    }
+
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @Test
+    public void testTransact() throws Exception {
+        TransactCommand command = mock(TransactCommand.class);
+        transactInvokers = new HashMap();
+
+        //init instance variables
+        TransactInvoker transactInvoker1 = mock(TransactInvoker.class);
+        TransactInvoker transactInvoker2 = mock(TransactInvoker.class);
+        transactInvokers.put(mock(DatabaseSchema.class), transactInvoker1);
+        transactInvokers.put(mock(DatabaseSchema.class), transactInvoker2);
+        MemberModifier.field(OvsdbConnectionInstance.class, "transactInvokers").set(ovsdbConnectionInstance , transactInvokers);
+
+        ovsdbConnectionInstance.transact(command);
+        verify(transactInvoker1).invoke(any(TransactCommand.class));
+        verify(transactInvoker2).invoke(any(TransactCommand.class));
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testRegisterCallbacks() throws Exception {
+
+        //callback not null case
+        MemberModifier.field(OvsdbConnectionInstance.class, "callback").set(ovsdbConnectionInstance , callback);
+        ovsdbConnectionInstance.registerCallbacks();
+        verify(ovsdbConnectionInstance, times(0)).getDatabases();
+
+        //callback null case
+        MemberModifier.field(OvsdbConnectionInstance.class, "callback").set(ovsdbConnectionInstance , null);
+        ListenableFuture<List<String>> listenableFuture = mock(ListenableFuture.class);
+        List<String> databases = new ArrayList<String>();
+        databases.add("Open_vSwitch");
+        databases.add("");
+        doReturn(listenableFuture).when(ovsdbConnectionInstance).getDatabases();
+        when(listenableFuture.get()).thenReturn(databases);
+
+        ListenableFuture<DatabaseSchema> listenableDbSchema = mock(ListenableFuture.class);
+        DatabaseSchema dbSchema= mock(DatabaseSchema.class);
+        doReturn(listenableDbSchema).when(ovsdbConnectionInstance).getSchema(anyString());
+        when(listenableDbSchema.get()).thenReturn(dbSchema);
+
+        MemberModifier.suppress(MemberMatcher.method(OvsdbConnectionInstance.class, "monitorAllTables", String.class,DatabaseSchema.class));
+        ovsdbConnectionInstance.registerCallbacks();
+        PowerMockito.verifyPrivate(ovsdbConnectionInstance, times(2)).invoke("monitorAllTables", anyString(), any(DatabaseSchema.class));
+    }
+
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @Test
+    public void testCreateTransactInvokers() throws Exception {
+        //transactInvokers not null case
+        transactInvokers = new HashMap();
+        MemberModifier.field(OvsdbConnectionInstance.class, "transactInvokers").set(ovsdbConnectionInstance , transactInvokers);
+        ovsdbConnectionInstance.createTransactInvokers();
+        verify(ovsdbConnectionInstance, times(0)).getDatabases();
+
+        //transactInvokers null case
+        MemberModifier.field(OvsdbConnectionInstance.class, "transactInvokers").set(ovsdbConnectionInstance , null);
+        ListenableFuture<List<String>> listenableFuture = mock(ListenableFuture.class);
+        List<String> databases = new ArrayList<String>();
+        databases.add("database1");
+        databases.add("database2");
+        doReturn(listenableFuture).when(ovsdbConnectionInstance).getDatabases();
+        when(listenableFuture.get()).thenReturn(databases);
+
+        ListenableFuture<DatabaseSchema> listenableDbSchema = mock(ListenableFuture.class);
+        DatabaseSchema dbSchema= mock(DatabaseSchema.class);
+        DatabaseSchema dbSchema1= mock(DatabaseSchema.class);
+        doReturn(listenableDbSchema).when(ovsdbConnectionInstance).getSchema(anyString());
+        when(listenableDbSchema.get()).thenReturn(dbSchema).thenReturn(dbSchema1);
+
+        ovsdbConnectionInstance.createTransactInvokers();
+        verify(ovsdbConnectionInstance).getDatabases();
+        verify(ovsdbConnectionInstance, times(2)).getSchema(anyString());
+
+        Map<DatabaseSchema,TransactInvoker> testTransactInvokers = Whitebox.getInternalState(ovsdbConnectionInstance, "transactInvokers");
+        assertEquals("Error, size of the hashmap is incorrect", 2, testTransactInvokers.size());
+    }
+
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testMonitorAllTables() throws Exception {
+        Set<String> tables = new HashSet<String>();
+        tables.add("tableName1");
+        tables.add("tableName2");
+        DatabaseSchema dbSchema = mock(DatabaseSchema.class);
+        when(dbSchema.getTables()).thenReturn(tables);
+        GenericTableSchema tableSchema = mock(GenericTableSchema.class);
+        when(dbSchema.table(anyString(), eq(GenericTableSchema.class))).thenReturn(tableSchema);
+
+        Set<String> columns = new HashSet<String>();
+        columns.add("columnName1");
+        columns.add("columnName2");
+        when(tableSchema.getColumns()).thenReturn(columns);
+        MonitorRequestBuilder<GenericTableSchema> monitorBuilder = mock(MonitorRequestBuilder.class);
+        PowerMockito.mockStatic(MonitorRequestBuilder.class);
+        when(MonitorRequestBuilder.builder(any(GenericTableSchema.class))).thenReturn(monitorBuilder);
+        when(monitorBuilder.addColumn(anyString())).thenReturn(monitorBuilder);
+        MonitorRequest<GenericTableSchema> monitorReq = mock(MonitorRequest.class);
+        when(monitorBuilder.with(any(MonitorSelect.class))).thenReturn(monitorBuilder);
+        when(monitorBuilder.build()).thenReturn(monitorReq);
+
+        MemberModifier.suppress(MemberMatcher.method(OvsdbConnectionInstance.class, "monitor", DatabaseSchema.class, List.class, MonitorCallBack.class));
+        TableUpdates tableUpdates = mock(TableUpdates.class);
+        when(ovsdbConnectionInstance.monitor(any(DatabaseSchema.class), any(List.class), any(MonitorCallBack.class))).thenReturn(tableUpdates);
+        MemberModifier.field(OvsdbConnectionInstance.class, "callback").set(ovsdbConnectionInstance, callback);
+        doNothing().when(callback).update(any(TableUpdates.class), any(DatabaseSchema.class));
+
+        Whitebox.invokeMethod(ovsdbConnectionInstance, "monitorAllTables", "database", dbSchema);
+        PowerMockito.verifyPrivate(ovsdbConnectionInstance, times(1)).invoke("monitorAllTables", anyString(), any(DatabaseSchema.class));
+
+        verify(monitorBuilder, times(4)).addColumn(anyString());
+    }
+
+    @SuppressWarnings({ "unchecked" })
+    @Test
+    public void testOvsdbConnectionInstance() throws Exception {
+        MemberModifier.field(OvsdbConnectionInstance.class, "client").set(ovsdbConnectionInstance, client);
+        DatabaseSchema databaseSchema = mock(DatabaseSchema.class);
+
+        //test getDatabases()
+        ListenableFuture<List<String>> listenableFuture = mock(ListenableFuture.class);
+        when(client.getDatabases()).thenReturn(listenableFuture);
+        assertEquals("Error, did not return correct ListenableFuture<List<String>> object", listenableFuture, ovsdbConnectionInstance.getDatabases());
+        verify(client).getDatabases();
+
+        //test getSchema()
+        ListenableFuture<DatabaseSchema> futureDatabaseSchema = mock(ListenableFuture.class);
+        when(client.getSchema(anyString())).thenReturn(futureDatabaseSchema);
+        assertEquals("Error, did not return correct ListenableFuture<DatabaseSchema> object", futureDatabaseSchema, ovsdbConnectionInstance.getSchema(anyString()));
+        verify(client).getSchema(anyString());
+
+        //test transactBuilder()
+        TransactionBuilder transactionBuilder = mock(TransactionBuilder.class);
+        when(client.transactBuilder(any(DatabaseSchema.class))).thenReturn(transactionBuilder);
+        assertEquals("Error, did not return correct TransactionBuilder object", transactionBuilder, ovsdbConnectionInstance.transactBuilder(any(DatabaseSchema.class)));
+        verify(client).transactBuilder(any(DatabaseSchema.class));
+
+        //test transact()
+        ListenableFuture<List<OperationResult>> futureOperationResult = mock(ListenableFuture.class);
+        when(client.transact(any(DatabaseSchema.class), any(List.class))).thenReturn(futureOperationResult);
+        assertEquals("Error, did not return correct ListenableFuture<List<OperationResult>> object", futureOperationResult, ovsdbConnectionInstance.transact(any(DatabaseSchema.class), any(List.class)));
+        verify(client).transact(any(DatabaseSchema.class), any(List.class));
+
+        //test monitor()
+        TableUpdates tableUpdates = mock(TableUpdates.class);
+        when(client.monitor(any(DatabaseSchema.class), any(List.class), any(MonitorCallBack.class))).thenReturn(tableUpdates);
+        assertEquals("Error, did not return correct TableUpdates object", tableUpdates, ovsdbConnectionInstance.monitor(any(DatabaseSchema.class), any(List.class), any(MonitorCallBack.class)));
+        verify(client).monitor(any(DatabaseSchema.class), any(List.class), any(MonitorCallBack.class));
+
+        //test cancelMonitor()
+        doNothing().when(client).cancelMonitor(any(MonitorHandle.class));
+        MonitorHandle monitorHandle = mock(MonitorHandle.class);
+        ovsdbConnectionInstance.cancelMonitor(monitorHandle);
+        verify(client).cancelMonitor(any(MonitorHandle.class));
+
+        //test lock()
+        doNothing().when(client).lock(anyString(), any(LockAquisitionCallback.class), any(LockStolenCallback.class));
+        LockAquisitionCallback lockAquisitionCallback = mock(LockAquisitionCallback.class);
+        LockStolenCallback lockStolenCallback = mock(LockStolenCallback.class);
+        ovsdbConnectionInstance.lock("lockId", lockAquisitionCallback, lockStolenCallback);
+        verify(client).lock(anyString(), any(LockAquisitionCallback.class), any(LockStolenCallback.class));
+
+        //test steal()
+        ListenableFuture<Boolean> futureBoolean = mock(ListenableFuture.class);
+        when(client.steal(anyString())).thenReturn(futureBoolean);
+        assertEquals("Error, did not return correct ListenableFuture<Boolean> object", futureBoolean, ovsdbConnectionInstance.steal(anyString()));
+        verify(client).steal(anyString());
+
+        //test unLock()
+        when(client.unLock(anyString())).thenReturn(futureBoolean);
+        assertEquals("Error, did not return correct ListenableFuture<Boolean> object", futureBoolean, ovsdbConnectionInstance.unLock(anyString()));
+        verify(client).unLock(anyString());
+
+        //test startEchoService()
+        EchoServiceCallbackFilters echoServiceCallbackFilters = mock(EchoServiceCallbackFilters.class);
+        doNothing().when(client).startEchoService(any(EchoServiceCallbackFilters.class));
+        ovsdbConnectionInstance.startEchoService(echoServiceCallbackFilters);
+        verify(client).startEchoService(any(EchoServiceCallbackFilters.class));
+
+        //test stopEchoService()
+        doNothing().when(client).stopEchoService();
+        ovsdbConnectionInstance.stopEchoService();
+        verify(client).stopEchoService();
+
+        //test isActive()
+        when(client.isActive()).thenReturn(true);
+        assertEquals("Error, does not match isActive()", true, ovsdbConnectionInstance.isActive());
+        verify(client).isActive();
+
+        //test disconnect()
+        doNothing().when(client).disconnect();
+        ovsdbConnectionInstance.disconnect();
+        verify(client).disconnect();
+
+        //test getDatabaseSchema()
+        when(client.getDatabaseSchema(anyString())).thenReturn(databaseSchema);
+        assertEquals("Error, did not return correct DatabaseSchema object", databaseSchema, ovsdbConnectionInstance.getDatabaseSchema(anyString()));
+        verify(client).getDatabaseSchema(anyString());
+
+        //test getConnectionInfo()
+        OvsdbConnectionInfo ovsdbConnectionInfo = mock(OvsdbConnectionInfo.class);
+        when(client.getConnectionInfo()).thenReturn(ovsdbConnectionInfo);
+        assertEquals("Error, did not return correct OvsdbConnectionInfo object", ovsdbConnectionInfo, ovsdbConnectionInstance.getConnectionInfo());
+        verify(client).getConnectionInfo();
+
+        //test getMDConnectionInfo()
+        assertEquals("Error, incorrect connectionInfo", key, ovsdbConnectionInstance.getMDConnectionInfo());
+
+        //test setMDConnectionInfo()
+        ovsdbConnectionInstance.setMDConnectionInfo(key);
+        assertEquals("Error, incorrect ConnectionInfo", key, Whitebox.getInternalState(ovsdbConnectionInstance, "key"));
+
+        //test getInstanceIdentifier()
+        assertEquals("Error, incorrect instanceIdentifier", instanceIdentifier, ovsdbConnectionInstance.getInstanceIdentifier());
+
+        //test getNodeId()
+        NodeKey nodeKey = mock(NodeKey.class);
+        NodeId nodeId = mock(NodeId.class);
+        MemberModifier.suppress(MemberMatcher.method(OvsdbConnectionInstance.class, "getNodeKey"));
+        when(ovsdbConnectionInstance.getNodeKey()).thenReturn(nodeKey);
+        when(nodeKey.getNodeId()).thenReturn(nodeId);
+        assertEquals("Error, incorrect NodeId object", nodeId, ovsdbConnectionInstance.getNodeId());
+
+        //test setInstanceIdentifier()
+        ovsdbConnectionInstance.setInstanceIdentifier(instanceIdentifier);
+        assertEquals("Error, incorrect instanceIdentifier", instanceIdentifier, Whitebox.getInternalState(ovsdbConnectionInstance, "instanceIdentifier"));
+
+        //test monitor()
+        MemberModifier.suppress(MemberMatcher.method(OvsdbConnectionInstance.class, "monitor", DatabaseSchema.class, List.class, MonitorHandle.class, MonitorCallBack.class));
+        when(ovsdbConnectionInstance.monitor(any(DatabaseSchema.class), any(List.class), any(MonitorHandle.class), any(MonitorCallBack.class))).thenReturn(null);
+        assertNull(ovsdbConnectionInstance.monitor(any(DatabaseSchema.class), any(List.class), any(MonitorHandle.class), any(MonitorCallBack.class)));
+    }
+}
diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java
new file mode 100644 (file)
index 0000000..055d74f
--- /dev/null
@@ -0,0 +1,36 @@
+package org.opendaylight.ovsdb.southbound;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.opendaylight.ovsdb.lib.message.TableUpdates;
+import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
+import org.opendaylight.ovsdb.southbound.transactions.md.OvsdbOperationalCommandAggregator;
+import org.opendaylight.ovsdb.southbound.transactions.md.TransactionInvoker;
+
+@RunWith(MockitoJUnitRunner.class)
+
+public class OvsdbMonitorCallbackTest {
+    @InjectMocks private OvsdbMonitorCallback ovsdbMonitorCallback = mock(OvsdbMonitorCallback.class, Mockito.CALLS_REAL_METHODS);
+    @Mock private TransactionInvoker txInvoker;
+    @Mock private OvsdbConnectionInstance key;
+
+    @Test
+    public void testUpdate() {
+        ovsdbMonitorCallback.update(mock(TableUpdates.class), mock(DatabaseSchema.class));
+        verify(txInvoker).invoke(any(OvsdbOperationalCommandAggregator.class));
+    }
+
+    @Test
+    public void testException() {
+        ovsdbMonitorCallback.exception(mock(Throwable.class));
+        verify(ovsdbMonitorCallback).exception(any(Throwable.class));
+    }
+}
index 954752f1a38241d61ed748b8c389699d5e719e39..97d94424b1df80ce785f52876f9e7b685f2b9b93 100644 (file)
@@ -10,14 +10,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <parent>
     <groupId>org.opendaylight.controller</groupId>
-    <artifactId>config-parent</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
+    <artifactId>mdsal-it-parent</artifactId>
+    <version>1.3.0-SNAPSHOT</version>
     <relativePath/>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>southbound-it</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
diff --git a/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/AbstractConfigTestBase.java b/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/AbstractConfigTestBase.java
deleted file mode 100644 (file)
index f4f8053..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.ovsdb.southbound.it;
-
-import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
-
-import java.io.File;
-import java.lang.management.ManagementFactory;
-import java.util.Calendar;
-
-import javax.management.InstanceNotFoundException;
-
-import org.junit.Rule;
-import org.junit.internal.AssumptionViolatedException;
-import org.junit.rules.TestRule;
-import org.junit.rules.TestWatcher;
-import org.junit.runner.Description;
-import org.opendaylight.controller.config.api.ConfigRegistry;
-import org.opendaylight.controller.config.util.ConfigRegistryJMXClient;
-import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
-import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
-import org.ops4j.pax.exam.options.MavenUrlReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ObjectArrays;
-
-public abstract class AbstractConfigTestBase {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractConfigTestBase.class);
-
-    /*
-     * Wait up to 10s for our configured module to come up
-     */
-    private static final int MODULE_TIMEOUT = 10000;
-    private static int configTimes = 0;
-
-    public abstract String getModuleName();
-
-    public abstract String getInstanceName();
-
-    public abstract MavenUrlReference getFeatureRepo();
-
-    public abstract String getFeatureName();
-
-    public Option[] getLoggingOptions() {
-        Option[] options = new Option[] {
-                editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
-                        logConfiguration(AbstractConfigTestBase.class),
-                        LogLevel.INFO.name())
-        };
-        return options;
-    }
-
-    public String logConfiguration(Class<?> klazz) {
-        return "log4j.logger." + klazz.getPackage().getName();
-    }
-
-    public Option[] getFeaturesOptions() {
-        return new Option[]{};
-    }
-
-    public Option[] getPropertiesOptions() {
-        return new Option[]{};
-    }
-
-    public MavenArtifactUrlReference getKarafDistro() {
-        MavenArtifactUrlReference karafUrl;
-        karafUrl = maven()
-                // karaf-empty is busted
-                //.groupId("org.opendaylight.controller")
-                //.artifactId("opendaylight-karaf-empty")
-                //.version("1.5.0-SNAPSHOT")
-                .groupId("org.opendaylight.ovsdb")
-                .artifactId("southbound-karaf")
-                .versionAsInProject()
-                .type("zip");
-        return karafUrl;
-    }
-
-    @Configuration
-    public Option[] config() {
-        LOG.info("Calling config, configTimes: {}", configTimes);
-        configTimes++;
-        Option[] options = new Option[] {
-                //KarafDistributionOption.debugConfiguration("5005", true),
-                karafDistributionConfiguration()
-                        .frameworkUrl(getKarafDistro())
-                        .unpackDirectory(new File("target/exam"))
-                        .useDeployFolder(false),
-                keepRuntimeFolder(),
-                //debugConfiguration("5005", true),
-                //features(getFeatureRepo() , getFeatureName())
-        };
-        options = ObjectArrays.concat(options, getFeaturesOptions(), Option.class);
-        options = ObjectArrays.concat(options, getLoggingOptions(), Option.class);
-        options = ObjectArrays.concat(options, getPropertiesOptions(), Option.class);
-        return options;
-    }
-
-    public void setup() throws Exception {
-        LOG.info("Module: {} Instance: {} attempting to configure.",
-                getModuleName(),getInstanceName());
-        Calendar start = Calendar.getInstance();
-        ConfigRegistry configRegistryClient = new ConfigRegistryJMXClient(ManagementFactory
-                .getPlatformMBeanServer());
-        for (int timer = 0;timer < MODULE_TIMEOUT;timer++) {
-            try {
-                configRegistryClient.lookupConfigBean(getModuleName(), getInstanceName());
-                Thread.sleep(1);
-            } catch (InstanceNotFoundException e) {
-                if (timer >= MODULE_TIMEOUT) {
-                    throw e;
-                }
-            } catch (InterruptedException e) {
-                LOG.error("Exception: ",e);
-            }
-        }
-        Calendar stop = Calendar.getInstance();
-        LOG.info("Module: {} Instance: {} configured after {} ms",
-                getModuleName(),getInstanceName(),
-                stop.getTimeInMillis() - start.getTimeInMillis());
-    }
-
-    @Rule
-    public TestRule watcher = new TestWatcher() {
-        @Override
-        protected void starting(Description description) {
-            LOG.info("TestWatcher: Starting test:\n{}", description.getDisplayName());
-        }
-
-        @Override
-        protected void finished(Description description) {
-            LOG.info("TestWatcher: Finished test:\n{}", description.getDisplayName());
-        }
-
-        @Override
-        protected void succeeded(Description description) {
-            LOG.info("TestWatcher: Test succeeded:\n{}", description.getDisplayName());
-        }
-
-        @Override
-        protected void failed(Throwable ex, Description description) {
-            LOG.info("TestWatcher: Test failed:\n{} ", description.getDisplayName(), ex);
-        }
-
-        @Override
-        protected void skipped(AssumptionViolatedException ex, Description description) {
-            LOG.info("TestWatcher: Test skipped:\n{} ", description.getDisplayName(), ex);
-        }
-    };
-}
diff --git a/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/AbstractMdsalTestBase.java b/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/AbstractMdsalTestBase.java
deleted file mode 100644 (file)
index 72f0c24..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.ovsdb.southbound.it;
-
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-
-import java.util.Calendar;
-
-import javax.inject.Inject;
-
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
-import org.ops4j.pax.exam.util.Filter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ObjectArrays;
-
-public abstract class AbstractMdsalTestBase extends AbstractConfigTestBase implements BindingAwareProvider {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractMdsalTestBase.class);
-    private static final int REGISTRATION_TIMEOUT = 10000;
-    @Inject @Filter(timeout = 60000)
-    private BindingAwareBroker broker;
-    private ProviderContext session = null;
-
-    public ProviderContext getSession() {
-        return session;
-    }
-
-    @Override
-    public void onSessionInitiated(ProviderContext session) {
-        LOG.info("Session Initiated: {}",session);
-        this.session = session;
-    }
-
-    @Override
-    public void setup() throws Exception {
-        super.setup();
-        Calendar start = Calendar.getInstance();
-        broker.registerProvider(this);
-        for (int timer = 0;timer < REGISTRATION_TIMEOUT;timer++) {
-            if (session != null) {
-                Calendar stop = Calendar.getInstance();
-                LOG.info("Registered with the MD-SAL after {} ms",
-                        stop.getTimeInMillis() - start.getTimeInMillis());
-                return;
-            } else {
-                Thread.sleep(1);
-            }
-        }
-        throw new RuntimeException("Session not initiated after " + REGISTRATION_TIMEOUT + " ms");
-    }
-
-    @Override
-    public Option[] getLoggingOptions() {
-        Option[] options = new Option[] {
-                editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
-                        logConfiguration(AbstractMdsalTestBase.class),
-                        LogLevel.INFO.name()),
-        };
-        options = ObjectArrays.concat(options, super.getLoggingOptions(), Option.class);
-        return options;
-    }
-
-}
index ae3aa7d9f3b3642dec4db3653fdfe26c423e993e..b3ef1a4b21f207aba8f7fb8b75460acf8fdd3ecf 100644 (file)
@@ -9,15 +9,19 @@ package org.opendaylight.ovsdb.southbound.it;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.composite;
 import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.when;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
 
 import com.google.common.collect.ImmutableBiMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-import com.google.common.collect.ObjectArrays;
 import com.google.common.collect.Sets;
 
+import java.io.File;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
@@ -36,6 +40,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
 import org.opendaylight.ovsdb.southbound.SouthboundConstants;
 import org.opendaylight.ovsdb.southbound.SouthboundMapper;
 import org.opendaylight.ovsdb.southbound.SouthboundProvider;
@@ -97,6 +102,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.options.KarafDistributionOption;
 import org.ops4j.pax.exam.karaf.options.LogLevelOption;
 import org.ops4j.pax.exam.options.MavenUrlReference;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
@@ -125,12 +131,42 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     private static Boolean setup = false;
     private static MdsalUtils mdsalUtils = null;
 
+    // TODO Constants copied frmo AbstractConfigTestBase, need to be removed (see TODO below)
+    private static final String PAX_EXAM_UNPACK_DIRECTORY = "target/exam";
+    private static final String KARAF_DEBUG_PORT = "5005";
+    private static final String KARAF_DEBUG_PROP = "karaf.debug";
+    private static final String KEEP_UNPACK_DIRECTORY_PROP = "karaf.keep.unpack";
+
     @Inject
     private BundleContext bundleContext;
 
     @Configuration
     public Option[] config() {
-        return super.config();
+        // TODO Figure out how to use the parent Karaf setup, then just use super.config()
+        Option[] options = new Option[] {
+                when(Boolean.getBoolean(KARAF_DEBUG_PROP))
+                        .useOptions(KarafDistributionOption.debugConfiguration(KARAF_DEBUG_PORT, true)),
+                karafDistributionConfiguration().frameworkUrl(getKarafDistro())
+                        .unpackDirectory(new File(PAX_EXAM_UNPACK_DIRECTORY))
+                        .useDeployFolder(false),
+                when(Boolean.getBoolean(KEEP_UNPACK_DIRECTORY_PROP)).useOptions(keepRuntimeFolder()),
+                // Works only if we don't specify the feature repo and name
+                getLoggingOption()};
+        Option[] propertyOptions = getPropertiesOptions();
+        Option[] combinedOptions = new Option[options.length + propertyOptions.length];
+        System.arraycopy(options, 0, combinedOptions, 0, options.length);
+        System.arraycopy(propertyOptions, 0, combinedOptions, options.length, propertyOptions.length);
+        return combinedOptions;
+    }
+
+    @Override
+    public String getKarafDistro() {
+        return maven()
+                .groupId("org.opendaylight.ovsdb")
+                .artifactId("southbound-karaf")
+                .versionAsInProject()
+                .type("zip")
+                .getURL();
     }
 
     @Override
@@ -165,24 +201,15 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     }
 
     @Override
-    public Option[] getFeaturesOptions() {
-        return new Option[]{};
-    }
-
-    @Override
-    public Option[] getLoggingOptions() {
-        Option[] options = new Option[] {
+    public Option getLoggingOption() {
+        return composite(
                 editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
                         "log4j.logger.org.opendaylight.ovsdb",
-                        LogLevelOption.LogLevel.TRACE.name())
-        };
-
-        options = ObjectArrays.concat(options, super.getLoggingOptions(), Option.class);
-        return options;
+                        LogLevelOption.LogLevel.TRACE.name()),
+                super.getLoggingOption());
     }
 
-    @Override
-    public Option[] getPropertiesOptions() {
+    private Option[] getPropertiesOptions() {
         Properties props = new Properties(System.getProperties());
         String addressStr = props.getProperty(SouthboundITConstants.SERVER_IPADDRESS,
                 SouthboundITConstants.DEFAULT_SERVER_IPADDRESS);
@@ -206,8 +233,9 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     }
 
     @Before
-    public void setUp() throws InterruptedException {
-        if (setup == true) {
+    @Override
+    public void setup() throws InterruptedException {
+        if (setup) {
             LOG.info("Skipping setUp, already initialized");
             return;
         }
index 183ee00b9439ff97cabac2e53873252c9e4bce05..914e524e5cd94be860a14e221c50cce0f3bc8383 100644 (file)
@@ -15,7 +15,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.ovsdb</groupId>
   <artifactId>southbound-karaf</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <prerequisites>
     <maven>3.1.1</maven>
index bfe3799493c6316812d8ba1fbcfbd3bcda05ff65..2a5afc530b4356dfb1c324a9bbf6c6e2f4898df5 100644 (file)
@@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <artifactId>utils.config</artifactId>
   <name>${project.artifactId}</name>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index b583117c23f9342341c6c243700e42a1384bb473..444d5d1ef35f25357d4c0190c5c2715abe99ebdd 100644 (file)
@@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <artifactId>utils.mdsal-node</artifactId>
   <name>${project.artifactId}</name>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index 0025b27b66227c6153dc8e59d43cea307d7281e8..573ea2c083eb355b0fd215df7c823d8af75bc49c 100644 (file)
@@ -20,7 +20,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <artifactId>utils.mdsal-openflow</artifactId>
   <name>${project.artifactId}</name>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
index 7cc770dc1ac8af72baaad29f5c79dcfa6edf59d8..73da69da6b0cc0a8ee2460ec83ef91d84f6ad04f 100644 (file)
@@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </parent>
 
   <artifactId>utils.servicehelper</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>