Merge "Bug 1029: Remove dead code: sal-schema-repository-api"
authorTony Tkacik <ttkacik@cisco.com>
Wed, 28 May 2014 14:40:46 +0000 (14:40 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 28 May 2014 14:40:46 +0000 (14:40 +0000)
355 files changed:
.gitignore
features/base/pom.xml [new file with mode: 0644]
features/base/src/main/resources/features.xml [new file with mode: 0644]
opendaylight/commons/opendaylight/pom.xml
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigRegistryImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/SearchableServiceReferenceWritableRegistry.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ServiceReferenceRegistryImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BeanToOsgiServiceManager.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/mapping/CodecRegistryProvider.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntry.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntry.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/AbstractYangTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeRegistratorTest.java
opendaylight/config/yang-jmx-generator/src/test/resources/config-bgp-listener-impl.yang
opendaylight/config/yang-jmx-generator/src/test/resources/test-config-threads-java.yang
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/DepTestImplModule.java
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/IdentityTestModule.java
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/NetconfTestImplModule.java
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/TestImplModule.java
opendaylight/config/yang-test/src/main/yang/config-test-impl.yang
opendaylight/distribution/opendaylight-karaf/pom.xml
opendaylight/distribution/opendaylight/pom.xml
opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini
opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/99-netconf-connector.xml [moved from opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/01-netconf-connector.xml with 100% similarity]
opendaylight/dummy-console/pom.xml
opendaylight/md-sal/clustered-data-store/implementation/pom.xml [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/cluster/store/ClusteredDataStoreImplModule.java [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/cluster/store/ClusteredDataStoreImplModuleFactory.java [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/ClusteredDataStore.java [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreImpl.java [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreManager.java [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/main/yang/odl-sal-dom-clustered-store-cfg.yang [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/test/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreImplTest.java [deleted file]
opendaylight/md-sal/clustered-data-store/implementation/src/test/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreManagerTest.java [deleted file]
opendaylight/md-sal/clustered-data-store/integrationtest/pom.xml [deleted file]
opendaylight/md-sal/clustered-data-store/integrationtest/src/test/java/org/opendaylight/controller/datastore/ClusteredDataStoreIT.java [deleted file]
opendaylight/md-sal/clustered-data-store/integrationtest/src/test/resources/controller.xml [deleted file]
opendaylight/md-sal/clustered-data-store/integrationtest/src/test/resources/logback.xml [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ComponentActivator.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ComponentActivator.xtend [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/DataPacketAdapter.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/DataPacketAdapter.xtend [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FlowProgrammerAdapter.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FlowProgrammerAdapter.xtend [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/InventoryAndReadAdapter.xtend
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/NodeMapping.java
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/SalCompatibilityProvider.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.xtend [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyMapping.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyMapping.xtend [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyProvider.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyProvider.xtend [deleted file]
opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java [new file with mode: 0644]
opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestFromSalConversionsUtils.java
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingToNormalizedNodeCodec.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ForwardedBackwardsCompatibleDataBroker.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.xtend [deleted file]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/YangtoolsMappingHelper.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/connect/dom/BindingIndependentConnector.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/connect/dom/RpcInvocationStrategy.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/impl/connect/dom/RpcInvocationStrategyTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/MultipleAugmentationPutsTest.java [moved from opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/MultipleAugmentationPuts.java with 98% similarity]
opendaylight/md-sal/sal-binding-it/src/main/java/org/opendaylight/controller/test/sal/binding/it/TestHelper.java
opendaylight/md-sal/sal-binding-spi/pom.xml [deleted file]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/DataDomToJavaTransformer.java [deleted file]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/JavaToDataDomTransformer.java [deleted file]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/Mapper.java [deleted file]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/MappingProvider.java [deleted file]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/RpcMapper.java [deleted file]
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizer.java
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Arguments.java
opendaylight/md-sal/sal-data-api/pom.xml [deleted file]
opendaylight/md-sal/sal-dom-broker/pom.xml
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModule.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/compat/BackwardsCompatibleDataBroker.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/compat/TranslatingDataChangeEvent.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/compat/TranslatingListenerInvoker.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/DataAndMetadataSnapshot.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/DataPreconditionFailedException.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/MutableDataTree.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/ResolveDataChangeEventsTask.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaAwareApplyOperation.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataPreconditionFailedException.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTree.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeCandidate.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeCandidateNode.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeFactory.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeModification.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/DataTreeSnapshot.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/StoreMetadataNode.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/StoreNodeCompositeBuilder.java [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/StoreUtils.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/StoreUtils.java with 98% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/AbstractDataTreeCandidate.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/AlwaysFailOperation.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/DataNodeContainerModificationStrategy.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/InMemoryDataTree.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/InMemoryDataTreeCandidate.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/InMemoryDataTreeFactory.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/InMemoryDataTreeModification.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/InMemoryDataTreeSnapshot.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/ModificationApplyOperation.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/ModificationApplyOperation.java with 68% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/ModifiedNode.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/NodeModification.java with 53% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/NodeModification.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/NoopDataTreeCandidate.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/NormalizedNodeContainerModificationStrategy.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/OperationWithModification.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/OperationWithModification.java with 71% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/SchemaAwareApplyOperation.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/ValueNodeModificationStrategy.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/AbstractTreeNode.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/ContainerNode.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/MutableTreeNode.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/TreeNode.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/TreeNodeFactory.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/ValueNode.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/spi/Version.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerConfigActivator.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerConfigActivator.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ConsumerContextImpl.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ConsumerContextImpl.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/GlobalBundleScanningSchemaServiceImpl.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointImpl.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointManagerImpl.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/MountPointManagerImpl.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/RpcRegistrationWrapper.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/DataReaderRouter.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/DataReaderRouter.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/HashMapDataStore.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/HashMapDataStore.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/HashMapDataStoreTransaction.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/SchemaAwareDataStoreAdapter.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/ProxyFactory.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceActivator.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend [deleted file]
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/ModificationMetadataTreeTest.java [moved from opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/ModificationMetadataTreeTest.java with 78% similarity]
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/data/SchemaAwareApplyOperationRoot.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaAwareApplyOperationRoot.java with 87% similarity]
opendaylight/md-sal/sal-dom-demo/pom.xml [deleted file]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoConsumerImpl.java [deleted file]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoProviderImpl.java [deleted file]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoUtils.java [deleted file]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/SALDemo.java [deleted file]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/package-info.java [deleted file]
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/config/yang/md/sal/connector/netconf/NetconfConnectorModule.java
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDeviceTwoPhaseCommitTransaction.java
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfMapping.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ClientImpl.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/Context.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RemoteRpcClient.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RemoteRpcProvider.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RoutingTableProvider.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ServerImpl.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/ServerRequestHandler.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/dto/Message.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/ClientImplTest.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/ClientRequestHandlerTest.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/MockRoutingTable.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/ServerImplTest.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/ServerRequestHandlerTest.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/utils/MessagingUtil.java
opendaylight/md-sal/sal-remoterpc-connector/implementation/src/test/java/org/opendaylight/controller/sal/connector/remoterpc/utils/RemoteServerTestClient.java
opendaylight/md-sal/sal-rest-connector/pom.xml
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/Draft02.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonMapper.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/RestconfApplication.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/RestconfDocumentedExceptionMapper.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/RestconfProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToJsonProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToXmlProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/BrokerFacade.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ResponseException.java [deleted file]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfDocumentedException.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfError.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/AbstractRpcExecutor.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/BrokerRpcExecutor.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/MountPointRpcExecutor.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/rpc/impl/RpcExecutor.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnJsonBasicYangTypesTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonIdentityrefTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonWithDataFromSeveralModulesTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlNotExistingLeafTypeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/xml/test/CnSnToXmlWithChoiceTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonIdentityrefToCnSnTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonLeafrefToCnSnTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonToCnSnTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/BrokerFacadeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CnSnToXmlAndJsonInstanceIdentifierTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CodecsExceptionsCatchingTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/InvokeRpcMethodTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/NormalizeNodeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestGetAugmentedElementWhenEqualNamesTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestGetOperationTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestPostOperationTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfDocumentedExceptionMapperTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfErrorTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfImplTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/URITest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/xml/to/cnsn/test/XmlLeafrefToCnSnTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/xml/to/cnsn/test/XmlToCnSnTest.java
opendaylight/md-sal/sal-rest-connector/src/test/resources/full-versions/yangs/toaster.yang [new file with mode: 0644]
opendaylight/md-sal/sal-rest-docgen/pom.xml
opendaylight/md-sal/samples/l2switch/implementation/src/main/java/org/opendaylight/controller/sample/l2switch/md/inventory/InventoryService.java
opendaylight/md-sal/samples/l2switch/implementation/src/main/java/org/opendaylight/controller/sample/l2switch/md/packet/PacketHandler.java
opendaylight/md-sal/samples/l2switch/implementation/src/main/java/org/opendaylight/controller/sample/l2switch/md/util/InstanceIdentifierUtils.java
opendaylight/md-sal/samples/l2switch/implementation/src/test/java/org/opendaylight/controller/sample/l2switch/md/flow/FlowWriterServiceImplTest.java
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java
opendaylight/md-sal/test/sal-rest-connector-it/pom.xml [deleted file]
opendaylight/md-sal/test/sal-rest-connector-it/src/test/java/org/opendaylight/controller/test/restconf/it/ServiceProviderController.java [deleted file]
opendaylight/md-sal/test/sal-rest-connector-it/src/test/resources/exam.properties [deleted file]
opendaylight/md-sal/test/sal-rest-connector-it/src/test/resources/logback.xml [deleted file]
opendaylight/md-sal/test/sal-rest-connector-it/src/test/resources/tomcat-server.xml [deleted file]
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/ArrayAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/ObjectNameAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/fromxml/SimpleAttributeReadingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/mapping/ObjectMapper.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/resolving/SimpleAttributeResolvingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/AbstractAttributeWritingStrategy.java [deleted file]
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/ObjectNameAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/RuntimeBeanEntryWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleIdentityRefAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/Config.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/InstanceConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/InstanceConfigElementResolved.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/ModuleConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/ModuleElementDefinition.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/ServiceRegistryWrapper.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/config/Services.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/rpc/ModuleRpcs.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/InstanceRuntime.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/ModuleRuntime.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/Runtime.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditConfigXmlParser.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/EditStrategyType.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/MergeEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/MissingInstanceHandlingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/editconfig/ReplaceEditConfigStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/get/Get.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/getconfig/GetConfig.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/NetconfOperationProvider.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/YangStoreServiceImpl.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/transactions/TransactionProvider.java
opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/osgi/ConfigPersisterActivator.java
opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfDocumentedException.java
opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfExiSession.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfExiSession.java with 86% similarity]
opendaylight/netconf/netconf-client/pom.xml
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSession.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiator.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactory.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/SshClientChannelInitializer.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/TcpClientChannelInitializer.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/conf/NetconfClientConfiguration.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/conf/NetconfClientConfigurationBuilder.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/conf/NetconfReconnectingClientConfiguration.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/conf/NetconfReconnectingClientConfigurationBuilder.java
opendaylight/netconf/netconf-impl/pom.xml
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerDispatcher.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSession.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerSessionNegotiator.java
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivator.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/ConcurrentClientsTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/MessageParserTest.java
opendaylight/netconf/netconf-it/pom.xml
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfITSecureTest.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfITTest.java
opendaylight/netconf/netconf-netty-util/pom.xml [new file with mode: 0644]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractChannelInitializer.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractChannelInitializer.java with 85% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractNetconfSession.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSession.java with 94% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractNetconfSessionNegotiator.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSessionNegotiator.java with 95% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ChunkedFramingMechanismEncoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ChunkedFramingMechanismEncoder.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/EOMFramingMechanismEncoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/EOMFramingMechanismEncoder.java with 92% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/FramingMechanismHandlerFactory.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/FramingMechanismHandlerFactory.java with 94% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfChunkAggregator.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfChunkAggregator.java with 99% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfEOMAggregator.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfEOMAggregator.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfEXICodec.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfEXICodec.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfEXIToMessageDecoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfEXIToMessageDecoder.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfHelloMessageToXMLEncoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfHelloMessageToXMLEncoder.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfMessageToEXIEncoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfMessageToEXIEncoder.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfMessageToXMLEncoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfMessageToXMLEncoder.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfXMLToHelloMessageDecoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfXMLToHelloMessageDecoder.java with 99% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfXMLToMessageDecoder.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfXMLToMessageDecoder.java with 95% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/exi/EXIParameters.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/EXIParameters.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/exi/NetconfStartExiMessage.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfStartExiMessage.java with 98% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/SshHandler.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/SshHandler.java with 80% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/authentication/AuthenticationHandler.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/authentication/AuthenticationHandler.java with 87% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/authentication/LoginPassword.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/authentication/LoginPassword.java with 86% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/Invoker.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/Invoker.java with 94% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshClient.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/SshClient.java with 87% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshClientAdapter.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/SshClientAdapter.java with 95% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/client/SshSession.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/client/SshSession.java with 96% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/virtualsocket/ChannelInputStream.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelInputStream.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/virtualsocket/ChannelOutputStream.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelOutputStream.java with 96% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/virtualsocket/VirtualSocket.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/VirtualSocket.java with 98% similarity]
opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/handler/ssh/virtualsocket/VirtualSocketException.java [moved from opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/VirtualSocketException.java with 86% similarity]
opendaylight/netconf/netconf-netty-util/src/test/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfChunkAggregatorTest.java [moved from opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/handler/NetconfChunkAggregatorTest.java with 97% similarity]
opendaylight/netconf/netconf-netty-util/src/test/java/org/opendaylight/controller/netconf/nettyutil/handler/NetconfMessageFactoryTest.java [moved from opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/messages/NetconfMessageFactoryTest.java with 87% similarity]
opendaylight/netconf/netconf-netty-util/src/test/resources/netconfMessages/client_hello_with_auth.xml [moved from opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/client_hello_with_auth.xml with 100% similarity]
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/NetconfSSHServer.java
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/authentication/PEMGenerator.java
opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/osgi/NetconfSSHActivator.java
opendaylight/netconf/netconf-util/pom.xml
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/NetconfUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XmlElement.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XmlUtil.java
opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/test/XmlUnitUtil.java
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/editConfig.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/editConfig_none.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/editConfig_setUnions.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/namespaces/editConfig_differentNamespaceTO.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/namespaces/editConfig_sameAttrDifferentNamespaces.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/namespaces/editConfig_sameAttrDifferentNamespacesList.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/namespaces/editConfig_typeNameConfigAttributeMatching.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/unrecognised/editConfig_unrecognised7.xml
opendaylight/netconf/netconf-util/src/test/resources/netconfMessages/unrecognised/editConfig_unrecognised8.xml
opendaylight/netconf/pom.xml
opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/Activator.java
opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/NeutronSecurityGroupInterface.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/NeutronSecurityRuleInterface.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/INeutronSecurityGroupAware.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/INeutronSecurityGroupCRUD.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/INeutronSecurityRuleAware.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/INeutronSecurityRuleCRUD.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronCRUDInterfaces.java
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronPort.java
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSecurityGroup.java [new file with mode: 0644]
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSecurityRule.java [new file with mode: 0644]
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNorthboundRSApplication.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronPortsNorthbound.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityGroupRequest.java [new file with mode: 0644]
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityGroupsNorthbound.java [new file with mode: 0644]
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityRuleRequest.java [new file with mode: 0644]
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityRulesNorthbound.java [new file with mode: 0644]
pom.xml

index 6fc003b..f8cf74f 100644 (file)
@@ -25,3 +25,5 @@ classes
 out/
 .externalToolBuilders
 maven-eclipse.xml
+.DS_STORE
+.metadata
diff --git a/features/base/pom.xml b/features/base/pom.xml
new file mode 100644 (file)
index 0000000..d12432c
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>commons.opendaylight</artifactId>
+    <version>1.4.2-SNAPSHOT</version>
+    <relativePath>../../opendaylight/commons/opendaylight</relativePath>
+  </parent>
+  <artifactId>base-features</artifactId>
+  <packaging>kar</packaging>
+  <name>${project.artifactId}</name>
+  <description>Base Features POM</description>
+  <properties>
+    <features.file>features.xml</features.file>
+  </properties>
+  <build>
+    <resources>
+      <resource>
+        <filtering>true</filtering>
+        <directory>src/main/resources</directory>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.karaf.tooling</groupId>
+        <artifactId>karaf-maven-plugin</artifactId>
+        <version>${karaf.version}</version>
+        <extensions>true</extensions>
+        <executions>
+          <execution>
+            <id>features-create-kar</id>
+            <goals>
+              <goal>features-create-kar</goal>
+            </goals>
+            <configuration>
+              <featuresFile>${project.build.directory}/classes/${features.file}</featuresFile>
+            </configuration>
+          </execution>
+        </executions>
+        <!-- There is no useful configuration for the kar mojo. The features-generate-descriptor mojo configuration may be useful -->
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>filter</id>
+            <goals>
+              <goal>resources</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-artifacts</id>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>${project.build.directory}/classes/${features.file}</file>
+                  <type>xml</type>
+                  <classifier>features</classifier>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/features/base/src/main/resources/features.xml b/features/base/src/main/resources/features.xml
new file mode 100644 (file)
index 0000000..cc11205
--- /dev/null
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<features name="base-${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">
+
+   <feature name="base-all" description="OpenDaylight Controller"
+      version="${project.version}">
+      <feature>http</feature>
+      <feature>transaction</feature>
+      <feature>base-felix-dm</feature>
+      <feature>base-aries-spi-fly</feature>
+      <feature>base-dummy-console</feature>
+      <feature>base-apache-commons</feature>
+      <feature>base-eclipselink-persistence</feature>
+      <feature>base-gemini-web</feature>
+      <feature>base-tomcat</feature>
+      <feature>base-netty</feature>
+      <feature>base-jersey</feature>
+      <feature>base-spring-security</feature>
+   </feature>
+   <feature name="base-dummy-console" description="Temporary Dummy Console" version="1.1.0-SNAPSHOT">
+      <bundle>mvn:org.opendaylight.controller/dummy-console/1.1.0-SNAPSHOT</bundle>
+   </feature>
+   <feature name="base-felix-dm" description="Felix Dependency Manager"
+      version="${felix.dependencymanager.version}">
+      <bundle start-level="35">mvn:org.osgi/org.osgi.compendium/${osgi.compendium.version}</bundle>
+      <bundle start-level="35">mvn:org.apache.felix/org.apache.felix.dependencymanager/${felix.dependencymanager.version}</bundle>
+      <bundle start-level="35">mvn:org.apache.felix/org.apache.felix.dependencymanager.shell/${felix.dependencymanager.shell.version}</bundle>
+   </feature>
+   <feature name="base-aries-spi-fly" description="Aries SPI Fly"
+      version="${spifly.version}">
+      <bundle start-level="35">mvn:org.apache.aries/org.apache.aries.util/1.1.0</bundle>
+      <bundle start-level="35">mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/${spifly.version}</bundle>
+      <bundle start-level="35">mvn:org.ow2.asm/asm-all/4.0</bundle>
+   </feature>
+     <feature name='base-netty' version='${netty.version}'>
+        <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:org.opendaylight.controller.thirdparty/ganymed/1.1-SNAPSHOT</bundle>
+    </feature>
+    <feature name="base-jersey" description="Jersey" version="${jersey.version}">
+        <feature>base-gemini-web</feature>
+        <bundle>mvn:org.opendaylight.controller.thirdparty/com.sun.jersey.jersey-servlet/${jersey.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-server/${jersey.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-core/${jersey.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-client/${jersey.version}</bundle>
+        <bundle>mvn:com.sun.jersey/jersey-servlet/${jersey.version}</bundle>
+   </feature>
+   <feature name="base-jackson" description="Jackson JAX-RS" version="${jackson.version}">
+      <bundle start="true" start-level="35">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
+      <bundle start="true" start-level="35">mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
+      <bundle start="true" start-level="35">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
+      <bundle start="true" start-level="35">mvn:org.codehaus.jettison/jettison/${jettison.version}</bundle>
+      <bundle start="true" start-level="35">mvn:javax.ws.rs/jsr311-api/${jsr311.api.version}</bundle>
+      <bundle start="true" start-level="35">mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${jackson.version}</bundle>
+      <bundle start="true" start-level="35">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
+      <bundle start="true" start-level="35">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
+   </feature>
+   <feature name="base-slf4j" description="SLF4J Logging" version="${slf4j.version}">
+      <bundle start-level="35">mvn:org.slf4j/slf4j-jdk14/1.7.2</bundle>
+      <bundle start-level="35">mvn:org.slf4j/slf4j-nop/1.7.2</bundle>
+      <bundle start-level="35">mvn:org.slf4j/slf4j-simple/1.7.2</bundle>
+      <bundle start="true" start-level="35">mvn:org.slf4j/slf4j-api/1.7.2</bundle>
+   </feature>
+   <feature name="base-apache-commons" description="Apache Commons Libraries"
+      version="${project.version}">
+      <bundle start="true" start-level="35">mvn:com.google.guava/guava/${guava.version}</bundle>
+      <bundle start="true" start-level="35">mvn:org.javassist/javassist/${javassist.version}</bundle>
+      <bundle start="true" start-level="35">mvn:commons-io/commons-io/${commons.io.version}</bundle>
+      <bundle start="true" start-level="35">mvn:commons-codec/commons-codec/${commons.codec.version}</bundle>
+      <bundle start="true" start-level="35">mvn:org.apache.commons/commons-lang3/${commons.lang.version}</bundle>
+      <bundle start="true" start-level="35">mvn:commons-net/commons-net/${commons.net.version}</bundle>
+   </feature>
+   <feature name="base-eclipselink-persistence" description="EclipseLink Persistence API" version="2.0.4.v201112161009">
+      <bundle start="true" start-level="35">mvn:eclipselink/javax.persistence/2.0.4.v201112161009</bundle>
+      <bundle start="true" start-level="35">mvn:eclipselink/javax.resource/1.5.0.v200906010428</bundle>
+   </feature>
+   <feature name="base-gemini-web" description="Gemini Web" version="${geminiweb.version}">
+      <feature>http</feature>
+      <feature>transaction</feature>
+      <feature>base-slf4j</feature>
+      <feature>base-felix-dm</feature>
+      <feature>base-jackson</feature>
+      <feature>base-apache-commons</feature>
+      <bundle start="true" start-level="35">mvn:com.google.code.gson/gson/${gson.version}</bundle>
+      <bundle start="true" start-level="35">mvn:commons-fileupload/commons-fileupload/${commons.fileupload.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.gemini.web.core/${geminiweb.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.gemini.web.extender/${geminiweb.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.virgo.util.common/${virgo.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.virgo.util.io/${virgo.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.virgo.util.math/${virgo.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.virgo.util.osgi/${virgo.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.virgo.util.osgi.manifest/${virgo.version}</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.virgo.util.parser.manifest/${virgo.version}</bundle>
+      <bundle start="true" start-level="35">mvn:org.apache.felix/org.apache.felix.fileinstall/3.1.6</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.activation/1.1.0.v201211130549</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.annotation/1.1.0.v201209060031</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.ejb/3.1.1.v201204261316</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.el/2.2.0.v201108011116</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.mail.glassfish/1.4.1.v201108011116</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.xml.rpc/1.1.0.v201005080400</bundle>
+      <bundle start="true" start-level="35">mvn:org.eclipse.jetty.orbit/javax.servlet.jsp/2.2.0.v201112011158</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.servlet.jsp.jstl/1.2.0.v201105211821</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/javax.servlet.jsp.jstl.impl/1.2.0.v201210211230</bundle>
+   </feature>
+   <feature name="base-tomcat" description="OpenDaylight Tomcat" version="7.0.32">
+      <feature>base-gemini-web</feature>
+      <feature>base-eclipselink-persistence</feature>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.catalina/7.0.32.v201211201336</bundle>
+      <bundle start="true" start-level="35">mvn:geminiweb/org.eclipse.gemini.web.tomcat/${geminiweb.version}</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.catalina.ha/7.0.32.v201211201952</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.catalina.tribes/7.0.32.v201211201952</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.coyote/7.0.32.v201211201952</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.el/7.0.32.v201211081135</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.jasper/7.0.32.v201211201952</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.juli.extras/7.0.32.v201211081135</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.tomcat.api/7.0.32.v201211081135</bundle>
+      <bundle start="true" start-level="35">mvn:orbit/org.apache.tomcat.util/7.0.32.v201211201952</bundle>
+      <bundle start="true" start-level="35">wrap:mvn:virgomirror/org.eclipse.jdt.core.compiler.batch/3.8.0.I20120518-2145</bundle>
+   </feature>
+   <feature name="base-spring" description="Opendaylight Spring Support" version="${spring.version}">
+      <bundle>mvn:org.ow2.asm/asm-all/${asm.version}</bundle>
+      <bundle>mvn:org.aopalliance/com.springsource.org.aopalliance/${aopalliance.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.aop/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.asm/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.beans/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.context/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.context.support/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.core/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.expression/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.transaction/${spring.version}</bundle>
+   </feature>
+   <feature name="base-spring-web" description="OpenDaylight Spring Web" version="${spring.version}">
+      <feature>base-spring</feature>
+      <feature>base-gemini-web</feature>
+      <bundle>mvn:org.springframework/org.springframework.web/${spring.version}</bundle>
+      <bundle>mvn:org.springframework/org.springframework.web.servlet/${spring.version}</bundle>
+   </feature>
+   <feature name="base-spring-security" description="OpenDaylight Spring Security" version="${spring-security.version}">
+      <feature>base-spring-web</feature>
+      <bundle>mvn:org.springframework.security/spring-security-config/${spring-security.version}</bundle>
+      <bundle>mvn:org.springframework.security/spring-security-core/${spring-security.version}</bundle>
+      <bundle>mvn:org.springframework.security/spring-security-taglibs/${spring-security.version}</bundle>
+      <bundle>mvn:org.springframework.security/spring-security-web/${spring-security.version}</bundle>
+   </feature>
+</features>
index aaab66d..e1e3164 100644 (file)
@@ -17,6 +17,7 @@
   <properties>
     <aopalliance.version>1.0.0</aopalliance.version>
     <appauth.version>0.4.2-SNAPSHOT</appauth.version>
+    <aries.util.version>1.1.0</aries.util.version>
     <!-- Controller Modules Versions -->
     <arphandler.version>0.5.2-SNAPSHOT</arphandler.version>
     <asm.version>4.1</asm.version>
@@ -77,6 +78,7 @@
     <hosttracker.northbound.version>0.4.2-SNAPSHOT</hosttracker.northbound.version>
     <hosttracker_new.api.version>0.4.2-SNAPSHOT</hosttracker_new.api.version>
     <ietf-inet-types.version>2010.09.24.4-SNAPSHOT</ietf-inet-types.version>
+    <ietf-restconf.version>2013.10.19.1-SNAPSHOT</ietf-restconf.version>
     <ietf-topology.version>2013.10.21.2-SNAPSHOT</ietf-topology.version>
     <ietf-yang-types.version>2010.09.24.4-SNAPSHOT</ietf-yang-types.version>
     <jackson.version>2.3.2</jackson.version>
         <artifactId>ietf-netconf-monitoring-extension</artifactId>
         <version>${netconf.version}</version>
       </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netconf-netty-util</artifactId>
+        <version>${netconf.version}</version>
+      </dependency>
       <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-classic</artifactId>
         <artifactId>netconf-monitoring</artifactId>
         <version>${netconf.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>netconf-netty-util</artifactId>
+        <version>${netconf.version}</version>
+        <type>test-jar</type>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>netconf-ssh</artifactId>
         <artifactId>concepts</artifactId>
         <version>${yangtools.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>object-cache-api</artifactId>
+        <version>${yangtools.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>object-cache-guava</artifactId>
+        <version>${yangtools.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>restconf-client-api</artifactId>
         <artifactId>ietf-inet-types</artifactId>
         <version>${ietf-inet-types.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools.model</groupId>
+        <artifactId>ietf-restconf</artifactId>
+        <version>${ietf-restconf.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.yangtools.model</groupId>
         <artifactId>ietf-topology</artifactId>
         <artifactId>ietf-yang-types</artifactId>
         <version>${ietf-yang-types.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools.model</groupId>
+        <artifactId>ietf-yang-types-20130715</artifactId>
+        <version>2013.07.15.1-SNAPSHOT</version>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.yangtools.model</groupId>
         <artifactId>opendaylight-l2-types</artifactId>
index 8f85972..b7cdf94 100644 (file)
@@ -359,7 +359,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
             }
 
             // register services to OSGi
-            Map<String, ServiceInterfaceAnnotation> annotationMapping = configTransactionController.getWritableRegistry().findServiceInterfaces(moduleIdentifier);
+            Map<ServiceInterfaceAnnotation, String /* service ref name */> annotationMapping = configTransactionController.getWritableRegistry().findServiceInterfaces(moduleIdentifier);
             BundleContext bc = configTransactionController.getModuleFactoryBundleContext(
                     entry.getModuleFactory().getImplementationName());
             if (osgiRegistration == null) {
index 7a41a3b..4c5e391 100644 (file)
@@ -21,6 +21,6 @@ public interface SearchableServiceReferenceWritableRegistry extends ServiceRefer
      * @throws java.lang.IllegalArgumentException if any of service qNames is not found
      * @throws java.lang.NullPointerException     if parameter is null
      */
-    Map<String /* service ref */, ServiceInterfaceAnnotation> findServiceInterfaces(ModuleIdentifier moduleIdentifier);
+    Map<ServiceInterfaceAnnotation, String /* service ref name */> findServiceInterfaces(ModuleIdentifier moduleIdentifier);
 
 }
index ceea994..52bb3f5 100644 (file)
@@ -50,7 +50,7 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe
     private final Map<String /* service qName */, ServiceInterfaceAnnotation> serviceQNamesToAnnotations;
     // all Service Interface qNames for sanity checking
     private final Set<String /* qName */> allQNames;
-    Map<ModuleIdentifier, Map<String /* service ref name */, ServiceInterfaceAnnotation >> modulesToServiceRef = new HashMap<>();
+    Map<ModuleIdentifier, Map<ServiceInterfaceAnnotation, String /* service ref name */>> modulesToServiceRef = new HashMap<>();
 
 
     // actual reference database
@@ -241,8 +241,8 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe
     }
 
     @Override
-    public Map<String /* service ref */, ServiceInterfaceAnnotation> findServiceInterfaces(ModuleIdentifier moduleIdentifier) {
-        Map<String, ServiceInterfaceAnnotation> result = modulesToServiceRef.get(moduleIdentifier);
+    public Map<ServiceInterfaceAnnotation, String /* service ref name */> findServiceInterfaces(ModuleIdentifier moduleIdentifier) {
+        Map<ServiceInterfaceAnnotation, String /* service ref name */> result = modulesToServiceRef.get(moduleIdentifier);
         if (result == null) {
             return Collections.emptyMap();
         }
@@ -417,7 +417,7 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe
         }
         // save to refNames
         refNames.put(serviceReference, moduleIdentifier);
-        Map<String, ServiceInterfaceAnnotation> refNamesToAnnotations = modulesToServiceRef.get(moduleIdentifier);
+        Map<ServiceInterfaceAnnotation, String /* service ref name */> refNamesToAnnotations = modulesToServiceRef.get(moduleIdentifier);
         if (refNamesToAnnotations == null){
             refNamesToAnnotations = new HashMap<>();
             modulesToServiceRef.put(moduleIdentifier, refNamesToAnnotations);
@@ -425,7 +425,7 @@ public class ServiceReferenceRegistryImpl implements CloseableServiceReferenceRe
 
         ServiceInterfaceAnnotation annotation = serviceQNamesToAnnotations.get(serviceReference.getServiceInterfaceQName());
         checkNotNull(annotation, "Possible error in code, cannot find annotation for " + serviceReference);
-        refNamesToAnnotations.put(serviceReference.getRefName(), annotation);
+        refNamesToAnnotations.put(annotation, serviceReference.getRefName());
         return result;
     }
 
index fbc7eb6..b592fa3 100644 (file)
@@ -37,7 +37,7 @@ public class BeanToOsgiServiceManager {
      */
     public OsgiRegistration registerToOsgi(AutoCloseable instance, ModuleIdentifier moduleIdentifier,
                                            BundleContext bundleContext,
-                                           Map<String, ServiceInterfaceAnnotation> serviceNamesToAnnotations) {
+                                           Map<ServiceInterfaceAnnotation, String /* service ref name */> serviceNamesToAnnotations) {
         return new OsgiRegistration(instance, moduleIdentifier, bundleContext, serviceNamesToAnnotations);
     }
 
@@ -57,11 +57,11 @@ public class BeanToOsgiServiceManager {
         @GuardedBy("this")
         private final Set<ServiceRegistration<?>> serviceRegistrations;
         @GuardedBy("this")
-        private final Map<String, ServiceInterfaceAnnotation> serviceNamesToAnnotations;
+        private final Map<ServiceInterfaceAnnotation, String /* service ref name */> serviceNamesToAnnotations;
 
         public OsgiRegistration(AutoCloseable instance, ModuleIdentifier moduleIdentifier,
                                 BundleContext bundleContext,
-                                Map<String, ServiceInterfaceAnnotation> serviceNamesToAnnotations) {
+                                Map<ServiceInterfaceAnnotation, String /* service ref name */> serviceNamesToAnnotations) {
             this.instance = instance;
             this.moduleIdentifier = moduleIdentifier;
             this.serviceNamesToAnnotations = serviceNamesToAnnotations;
@@ -69,13 +69,13 @@ public class BeanToOsgiServiceManager {
         }
 
         private static Set<ServiceRegistration<?>> registerToSR(AutoCloseable instance, BundleContext bundleContext,
-                                                                Map<String, ServiceInterfaceAnnotation> serviceNamesToAnnotations) {
+                                                                Map<ServiceInterfaceAnnotation, String /* service ref name */> serviceNamesToAnnotations) {
             Set<ServiceRegistration<?>> serviceRegistrations = new HashSet<>();
-            for (Entry<String, ServiceInterfaceAnnotation> entry : serviceNamesToAnnotations.entrySet()) {
-                Class<?> requiredInterface = entry.getValue().osgiRegistrationType();
+            for (Entry<ServiceInterfaceAnnotation, String /* service ref name */> entry : serviceNamesToAnnotations.entrySet()) {
+                Class<?> requiredInterface = entry.getKey().osgiRegistrationType();
                 checkState(requiredInterface.isInstance(instance), instance.getClass().getName() +
                         " instance should implement " + requiredInterface.getName());
-                Dictionary<String, String> propertiesForOsgi = createProps(entry.getKey());
+                Dictionary<String, String> propertiesForOsgi = createProps(entry.getValue());
                 ServiceRegistration<?> serviceRegistration = bundleContext
                         .registerService(requiredInterface.getName(), instance, propertiesForOsgi);
                 serviceRegistrations.add(serviceRegistration);
@@ -95,7 +95,7 @@ public class BeanToOsgiServiceManager {
             serviceRegistrations.clear();
         }
 
-        public synchronized void updateRegistrations(Map<String, ServiceInterfaceAnnotation> newAnnotationMapping,
+        public synchronized void updateRegistrations(Map<ServiceInterfaceAnnotation, String /* service ref name */> newAnnotationMapping,
                                                      BundleContext bundleContext, AutoCloseable newInstance) {
             boolean notEquals = this.instance != newInstance;
             notEquals |= newAnnotationMapping.equals(serviceNamesToAnnotations) == false;
index 9d0fbd8..ec46219 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.config.manager.impl.osgi.mapping;
 
 import javassist.ClassPool;
+
 import org.opendaylight.controller.config.manager.impl.util.OsgiRegistrationUtil;
 import org.opendaylight.yangtools.sal.binding.generator.api.ClassLoadingStrategy;
 import org.opendaylight.yangtools.sal.binding.generator.impl.RuntimeGeneratedMappingServiceImpl;
@@ -27,10 +28,8 @@ public class CodecRegistryProvider implements AutoCloseable {
     private final RuntimeGeneratedMappingServiceImpl service;
     private final AutoCloseable registration;
 
-    public CodecRegistryProvider(ClassLoadingStrategy classLoadingStrategy, BundleContext context) {
-        service = new RuntimeGeneratedMappingServiceImpl(classLoadingStrategy);
-        service.setPool(CLASS_POOL);
-        service.init();
+    public CodecRegistryProvider(final ClassLoadingStrategy classLoadingStrategy, final BundleContext context) {
+        service = new RuntimeGeneratedMappingServiceImpl(CLASS_POOL, classLoadingStrategy);
         registration = OsgiRegistrationUtil.registerService(context, service,
                 SchemaServiceListener.class, BindingIndependentMappingService.class);
     }
index 0cc950a..773025c 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.config.yangjmxgenerator;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
-
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.FullyQualifiedNameHelper;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -73,6 +72,7 @@ public class ModuleMXBeanEntry extends AbstractEntry {
     private final Map<String, QName> providedServices;
 
     private Collection<RuntimeBeanEntry> runtimeBeans;
+    private String nullableDummyContainerName;
 
     ModuleMXBeanEntry(ModuleMXBeanEntryInitial initials, Map<String, AttributeIfc> yangToAttributes,
             Map<String, QName> providedServices2, Collection<RuntimeBeanEntry> runtimeBeans) {
@@ -183,6 +183,15 @@ public class ModuleMXBeanEntry extends AbstractEntry {
                 + '\'' + '}';
     }
 
+    public String getNullableDummyContainerName() {
+        return nullableDummyContainerName;
+    }
+
+    public void setNullableDummyContainerName(String nullableDummyContainerName) {
+        this.nullableDummyContainerName = nullableDummyContainerName;
+    }
+
+
     static final class ModuleMXBeanEntryInitial {
 
         private String localName;
index 676c8ec..6da8dfc 100644 (file)
@@ -7,12 +7,27 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+import static java.lang.String.format;
+import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.createConfigQName;
+
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
 import com.google.common.base.Optional;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.annotation.Nullable;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AbstractDependencyAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.DependencyAttribute;
@@ -35,26 +50,13 @@ import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.ModuleImport;
 import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.UsesNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.annotation.Nullable;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import static com.google.common.base.Preconditions.checkState;
-import static java.lang.String.format;
-import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.createConfigQName;
-
 final class ModuleMXBeanEntryBuilder {
 
     private Module currentModule;
@@ -233,7 +235,7 @@ final class ModuleMXBeanEntryBuilder {
         return true;
     }
 
-    private void processChoiceCaseNode(Map<String, ModuleMXBeanEntry> result,
+    private <HAS_CHILDREN_AND_QNAME extends DataNodeContainer & SchemaNode> void processChoiceCaseNode(Map<String, ModuleMXBeanEntry> result,
             Map<String, QName> uniqueGeneratedClassesNames, String configModulePrefix,
             Map<String, IdentitySchemaNode> moduleIdentities,
             Map<String, IdentitySchemaNode> unaugmentedModuleIdentities, AugmentationSchema augmentation,
@@ -266,15 +268,17 @@ final class ModuleMXBeanEntryBuilder {
         // runtime-data
         Collection<RuntimeBeanEntry> runtimeBeans = null;
 
+        HAS_CHILDREN_AND_QNAME dataNodeContainer = getDataNodeContainer(choiceCaseNode);
+
         if (expectedConfigurationAugmentationSchemaPath.equals(augmentation.getTargetPath())) {
             logger.debug("Parsing configuration of {}", moduleLocalNameFromXPath);
-            yangToAttributes = fillConfiguration(choiceCaseNode, currentModule, typeProviderWrapper, qNamesToSIEs,
+            yangToAttributes = fillConfiguration(dataNodeContainer, currentModule, typeProviderWrapper, qNamesToSIEs,
                     schemaContext, packageName);
             checkUniqueAttributesWithGeneratedClass(uniqueGeneratedClassesNames, when.getQName(), yangToAttributes);
         } else if (expectedStateAugmentationSchemaPath.equals(augmentation.getTargetPath())) {
             logger.debug("Parsing state of {}", moduleLocalNameFromXPath);
             try {
-                runtimeBeans = fillRuntimeBeans(choiceCaseNode, currentModule, typeProviderWrapper, packageName,
+                runtimeBeans = fillRuntimeBeans(dataNodeContainer, currentModule, typeProviderWrapper, packageName,
                         moduleLocalNameFromXPath, javaNamePrefix);
             } catch (NameConflictException e) {
                 throw new NameConflictException(e.getConflictingName(), when.getQName(), when.getQName());
@@ -289,14 +293,20 @@ final class ModuleMXBeanEntryBuilder {
         } else {
             throw new IllegalArgumentException("Cannot parse augmentation " + augmentation);
         }
+        boolean hasDummyContainer = choiceCaseNode.equals(dataNodeContainer) == false;
+
+        String nullableDummyContainerName = hasDummyContainer ? dataNodeContainer.getQName().getLocalName() : null;
         if (result.containsKey(moduleLocalNameFromXPath)) {
-            // either fill runtimeBeans or yangToAttributes
+            // either fill runtimeBeans or yangToAttributes, merge
             ModuleMXBeanEntry moduleMXBeanEntry = result.get(moduleLocalNameFromXPath);
             if (yangToAttributes != null && moduleMXBeanEntry.getAttributes() == null) {
                 moduleMXBeanEntry.setYangToAttributes(yangToAttributes);
             } else if (runtimeBeans != null && moduleMXBeanEntry.getRuntimeBeans() == null) {
                 moduleMXBeanEntry.setRuntimeBeans(runtimeBeans);
             }
+            checkState(Objects.equals(nullableDummyContainerName, moduleMXBeanEntry.getNullableDummyContainerName()),
+                    "Mismatch in module " + moduleMXBeanEntry.toString() + " - dummy container must be present/missing in" +
+                            " both state and configuration");
         } else {
             ModuleMXBeanEntry.ModuleMXBeanEntryInitial initial = new ModuleMXBeanEntry.ModuleMXBeanEntryInitialBuilder()
                     .setIdSchemaNode(moduleIdentity).setPackageName(packageName).setJavaNamePrefix(javaNamePrefix)
@@ -309,6 +319,7 @@ final class ModuleMXBeanEntryBuilder {
 
             moduleMXBeanEntry.setYangModuleName(currentModule.getName());
             moduleMXBeanEntry.setYangModuleLocalname(moduleLocalNameFromXPath);
+            moduleMXBeanEntry.setNullableDummyContainerName(nullableDummyContainerName);
             result.put(moduleLocalNameFromXPath, moduleMXBeanEntry);
         }
     }
@@ -352,29 +363,52 @@ final class ModuleMXBeanEntryBuilder {
     }
 
     private void checkUniqueTOAttr(Map<String, QName> uniqueGeneratedClassNames, QName parentQName, TOAttribute attr) {
-        final String upperCaseCammelCase = attr.getUpperCaseCammelCase();
-        if (uniqueGeneratedClassNames.containsKey(upperCaseCammelCase)) {
-            QName firstDefinedQName = uniqueGeneratedClassNames.get(upperCaseCammelCase);
-            throw new NameConflictException(upperCaseCammelCase, firstDefinedQName, parentQName);
+        final String upperCaseCamelCase = attr.getUpperCaseCammelCase();
+        if (uniqueGeneratedClassNames.containsKey(upperCaseCamelCase)) {
+            QName firstDefinedQName = uniqueGeneratedClassNames.get(upperCaseCamelCase);
+            throw new NameConflictException(upperCaseCamelCase, firstDefinedQName, parentQName);
         } else {
-            uniqueGeneratedClassNames.put(upperCaseCammelCase, parentQName);
+            uniqueGeneratedClassNames.put(upperCaseCamelCase, parentQName);
         }
     }
 
-    private Collection<RuntimeBeanEntry> fillRuntimeBeans(ChoiceCaseNode choiceCaseNode, Module currentModule,
+    private Collection<RuntimeBeanEntry> fillRuntimeBeans(DataNodeContainer dataNodeContainer, Module currentModule,
             TypeProviderWrapper typeProviderWrapper, String packageName, String moduleLocalNameFromXPath,
             String javaNamePrefix) {
 
-        return RuntimeBeanEntry.extractClassNameToRuntimeBeanMap(packageName, choiceCaseNode, moduleLocalNameFromXPath,
+        return RuntimeBeanEntry.extractClassNameToRuntimeBeanMap(packageName, dataNodeContainer, moduleLocalNameFromXPath,
                 typeProviderWrapper, javaNamePrefix, currentModule).values();
 
     }
 
-    private Map<String, AttributeIfc> fillConfiguration(ChoiceCaseNode choiceCaseNode, Module currentModule,
+    /**
+     * Since each case statement within a module must provide unique child nodes, it is allowed to wrap
+     * the actual configuration with a container node with name equal to case name.
+     *
+     * @param choiceCaseNode state or configuration case statement
+     * @return either choiceCaseNode or its only child container
+     */
+    private <HAS_CHILDREN_AND_QNAME extends DataNodeContainer & SchemaNode> HAS_CHILDREN_AND_QNAME getDataNodeContainer(ChoiceCaseNode choiceCaseNode) {
+        Set<DataSchemaNode> childNodes = choiceCaseNode.getChildNodes();
+        if (childNodes.size() == 1) {
+            DataSchemaNode onlyChild = childNodes.iterator().next();
+            if (onlyChild instanceof ContainerSchemaNode) {
+                ContainerSchemaNode onlyContainer = (ContainerSchemaNode) onlyChild;
+                if (Objects.equals(onlyContainer.getQName().getLocalName(), choiceCaseNode.getQName().getLocalName())) {
+                    // the actual configuration is inside dummy container
+                    return (HAS_CHILDREN_AND_QNAME) onlyContainer;
+                }
+            }
+        }
+        return (HAS_CHILDREN_AND_QNAME) choiceCaseNode;
+    }
+
+    private Map<String, AttributeIfc> fillConfiguration(DataNodeContainer dataNodeContainer, Module currentModule,
             TypeProviderWrapper typeProviderWrapper, Map<QName, ServiceInterfaceEntry> qNamesToSIEs,
             SchemaContext schemaContext, String packageName) {
         Map<String, AttributeIfc> yangToAttributes = new HashMap<>();
-        for (DataSchemaNode attrNode : choiceCaseNode.getChildNodes()) {
+        Set<DataSchemaNode> childNodes = dataNodeContainer.getChildNodes();
+        for (DataSchemaNode attrNode : childNodes) {
             AttributeIfc attributeValue = getAttributeValue(attrNode, currentModule, qNamesToSIEs, typeProviderWrapper,
                     schemaContext, packageName);
             yangToAttributes.put(attributeValue.getAttributeYangName(), attributeValue);
@@ -483,7 +517,7 @@ final class ModuleMXBeanEntryBuilder {
             String prefix = m.group(1);
             ModuleImport moduleImport = findModuleImport(currentModule, prefix);
             foundModule = schemaContext.findModuleByName(moduleImport.getModuleName(), moduleImport.getRevision());
-            checkState(foundModule != null, format("Module not found in SchemaContext by %s", moduleImport));
+            checkNotNull(foundModule, format("Module not found in SchemaContext by %s", moduleImport));
             localSIName = m.group(2);
         } else {
             foundModule = currentModule; // no prefix => SIE is in currentModule
index cd14458..c941d15 100644 (file)
@@ -7,9 +7,24 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkState;
+
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
@@ -18,7 +33,6 @@ import org.opendaylight.controller.config.yangjmxgenerator.attribute.VoidAttribu
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.FullyQualifiedNameHelper;
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.NameConflictException;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -32,22 +46,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.UsesNode;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
-
 /**
  * Holds information about runtime bean to be generated. There are two kinds of
  * RuntimeBeanEntry instances: if isRoot flag is set to true, this bean
@@ -68,7 +66,7 @@ public class RuntimeBeanEntry {
 
     @VisibleForTesting
     RuntimeBeanEntry(String packageName,
-            DataSchemaNode nodeForReporting, String yangName,
+            DataNodeContainer nodeForReporting, String yangName,
             String javaNamePrefix, boolean isRoot,
             Optional<String> keyYangName, List<AttributeIfc> attributes,
             List<RuntimeBeanEntry> children, Set<Rpc> rpcs) {
@@ -112,7 +110,7 @@ public class RuntimeBeanEntry {
      *         not contain special configuration for it.
      */
     public static Map<String, RuntimeBeanEntry> extractClassNameToRuntimeBeanMap(
-            String packageName, ChoiceCaseNode container,
+            String packageName, DataNodeContainer container,
             String moduleYangName, TypeProviderWrapper typeProviderWrapper,
             String javaNamePrefix, Module currentModule) {
 
@@ -390,7 +388,7 @@ public class RuntimeBeanEntry {
     }
 
     private static RuntimeBeanEntry createRoot(String packageName,
-            DataSchemaNode nodeForReporting, String attributeYangName,
+            DataNodeContainer nodeForReporting, String attributeYangName,
             List<AttributeIfc> attributes, String javaNamePrefix,
             List<RuntimeBeanEntry> children, Set<Rpc> rpcs) {
         return new RuntimeBeanEntry(packageName, nodeForReporting,
index 76d9770..b9f2ba9 100644 (file)
@@ -7,8 +7,19 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator;
 
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.format;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Sets;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import org.junit.Assert;
 import org.junit.Before;
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.YangModelSearchUtils;
@@ -19,18 +30,6 @@ import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
 
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.format;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
 public abstract class AbstractYangTest {
     protected SchemaContext context;
     protected Map<String, Module> namesToModules; // are module names globally
index 6dd6444..7765b28 100644 (file)
@@ -11,27 +11,25 @@ import static org.apache.commons.lang3.StringUtils.capitalize;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
+import com.google.common.base.Optional;
 import java.net.URI;
 import java.util.Collections;
 import java.util.List;
-
 import org.junit.Test;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry.Rpc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 
-import com.google.common.base.Optional;
-
 public class RuntimeRegistratorTest {
     // TODO add more tests
     protected RuntimeBeanEntry prepareRootRB(List<RuntimeBeanEntry> children) {
 
-        DataSchemaNode dataSchemaNodeForReporting = mock(DataSchemaNode.class);
-        doReturn("DataSchemaNode").when(dataSchemaNodeForReporting).toString();
-        return new RuntimeBeanEntry("pa.cka.ge", dataSchemaNodeForReporting,
+        DataNodeContainer nodeContainer = mock(DataNodeContainer.class);
+        doReturn("DataSchemaNode").when(nodeContainer).toString();
+        return new RuntimeBeanEntry("pa.cka.ge", nodeContainer,
                 "module-name", "ModuleName", true, Optional.<String> absent(),
                 Collections.<AttributeIfc> emptyList(), children,
                 Collections.<Rpc> emptySet());
@@ -39,9 +37,9 @@ public class RuntimeRegistratorTest {
 
     protected RuntimeBeanEntry prepareChildRB(List<RuntimeBeanEntry> children,
             String prefix) {
-        DataSchemaNode dataSchemaNodeForReporting = mock(DataSchemaNode.class);
-        doReturn("DataSchemaNode").when(dataSchemaNodeForReporting).toString();
-        return new RuntimeBeanEntry("pa.cka.ge", dataSchemaNodeForReporting,
+        DataNodeContainer nodeContainer = mock(DataNodeContainer.class);
+        doReturn("DataSchemaNode").when(nodeContainer).toString();
+        return new RuntimeBeanEntry("pa.cka.ge", nodeContainer,
                 prefix + "child-name", capitalize(prefix) + "ChildName", false,
                 Optional.<String> absent(),
                 Collections.<AttributeIfc> emptyList(), children,
index fca83fd..0a011b7 100644 (file)
@@ -23,20 +23,22 @@ module config-bgp-listener-impl {
     augment "/config:modules/config:module/config:state" {
         case bgp-listener-impl {
             when "/config:modules/config:module/config:type = 'bgp-listener-impl'";
-            list peers {
-                config:inner-state-bean;
-                leaf port {
-                    type inet:port-number;
-                    default 179;
+            container bgp-listener-impl {
+                list peers {
+                    config:inner-state-bean;
+                    leaf port {
+                        type inet:port-number;
+                        default 179;
+                    }
+                    leaf core-size {
+                        type uint32;
+                    }
                 }
-                leaf core-size {
-                    type uint32;
-                }
-            }
 
-           leaf as-number {
-                mandatory true;
-                type inet:as-number;
+                leaf as-number {
+                    mandatory true;
+                    type inet:as-number;
+                }
             }
         }
     }
index 4af5b95..e189ef7 100644 (file)
@@ -192,42 +192,44 @@ module config-threads-java {
     augment "/config:modules/config:module/config:configuration" {
         case threadpool-dynamic {
             when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
-            leaf core-size {
-                type uint32;
-            }
+            container threadpool-dynamic {
+                leaf core-size {
+                    type uint32;
+                }
 
-            leaf keep-alive {
-                type uint32;
-                units seconds;
-                default 10;
-            }
+                leaf keep-alive {
+                    type uint32;
+                    units seconds;
+                    default 10;
+                }
 
-            leaf maximum-size {
-                type uint32;
-                description "maximum-size description";
-            }
+                leaf maximum-size {
+                    type uint32;
+                    description "maximum-size description";
+                }
 
-            leaf binary {
-                type binary;
-            }
+                leaf binary {
+                    type binary;
+                }
 
-            container threadfactory {
-                description "threadfactory description";
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity th2:threadfactory;
+                container threadfactory {
+                    description "threadfactory description";
+                    uses config:service-ref {
+                        refine type {
+                            mandatory true;
+                            config:required-identity th2:threadfactory;
+                        }
                     }
                 }
-            }
 
-            leaf-list users  {
-                type string;
-            }
+                leaf-list users  {
+                    type string;
+                }
 
-             leaf-list users-numbers {
-                type uint32;
-                description "numbers of users description";
+                 leaf-list users-numbers {
+                    type uint32;
+                    description "numbers of users description";
+                }
             }
         }
     }
@@ -235,9 +237,11 @@ module config-threads-java {
     augment "/config:modules/config:module/config:state" {
         case threadpool-dynamic {
             when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
-            // root runtime bean
-            leaf created-sessions {
-                type uint32;
+            container threadpool-dynamic {
+                // root runtime bean
+                leaf created-sessions {
+                    type uint32;
+                }
             }
         }
     }
index 78ac362..6046665 100644 (file)
@@ -1,5 +1,3 @@
-
-
 package org.opendaylight.controller.config.yang.test.impl;
 public class DepTestImplModule extends org.opendaylight.controller.config.yang.test.impl.AbstractDepTestImplModule {
     public DepTestImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
index ddf72f3..bda3548 100644 (file)
@@ -1,5 +1,3 @@
-
-
 package org.opendaylight.controller.config.yang.test.impl;
 public class IdentityTestModule extends org.opendaylight.controller.config.yang.test.impl.AbstractIdentityTestModule {
     public IdentityTestModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
index 943fe3b..ab43dea 100644 (file)
@@ -1,5 +1,3 @@
-
-
 package org.opendaylight.controller.config.yang.test.impl;
 public class NetconfTestImplModule extends org.opendaylight.controller.config.yang.test.impl.AbstractNetconfTestImplModule {
     public NetconfTestImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
index 7b049e7..2880b46 100644 (file)
@@ -1,5 +1,3 @@
-
-
 package org.opendaylight.controller.config.yang.test.impl;
 public class TestImplModule extends org.opendaylight.controller.config.yang.test.impl.AbstractTestImplModule {
     public TestImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
index c82da58..4b006bc 100644 (file)
@@ -162,177 +162,179 @@ module config-test-impl {
     augment "/config:modules/config:module/config:configuration" {
         case impl-netconf {
             when "/config:modules/config:module/config:type = 'impl-netconf'";
-            leaf binaryLeaf {
-                type binary;
-                default ZGVmYXVsdEJpbg==;
-            }
-
-            leaf type {
-                type string;
-                default "default-string";
-            }
+            container impl-netconf {
+                leaf binaryLeaf {
+                    type binary;
+                    default ZGVmYXVsdEJpbg==;
+                }
 
-            leaf extended {
-                type tt:extend-once;
-                default 1;
-            }
+                leaf type {
+                    type string;
+                    default "default-string";
+                }
 
-            leaf extended-twice {
-                type tt:extend-twice;
-                default 2;
-            }
+                leaf extended {
+                    type tt:extend-once;
+                    default 1;
+                }
 
-            leaf extended-enum {
-                type tt:extend-enum;
-                default ONE;
-            }
+                leaf extended-twice {
+                    type tt:extend-twice;
+                    default 2;
+                }
 
-            leaf ip {
-                type inet:ip-address;
-                default 0:0:0:0:0:0:0:1;
-            }
+                leaf extended-enum {
+                    type tt:extend-enum;
+                    default ONE;
+                }
 
-            leaf union-test-attr {
-                type tt:unionTest;
-                default 456;
-            }
+                leaf ip {
+                    type inet:ip-address;
+                    default 0:0:0:0:0:0:0:1;
+                }
 
-            leaf sleep-factor {
-                type decimal64 {
-                    fraction-digits 2;
+                leaf union-test-attr {
+                    type tt:unionTest;
+                    default 456;
                 }
-                default 2.00;
-            }
 
-           container dto-c {
-                leaf simple-arg {
-                    type uint32;
+                leaf sleep-factor {
+                    type decimal64 {
+                        fraction-digits 2;
+                    }
+                    default 2.00;
                 }
 
-                container dto-a-inner {
+               container dto-c {
                     leaf simple-arg {
                         type uint32;
                     }
 
-                    container dto-a-inner-inner {
+                    container dto-a-inner {
                         leaf simple-arg {
                             type uint32;
                         }
+
+                        container dto-a-inner-inner {
+                            leaf simple-arg {
+                                type uint32;
+                            }
+                        }
                     }
                 }
-            }
-
-            leaf simpleInt {
-                type uint32;
-            }
-
-            leaf simpleBoolean {
-                type boolean;
-                default false;
-            }
-
-            leaf simple-long {
-                type int64;
-                default -45;
-            }
-
-            leaf simple-long-2 {
-                type uint32;
-                default 445;
-            }
 
-            leaf simple-BigInteger {
-                type uint64;
-                default 545454;
-            }
+                leaf simpleInt {
+                    type uint32;
+                }
 
-            leaf simple-byte {
-                type int8;
-                default -4;
-            }
+                leaf simpleBoolean {
+                    type boolean;
+                    default false;
+                }
 
-            leaf simple-short {
-                type uint8;
-                default 45;
-            }
+                leaf simple-long {
+                    type int64;
+                    default -45;
+                }
 
-            leaf simple-test {
-                type uint16;
-                default 99;
-            }
+                leaf simple-long-2 {
+                    type uint32;
+                    default 445;
+                }
 
-            leaf-list simple-list {
-                type uint16;
-            }
+                leaf simple-BigInteger {
+                    type uint64;
+                    default 545454;
+                }
 
-            container dto_d {
-                leaf simple-int1 {
-                    type uint32;
+                leaf simple-byte {
+                    type int8;
+                    default -4;
                 }
 
-                leaf simple-int2 {
-                    type uint32;
+                leaf simple-short {
+                    type uint8;
+                    default 45;
                 }
 
-                leaf simple-int3 {
+                leaf simple-test {
                     type uint16;
+                    default 99;
                 }
 
                 leaf-list simple-list {
                     type uint16;
                 }
 
-                list complex-dto-bInner {
-                    leaf-list simple-list {
-                        type uint16;
+                container dto_d {
+                    leaf simple-int1 {
+                        type uint32;
                     }
+
+                    leaf simple-int2 {
+                        type uint32;
+                    }
+
                     leaf simple-int3 {
                         type uint16;
                     }
 
-                    container deep {
+                    leaf-list simple-list {
+                        type uint16;
+                    }
+
+                    list complex-dto-bInner {
+                        leaf-list simple-list {
+                            type uint16;
+                        }
                         leaf simple-int3 {
                             type uint16;
-                            default 0;
+                        }
+
+                        container deep {
+                            leaf simple-int3 {
+                                type uint16;
+                                default 0;
+                            }
                         }
                     }
                 }
-            }
 
-            list complex-list {
-                list simple-list {
-                    leaf simple-int3 {
-                        type uint16;
+                list complex-list {
+                    list simple-list {
+                        leaf simple-int3 {
+                            type uint16;
+                        }
                     }
                 }
-            }
 
-            list peers {
-                    leaf port {
-                        type string;
-                    }
-                    leaf core-size {
-                        type uint32;
-                    }
-                    leaf simple-int3 {
-                        type uint16;
-                    }
-            }
+                list peers {
+                        leaf port {
+                            type string;
+                        }
+                        leaf core-size {
+                            type uint32;
+                        }
+                        leaf simple-int3 {
+                            type uint16;
+                        }
+                }
 
-            container testing-dep {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity test:testing;
+                container testing-dep {
+                    uses config:service-ref {
+                        refine type {
+                            mandatory true;
+                            config:required-identity test:testing;
+                        }
                     }
                 }
-            }
 
-            list testing-deps {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity test:testing;
+                list testing-deps {
+                    uses config:service-ref {
+                        refine type {
+                            mandatory true;
+                            config:required-identity test:testing;
+                        }
                     }
                 }
             }
@@ -342,97 +344,99 @@ module config-test-impl {
     augment "/config:modules/config:module/config:state" {
         case impl-netconf {
             when "/config:modules/config:module/config:type = 'impl-netconf'";
-            // rpc
-            rpcx:rpc-context-instance "test-rpc";
-
-            // root runtime bean
-            leaf created-sessions {
-                type uint32;
-            }
-
-            container asdf {
-                leaf simpleInt {
-                    type uint16;
-                }
+            container impl-netconf {
+                // rpc
+                rpcx:rpc-context-instance "test-rpc";
 
-                leaf simpleString {
-                    type string;
+                // root runtime bean
+                leaf created-sessions {
+                    type uint32;
                 }
-            }
 
+                container asdf {
+                    leaf simpleInt {
+                        type uint16;
+                    }
 
-            list inner-running-data-additional {
-                config:inner-state-bean;
+                    leaf simpleString {
+                        type string;
+                    }
+                }
 
-                // rpc
-                rpcx:rpc-context-instance "inner-test-rpc";
 
-                key "simpleString";
+                list inner-running-data-additional {
+                    config:inner-state-bean;
 
-                leaf simple-int3 {
-                        type uint16;
-                }
+                    // rpc
+                    rpcx:rpc-context-instance "inner-test-rpc";
 
-                leaf simpleString {
-                    type string;
-                }
+                    key "simpleString";
 
-                container deep4 {
-                    leaf boool {
-                        type boolean;
+                    leaf simple-int3 {
+                            type uint16;
                     }
-                }
-            }
-
-             list inner-running-data {
-                config:inner-state-bean;
 
-                key "simple-int3";
-
-                leaf simple-int3 {
-                        type uint16;
+                    leaf simpleString {
+                        type string;
                     }
 
-                    container deep2 {
-                    leaf boool {
-                        type boolean;
+                    container deep4 {
+                        leaf boool {
+                            type boolean;
+                        }
                     }
-                 }
+                }
 
-                list inner-inner-running-data {
+                 list inner-running-data {
                     config:inner-state-bean;
 
-                    rpcx:rpc-context-instance "inner-inner-test-rpc";
-                    rpcx:rpc-context-instance "complex-output-rpc";
-
                     key "simple-int3";
 
                     leaf simple-int3 {
-                        type uint16;
-                    }
+                            type uint16;
+                        }
 
-                    leaf-list list-of-strings {
-                        type string;
-                    }
+                        container deep2 {
+                        leaf boool {
+                            type boolean;
+                        }
+                     }
 
-                    list not-state-bean {
-                        leaf element {
-                            type string;
+                    list inner-inner-running-data {
+                        config:inner-state-bean;
+
+                        rpcx:rpc-context-instance "inner-inner-test-rpc";
+                        rpcx:rpc-context-instance "complex-output-rpc";
+
+                        key "simple-int3";
+
+                        leaf simple-int3 {
+                            type uint16;
                         }
 
-                        list not-state-bean-internal {
-                            // This should be ignored
-                            config:inner-state-bean;
+                        leaf-list list-of-strings {
+                            type string;
+                        }
 
-                            leaf element2 {
+                        list not-state-bean {
+                            leaf element {
                                 type string;
                             }
+
+                            list not-state-bean-internal {
+                                // This should be ignored
+                                config:inner-state-bean;
+
+                                leaf element2 {
+                                    type string;
+                                }
+                            }
                         }
-                    }
 
-                    container deep3 {
-                        leaf boool {
-                            type boolean;
+                        container deep3 {
+                            leaf boool {
+                                type boolean;
+                            }
                         }
                     }
                 }
index 1414fac..31cdedd 100644 (file)
       <version>${karaf.version}</version>
       <type>kar</type>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>config-features</artifactId>
-      <version>${config.version}</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
     <!-- scope is runtime so the feature repo is listed in the features
       service config file, and features may be installed using the
       karaf-maven-plugin configuration -->
-    <!-- dependencies commented out till we can get them in
     <dependency>
       <groupId>org.apache.karaf.features</groupId>
       <artifactId>standard</artifactId>
       <scope>runtime</scope>
     </dependency>
     <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.opendaylight.controller</groupId>
+      <artifactId>base-features</artifactId>
+      <version>${project.version}</version>
+      <type>kar</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>config-features</artifactId>
+      <version>${config.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <!--<dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>base-features</artifactId>
+      <version>${project.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>-->
+    <!-- <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>controller-features</artifactId>
       <version>${project.version}</version>
index 72ce89d..52aa6d2 100644 (file)
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>netconf-monitoring</artifactId>
         </dependency>
+        <dependency>
+          <groupId>org.opendaylight.controller</groupId>
+          <artifactId>netconf-netty-util</artifactId>
+        </dependency>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>netconf-ssh</artifactId>
           <groupId>org.opendaylight.yangtools</groupId>
           <artifactId>concepts</artifactId>
         </dependency>
+        <dependency>
+          <groupId>org.opendaylight.yangtools</groupId>
+          <artifactId>object-cache-api</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.opendaylight.yangtools</groupId>
+          <artifactId>object-cache-guava</artifactId>
+        </dependency>
         <dependency>
           <groupId>org.opendaylight.yangtools</groupId>
           <artifactId>restconf-client-api</artifactId>
           <groupId>org.opendaylight.yangtools.model</groupId>
           <artifactId>ietf-inet-types</artifactId>
         </dependency>
+        <dependency>
+          <groupId>org.opendaylight.yangtools.model</groupId>
+          <artifactId>ietf-restconf</artifactId>
+        </dependency>
         <dependency>
           <groupId>org.opendaylight.yangtools.model</groupId>
           <artifactId>ietf-topology</artifactId>
           <groupId>org.opendaylight.yangtools.model</groupId>
           <artifactId>ietf-yang-types</artifactId>
         </dependency>
+        <dependency>
+          <groupId>org.opendaylight.yangtools.model</groupId>
+          <artifactId>ietf-yang-types-20130715</artifactId>
+        </dependency>
         <dependency>
           <groupId>org.opendaylight.yangtools.model</groupId>
           <artifactId>opendaylight-l2-types</artifactId>
index c958039..f15f8f7 100644 (file)
@@ -13,11 +13,13 @@ osgi.bundles=\
     reference\:file\:../lib/jersey-server-1.17.jar@2:start
 
 # Netconf startup configuration
-netconf.tcp.address=127.0.0.1
-netconf.tcp.port=8383
 
-netconf.tcp.client.address=127.0.0.1
-netconf.tcp.client.port=8383
+# Netconf tcp address:port is optional with default value 127.0.0.1:8383
+#netconf.tcp.address=127.0.0.1
+#netconf.tcp.port=8384
+
+#netconf.tcp.client.address=127.0.0.1
+#netconf.tcp.client.port=8384
 
 netconf.ssh.address=0.0.0.0
 netconf.ssh.port=1830
index 6d90eb3..8901c2e 100644 (file)
@@ -16,7 +16,6 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/pom.xml b/opendaylight/md-sal/clustered-data-store/implementation/pom.xml
deleted file mode 100644 (file)
index fe0b516..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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.controller</groupId>
-        <artifactId>sal-parent</artifactId>
-        <version>1.1-SNAPSHOT</version>
-        <relativePath>../..</relativePath>
-    </parent>
-    <scm>
-        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
-        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
-        <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
-        <tag>HEAD</tag>
-    </scm>
-
-    <artifactId>clustered-datastore-implementation</artifactId>
-    <version>0.4.1-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                    </instructions>
-                    <manifestLocation>${project.basedir}/META-INF</manifestLocation>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>generate-sources</goal>
-                        </goals>
-                        <configuration>
-                            <codeGenerators>
-                                <generator>
-                                    <codeGeneratorClass>
-                                        org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-                                    </codeGeneratorClass>
-                                    <outputBaseDir>${project.build.directory}/generated-sources/config</outputBaseDir>
-                                    <additionalConfiguration>
-                                        <namespaceToPackage1>
-                                            urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
-                                        </namespaceToPackage1>
-                                    </additionalConfiguration>
-                                </generator>
-                                <generator>
-                                    <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
-                                    <outputBaseDir>target/site/models</outputBaseDir>
-                                </generator>
-                            </codeGenerators>
-                            <inspectDependencies>true</inspectDependencies>
-                        </configuration>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.opendaylight.controller</groupId>
-                        <artifactId>yang-jmx-generator-plugin</artifactId>
-                        <version>0.2.3-SNAPSHOT</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.opendaylight.yangtools</groupId>
-                        <artifactId>maven-sal-api-gen-plugin</artifactId>
-                        <version>${yangtools.version}</version>
-                        <type>jar</type>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-core-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>clustering.services</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-binding</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-api</artifactId>
-        </dependency>
-
-    </dependencies>
-</project>
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/cluster/store/ClusteredDataStoreImplModule.java b/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/cluster/store/ClusteredDataStoreImplModule.java
deleted file mode 100644 (file)
index 5fc2c01..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- */
-/**
-* Generated file
-
-* Generated from: yang module name: odl-sal-dom-clustered-store-cfg  yang module local name: dom-clustered-store-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Nov 27 17:09:17 CET 2013
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.controller.config.yang.md.sal.dom.cluster.store;
-
-import org.opendaylight.controller.datastore.internal.ClusteredDataStoreManager;
-import org.osgi.framework.BundleContext;
-
-/**
-*
-*/
-public final class ClusteredDataStoreImplModule extends org.opendaylight.controller.config.yang.md.sal.dom.cluster.store.AbstractClusteredDataStoreImplModule
-{
-
-    private BundleContext bundleContext;
-
-    public ClusteredDataStoreImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public ClusteredDataStoreImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, ClusteredDataStoreImplModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void validate(){
-        super.validate();
-        // Add custom validation for module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        ClusteredDataStoreManager manager = new ClusteredDataStoreManager();
-        manager.setContext(bundleContext);
-        manager.start();
-        return manager;
-    }
-
-    public void setBundleContext(BundleContext bundleContext) {
-        this.bundleContext = bundleContext;
-    }
-}
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/cluster/store/ClusteredDataStoreImplModuleFactory.java b/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/cluster/store/ClusteredDataStoreImplModuleFactory.java
deleted file mode 100644 (file)
index 40c5587..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- */
-/**
-* Generated file
-
-* Generated from: yang module name: odl-sal-dom-clustered-store-cfg  yang module local name: dom-clustered-store-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Nov 27 17:09:17 CET 2013
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.controller.config.yang.md.sal.dom.cluster.store;
-
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
-import org.opendaylight.controller.config.spi.Module;
-import org.osgi.framework.BundleContext;
-
-/**
-*
-*/
-public class ClusteredDataStoreImplModuleFactory extends org.opendaylight.controller.config.yang.md.sal.dom.cluster.store.AbstractClusteredDataStoreImplModuleFactory
-{
-
-    @Override
-    public Module createModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
-        ClusteredDataStoreImplModule module = 
-        (ClusteredDataStoreImplModule) super.createModule(instanceName, dependencyResolver, bundleContext);
-        module.setBundleContext(bundleContext);
-        return module;
-    }
-    
-    @Override
-    public Module createModule(String instanceName, DependencyResolver dependencyResolver,
-            DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception {
-        ClusteredDataStoreImplModule module = 
-                (ClusteredDataStoreImplModule) super.createModule(instanceName, dependencyResolver, old, bundleContext);
-        module.setBundleContext(bundleContext);
-        return module;
-    }
-
-}
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/ClusteredDataStore.java b/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/ClusteredDataStore.java
deleted file mode 100644 (file)
index 1aecb96..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-/*
- * Copyright (c) 2013 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.controller.datastore;
-
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
-import org.opendaylight.controller.md.sal.common.api.data.DataReader;
-import org.opendaylight.controller.sal.core.api.data.DataStore;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-
-public interface ClusteredDataStore extends DataStore {
-
-
-}
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreImpl.java b/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreImpl.java
deleted file mode 100644 (file)
index 0809ba3..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-
-/*
- * Copyright (c) 2013 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.controller.datastore.internal;
-
-import com.google.common.base.Preconditions;
-
-import org.opendaylight.controller.clustering.services.CacheConfigException;
-import org.opendaylight.controller.clustering.services.CacheExistException;
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
-import org.opendaylight.controller.clustering.services.IClusterServices;
-import org.opendaylight.controller.datastore.ClusteredDataStore;
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.controller.sal.common.util.Rpcs;
-import org.opendaylight.yangtools.yang.common.RpcError;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * The ClusteredDataStoreImpl stores global data to be shared across a controller cluster. It uses Clustering Services.
- */
-public class ClusteredDataStoreImpl implements ClusteredDataStore {
-
-
-    public static final String OPERATIONAL_DATA_CACHE = "clustered_data_store.operational_data_cache";
-    public static final String CONFIGURATION_DATA_CACHE = "clustered_data_store.configuration_data_cache";
-
-    private final ConcurrentMap<InstanceIdentifier, CompositeNode> operationalDataCache;
-    private final ConcurrentMap<InstanceIdentifier, CompositeNode> configurationDataCache;
-
-    private Logger logger = LoggerFactory.getLogger(ClusteredDataStoreImpl.class);
-
-    public ClusteredDataStoreImpl(IClusterGlobalServices clusterGlobalServices) throws CacheConfigException {
-        logger.trace("Constructing clustered data store");
-        Preconditions.checkNotNull(clusterGlobalServices, "clusterGlobalServices cannot be null");
-
-        operationalDataCache = getOrCreateCache(clusterGlobalServices, OPERATIONAL_DATA_CACHE);
-
-        Preconditions.checkNotNull(operationalDataCache, "operationalDataCache cannot be null");
-
-        configurationDataCache = getOrCreateCache(clusterGlobalServices, CONFIGURATION_DATA_CACHE);
-
-        Preconditions.checkNotNull(configurationDataCache, "configurationDataCache cannot be null");
-    }
-
-    @Override
-    public DataCommitTransaction<InstanceIdentifier, CompositeNode> requestCommit(DataModification<InstanceIdentifier, CompositeNode> modification) {
-        return new ClusteredDataStoreTransaction(modification);
-    }
-
-    @Override
-    public CompositeNode readOperationalData(InstanceIdentifier path) {
-        Preconditions.checkNotNull(path, "path cannot be null");
-        return operationalDataCache.get(path);
-    }
-
-    @Override
-    public boolean containsConfigurationPath(InstanceIdentifier path) {
-        return configurationDataCache.containsKey(path);
-    }
-
-    @Override
-    public boolean containsOperationalPath(InstanceIdentifier path) {
-        return operationalDataCache.containsKey(path);
-    }
-
-    @Override
-    public Iterable<InstanceIdentifier> getStoredConfigurationPaths() {
-        return configurationDataCache.keySet();
-    }
-
-    @Override
-    public Iterable<InstanceIdentifier> getStoredOperationalPaths() {
-        return operationalDataCache.keySet();
-    }
-
-
-
-    @Override
-    public CompositeNode readConfigurationData(InstanceIdentifier path) {
-        Preconditions.checkNotNull(path, "path cannot be null");
-        return configurationDataCache.get(path);
-    }
-
-    private RpcResult<Void> finish(final ClusteredDataStoreTransaction transaction) {
-      final DataModification<InstanceIdentifier,CompositeNode> modification = transaction.getModification();
-
-      this.configurationDataCache.putAll(modification.getUpdatedConfigurationData());
-      this.operationalDataCache.putAll(modification.getUpdatedOperationalData());
-
-      for (final InstanceIdentifier removal : modification.getRemovedConfigurationData()) {
-        this.configurationDataCache.remove(removal);
-      }
-
-      for (final InstanceIdentifier removal : modification.getRemovedOperationalData()) {
-        this.operationalDataCache.remove(removal  );
-      }
-
-      Set<RpcError> _emptySet = Collections.<RpcError>emptySet();
-      return Rpcs.<Void>getRpcResult(true, null, _emptySet);
-    }
-
-    private RpcResult<Void> rollback(final ClusteredDataStoreTransaction transaction) {
-      Set<RpcError> _emptySet = Collections.<RpcError>emptySet();
-      return Rpcs.<Void>getRpcResult(true, null, _emptySet);
-    }
-
-
-    private ConcurrentMap getOrCreateCache(IClusterGlobalServices clusterGlobalServices, String name) throws CacheConfigException {
-        ConcurrentMap cache = clusterGlobalServices.getCache(name);
-
-        if(cache == null) {
-            try {
-                cache = clusterGlobalServices.createCache(name, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-            } catch (CacheExistException e) {
-                cache = clusterGlobalServices.getCache(name);
-            }
-        }
-        return cache;
-    }
-
-    private class ClusteredDataStoreTransaction implements DataCommitTransaction<InstanceIdentifier, CompositeNode> {
-        private final DataModification<InstanceIdentifier,CompositeNode> modification;
-
-        public ClusteredDataStoreTransaction(DataModification<InstanceIdentifier,CompositeNode> modification){
-            Preconditions.checkNotNull(modification, "modification cannot be null");
-
-            this.modification = modification;
-        }
-
-        @Override
-        public DataModification<InstanceIdentifier, CompositeNode> getModification() {
-            return this.modification;
-        }
-
-        @Override
-        public RpcResult<Void> finish() throws IllegalStateException {
-            return ClusteredDataStoreImpl.this.finish(this);
-        }
-
-        @Override
-        public RpcResult<Void> rollback() throws IllegalStateException {
-            return ClusteredDataStoreImpl.this.rollback(this);
-        }
-    }
-}
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreManager.java b/opendaylight/md-sal/clustered-data-store/implementation/src/main/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreManager.java
deleted file mode 100644 (file)
index b0a099f..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2013 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.controller.datastore.internal;
-
-import java.util.Hashtable;
-
-import com.google.common.base.Preconditions;
-
-import org.opendaylight.controller.clustering.services.CacheConfigException;
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
-import org.opendaylight.controller.datastore.ClusteredDataStore;
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class ClusteredDataStoreManager implements //
-        ClusteredDataStore, //
-        ServiceTrackerCustomizer<IClusterGlobalServices, IClusterGlobalServices>, //
-        AutoCloseable {
-
-    private ClusteredDataStore clusteredDataStore = null;
-    private IClusterGlobalServices clusterGlobalServices = null;
-    private BundleContext context;
-
-    private ServiceReference<IClusterGlobalServices> firstClusterGlobalReference;
-    private ServiceTracker<IClusterGlobalServices, IClusterGlobalServices> clusterTracker;
-
-    @Override
-    public DataCommitTransaction<InstanceIdentifier, CompositeNode> requestCommit(
-            DataModification<InstanceIdentifier, CompositeNode> modification) {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.requestCommit(modification);
-    }
-
-    @Override
-    public CompositeNode readOperationalData(InstanceIdentifier path) {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.readOperationalData(path);
-    }
-
-    @Override
-    public CompositeNode readConfigurationData(InstanceIdentifier path) {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.readConfigurationData(path);
-    }
-
-    public Iterable<InstanceIdentifier> getStoredConfigurationPaths() {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.getStoredConfigurationPaths();
-    }
-
-    public Iterable<InstanceIdentifier> getStoredOperationalPaths() {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.getStoredOperationalPaths();
-    }
-
-    public boolean containsConfigurationPath(InstanceIdentifier path) {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.containsConfigurationPath(path);
-    }
-
-    public boolean containsOperationalPath(InstanceIdentifier path) {
-        Preconditions.checkState(clusteredDataStore != null, "clusteredDataStore cannot be null");
-        return clusteredDataStore.containsOperationalPath(path);
-    }
-
-    public void setClusterGlobalServices(IClusterGlobalServices clusterGlobalServices) {
-        this.clusterGlobalServices = clusterGlobalServices;
-        try {
-            // Adding creation of the clustered data store in its own method
-            // to make the method unit testable
-            clusteredDataStore = createClusteredDataStore();
-        } catch (CacheConfigException e) {
-            throw new IllegalStateException("could not construct clusteredDataStore");
-        }
-    }
-
-    @Override
-    public IClusterGlobalServices addingService(ServiceReference<IClusterGlobalServices> reference) {
-        if (clusterGlobalServices == null) {
-            setClusterGlobalServices(context.getService(reference));
-            return clusterGlobalServices;
-        }
-        return null;
-    }
-
-    @Override
-    public void modifiedService(ServiceReference<IClusterGlobalServices> reference, IClusterGlobalServices service) {
-
-    }
-
-    @Override
-    public void removedService(ServiceReference<IClusterGlobalServices> reference, IClusterGlobalServices service) {
-        if (clusterGlobalServices == service) {
-            clusterGlobalServices = null;
-            clusteredDataStore = null;
-        }
-    }
-
-    public BundleContext getContext() {
-        return context;
-    }
-
-    public void setContext(BundleContext context) {
-        this.context = context;
-    }
-    
-    
-    /**
-     * Function called by the dependency manager when all the required
-     * dependencies are satisfied
-     * 
-     */
-    public void start() {
-        if (context != null) {
-            clusterTracker = new ServiceTracker<>(context, IClusterGlobalServices.class, this);
-            clusterTracker.open();
-            
-            context.registerService(ClusteredDataStore.class, this, new Hashtable<String,Object>());
-        }
-    }
-
-    protected ClusteredDataStore createClusteredDataStore() throws CacheConfigException {
-        return new ClusteredDataStoreImpl(clusterGlobalServices);
-    }
-
-    @Override
-    public void close() throws Exception {
-        clusterTracker.close();
-    }
-}
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/main/yang/odl-sal-dom-clustered-store-cfg.yang b/opendaylight/md-sal/clustered-data-store/implementation/src/main/yang/odl-sal-dom-clustered-store-cfg.yang
deleted file mode 100644 (file)
index 95a26d7..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-module odl-sal-dom-clustered-store-cfg {
-       yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:cluster:store";
-    prefix "binding-impl";
-
-       import config { prefix config; revision-date 2013-04-05; }
-       import opendaylight-md-sal-dom {prefix sal;}
-
-    description
-        "Service definition for MD-SAL Clustered Store.";
-    revision "2013-10-28" {
-        description
-            "Initial revision";
-    }
-
-    identity dom-clustered-store-impl {
-        base config:module-type;
-        config:provided-service sal:dom-data-store;
-        config:java-name-prefix ClusteredDataStoreImpl;
-    }
-
-    augment "/config:modules/config:module/config:state" {
-        case dom-clustered-store-impl {
-            when "/config:modules/config:module/config:type = 'dom-clustered-store-impl'";
-        }
-    }
-    
-}
\ No newline at end of file
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/test/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreImplTest.java b/opendaylight/md-sal/clustered-data-store/implementation/src/test/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreImplTest.java
deleted file mode 100644 (file)
index 4c97b19..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * 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
- */
-package org.opendaylight.controller.datastore.internal;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.opendaylight.controller.clustering.services.CacheConfigException;
-import org.opendaylight.controller.clustering.services.CacheExistException;
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
-import org.opendaylight.controller.clustering.services.IClusterServices;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-
-import java.util.EnumSet;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class ClusteredDataStoreImplTest {
-    @Before
-    public void setUp(){
-
-    }
-
-    @Test
-    public void constructor_WhenPassedANullClusteringServices_ShouldThrowANullPointerException() throws CacheExistException, CacheConfigException {
-        try {
-            new ClusteredDataStoreImpl(null);
-        } catch(NullPointerException npe){
-            assertEquals("clusterGlobalServices cannot be null", npe.getMessage());
-        }
-    }
-
-    @Test
-    public void constructor_WhenClusteringServicesReturnsANullOperationalDataCache_ShouldThrowANullPointerException() throws CacheExistException, CacheConfigException {
-        try {
-            new ClusteredDataStoreImpl(mock(IClusterGlobalServices.class));
-        } catch(NullPointerException npe){
-            assertEquals("operationalDataCache cannot be null", npe.getMessage());
-        }
-    }
-
-    @Test
-    public void constructor_WhenClusteringServicesReturnsANullOConfigurationDataCache_ShouldThrowANullPointerException() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = mock(IClusterGlobalServices.class);
-
-        // Confused about the following line?
-        // See this http://stackoverflow.com/questions/10952629/a-strange-generics-edge-case-with-mockito-when-and-generic-type-inference
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(new ConcurrentHashMap<Object, Object>());
-
-
-        try {
-            new ClusteredDataStoreImpl(mockClusterGlobalServices);
-        } catch(NullPointerException npe){
-            assertEquals("configurationDataCache cannot be null", npe.getMessage());
-        }
-    }
-
-    @Test
-    public void constructor_WhenOperationalDataCacheIsAlreadyPresent_ShouldNotAttemptToCreateCache() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = mock(IClusterGlobalServices.class);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.getCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE)).thenReturn(new ConcurrentHashMap<Object, Object>());
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.getCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE)).thenReturn(new ConcurrentHashMap<Object, Object>());
-
-        new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        verify(mockClusterGlobalServices, never()).createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-    }
-
-    @Test
-    public void constructor_WhenConfigurationDataCacheIsAlreadyPresent_ShouldNotAttemptToCreateCache() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = mock(IClusterGlobalServices.class);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.getCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE)).thenReturn(new ConcurrentHashMap<Object, Object>());
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.getCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE)).thenReturn(new ConcurrentHashMap<Object, Object>());
-
-        new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        verify(mockClusterGlobalServices, never()).createCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-    }
-
-
-    @Test
-    public void constructor_WhenPassedAValidClusteringServices_ShouldNotThrowAnyExceptions() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        new ClusteredDataStoreImpl(mockClusterGlobalServices);
-    }
-
-
-    @Test
-    public void readOperationalData_WhenPassedANullPath_ShouldThrowANullPointerException() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        try {
-            store.readOperationalData(null);
-        } catch(NullPointerException npe){
-            assertEquals("path cannot be null", npe.getMessage());
-        }
-    }
-
-    @Test
-    public void readOperationalData_WhenPassedAKeyThatDoesNotExistInTheCache_ShouldReturnNull() throws CacheExistException, CacheConfigException {
-        InstanceIdentifier path = InstanceIdentifier.builder().toInstance();
-
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        assertNull(store.readOperationalData(path));
-    }
-
-    @Test
-    public void readOperationalData_WhenPassedAKeyThatDoesExistInTheCache_ShouldReturnTheValueObject() throws CacheExistException, CacheConfigException {
-        InstanceIdentifier path = InstanceIdentifier.builder().toInstance();
-
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ConcurrentMap<InstanceIdentifier, CompositeNode> mockOperationalDataCache = mock(ConcurrentMap.class);
-
-        CompositeNode valueObject = mock(CompositeNode.class);
-
-        when(mockOperationalDataCache.get(path)).thenReturn(valueObject);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mockOperationalDataCache);
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(new ConcurrentHashMap<Object, Object>());
-
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        assertEquals(valueObject, store.readOperationalData(path));
-    }
-
-
-
-    @Test
-    public void readConfigurationData_WhenPassedANullPath_ShouldThrowANullPointerException() throws CacheExistException, CacheConfigException {
-
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        try {
-            store.readConfigurationData(null);
-        } catch(NullPointerException npe){
-            assertEquals("path cannot be null", npe.getMessage());
-        }
-    }
-
-
-    @Test
-    public void readConfigurationData_WhenPassedAKeyThatDoesNotExistInTheCache_ShouldReturnNull() throws CacheExistException, CacheConfigException {
-        InstanceIdentifier path = InstanceIdentifier.builder().toInstance();
-
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        assertNull(store.readConfigurationData(path));
-    }
-
-    @Test
-    public void readConfigurationData_WhenPassedAKeyThatDoesExistInTheCache_ShouldReturnTheValueObject() throws CacheExistException, CacheConfigException {
-        InstanceIdentifier path = InstanceIdentifier.builder().toInstance();
-
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ConcurrentMap<InstanceIdentifier, CompositeNode> mockConfigurationDataCache = mock(ConcurrentMap.class);
-
-        CompositeNode valueObject = mock(CompositeNode.class);
-
-        when(mockConfigurationDataCache.get(path)).thenReturn(valueObject);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mock(ConcurrentMap.class));
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mockConfigurationDataCache);
-
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        assertEquals(valueObject, store.readConfigurationData(path));
-    }
-
-
-    @Test
-    public void requestCommit_ShouldReturnADataTransaction() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = createClusterGlobalServices();
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        assertNotNull(store.requestCommit(mock(DataModification.class)));
-
-
-    }
-
-    @Test
-    public void finishingADataTransaction_ShouldUpdateTheUnderlyingCache() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = mock(IClusterGlobalServices.class);
-
-        ConcurrentMap mockConfigurationDataCache = mock(ConcurrentMap.class);
-        ConcurrentMap mockOperationalDataCache = mock(ConcurrentMap.class);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mockOperationalDataCache);
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mockConfigurationDataCache);
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        DataModification mockModification = mock(DataModification.class);
-
-        Map configurationData = mock(Map.class);
-        Map operationalData = mock(Map.class);
-
-        when(mockModification.getUpdatedConfigurationData()).thenReturn(configurationData);
-        when(mockModification.getUpdatedOperationalData()).thenReturn(operationalData);
-
-        DataCommitHandler.DataCommitTransaction<InstanceIdentifier, CompositeNode> transaction = store.requestCommit(mockModification);
-
-        transaction.finish();
-
-        verify(mockConfigurationDataCache).putAll(mockModification.getUpdatedConfigurationData());
-        verify(mockOperationalDataCache).putAll(mockModification.getUpdatedOperationalData());
-    }
-
-
-    @Test
-    public void rollingBackADataTransaction_ShouldDoNothing() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = mock(IClusterGlobalServices.class);
-
-        ConcurrentMap mockConfigurationDataCache = mock(ConcurrentMap.class);
-        ConcurrentMap mockOperationalDataCache = mock(ConcurrentMap.class);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mockOperationalDataCache);
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mockConfigurationDataCache);
-
-        ClusteredDataStoreImpl store = new ClusteredDataStoreImpl(mockClusterGlobalServices);
-
-        DataModification mockModification = mock(DataModification.class);
-
-        Map configurationData = mock(Map.class);
-        Map operationalData = mock(Map.class);
-
-        when(mockModification.getUpdatedConfigurationData()).thenReturn(configurationData);
-        when(mockModification.getUpdatedOperationalData()).thenReturn(operationalData);
-
-        DataCommitHandler.DataCommitTransaction<InstanceIdentifier, CompositeNode> transaction = store.requestCommit(mockModification);
-
-        transaction.rollback();
-
-        verify(mockConfigurationDataCache, never()).putAll(mockModification.getUpdatedConfigurationData());
-        verify(mockOperationalDataCache, never()).putAll(mockModification.getUpdatedOperationalData());
-
-    }
-
-
-    private IClusterGlobalServices createClusterGlobalServices() throws CacheExistException, CacheConfigException {
-        IClusterGlobalServices mockClusterGlobalServices = mock(IClusterGlobalServices.class);
-
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mock(ConcurrentMap.class));
-        Mockito.<ConcurrentMap<?,?>>when(mockClusterGlobalServices.createCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL))).thenReturn(mock(ConcurrentMap.class));
-
-        return mockClusterGlobalServices;
-    }
-}
diff --git a/opendaylight/md-sal/clustered-data-store/implementation/src/test/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreManagerTest.java b/opendaylight/md-sal/clustered-data-store/implementation/src/test/java/org/opendaylight/controller/datastore/internal/ClusteredDataStoreManagerTest.java
deleted file mode 100644 (file)
index 10f9622..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2013 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.controller.datastore.internal;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.felix.dm.Component;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.opendaylight.controller.clustering.services.CacheConfigException;
-import org.opendaylight.controller.clustering.services.CacheExistException;
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler.DataCommitTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-
-import static junit.framework.Assert.assertNotNull;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.when;
-
-public class ClusteredDataStoreManagerTest {
-
-    private static ClusteredDataStoreManager clusteredDSMgr = null;
-    private IClusterGlobalServices icClusterGlbServices = mock(IClusterGlobalServices.class);
-
-    @BeforeClass
-    public static void construct() {
-        clusteredDSMgr = new ClusteredDataStoreManager();
-        assertNotNull(clusteredDSMgr);
-    }
-
-    @Test
-    public void construct_OnSetClusterGlobalServices_AssertNoException() {
-        doReturn(new ConcurrentHashMap<InstanceIdentifier, CompositeNode>()).when(icClusterGlbServices).getCache(ClusteredDataStoreImpl.CONFIGURATION_DATA_CACHE);
-        doReturn(new ConcurrentHashMap<InstanceIdentifier, CompositeNode>()).when(icClusterGlbServices).getCache(ClusteredDataStoreImpl.OPERATIONAL_DATA_CACHE);
-        clusteredDSMgr.setClusterGlobalServices(icClusterGlbServices);
-    }
-
-    @Test
-    public void construct_init_AssertNoException() throws CacheExistException, CacheConfigException {
-        ClusteredDataStoreImpl clusteredDSImpl = mock(ClusteredDataStoreImpl.class);
-
-        ClusteredDataStoreManager clusteredDSManager = spy(new ClusteredDataStoreManager());
-        doReturn(clusteredDSImpl).when(clusteredDSManager).createClusteredDataStore();
-        clusteredDSManager.start();
-    }
-
-
-    @Test
-    public void construct_readOperationalData_AssertNoException() throws CacheExistException, CacheConfigException {
-        ClusteredDataStoreImpl clusteredDSImpl = mock(ClusteredDataStoreImpl.class);
-
-        ClusteredDataStoreManager clusteredDSManager = spy(new ClusteredDataStoreManager());
-        doReturn(clusteredDSImpl).when(clusteredDSManager).createClusteredDataStore();
-        Component c = mock(Component.class);
-        
-        clusteredDSManager.start();
-        clusteredDSManager.setClusterGlobalServices(icClusterGlbServices);
-        CompositeNode o = mock(CompositeNode.class);
-
-        when(clusteredDSImpl.readOperationalData(any(InstanceIdentifier.class))).thenReturn(o);
-        assertEquals(o, clusteredDSManager.readOperationalData(any(InstanceIdentifier.class)));
-    }
-
-    @Test
-    public void construct_readConfigurationData_AssertNoException() throws CacheExistException, CacheConfigException {
-        ClusteredDataStoreImpl clusteredDSImpl = mock(ClusteredDataStoreImpl.class);
-
-        ClusteredDataStoreManager clusteredDSManager = spy(new ClusteredDataStoreManager());
-        doReturn(clusteredDSImpl).when(clusteredDSManager).createClusteredDataStore();
-        Component c = mock(Component.class);
-
-        clusteredDSManager.start();
-        clusteredDSManager.setClusterGlobalServices(icClusterGlbServices);
-        
-        CompositeNode o = mock(CompositeNode.class);
-
-        when(clusteredDSImpl.readConfigurationData(any(InstanceIdentifier.class))).thenReturn(o);
-        assertEquals(o, clusteredDSManager.readConfigurationData(any(InstanceIdentifier.class)));
-    }
-
-    @Test
-    public void construct_requestCommit_AssertNoException() throws CacheExistException, CacheConfigException {
-        ClusteredDataStoreImpl clusteredDSImpl = mock(ClusteredDataStoreImpl.class);
-
-        ClusteredDataStoreManager clusteredDSManager = spy(new ClusteredDataStoreManager());
-        doReturn(clusteredDSImpl).when(clusteredDSManager).createClusteredDataStore();
-        IClusterGlobalServices globalServices = mock(IClusterGlobalServices.class);
-        clusteredDSManager.setClusterGlobalServices(globalServices);
-        clusteredDSManager.start();
-        DataCommitTransaction dataCommitTransaction = mock(DataCommitTransaction.class);
-
-        when(clusteredDSImpl.requestCommit(any(DataModification.class))).thenReturn(dataCommitTransaction);
-        assertEquals(dataCommitTransaction, clusteredDSManager.requestCommit(any(DataModification.class)));
-    }
-}
diff --git a/opendaylight/md-sal/clustered-data-store/integrationtest/pom.xml b/opendaylight/md-sal/clustered-data-store/integrationtest/pom.xml
deleted file mode 100644 (file)
index 2d68b47..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>commons.integrationtest</artifactId>
-        <version>0.5.1-SNAPSHOT</version>
-        <relativePath>../../../commons/integrationtest</relativePath>
-    </parent>
-    <scm>
-        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
-        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
-        <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
-    </scm>
-
-    <artifactId>clustered-datastore.integrationtest</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>xml-apis</groupId>
-                <artifactId>xml-apis</artifactId>
-                <version>1.4.01</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-it</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-api</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-util</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common-impl</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-broker-impl</artifactId>
-            <version>1.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>xml-apis</artifactId>
-                    <groupId>xml-apis</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>reflections</artifactId>
-                    <groupId>org.reflections</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal</artifactId>
-            <version>0.7.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>clustering.services</artifactId>
-            <version>0.5.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-binding</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.thirdparty</groupId>
-            <artifactId>antlr4-runtime-osgi-nohead</artifactId>
-            <version>4.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>protocol_plugins.stub</artifactId>
-            <version>0.4.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal.implementation</artifactId>
-            <version>0.4.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>containermanager</artifactId>
-            <version>0.5.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>containermanager.it.implementation</artifactId>
-            <version>0.5.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>clustering.stub</artifactId>
-            <version>0.4.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>clustered-datastore-implementation</artifactId>
-            <version>0.4.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.thirdparty</groupId>
-            <artifactId>xtend-lib-osgi</artifactId>
-            <version>2.4.3</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-broker-impl</artifactId>
-            <version>1.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-native</artifactId>
-            <version>${exam.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-junit4</artifactId>
-            <version>${exam.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-netconf-connector</artifactId>
-            <version>${netconf.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <artifactId>xml-apis</artifactId>
-                    <groupId>xml-apis</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>logback-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-persister-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-persister-file-xml-adapter</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netconf-impl</artifactId>
-            <version>${netconf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netconf-client</artifactId>
-            <version>${netconf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-common</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>concepts</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-data-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
-            <version>1.9.5</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-manager</artifactId>
-            <version>0.2.3-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller.model</groupId>
-            <artifactId>model-flow-management</artifactId>
-            <version>1.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.thirdparty</groupId>
-            <artifactId>antlr4-runtime-osgi-nohead</artifactId>
-            <version>4.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.thirdparty</groupId>
-            <artifactId>xtend-lib-osgi</artifactId>
-            <version>2.4.3</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-binding-broker-impl</artifactId>
-            <version>1.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-native</artifactId>
-            <version>${exam.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-junit4</artifactId>
-            <version>${exam.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-netconf-connector</artifactId>
-            <version>${netconf.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-parser-impl</artifactId>
-            <version>${yangtools.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>yang-model-util</artifactId>
-            <version>${yangtools.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>logback-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-persister-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netconf-impl</artifactId>
-            <version>${netconf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netconf-client</artifactId>
-            <version>${netconf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-link-mvn</artifactId>
-            <version>${exam.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>equinoxSDK381</groupId>
-            <artifactId>org.eclipse.osgi</artifactId>
-            <version>3.8.1.v20120830-144521</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-            <version>1.7.2</version>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-core</artifactId>
-            <version>1.0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>1.0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller.model</groupId>
-            <artifactId>model-flow-service</artifactId>
-            <version>1.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-manager</artifactId>
-            <version>0.2.3-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller.model</groupId>
-            <artifactId>model-flow-management</artifactId>
-            <version>1.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.thirdparty</groupId>
-            <artifactId>antlr4-runtime-osgi-nohead</artifactId>
-            <version>4.0</version>
-        </dependency>
-    </dependencies>
-    <properties>
-        <!-- Sonar jacoco plugin to get integration test coverage info -->
-        <sonar.jacoco.reportPath>../implementation/target/jacoco.exec</sonar.jacoco.reportPath>
-        <sonar.jacoco.itReportPath>../implementaiton/target/jacoco-it.exec</sonar.jacoco.itReportPath>
-    </properties>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-                <configuration>
-                    <destFile>../implementation/target/jacoco-it.exec</destFile>
-                    <includes><include>org.opendaylight.controller.*</include></includes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>pre-test</id>
-                        <goals>
-                            <goal>prepare-agent</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>post-test</id>
-                        <configuration>
-                            <skip>true</skip>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/opendaylight/md-sal/clustered-data-store/integrationtest/src/test/java/org/opendaylight/controller/datastore/ClusteredDataStoreIT.java b/opendaylight/md-sal/clustered-data-store/integrationtest/src/test/java/org/opendaylight/controller/datastore/ClusteredDataStoreIT.java
deleted file mode 100644 (file)
index a1fa9e3..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2013 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.controller.datastore;
-
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.systemPackages;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler.DataCommitTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.controller.test.sal.binding.it.TestHelper;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.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.util.Filter;
-import org.ops4j.pax.exam.util.PathUtils;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@RunWith(PaxExam.class)
-//@ExamReactorStrategy(PerClass.class)
-public class ClusteredDataStoreIT {
-    private Logger log = LoggerFactory.getLogger(ClusteredDataStoreIT.class);
-    // get the OSGI bundle context
-    @Inject
-    private BundleContext bc;
-    @Inject
-    @Filter(timeout=60*1000)
-    private ClusteredDataStore clusteredDS;
-
-    // Configure the OSGi container
-    @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"),
-                // Set the systemPackages (used by clustering)
-                systemPackages("sun.reflect", "sun.reflect.misc", "sun.misc"),
-                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
-                // List framework bundles
-                mavenBundle("equinoxSDK381", "org.eclipse.equinox.console").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.eclipse.equinox.util").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.eclipse.osgi.services").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.eclipse.equinox.ds").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.apache.felix.gogo.command").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.apache.felix.gogo.runtime").versionAsInProject(),
-                mavenBundle("equinoxSDK381", "org.apache.felix.gogo.shell").versionAsInProject(),
-                // List logger bundles
-                mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(),
-                mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(),
-                mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(),
-                mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(),
-                // needed by statisticsmanager
-                mavenBundle("org.opendaylight.controller", "containermanager").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "containermanager.it.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "clustering.services").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "clustering.stub").versionAsInProject(),
-
-                // List all the bundles on which the test case depends
-                mavenBundle("org.opendaylight.controller", "sal").versionAsInProject(),
-                TestHelper.baseModelBundles(),
-                TestHelper.configMinumumBundles(),
-                TestHelper.bindingIndependentSalBundles(),
-                TestHelper.bindingAwareSalBundles(),
-                TestHelper.mdSalCoreBundles(),
-                mavenBundle("org.opendaylight.controller", "config-api").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "sal.implementation").versionAsInProject(),
-                mavenBundle("org.opendaylight.controller", "protocol_plugins.stub").versionAsInProject(),
-
-                mavenBundle("org.osgi", "org.osgi.core").versionAsInProject(),
-                // adding new maven bundles
-                mavenBundle("org.mockito", "mockito-all").versionAsInProject(),
-
-                // needed by hosttracker
-                mavenBundle("org.opendaylight.controller", "clustered-datastore-implementation").versionAsInProject(),
-                mavenBundle("org.jboss.spec.javax.transaction", "jboss-transaction-api_1.1_spec").versionAsInProject(),
-                mavenBundle("org.apache.commons", "commons-lang3").versionAsInProject(),
-                mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager").versionAsInProject(),
-                junitBundles());
-    }
-
-    private String stateToString(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";
-        }
-    }
-
-    @Test
-    public void testBundleContextClusteredDS_NotNull() throws Exception {
-        ServiceReference serviceReference = bc.getServiceReference(ClusteredDataStore.class);
-        ClusteredDataStore store = ClusteredDataStore.class.cast(bc.getService(serviceReference));
-        assertNotNull(store);
-    }
-
-    @Test
-    public void testInjected_ClusteredDS_NotNull() {
-        assertNotNull(clusteredDS);
-    }
-
-    @Test
-    public void requestCommit_readConfigurationData_ShouldVerifyDataAndNoException() {
-        DataModification dataModification = mock(DataModification.class);
-        HashMap map = new HashMap();
-        List list = new ArrayList();
-        list.add("key");
-        InstanceIdentifier key = new InstanceIdentifier(list);
-        map.put(key, mock(CompositeNode.class));
-        when(dataModification.getUpdatedConfigurationData()).thenReturn(map);
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-        Object value = clusteredDS.readConfigurationData(key);
-        Assert.assertNotNull(value);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void requestCommit_ShouldThrowException() {
-        DataModification dataModification = null;
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-    }
-
-    @Test
-    public void requestCommit_readOperationalData_ShouldVerifyDataAndNoException() {
-        DataModification dataModification = mock(DataModification.class);
-        HashMap map = new HashMap();
-        List list = new ArrayList();
-        list.add("key");
-        InstanceIdentifier key = new InstanceIdentifier(list);
-        map.put(key, mock(CompositeNode.class));
-        when(dataModification.getUpdatedOperationalData()).thenReturn(map);
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-        Object value = clusteredDS.readOperationalData(key);
-        Assert.assertNotNull(value);
-    }
-
-    @Test
-    public void requestCommit_readConfigurationData_NonExistingKey_ShouldVerifyNoMappedValueAndNoException() {
-        DataModification dataModification = mock(DataModification.class);
-        HashMap map = new HashMap();
-        List list = new ArrayList();
-        list.add("key");
-        InstanceIdentifier key = new InstanceIdentifier(list);
-        map.put(key, "value");
-        when(dataModification.getUpdatedConfigurationData()).thenReturn(map);
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-        list = new ArrayList();
-        list.add("key1");
-        InstanceIdentifier key1 = new InstanceIdentifier(list);
-
-        Object value = clusteredDS.readConfigurationData(key1);
-        assertNull(value);
-    }
-
-    @Test
-    public void requestCommit_readOperationalData_NonExistingKey_ShouldVerifyNoMappedValueAndNoException() {
-        DataModification dataModification = mock(DataModification.class);
-        HashMap map = new HashMap();
-        List list = new ArrayList();
-        list.add("key");
-        InstanceIdentifier key = new InstanceIdentifier(list);
-        map.put(key, mock(CompositeNode.class));
-        when(dataModification.getUpdatedOperationalData()).thenReturn(map);
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-        list = new ArrayList();
-        list.add("key1");
-        InstanceIdentifier key1 = new InstanceIdentifier(list);
-
-        Object value = clusteredDS.readOperationalData(key1);
-        assertNull(value);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void requestCommit_readConfigurationData_WithNullPathShouldThrowException() {
-        DataModification dataModification = mock(DataModification.class);
-        HashMap map = new HashMap();
-        List list = new ArrayList();
-        list.add("key");
-        InstanceIdentifier key = new InstanceIdentifier(list);
-        map.put(key, "value");
-        when(dataModification.getUpdatedConfigurationData()).thenReturn(map);
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-        Object value = clusteredDS.readConfigurationData(null);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void requestCommit_readOperationalData_WithNullPathShouldThrowException() {
-        DataModification dataModification = mock(DataModification.class);
-        HashMap map = new HashMap();
-        List list = new ArrayList();
-        list.add("key");
-        InstanceIdentifier key = new InstanceIdentifier(list);
-        map.put(key, "value");
-        when(dataModification.getOriginalOperationalData()).thenReturn(map);
-        DataCommitTransaction dataCommitTrans = clusteredDS.requestCommit(dataModification);
-        dataCommitTrans.finish();
-        Object value = clusteredDS.readOperationalData(null);
-    }
-
-}
diff --git a/opendaylight/md-sal/clustered-data-store/integrationtest/src/test/resources/controller.xml b/opendaylight/md-sal/clustered-data-store/integrationtest/src/test/resources/controller.xml
deleted file mode 100644 (file)
index 5f43ddc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persisted-snapshots>
-    <snapshots>
-        <snapshot>
-            <required-capabilities>
-                <capability>
-                    urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:cluster:store?module=odl-sal-dom-clustered-store-cfg&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:controller:md:sal:dom:cluster:store">
-                                prefix:dom-clustered-store-impl
-                            </type>
-                            <name>cluster-data-store</name>
-                        </module>
-                    </modules>
-
-                    <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-
-                    </services>
-                </data>
-
-            </configuration>
-        </snapshot>
-    </snapshots>
-</persisted-snapshots>
diff --git a/opendaylight/md-sal/clustered-data-store/integrationtest/src/test/resources/logback.xml b/opendaylight/md-sal/clustered-data-store/integrationtest/src/test/resources/logback.xml
deleted file mode 100644 (file)
index 5246f01..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<configuration scan="true">
-
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-    <encoder>
-      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-      </pattern>
-    </encoder>
-  </appender>
-
-  <root level="debug">
-    <appender-ref ref="STDOUT" />
-  </root>
-</configuration>
diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ComponentActivator.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ComponentActivator.java
new file mode 100644 (file)
index 0000000..b3a89a4
--- /dev/null
@@ -0,0 +1,238 @@
+/**
+ * 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
+ */
+package org.opendaylight.controller.sal.compatibility;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.felix.dm.Component;
+import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import org.opendaylight.controller.sal.compatibility.adsal.DataPacketServiceAdapter;
+import org.opendaylight.controller.sal.compatibility.topology.TopologyAdapter;
+import org.opendaylight.controller.sal.compatibility.topology.TopologyProvider;
+import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
+import org.opendaylight.controller.sal.core.Node.NodeIDType;
+import org.opendaylight.controller.sal.core.NodeConnector.NodeConnectorIDType;
+import org.opendaylight.controller.sal.discovery.IDiscoveryService;
+import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
+import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService;
+import org.opendaylight.controller.sal.inventory.IPluginInInventoryService;
+import org.opendaylight.controller.sal.inventory.IPluginOutInventoryService;
+import org.opendaylight.controller.sal.packet.IPluginInDataPacketService;
+import org.opendaylight.controller.sal.packet.IPluginOutDataPacketService;
+import org.opendaylight.controller.sal.reader.IPluginInReadService;
+import org.opendaylight.controller.sal.reader.IPluginOutReadService;
+import org.opendaylight.controller.sal.topology.IPluginInTopologyService;
+import org.opendaylight.controller.sal.topology.IPluginOutTopologyService;
+import org.opendaylight.controller.sal.utils.GlobalConstants;
+import org.opendaylight.controller.sal.utils.INodeConnectorFactory;
+import org.opendaylight.controller.sal.utils.INodeFactory;
+import org.osgi.framework.BundleContext;
+
+import com.google.common.base.Preconditions;
+
+public class ComponentActivator extends ComponentActivatorAbstractBase {
+    private final INodeConnectorFactory nodeConnectorFactory = new MDSalNodeConnectorFactory();
+    private final DataPacketServiceAdapter dataPacketService = new DataPacketServiceAdapter();
+    private final InventoryAndReadAdapter inventory = new InventoryAndReadAdapter();
+    private final FlowProgrammerAdapter flow = new FlowProgrammerAdapter();
+    private final DataPacketAdapter dataPacket = new DataPacketAdapter();
+    private final TopologyProvider tpProvider = new TopologyProvider();
+    private final INodeFactory nodeFactory = new MDSalNodeFactory();
+    private final TopologyAdapter topology = new TopologyAdapter();
+    private BundleContext context;
+
+    public INodeConnectorFactory getNodeConnectorFactory() {
+        return nodeConnectorFactory;
+    }
+
+    public DataPacketServiceAdapter getDataPacketService() {
+        return dataPacketService;
+    }
+
+    public InventoryAndReadAdapter getInventory() {
+        return inventory;
+    }
+
+    public FlowProgrammerAdapter getFlow() {
+        return flow;
+    }
+
+    public DataPacketAdapter getDataPacket() {
+        return dataPacket;
+    }
+
+    public TopologyProvider getTpProvider() {
+        return tpProvider;
+    }
+
+    public INodeFactory getNodeFactory() {
+        return nodeFactory;
+    }
+
+    public TopologyAdapter getTopology() {
+        return topology;
+    }
+
+    @Override
+    protected void init() {
+        NodeIDType.registerIDType(NodeMapping.MD_SAL_TYPE, String.class);
+        NodeConnectorIDType.registerIDType(NodeMapping.MD_SAL_TYPE, String.class, NodeMapping.MD_SAL_TYPE);
+    }
+
+    @Override
+    public void start(final BundleContext context) {
+        super.start(context);
+        this.context = Preconditions.checkNotNull(context);
+    }
+
+    public ProviderContext setBroker(final BindingAwareBroker broker) {
+        return broker.registerProvider(new SalCompatibilityProvider(this), context);
+    }
+
+    @Override
+    protected Object[] getGlobalImplementations() {
+        return new Object[] {
+                flow,
+                inventory,
+                dataPacket,
+                nodeFactory,
+                nodeConnectorFactory,
+                topology,
+                tpProvider,
+        };
+    }
+
+    @Override
+    protected void configureGlobalInstance(final Component c, final Object imp) {
+        if (imp instanceof DataPacketAdapter) {
+            _configure((DataPacketAdapter)imp, c);
+        } else if (imp instanceof FlowProgrammerAdapter) {
+            _configure((FlowProgrammerAdapter)imp, c);
+        } else if (imp instanceof InventoryAndReadAdapter) {
+            _configure((InventoryAndReadAdapter)imp, c);
+        } else if (imp instanceof ComponentActivator) {
+            _configure((ComponentActivator)imp, c);
+        } else if (imp instanceof MDSalNodeConnectorFactory) {
+            _configure((MDSalNodeConnectorFactory)imp, c);
+        } else if (imp instanceof MDSalNodeFactory) {
+            _configure((MDSalNodeFactory)imp, c);
+        } else if (imp instanceof TopologyAdapter) {
+            _configure((TopologyAdapter)imp, c);
+        } else if (imp instanceof TopologyProvider) {
+            _configure((TopologyProvider)imp, c);
+        } else {
+            throw new IllegalArgumentException(String.format("Unhandled implementation class %s", imp.getClass()));
+        }
+    }
+
+    @Override
+    protected Object[] getImplementations() {
+        return new Object[] {
+                dataPacketService,
+        };
+    }
+
+    @Override
+    protected void configureInstance(final Component c, final Object imp, final String containerName) {
+        if (imp instanceof ComponentActivator) {
+            _instanceConfigure((ComponentActivator)imp, c, containerName);
+        } else if (imp instanceof DataPacketServiceAdapter) {
+            _instanceConfigure((DataPacketServiceAdapter)imp, c, containerName);
+        } else {
+            throw new IllegalArgumentException(String.format("Unhandled implementation class %s", imp.getClass()));
+        }
+    }
+
+    private void _configure(final MDSalNodeFactory imp, final Component it) {
+        it.setInterface(INodeFactory.class.getName(), properties());
+    }
+
+    private void _configure(final MDSalNodeConnectorFactory imp, final Component it) {
+        it.setInterface(INodeConnectorFactory.class.getName(), properties());
+    }
+
+    private void _configure(final ComponentActivator imp, final Component it) {
+        it.add(createServiceDependency()
+                .setService(BindingAwareBroker.class)
+                .setCallbacks("setBroker", "setBroker")
+                .setRequired(true));
+    }
+
+    private void _configure(final DataPacketAdapter imp, final Component it) {
+        it.add(createServiceDependency()
+                .setService(IPluginOutDataPacketService.class)
+                .setCallbacks("setDataPacketPublisher", "setDataPacketPublisher")
+                .setRequired(false));
+    }
+
+    private void _configure(final FlowProgrammerAdapter imp, final Component it) {
+        it.setInterface(IPluginInFlowProgrammerService.class.getName(), properties());
+        it.add(createServiceDependency()
+                .setService(IPluginOutFlowProgrammerService.class)
+                .setCallbacks("setFlowProgrammerPublisher", "setFlowProgrammerPublisher")
+                .setRequired(false));
+        it.add(createServiceDependency()
+                .setService(IClusterGlobalServices.class)
+                .setCallbacks("setClusterGlobalServices", "unsetClusterGlobalServices")
+                .setRequired(false));
+    }
+
+    private void _instanceConfigure(final DataPacketServiceAdapter imp, final Component it, final String containerName) {
+        it.setInterface(IPluginInDataPacketService.class.getName(), properties());
+    }
+
+    private void _instanceConfigure(final ComponentActivator imp, final Component it, final String containerName) {
+        // No-op
+    }
+
+    private void _configure(final InventoryAndReadAdapter imp, final Component it) {
+        it.setInterface(new String[] {
+                IPluginInInventoryService.class.getName(),
+                IPluginInReadService.class.getName(),
+        }, properties());
+
+        it.add(createServiceDependency()
+                .setService(IPluginOutReadService.class)
+                .setCallbacks("setReadPublisher", "unsetReadPublisher")
+                .setRequired(false));
+        it.add(createServiceDependency()
+                .setService(IPluginOutInventoryService.class)
+                .setCallbacks("setInventoryPublisher", "unsetInventoryPublisher")
+                .setRequired(false));
+        it.add(createServiceDependency()
+                .setService(IDiscoveryService.class)
+                .setCallbacks("setDiscoveryPublisher", "setDiscoveryPublisher")
+                .setRequired(false));
+    }
+
+    private void _configure(final TopologyAdapter imp, final Component it) {
+        it.setInterface(IPluginInTopologyService.class.getName(), properties());
+
+        it.add(createServiceDependency()
+                .setService(IPluginOutTopologyService.class)
+                .setCallbacks("setTopologyPublisher", "setTopologyPublisher")
+                .setRequired(false));
+    }
+
+    private void _configure(final TopologyProvider imp, final Component it) {
+        it.add(createServiceDependency()
+                .setService(IPluginOutTopologyService.class)
+                .setCallbacks("setTopologyPublisher", "setTopologyPublisher")
+                .setRequired(false));
+    }
+
+    private Dictionary<String,Object> properties() {
+        final Hashtable<String,Object> props = new Hashtable<String, Object>();
+        props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString(), NodeMapping.MD_SAL_TYPE);
+        props.put("protocolName", NodeMapping.MD_SAL_TYPE);
+        return props;
+    }
+}
diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ComponentActivator.xtend b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ComponentActivator.xtend
deleted file mode 100644 (file)
index 00ce312..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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
- */
-package org.opendaylight.controller.sal.compatibility
-
-import java.util.Arrays
-import java.util.Dictionary
-import java.util.Hashtable
-import org.apache.felix.dm.Component
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext
-import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer
-import org.opendaylight.controller.sal.binding.api.NotificationService
-import org.opendaylight.controller.sal.binding.api.data.DataBrokerService
-import org.opendaylight.controller.sal.binding.api.data.DataProviderService
-import org.opendaylight.controller.sal.compatibility.topology.TopologyAdapter
-import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase
-import org.opendaylight.controller.sal.core.Node
-import org.opendaylight.controller.sal.core.NodeConnector
-import org.opendaylight.controller.sal.discovery.IDiscoveryService
-import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService
-import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService
-import org.opendaylight.controller.sal.inventory.IPluginInInventoryService
-import org.opendaylight.controller.sal.inventory.IPluginOutInventoryService
-import org.opendaylight.controller.sal.packet.IPluginOutDataPacketService
-import org.opendaylight.controller.sal.reader.IPluginInReadService
-import org.opendaylight.controller.sal.reader.IPluginOutReadService
-import org.opendaylight.controller.sal.topology.IPluginInTopologyService
-import org.opendaylight.controller.sal.topology.IPluginOutTopologyService
-import org.opendaylight.controller.sal.utils.GlobalConstants
-import org.opendaylight.controller.sal.utils.INodeConnectorFactory
-import org.opendaylight.controller.sal.utils.INodeFactory
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices
-import org.opendaylight.controller.sal.packet.IPluginInDataPacketService
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.OpendaylightFlowTableStatisticsService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.topology.discovery.rev130819.FlowTopologyDiscoveryService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService
-import org.osgi.framework.BundleContext
-
-import static org.opendaylight.controller.sal.compatibility.NodeMapping.*
-import org.opendaylight.controller.sal.compatibility.topology.TopologyProvider
-import org.opendaylight.controller.sal.compatibility.adsal.DataPacketServiceAdapter
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext
-
-class ComponentActivator extends ComponentActivatorAbstractBase {
-
-    private BundleContext context;
-
-    @Property
-    FlowProgrammerAdapter flow = new FlowProgrammerAdapter;
-
-    @Property
-    InventoryAndReadAdapter inventory = new InventoryAndReadAdapter;
-
-    @Property
-    DataPacketAdapter dataPacket = new DataPacketAdapter;
-
-    @Property
-    INodeFactory nodeFactory = new MDSalNodeFactory
-
-    @Property
-    INodeConnectorFactory nodeConnectorFactory = new MDSalNodeConnectorFactory
-    
-    @Property
-    TopologyAdapter topology = new TopologyAdapter
-    
-    @Property
-    TopologyProvider tpProvider = new TopologyProvider()
-
-    @Property
-    DataPacketServiceAdapter dataPacketService = new DataPacketServiceAdapter()
-
-
-
-    override protected init() {
-        Node.NodeIDType.registerIDType(MD_SAL_TYPE, String);
-        NodeConnector.NodeConnectorIDType.registerIDType(MD_SAL_TYPE, String, MD_SAL_TYPE);
-    }
-
-    override start(BundleContext context) {
-        super.start(context)
-        this.context = context;
-    }
-
-    def setBroker(BindingAwareBroker broker) {
-        broker.registerProvider(new SalCompatibilityProvider(this), context)
-    }
-
-
-    override protected getGlobalImplementations() {
-        return Arrays.asList(this, flow, inventory, dataPacket, nodeFactory, nodeConnectorFactory,topology,tpProvider)
-    }
-
-    override protected configureGlobalInstance(Component c, Object imp) {
-        configure(imp, c);
-    }
-
-    override protected getImplementations() {
-        return Arrays.asList(dataPacketService)
-    }
-
-    override protected configureInstance(Component c, Object imp, String containerName) {
-        instanceConfigure(imp, c, containerName);
-    }
-
-    private def dispatch configure(MDSalNodeFactory imp, Component it) {
-        setInterface(INodeFactory.name, properties);
-    }
-
-    private def dispatch configure(MDSalNodeConnectorFactory imp, Component it) {
-        setInterface(INodeConnectorFactory.name, properties);
-    }
-
-    private def dispatch configure(ComponentActivator imp, Component it) {
-        add(
-            createServiceDependency().setService(BindingAwareBroker) //
-            .setCallbacks("setBroker", "setBroker") //
-            .setRequired(true))
-
-
-    }
-
-    private def dispatch configure(DataPacketAdapter imp, Component it) {
-        add(
-            createServiceDependency() //
-            .setService(IPluginOutDataPacketService) //
-            .setCallbacks("setDataPacketPublisher", "setDataPacketPublisher") //
-            .setRequired(false))
-    }
-
-    private def dispatch configure(FlowProgrammerAdapter imp, Component it) {
-        setInterface(IPluginInFlowProgrammerService.name, properties)
-        add(
-            createServiceDependency() //
-            .setService(IPluginOutFlowProgrammerService) //
-            .setCallbacks("setFlowProgrammerPublisher", "setFlowProgrammerPublisher") //
-            .setRequired(false))
-
-        add(
-            createServiceDependency() //
-            .setService(IClusterGlobalServices) //
-            .setCallbacks("setClusterGlobalServices", "unsetClusterGlobalServices") //
-            .setRequired(false))
-
-    }
-
-    private def dispatch instanceConfigure(DataPacketServiceAdapter imp, Component it, String containerName) {
-        setInterface(IPluginInDataPacketService.name, properties)
-    }
-
-    private def dispatch instanceConfigure(ComponentActivator imp, Component it, String containerName) {
-    }
-
-
-    private def dispatch configure(InventoryAndReadAdapter imp, Component it) {
-        setInterface(Arrays.asList(IPluginInInventoryService.name, IPluginInReadService.name), properties)
-        add(
-            createServiceDependency() //
-            .setService(IPluginOutReadService) //
-            .setCallbacks("setReadPublisher", "unsetReadPublisher") //
-            .setRequired(false))
-        add(
-            createServiceDependency() //
-            .setService(IPluginOutInventoryService) //
-            .setCallbacks("setInventoryPublisher", "unsetInventoryPublisher") //
-            .setRequired(false))
-        add(
-            createServiceDependency() //
-            .setService(IDiscoveryService) //
-            .setCallbacks("setDiscoveryPublisher", "setDiscoveryPublisher") //
-            .setRequired(false))
-
-        
-    }
-    
-    private def dispatch configure (TopologyAdapter imp, Component it) {
-        setInterface(Arrays.asList(IPluginInTopologyService.name), properties)
-        add(
-            createServiceDependency() //
-            .setService(IPluginOutTopologyService) //
-            .setCallbacks("setTopologyPublisher", "setTopologyPublisher") //
-            .setRequired(false))
-    }
-    
-    private def dispatch configure (TopologyProvider imp, Component it) {
-        add(
-            createServiceDependency() //
-            .setService(IPluginOutTopologyService) //
-            .setCallbacks("setTopologyPublisher", "setTopologyPublisher") //
-            .setRequired(false))
-    }
-
-    private def Dictionary<String, Object> properties() {
-        val props = new Hashtable<String, Object>();
-        props.put(GlobalConstants.PROTOCOLPLUGINTYPE.toString, MD_SAL_TYPE)
-        props.put("protocolName", MD_SAL_TYPE);
-        return props;
-    }
-}
-package class SalCompatibilityProvider implements BindingAwareProvider {
-    
-    private val ComponentActivator activator;
-    
-    new(ComponentActivator cmpAct) {
-        activator = cmpAct;
-    }
-    
-    override getFunctionality() {
-        // Noop
-    }
-    
-    override getImplementations() {
-        // Noop
-    }
-    
-    
-    override onSessionInitialized(ConsumerContext session) {
-        // Noop
-    }
-    
-    
-    override onSessionInitiated(ProviderContext session) {
-        val it = activator
-                val subscribe = session.getSALService(NotificationService)
-
-        // Registration of Flow Service
-        flow.delegate = session.getRpcService(SalFlowService)
-        flow.dataBrokerService = session.getSALService(DataBrokerService);
-        subscribe.registerNotificationListener(flow);
-
-        // Data Packet Service
-        subscribe.registerNotificationListener(inventory);
-        dataPacketService.delegate = session.getRpcService(PacketProcessingService)
-
-        // Inventory Service
-        inventory.dataService = session.getSALService(DataBrokerService);
-        inventory.flowStatisticsService = session.getRpcService(OpendaylightFlowStatisticsService);
-        inventory.flowTableStatisticsService = session.getRpcService(OpendaylightFlowTableStatisticsService);
-        inventory.nodeConnectorStatisticsService = session.getRpcService(OpendaylightPortStatisticsService);
-        inventory.topologyDiscovery = session.getRpcService(FlowTopologyDiscoveryService);
-        inventory.dataProviderService = session.getSALService(DataProviderService)
-        topology.dataService = session.getSALService(DataProviderService)
-        tpProvider.dataService = session.getSALService(DataProviderService)
-
-        inventory.startAdapter();
-
-        tpProvider.startAdapter();
-
-        subscribe.registerNotificationListener(dataPacket)
-    }
-}
diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/DataPacketAdapter.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/DataPacketAdapter.java
new file mode 100644 (file)
index 0000000..f95f978
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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
+ */
+package org.opendaylight.controller.sal.compatibility;
+
+import org.opendaylight.controller.sal.core.ConstructionException;
+import org.opendaylight.controller.sal.packet.IPluginOutDataPacketService;
+import org.opendaylight.controller.sal.packet.RawPacket;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class DataPacketAdapter implements PacketProcessingListener {
+    private static final Logger LOG = LoggerFactory.getLogger(DataPacketAdapter.class);
+    private IPluginOutDataPacketService dataPacketPublisher;
+
+    @Override
+    public void onPacketReceived(final PacketReceived packet) {
+        try {
+            RawPacket inPacket = toRawPacket(packet);
+            dataPacketPublisher.receiveDataPacket(inPacket);
+        } catch (ConstructionException e) {
+            LOG.warn("Failed to construct raw packet from {}, dropping it", packet, e);
+        }
+    }
+
+    public static RawPacket toRawPacket(final PacketReceived received) throws ConstructionException {
+        final RawPacket ret = new RawPacket(received.getPayload());
+        ret.setIncomingNodeConnector(NodeMapping.toADNodeConnector(received.getIngress()));
+        return ret;
+    }
+}
diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/DataPacketAdapter.xtend b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/DataPacketAdapter.xtend
deleted file mode 100644 (file)
index 8581d4a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- */
-package org.opendaylight.controller.sal.compatibility
-
-import org.opendaylight.controller.sal.packet.IPluginOutDataPacketService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListener
-import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived
-import org.opendaylight.controller.sal.packet.RawPacket
-
-class DataPacketAdapter implements PacketProcessingListener {
-
-    @Property
-    IPluginOutDataPacketService dataPacketPublisher;
-
-    override onPacketReceived(PacketReceived packet) {
-        val RawPacket inPacket = packet.toRawPacket();
-        dataPacketPublisher.receiveDataPacket(inPacket);
-    }
-
-    public static def RawPacket toRawPacket(PacketReceived received) {        
-        val ret = new RawPacket(received.payload);
-        ret.setIncomingNodeConnector(NodeMapping.toADNodeConnector(received.ingress))
-        return ret;
-    }
-
-}
diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FlowProgrammerAdapter.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FlowProgrammerAdapter.java
new file mode 100644 (file)
index 0000000..e5a9d3e
--- /dev/null
@@ -0,0 +1,302 @@
+/**
+ * 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
+ */
+package org.opendaylight.controller.sal.compatibility;
+
+import java.util.EnumSet;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import org.opendaylight.controller.clustering.services.CacheConfigException;
+import org.opendaylight.controller.clustering.services.CacheExistException;
+import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
+import org.opendaylight.controller.clustering.services.IClusterServices.cacheMode;
+import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
+import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
+import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
+import org.opendaylight.controller.sal.core.ConstructionException;
+import org.opendaylight.controller.sal.core.Node;
+import org.opendaylight.controller.sal.flowprogrammer.Flow;
+import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
+import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService;
+import org.opendaylight.controller.sal.utils.Status;
+import org.opendaylight.controller.sal.utils.StatusCode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeExperimenterErrorNotification;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class FlowProgrammerAdapter implements IPluginInFlowProgrammerService, SalFlowListener {
+    private final static Logger LOG = LoggerFactory.getLogger(FlowProgrammerAdapter.class);
+
+    // Note: clustering services manipulate this
+    private final Map<Flow, UUID> flowToFlowId = new ConcurrentHashMap<Flow, UUID>();
+    private final static String CACHE_NAME = "flowprogrammeradapter.flowtoid";
+
+    // These are injected via Apache DM (see ComponentActivator)
+    private IPluginOutFlowProgrammerService flowProgrammerPublisher;
+    private IClusterGlobalServices clusterGlobalServices;
+    private DataBrokerService dataBrokerService;
+    private SalFlowService delegate;
+
+    public SalFlowService getDelegate() {
+        return this.delegate;
+    }
+
+    public void setDelegate(final SalFlowService delegate) {
+        this.delegate = delegate;
+    }
+
+    public DataBrokerService getDataBrokerService() {
+        return this.dataBrokerService;
+    }
+
+    public void setDataBrokerService(final DataBrokerService dataBrokerService) {
+        this.dataBrokerService = dataBrokerService;
+    }
+
+    public IPluginOutFlowProgrammerService getFlowProgrammerPublisher() {
+        return this.flowProgrammerPublisher;
+    }
+
+    public void setFlowProgrammerPublisher(final IPluginOutFlowProgrammerService flowProgrammerPublisher) {
+        this.flowProgrammerPublisher = flowProgrammerPublisher;
+    }
+
+    public IClusterGlobalServices getClusterGlobalServices() {
+        return this.clusterGlobalServices;
+    }
+
+    public void setClusterGlobalServices(final IClusterGlobalServices clusterGlobalServices) {
+        this.clusterGlobalServices = clusterGlobalServices;
+    }
+
+    @Override
+    public Status addFlow(final Node node, final Flow flow) {
+        return toFutureStatus(internalAddFlowAsync(node, flow, 0));
+    }
+
+    @Override
+    public Status modifyFlow(final Node node, final Flow oldFlow, final Flow newFlow) {
+        return toFutureStatus(internalModifyFlowAsync(node, oldFlow, newFlow, 0));
+    }
+
+    @Override
+    public Status removeFlow(final Node node, final Flow flow) {
+        return toFutureStatus(internalRemoveFlowAsync(node, flow, 0));
+    }
+
+    @Override
+    public Status addFlowAsync(final Node node, final Flow flow, final long rid) {
+        // FIXME is this correct? What if the future fails?
+        this.internalAddFlowAsync(node, flow, rid);
+        return FlowProgrammerAdapter.toStatus(true);
+    }
+
+    @Override
+    public Status modifyFlowAsync(final Node node, final Flow oldFlow, final Flow newFlow, final long rid) {
+        // FIXME is this correct? What if the future fails?
+        this.internalModifyFlowAsync(node, oldFlow, newFlow, rid);
+        return FlowProgrammerAdapter.toStatus(true);
+    }
+
+    @Override
+    public Status removeFlowAsync(final Node node, final Flow flow, final long rid) {
+        // FIXME is this correct? What if the future fails?
+        this.internalRemoveFlowAsync(node, flow, rid);
+        return FlowProgrammerAdapter.toStatus(true);
+    }
+
+    @Override
+    public Status removeAllFlows(final Node node) {
+        // FIXME: unfinished?
+        return new Status(StatusCode.SUCCESS);
+    }
+
+    @Override
+    public Status syncSendBarrierMessage(final Node node) {
+        // FIXME: unfinished?
+        return null;
+    }
+
+    @Override
+    public Status asyncSendBarrierMessage(final Node node) {
+        // FIXME: unfinished?
+        return null;
+    }
+
+    private static Status toStatus(final boolean successful) {
+        return new Status(successful ? StatusCode.SUCCESS : StatusCode.INTERNALERROR);
+    }
+
+    public static Status toStatus(final RpcResult<? extends Object> result) {
+        return toStatus(result.isSuccessful());
+    }
+
+    @Override
+    public void onFlowAdded(final FlowAdded notification) {
+        // FIXME: unfinished?
+    }
+
+    @Override
+    public void onFlowRemoved(final FlowRemoved notification) {
+        if (notification == null) {
+            return;
+        }
+
+        final NodeRef node = notification.getNode();
+        if (node == null) {
+            LOG.debug("Notification {} has not node, ignoring it", notification);
+            return;
+        }
+
+        Node adNode;
+        try {
+            adNode = NodeMapping.toADNode(notification.getNode());
+        } catch (ConstructionException e) {
+            LOG.warn("Failed to construct AD node for {}, ignoring notification", node, e);
+            return;
+        }
+        flowProgrammerPublisher.flowRemoved(adNode, ToSalConversionsUtils.toFlow(notification, adNode));
+    }
+
+    @Override
+    public void onFlowUpdated(final FlowUpdated notification) {
+        // FIXME: unfinished?
+    }
+
+    @Override
+    public void onSwitchFlowRemoved(final SwitchFlowRemoved notification) {
+        // FIXME: unfinished?
+    }
+
+    @Override
+    public void onNodeErrorNotification(final NodeErrorNotification notification) {
+        // FIXME: unfinished?
+    }
+
+    @Override
+    public void onNodeExperimenterErrorNotification(final NodeExperimenterErrorNotification notification) {
+        // FIXME: unfinished?
+    }
+
+    private static final InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> flowPath(
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow, final NodeKey nodeKey) {
+        return InstanceIdentifier.builder(Nodes.class)
+                .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class, nodeKey)
+                .augmentation(FlowCapableNode.class)
+                .child(Table.class, new TableKey(flow.getTableId()))
+                .child(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow.class, new FlowKey(flow.getId()))
+                .toInstance();
+    }
+
+    private Future<RpcResult<TransactionStatus>> writeFlowAsync(final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow, final NodeKey nodeKey) {
+        final DataModificationTransaction modification = this.dataBrokerService.beginTransaction();
+        modification.putConfigurationData(flowPath(flow, nodeKey), flow);
+        return modification.commit();
+    }
+
+    private Future<RpcResult<TransactionStatus>> internalAddFlowAsync(final Node node, final Flow flow, final long rid) {
+        final Map<Flow,UUID> cache = this.getCache();
+        UUID flowId = cache.get(flow);
+        if (flowId != null) {
+            this.removeFlow(node, flow);
+        }
+
+        flowId = UUID.randomUUID();
+        cache.put(flow, flowId);
+        return this.writeFlowAsync(MDFlowMapping.toMDFlow(flow, flowId.toString()), new NodeKey(new NodeId(node.getNodeIDString())));
+    }
+
+    private Future<RpcResult<TransactionStatus>> internalModifyFlowAsync(final Node node, final Flow oldFlow, final Flow newFlow, final long rid) {
+        final Map<Flow,UUID> cache = this.getCache();
+
+        UUID flowId = cache.remove(oldFlow);
+        if (flowId == null) {
+            flowId = UUID.randomUUID();
+            cache.put(oldFlow, flowId);
+            LOG.warn("Could not find flow {} in cache, assigned new ID {}", oldFlow.hashCode(), flowId);
+        }
+
+        cache.put(newFlow, flowId);
+        return this.writeFlowAsync(MDFlowMapping.toMDFlow(newFlow, flowId.toString()), new NodeKey(new NodeId(node.getNodeIDString())));
+    }
+
+    private Future<RpcResult<TransactionStatus>> internalRemoveFlowAsync(final Node node, final Flow adflow, final long rid) {
+        final Map<Flow,UUID> cache = this.getCache();
+
+        final UUID flowId = cache.remove(adflow);
+        if (flowId == null) {
+            LOG.warn("Could not find flow {} in cache, nothing to do", adflow.hashCode());
+            return null;
+        }
+
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow = MDFlowMapping.toMDFlow(adflow, flowId.toString());
+        final DataModificationTransaction modification = this.dataBrokerService.beginTransaction();
+        modification.removeConfigurationData(flowPath(flow, new NodeKey(new NodeId(node.getNodeIDString()))));
+        return modification.commit();
+    }
+
+    private static Status toFutureStatus(final Future<RpcResult<TransactionStatus>> future) {
+        if (future == null) {
+            // FIXME: really?
+            return FlowProgrammerAdapter.toStatus(true);
+        }
+
+        try {
+            final RpcResult<TransactionStatus> result = future.get();
+            return FlowProgrammerAdapter.toStatus(result);
+        } catch (final InterruptedException e) {
+            FlowProgrammerAdapter.LOG.error("Interrupted while processing flow", e);
+        } catch (ExecutionException e) {
+            FlowProgrammerAdapter.LOG.error("Failed to process flow", e);
+        }
+
+        return new Status(StatusCode.INTERNALERROR);
+    }
+
+    @SuppressWarnings("unchecked")
+    private Map<Flow,UUID> getCache() {
+        final IClusterGlobalServices cgs = getClusterGlobalServices();
+        if (cgs == null) {
+            return new ConcurrentHashMap<Flow, UUID>();
+        }
+
+        Map<Flow, UUID> cache = (Map<Flow, UUID>) cgs.getCache(FlowProgrammerAdapter.CACHE_NAME);
+        if (cache != null) {
+            return cache;
+        }
+
+        try {
+            return (Map<Flow, UUID>) cgs.createCache(CACHE_NAME, EnumSet.of(cacheMode.TRANSACTIONAL));
+        } catch (CacheExistException e) {
+            return (Map<Flow, UUID>) cgs.getCache(CACHE_NAME);
+        } catch (CacheConfigException e) {
+            throw new IllegalStateException("Unexpected cache configuration problem", e);
+        }
+    }
+
+}
diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FlowProgrammerAdapter.xtend b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FlowProgrammerAdapter.xtend
deleted file mode 100644 (file)
index 8a0874e..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * 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
- */
-package org.opendaylight.controller.sal.compatibility
-
-import java.util.Map
-import java.util.UUID
-import java.util.concurrent.ExecutionException
-import java.util.concurrent.ConcurrentHashMap
-import java.util.concurrent.Future
-import java.util.EnumSet
-import org.opendaylight.controller.sal.core.Node
-import org.opendaylight.controller.sal.flowprogrammer.Flow
-import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService
-import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService
-import org.opendaylight.controller.sal.utils.Status
-import org.opendaylight.controller.sal.utils.StatusCode
-import org.opendaylight.controller.clustering.services.CacheExistException
-import org.opendaylight.controller.clustering.services.IClusterGlobalServices
-import org.opendaylight.controller.clustering.services.IClusterServices
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeExperimenterErrorNotification
-import org.opendaylight.yangtools.yang.common.RpcResult
-import org.slf4j.LoggerFactory
-
-import org.opendaylight.controller.sal.binding.api.data.DataBrokerService
-import org.opendaylight.controller.md.sal.common.api.TransactionStatus
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId
-
-
-import static extension org.opendaylight.controller.sal.compatibility.MDFlowMapping.*
-
-import static extension org.opendaylight.controller.sal.compatibility.NodeMapping.*
-import static extension org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils.*
-
-class FlowProgrammerAdapter implements IPluginInFlowProgrammerService, SalFlowListener {
-
-    private static val LOG = LoggerFactory.getLogger(FlowProgrammerAdapter);
-    private static val CACHE_NAME = "flowprogrammeradapter.flowtoid";
-
-    @Property
-    private SalFlowService delegate;
-
-    @Property
-    private DataBrokerService dataBrokerService;
-    
-    @Property
-    private IPluginOutFlowProgrammerService flowProgrammerPublisher;
-
-    @Property
-    private IClusterGlobalServices clusterGlobalServices;
-
-
-    @Property
-    private Map<Flow, UUID> flowToFlowId = new ConcurrentHashMap<Flow, UUID>();
-
-
-    override addFlow(Node node, Flow flow) {
-        return toFutureStatus(internalAddFlowAsync(node,flow,0));
-&n