Merge "Strong password check to consider underscore as a special character"
authorGiovanni Meo <gmeo@cisco.com>
Wed, 25 Sep 2013 10:03:18 +0000 (10:03 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 25 Sep 2013 10:03:18 +0000 (10:03 +0000)
158 files changed:
opendaylight/archetypes/odl-model-project/src/main/resources/archetype-resources/pom.xml
opendaylight/clustering/services_implementation/pom.xml
opendaylight/clustering/services_implementation/src/main/java/org/infinispan/interceptors/distribution/BaseDistributionInterceptor.java [new file with mode: 0644]
opendaylight/commons/opendaylight/pom.xml
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/internal/ConnectionManager.java
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AnyControllerScheme.java
opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/SingleControllerScheme.java
opendaylight/distribution/opendaylight/pom.xml
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/FlowEntryDistributionOrderFutureTask.java
opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java
opendaylight/md-sal/model/model-flow-base/pom.xml [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-base/pom.xml with 100% similarity]
opendaylight/md-sal/model/model-flow-base/src/main/yang/flow-types.yang [new file with mode: 0644]
opendaylight/md-sal/model/model-flow-base/src/main/yang/group-types.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/group-types.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-base/src/main/yang/match-types.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/match-types.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-base/src/main/yang/meter-types.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/meter-types.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-service/pom.xml [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-service/pom.xml with 100% similarity]
opendaylight/md-sal/model/model-flow-service/src/main/yang/flow-service.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/flow-service.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-service/src/main/yang/group-service.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/group-service.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-service/src/main/yang/meter-service.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/meter-service.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-service/src/main/yang/packet-processing.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-service/src/main/yang/packet-processing.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-statistics/pom.xml [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/pom.xml with 100% similarity]
opendaylight/md-sal/model/model-flow-statistics/src/main/yang/flow-statistics.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/flow-statistics.yang with 100% similarity]
opendaylight/md-sal/model/model-flow-statistics/src/main/yang/statistics-types.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-flow-statistics/src/main/yang/statistics-types.yang with 100% similarity]
opendaylight/md-sal/model/model-inventory/pom.xml [moved from opendaylight/sal/yang-prototype/sal/model/model-inventory/pom.xml with 100% similarity]
opendaylight/md-sal/model/model-inventory/src/main/yang/inventory.yang [moved from opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/inventory.yang with 100% similarity]
opendaylight/md-sal/model/pom.xml [moved from opendaylight/sal/yang-prototype/sal/model/pom.xml with 100% similarity]
opendaylight/md-sal/model/src/main/yang/.gitignore [moved from opendaylight/sal/yang-prototype/sal/model/src/main/yang/.gitignore with 100% similarity]
opendaylight/md-sal/pom.xml [moved from opendaylight/sal/yang-prototype/sal/pom.xml with 85% similarity]
opendaylight/md-sal/sal-binding-api/.gitignore [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/.gitignore with 100% similarity]
opendaylight/md-sal/sal-binding-api/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/pom.xml with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareConsumer.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareConsumer.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareProvider.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareProvider.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareConsumer.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareProvider.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareProvider.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareService.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareService.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataCommitHandler.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataCommitHandler.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataProviderService.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataProviderService.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataRefresher.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataRefresher.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataValidator.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataValidator.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/RuntimeDataProvider.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/RuntimeDataProvider.java with 100% similarity]
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/package-info.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/pom.xml with 98% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/.gitignore [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/.gitignore with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeHelper.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeHelper.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/RuntimeCodeSpecification.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/YangtoolsMappingHelper.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/YangtoolsMappingHelper.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/JavassistUtils.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/JavassistUtils.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RoutingPair.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RoutingPair.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/BindingAwareBrokerImpl.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/BindingAwareBrokerImpl.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/BrokerActivator.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/BrokerActivator.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/DataProviderContext.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/DataProviderContext.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationBrokerImpl.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationServiceImpl.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/NotificationServiceImpl.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiConsumerContext.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiConsumerContext.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiProviderContext.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiProviderContext.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcProxyContext.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcProxyContext.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcServiceRegistrationImpl.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcServiceRegistrationImpl.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/_DataBrokerImpl.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/_DataBrokerImpl.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/osgi/Constants.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/osgi/Constants.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/osgi/PropertiesUtils.xtend [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/osgi/PropertiesUtils.xtend with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/osgi/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/osgi/package-info.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/java/org/opendaylight/controller/sal/binding/impl/package-info.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/main/test/org/opendaylight/controller/sal/binding/test/GenerationTest.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/main/test/org/opendaylight/controller/sal/binding/test/GenerationTest.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/RuntimeCodeGeneratorTest.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/RuntimeCodeGeneratorTest.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/BarUpdate.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/BarUpdate.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/FooListener.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/FooListener.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/FooService.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/FooService.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/FooUpdate.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/FooUpdate.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/Grouping.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/Grouping.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/InheritedContextInput.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/InheritedContextInput.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/ReferencableObject.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/ReferencableObject.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/ReferencableObjectKey.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/ReferencableObjectKey.java with 100% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/mock/SimpleInput.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/src/test/java/org/opendaylight/controller/sal/binding/test/mock/SimpleInput.java with 100% similarity]
opendaylight/md-sal/sal-binding-spi/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-binding-spi/pom.xml with 100% similarity]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/DataDomToJavaTransformer.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/DataDomToJavaTransformer.java with 100% similarity]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/JavaToDataDomTransformer.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/JavaToDataDomTransformer.java with 100% similarity]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/Mapper.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/Mapper.java with 100% similarity]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/MappingProvider.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/MappingProvider.java with 100% similarity]
opendaylight/md-sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/RpcMapper.java [moved from opendaylight/sal/yang-prototype/sal/sal-binding-spi/src/main/java/org/opendaylight/controller/sal/binding/spi/RpcMapper.java with 100% similarity]
opendaylight/md-sal/sal-common-util/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-common-util/pom.xml with 100% similarity]
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Futures.java [moved from opendaylight/sal/yang-prototype/sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Futures.java with 100% similarity]
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/RpcErrors.java [moved from opendaylight/sal/yang-prototype/sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/RpcErrors.java with 100% similarity]
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java [moved from opendaylight/sal/yang-prototype/sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java with 100% similarity]
opendaylight/md-sal/sal-common/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-common/pom.xml with 100% similarity]
opendaylight/md-sal/sal-common/src/main/java/org/opendaylight/controller/sal/common/DataStoreIdentifier.java [moved from opendaylight/sal/yang-prototype/sal/sal-common/src/main/java/org/opendaylight/controller/sal/common/DataStoreIdentifier.java with 100% similarity]
opendaylight/md-sal/sal-common/src/main/java/org/opendaylight/controller/sal/common/GlobalDataStore.java [moved from opendaylight/sal/yang-prototype/sal/sal-common/src/main/java/org/opendaylight/controller/sal/common/GlobalDataStore.java with 100% similarity]
opendaylight/md-sal/sal-common/src/main/java/org/opendaylight/controller/sal/common/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-common/src/main/java/org/opendaylight/controller/sal/common/package-info.java with 100% similarity]
opendaylight/md-sal/sal-compability/pom.xml
opendaylight/md-sal/sal-compability/src/main/java/org/opendaylight/controller/sal/compability/FromSalConversionsUtils.java
opendaylight/md-sal/sal-compability/src/main/java/org/opendaylight/controller/sal/compability/ToSalConversionsUtils.java
opendaylight/md-sal/sal-data-api/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-data-api/pom.xml with 100% similarity]
opendaylight/md-sal/sal-dom-api/.gitignore [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/.gitignore with 100% similarity]
opendaylight/md-sal/sal-dom-api/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/pom.xml with 88% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractConsumer.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractProvider.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java with 97% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/BrokerService.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/BrokerService.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Consumer.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/Consumer.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Provider.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/Provider.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcImplementation.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcImplementation.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataBrokerService.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataBrokerService.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataCommitHandler.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataCommitHandler.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataProviderService.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataProviderService.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataValidator.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataValidator.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/data/package-info.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/model/SchemaService.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/model/SchemaService.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationListener.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationListener.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationProviderService.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationProviderService.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationService.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/NotificationService.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/notify/package-info.java with 100% similarity]
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/package-info.java with 100% similarity]
opendaylight/md-sal/sal-dom-broker/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-broker-impl/pom.xml with 59% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java [new file with mode: 0644]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.java [moved from opendaylight/sal/yang-prototype/sal/sal-broker-impl/src/main/java/org/opendaylight/controller/sal/core/impl/BrokerImpl.java with 89% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/DataBrokerModule.java [moved from opendaylight/sal/yang-prototype/sal/sal-broker-impl/src/main/java/org/opendaylight/controller/sal/core/impl/DataBrokerModule.java with 99% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/NotificationModule.java [moved from opendaylight/sal/yang-prototype/sal/sal-broker-impl/src/main/java/org/opendaylight/controller/sal/core/impl/NotificationModule.java with 99% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-broker-impl/src/main/java/org/opendaylight/controller/sal/core/impl/package-info.java with 84% similarity]
opendaylight/md-sal/sal-dom-demo/pom.xml [new file with mode: 0644]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoConsumerImpl.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoConsumerImpl.java with 100% similarity]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoProviderImpl.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoProviderImpl.java with 100% similarity]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoUtils.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-demo/src/main/java/org/opendaylight/controller/sal/demo/DemoUtils.java with 100% similarity]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/SALDemo.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-demo/src/main/java/org/opendaylight/controller/sal/demo/SALDemo.java with 100% similarity]
opendaylight/md-sal/sal-dom-demo/src/main/java/org/opendaylight/controller/sal/demo/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-demo/src/main/java/org/opendaylight/controller/sal/demo/package-info.java with 100% similarity]
opendaylight/md-sal/sal-dom-spi/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-core-spi/pom.xml with 100% similarity]
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/BrokerModule.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-spi/src/main/java/org/opendaylight/controller/sal/core/spi/BrokerModule.java with 100% similarity]
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-core-spi/src/main/java/org/opendaylight/controller/sal/core/spi/package-info.java with 100% similarity]
opendaylight/md-sal/sal-schema-repository-api/.gitignore [moved from opendaylight/sal/yang-prototype/sal/sal-schema-repository-api/.gitignore with 100% similarity]
opendaylight/md-sal/sal-schema-repository-api/pom.xml [moved from opendaylight/sal/yang-prototype/sal/sal-schema-repository-api/pom.xml with 100% similarity]
opendaylight/md-sal/sal-schema-repository-api/src/main/java/org/opendaylight/controller/sal/schema/api/package-info.java [moved from opendaylight/sal/yang-prototype/sal/sal-schema-repository-api/src/main/java/org/opendaylight/controller/sal/schema/api/package-info.java with 100% similarity]
opendaylight/md-sal/samples/pom.xml [moved from opendaylight/sal/yang-prototype/sal/samples/pom.xml with 100% similarity]
opendaylight/md-sal/samples/toaster-consumer/pom.xml [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-consumer/pom.xml with 100% similarity]
opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/toaster/provider/api/ToastConsumer.java [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/toaster/provider/api/ToastConsumer.java with 100% similarity]
opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/toaster/provider/impl/ToastConsumerImpl.java [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/toaster/provider/impl/ToastConsumerImpl.java with 100% similarity]
opendaylight/md-sal/samples/toaster-it/pom.xml [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-it/pom.xml with 100% similarity]
opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java with 100% similarity]
opendaylight/md-sal/samples/toaster-provider/pom.xml [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-provider/pom.xml with 100% similarity]
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java with 100% similarity]
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterActivator.java [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterActivator.java with 100% similarity]
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProvider.java [moved from opendaylight/sal/yang-prototype/sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProvider.java with 100% similarity]
opendaylight/md-sal/samples/toaster/pom.xml [moved from opendaylight/sal/yang-prototype/sal/samples/toaster/pom.xml with 100% similarity]
opendaylight/md-sal/samples/toaster/src/main/yang/toaster.yang [moved from opendaylight/sal/yang-prototype/sal/samples/toaster/src/main/yang/toaster.yang with 100% similarity]
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryServiceShim.java
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/OFStatisticsManager.java
opendaylight/sal/connection/implementation/src/main/java/org/opendaylight/controller/sal/connection/implementation/internal/ConnectionService.java
opendaylight/sal/yang-prototype/pom.xml [deleted file]
opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/flow-types.yang [deleted file]
opendaylight/sal/yang-prototype/sal/sal-core-demo/pom.xml [deleted file]
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java
opendaylight/topologymanager/implementation/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java
opendaylight/web/devices/src/main/resources/js/page.js
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java

index ecc08d011db9db0063711104dfb205d3ddca0e02..b60dee7c417c1cdbd766f8b9d1a96febb88c6562 100644 (file)
       <id>jboss.releases</id>\r
       <name>jboss.releases</name>\r
       <url>${nexusproxy}/repositories/jboss.releases/</url>\r
+      <snapshots>\r
+        <enabled>false</enabled>\r
+      </snapshots>\r
+      <releases>\r
+        <enabled>true</enabled>\r
+      </releases>\r
     </repository>\r
     <!-- OpenDayLight Released artifact -->\r
     <repository>\r
index d6bd287434a499c19b1aa1576b0aa11ee303344d..fddaa6c9dc7e657f51576f5f1ed209a0409fe47a 100644 (file)
         </execution>
       </executions>
     </plugin>
+    <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>${enforcer.version}</version>
+        <executions>
+          <execution>
+            <id>enforce-banned-dependencies</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <bannedDependencies>
+                  <excludes>
+                    <exclude>org.infinispan:infinispan-core:*</exclude>
+                  </excludes>
+                  <includes>
+                    <include>org.infinispan:infinispan-core:[5.3.0.Final]</include>
+                  </includes>
+                </bannedDependencies>
+              </rules>
+              <fail>true</fail>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
   </plugins>
   </build>
   <dependencies>
diff --git a/opendaylight/clustering/services_implementation/src/main/java/org/infinispan/interceptors/distribution/BaseDistributionInterceptor.java b/opendaylight/clustering/services_implementation/src/main/java/org/infinispan/interceptors/distribution/BaseDistributionInterceptor.java
new file mode 100644 (file)
index 0000000..e105637
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009 Red Hat Inc. and/or its affiliates and other
+ * contributors as indicated by the @author tags. All rights reserved.
+ * See the copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.infinispan.interceptors.distribution;
+
+import org.infinispan.CacheException;
+import org.infinispan.commands.FlagAffectedCommand;
+import org.infinispan.commands.remote.ClusteredGetCommand;
+import org.infinispan.commands.write.DataWriteCommand;
+import org.infinispan.commands.write.WriteCommand;
+import org.infinispan.container.entries.InternalCacheEntry;
+import org.infinispan.container.entries.InternalCacheValue;
+import org.infinispan.context.InvocationContext;
+import org.infinispan.context.impl.TxInvocationContext;
+import org.infinispan.distribution.DistributionManager;
+import org.infinispan.factories.annotations.Inject;
+import org.infinispan.interceptors.ClusteringInterceptor;
+import org.infinispan.interceptors.locking.ClusteringDependentLogic;
+import org.infinispan.remoting.responses.ClusteredGetResponseValidityFilter;
+import org.infinispan.remoting.responses.ExceptionResponse;
+import org.infinispan.remoting.responses.Response;
+import org.infinispan.remoting.responses.SuccessfulResponse;
+import org.infinispan.remoting.rpc.ResponseFilter;
+import org.infinispan.remoting.rpc.ResponseMode;
+import org.infinispan.remoting.rpc.RpcOptions;
+import org.infinispan.remoting.transport.Address;
+import org.infinispan.transaction.xa.GlobalTransaction;
+import org.infinispan.util.logging.Log;
+import org.infinispan.util.logging.LogFactory;
+
+import java.util.*;
+
+/**
+ * Base class for distribution of entries across a cluster.
+ *
+ * @author Manik Surtani
+ * @author Mircea.Markus@jboss.com
+ * @author Pete Muir
+ * @author Dan Berindei <dan@infinispan.org>
+ * @since 4.0
+ */
+public abstract class BaseDistributionInterceptor extends ClusteringInterceptor {
+
+   protected DistributionManager dm;
+
+   protected ClusteringDependentLogic cdl;
+
+   private static final Log log = LogFactory.getLog(BaseDistributionInterceptor.class);
+
+   @Override
+   protected Log getLog() {
+      return log;
+   }
+
+   @Inject
+   public void injectDependencies(DistributionManager distributionManager, ClusteringDependentLogic cdl) {
+      this.dm = distributionManager;
+      this.cdl = cdl;
+   }
+
+   @Override
+   protected final InternalCacheEntry retrieveFromRemoteSource(Object key, InvocationContext ctx, boolean acquireRemoteLock, FlagAffectedCommand command) throws Exception {
+      GlobalTransaction gtx = acquireRemoteLock ? ((TxInvocationContext)ctx).getGlobalTransaction() : null;
+      ClusteredGetCommand get = cf.buildClusteredGetCommand(key, command.getFlags(), acquireRemoteLock, gtx);
+
+      List<Address> targets = new ArrayList<Address>(stateTransferManager.getCacheTopology().getReadConsistentHash().locateOwners(key));
+      // if any of the recipients has left the cluster since the command was issued, just don't wait for its response
+      targets.retainAll(rpcManager.getTransport().getMembers());
+      ResponseFilter filter = new ClusteredGetResponseValidityFilter(targets, rpcManager.getAddress());
+      RpcOptions options = rpcManager.getRpcOptionsBuilder(ResponseMode.WAIT_FOR_VALID_RESPONSE, false)
+            .responseFilter(filter).build();
+      Map<Address, Response> responses = rpcManager.invokeRemotely(targets, get, options);
+
+      if (!responses.isEmpty()) {
+         for (Response r : responses.values()) {
+            if (r instanceof SuccessfulResponse) {
+               InternalCacheValue cacheValue = (InternalCacheValue) ((SuccessfulResponse) r).getResponseValue();
+               return cacheValue.toInternalCacheEntry(key);
+            }
+         }
+      }
+
+      // TODO If everyone returned null, and the read CH has changed, retry the remote get.
+      // Otherwise our get command might be processed by the old owners after they have invalidated their data
+      // and we'd return a null even though the key exists on
+      return null;
+   }
+
+   protected final Object handleNonTxWriteCommand(InvocationContext ctx, DataWriteCommand command) throws Throwable {
+      if (ctx.isInTxScope()) {
+         throw new CacheException("Attempted execution of non-transactional write command in a transactional invocation context");
+      }
+
+      RecipientGenerator recipientGenerator = new SingleKeyRecipientGenerator(command.getKey());
+
+      // see if we need to load values from remote sources first
+      remoteGetBeforeWrite(ctx, command, recipientGenerator);
+
+      // if this is local mode then skip distributing
+      if (isLocalModeForced(command)) {
+         return invokeNextInterceptor(ctx, command);
+      }
+
+      boolean isSync = isSynchronous(command);
+      if (!ctx.isOriginLocal()) {
+         Object returnValue = invokeNextInterceptor(ctx, command);
+         Address primaryOwner = cdl.getPrimaryOwner(command.getKey());
+            if (primaryOwner.equals(rpcManager.getAddress())) {
+                if (command.isConditional() && !command.isSuccessful()) {
+                    log.tracef(
+                            "Skipping the replication of the conditional command as it did not succeed on primary owner (%s).",
+                            command);
+                    return returnValue;
+                }
+                rpcManager.invokeRemotely(recipientGenerator.generateRecipients(), command,
+                        rpcManager.getDefaultRpcOptions(isSync));
+            } else {
+                log.errorf("Didn't invoke RPC because primaryOwner (%s) didn't match this node (%s)", primaryOwner,
+                           rpcManager.getAddress());
+                log.errorf("Hashcode is (%s) for Key (%s) .. it could be inconsistent in the cluster!",
+                           command.getKey().hashCode(), command.getKey());
+            }
+         return returnValue;
+      } else {
+         Address primaryOwner = cdl.getPrimaryOwner(command.getKey());
+         if (primaryOwner.equals(rpcManager.getAddress())) {
+            Object result = invokeNextInterceptor(ctx, command);
+            if (command.isConditional() && !command.isSuccessful()) {
+               log.tracef("Skipping the replication of the conditional command as it did not succeed on primary owner (%s).", command);
+               return result;
+            }
+            List<Address> recipients = recipientGenerator.generateRecipients();
+            log.tracef("I'm the primary owner, sending the command to all (%s) the recipients in order to be applied.", recipients);
+            // check if a single owner has been configured and the target for the key is the local address
+            boolean isSingleOwnerAndLocal = cacheConfiguration.clustering().hash().numOwners() == 1
+                  && recipients != null
+                  && recipients.size() == 1
+                  && recipients.get(0).equals(rpcManager.getTransport().getAddress());
+            if (!isSingleOwnerAndLocal) {
+               rpcManager.invokeRemotely(recipients, command, rpcManager.getDefaultRpcOptions(isSync));
+            }
+            return result;
+         } else {
+            log.tracef("I'm not the primary owner, so sending the command to the primary owner(%s) in order to be forwarded", primaryOwner);
+            log.tracef("Hashcode is (%s) for Key (%s)", command.getKey().hashCode(), command.getKey());
+
+            Object localResult = invokeNextInterceptor(ctx, command);
+            boolean isSyncForwarding = isSync || isNeedReliableReturnValues(command);
+            Map<Address, Response> addressResponseMap = rpcManager.invokeRemotely(Collections.singletonList(primaryOwner), command,
+                  rpcManager.getDefaultRpcOptions(isSyncForwarding));
+            if (!isSyncForwarding) return localResult;
+
+            return getResponseFromPrimaryOwner(primaryOwner, addressResponseMap);
+         }
+      }
+   }
+
+   private Object getResponseFromPrimaryOwner(Address primaryOwner, Map<Address, Response> addressResponseMap) {
+      Response fromPrimaryOwner = addressResponseMap.get(primaryOwner);
+      if (fromPrimaryOwner == null) {
+         log.tracef("Primary owner %s returned null", primaryOwner);
+         return null;
+      }
+      if (!fromPrimaryOwner.isSuccessful()) {
+         Throwable cause = fromPrimaryOwner instanceof ExceptionResponse ? ((ExceptionResponse)fromPrimaryOwner).getException() : null;
+         throw new CacheException("Got unsuccessful response from primary owner: " + fromPrimaryOwner, cause);
+      } else {
+         return ((SuccessfulResponse) fromPrimaryOwner).getResponseValue();
+      }
+   }
+
+   protected abstract void remoteGetBeforeWrite(InvocationContext ctx, WriteCommand command, RecipientGenerator keygen) throws Throwable;
+
+   interface RecipientGenerator {
+
+      Collection<Object> getKeys();
+
+      List<Address> generateRecipients();
+   }
+
+   class SingleKeyRecipientGenerator implements RecipientGenerator {
+      private final Object key;
+      private final Set<Object> keys;
+      private List<Address> recipients = null;
+
+      SingleKeyRecipientGenerator(Object key) {
+         this.key = key;
+         keys = Collections.singleton(key);
+      }
+
+      @Override
+      public List<Address> generateRecipients() {
+         if (recipients == null) {
+            recipients = cdl.getOwners(key);
+         }
+         return recipients;
+      }
+
+      @Override
+      public Collection<Object> getKeys() {
+         return keys;
+      }
+   }
+
+   class MultipleKeysRecipientGenerator implements RecipientGenerator {
+
+      private final Collection<Object> keys;
+      private List<Address> recipients = null;
+
+      MultipleKeysRecipientGenerator(Collection<Object> keys) {
+         this.keys = keys;
+      }
+
+      @Override
+      public List<Address> generateRecipients() {
+         if (recipients == null) {
+            recipients = cdl.getOwners(keys);
+         }
+         return recipients;
+      }
+
+      @Override
+      public Collection<Object> getKeys() {
+         return keys;
+      }
+   }
+}
index 3ae9c6ee6ca7d2ae70c43c3fce5e227b2bfb0725..042bc54928a8def322a80c866d61682faed5656b 100644 (file)
@@ -28,6 +28,7 @@
     <siteplugin>3.2</siteplugin>
     <projectinfo>2.6</projectinfo>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <compiler.version>2.3.2</compiler.version>
     <surefire.version>2.15</surefire.version>
     <failsafe.version>2.15</failsafe.version>
@@ -56,6 +57,7 @@
     <releaseplugin.version>2.3.2</releaseplugin.version>
     <commons.lang.version>3.1</commons.lang.version>
     <jacoco.version>0.5.3.201107060350</jacoco.version>
+    <enforcer.version>1.3.1</enforcer.version>
   </properties>
 
   <pluginRepositories>
       <id>jboss.releases</id>
       <name>jboss.releases</name>
       <url>${nexusproxy}/repositories/jboss.releases/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
     </repository>
     <!-- OpenDayLight Released artifact -->
     <repository>
index df5175083b1870ef99b29443d42003eb2bb179c5..2d5f80fb79f99365544680e77df45cb779f897d9 100644 (file)
@@ -30,8 +30,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.LinkedBlockingQueue;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
 import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
@@ -55,6 +53,8 @@ import org.opendaylight.controller.sal.utils.Status;
 import org.opendaylight.controller.sal.utils.StatusCode;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.FrameworkUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ConnectionManager implements IConnectionManager, IConnectionListener,
                                           ICoordinatorChangeAware, IListenInventoryUpdates,
@@ -123,8 +123,19 @@ public class ConnectionManager implements IConnectionManager, IConnectionListene
         }
     }
 
-    public void started() {
-        connectionEventThread = new Thread(new EventHandler(), "ConnectionEvent Thread");
+
+   public void started() {
+       String schemeStr = System.getProperty("connection.scheme");
+       for (ConnectionMgmtScheme scheme : ConnectionMgmtScheme.values()) {
+           AbstractScheme schemeImpl = SchemeFactory.getScheme(scheme, clusterServices);
+           if (schemeImpl != null) {
+               schemes.put(scheme, schemeImpl);
+               if (scheme.name().equalsIgnoreCase(schemeStr)) {
+                   activeScheme = scheme;
+               }
+           }
+       }
+
         connectionEventThread.start();
 
         registerWithOSGIConsole();
@@ -134,21 +145,12 @@ public class ConnectionManager implements IConnectionManager, IConnectionListene
     }
 
     public void init() {
-        String schemeStr = System.getProperty("connection.scheme");
+        connectionEventThread = new Thread(new EventHandler(), "ConnectionEvent Thread");
         this.connectionEvents = new LinkedBlockingQueue<ConnectionMgmtEvent>();
         schemes = new ConcurrentHashMap<ConnectionMgmtScheme, AbstractScheme>();
-        for (ConnectionMgmtScheme scheme : ConnectionMgmtScheme.values()) {
-            AbstractScheme schemeImpl = SchemeFactory.getScheme(scheme, clusterServices);
-            if (schemeImpl != null) {
-                schemes.put(scheme, schemeImpl);
-                if (scheme.name().equalsIgnoreCase(schemeStr)) {
-                    activeScheme = scheme;
-                }
-            }
-        }
     }
 
-    public void stop() {
+    public void stopping() {
         connectionEventThread.interrupt();
         Set<Node> localNodes = getLocalNodes();
         if (localNodes != null) {
index 78f274c717585993d13a3deeb86812a32ad4ad5a..062fd1ee777564aa1a90863e3826ef7648e12454 100644 (file)
@@ -35,15 +35,18 @@ public abstract class AbstractScheme {
      */
     protected ConcurrentMap <Node, Set<InetAddress>> nodeConnections;
     protected abstract boolean isConnectionAllowedInternal(Node node);
-    private String name;
+    private final String name;
+    private final String nodeConnectionsCacheName;
 
     protected AbstractScheme(IClusterGlobalServices clusterServices, ConnectionMgmtScheme type) {
         this.clusterServices = clusterServices;
-        if (type != null) name = type.name();
-        else name = "UNKNOWN";
+        name = (type != null ? type.name() : "UNKNOWN");
+        nodeConnectionsCacheName = "connectionmanager."+name+".nodeconnections";
         if (clusterServices != null) {
             allocateCaches();
             retrieveCaches();
+        } else {
+            log.error("Couldn't retrieve caches for scheme %s. Clustering service unavailable", name);
         }
     }
 
@@ -72,7 +75,6 @@ public abstract class AbstractScheme {
         return isConnectionAllowedInternal(node);
     }
 
-    @SuppressWarnings("deprecation")
     public void handleClusterViewChanged() {
         log.debug("Handling Cluster View changed notification");
         List<InetAddress> controllers = clusterServices.getClusteredControllers();
@@ -122,7 +124,6 @@ public abstract class AbstractScheme {
     }
 
     public Set<Node> getNodes(InetAddress controller) {
-        if (nodeConnections == null) return null;
         ConcurrentMap <InetAddress, Set<Node>> controllerNodesMap = getControllerToNodesMap();
         return controllerNodesMap.get(controller);
     }
@@ -162,7 +163,7 @@ public abstract class AbstractScheme {
 
     protected Status removeNodeFromController (Node node, InetAddress controller) {
         if (node == null || controller == null) {
-            return new Status(StatusCode.BADREQUEST);
+            return new Status(StatusCode.BADREQUEST, "Invalid Node or Controller Address Specified.");
         }
 
         if (clusterServices == null || nodeConnections == null) {
@@ -189,7 +190,7 @@ public abstract class AbstractScheme {
                     }
                     clusterServices.tcommit();
                 } catch (Exception e) {
-                    log.error("Excepion in removing Controller from a Node", e);
+                    log.error("Exception in removing Controller from a Node", e);
                     try {
                         clusterServices.trollback();
                     } catch (Exception e1) {
@@ -210,7 +211,7 @@ public abstract class AbstractScheme {
      */
     private Status putNodeToController (Node node, InetAddress controller) {
         if (clusterServices == null || nodeConnections == null) {
-            return new Status(StatusCode.SUCCESS);
+            return new Status(StatusCode.INTERNALERROR, "Cluster service unavailable, or node connections info missing.");
         }
         log.debug("Trying to Put {} to {}", controller.getHostAddress(), node.toString());
 
@@ -277,7 +278,9 @@ public abstract class AbstractScheme {
         if (node == null || controller == null) {
             return new Status(StatusCode.BADREQUEST);
         }
-        if (isLocal(node)) return new Status(StatusCode.SUCCESS);
+        if (isLocal(node))  {
+            return new Status(StatusCode.SUCCESS);
+        }
         if (isConnectionAllowed(node)) {
             return putNodeToController(node, controller);
         } else {
@@ -285,36 +288,34 @@ public abstract class AbstractScheme {
         }
     }
 
-    @SuppressWarnings("deprecation")
     public Status addNode (Node node) {
         return addNode(node, clusterServices.getMyAddress());
     }
 
-    @SuppressWarnings({ "unchecked", "deprecation" })
+    @SuppressWarnings({ "unchecked" })
     private void retrieveCaches() {
         if (this.clusterServices == null) {
-            log.error("un-initialized clusterServices, can't retrieve cache");
+            log.error("Un-initialized Cluster Services, can't retrieve caches for scheme: {}", name);
             return;
         }
 
-        nodeConnections = (ConcurrentMap<Node, Set<InetAddress>>) clusterServices.getCache("connectionmanager."+name+".nodeconnections");
+        nodeConnections = (ConcurrentMap<Node, Set<InetAddress>>) clusterServices.getCache(nodeConnectionsCacheName);
 
         if (nodeConnections == null) {
-            log.error("\nFailed to get caches");
+            log.error("\nFailed to get cache: {}", nodeConnectionsCacheName);
         }
     }
 
-    @SuppressWarnings("deprecation")
     private void allocateCaches() {
         if (this.clusterServices == null) {
-            log.error("un-initialized clusterServices, can't create cache");
+            log.error("Un-initialized clusterServices, can't create cache");
             return;
         }
 
         try {
-            clusterServices.createCache("connectionmanager."+name+".nodeconnections", EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
+            clusterServices.createCache(nodeConnectionsCacheName, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
         } catch (CacheExistException cee) {
-            log.error("\nCache already exists - destroy and recreate if needed");
+            log.debug("\nCache already exists: {}", nodeConnectionsCacheName);
         } catch (CacheConfigException cce) {
             log.error("\nCache configuration invalid - check cache mode");
         } catch (Exception e) {
index 02282c30808be5a7ae673d1cd8227615c2ec3c1c..4db64a64d315a1ceab0d3146c571baf66379bf55 100644 (file)
@@ -2,14 +2,12 @@ package org.opendaylight.controller.connectionmanager.scheme;
 
 import java.net.InetAddress;
 import java.util.Set;
+
 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
 import org.opendaylight.controller.sal.core.Node;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 class AnyControllerScheme extends AbstractScheme {
-    private static final Logger logger = LoggerFactory.getLogger(AnyControllerScheme.class);
     private static AbstractScheme myScheme= null;
 
     protected AnyControllerScheme(IClusterGlobalServices clusterServices) {
@@ -23,10 +21,8 @@ class AnyControllerScheme extends AbstractScheme {
         return myScheme;
     }
 
-    @SuppressWarnings("deprecation")
     @Override
     public boolean isConnectionAllowedInternal(Node node) {
-        if (nodeConnections == null) return true;
         Set <InetAddress> controllers = nodeConnections.get(node);
         if (controllers == null || controllers.size() == 0) return true;
         return (controllers.size() == 1 && controllers.contains(clusterServices.getMyAddress()));
index 6afb27fb9ef5fbc5c345616c01af97f624084755..a84a11b33614d2b7ffce0d3fba3b839fe35749f4 100644 (file)
@@ -6,7 +6,7 @@ import org.opendaylight.controller.sal.core.Node;
 
 class SingleControllerScheme extends AbstractScheme {
 
-    private static AbstractScheme myScheme= null;
+    private static AbstractScheme myScheme = null;
 
     protected SingleControllerScheme(IClusterGlobalServices clusterServices) {
         super(clusterServices, ConnectionMgmtScheme.SINGLE_CONTROLLER);
@@ -19,12 +19,9 @@ class SingleControllerScheme extends AbstractScheme {
         return myScheme;
     }
 
-    @SuppressWarnings("deprecation")
     @Override
     public boolean isConnectionAllowedInternal(Node node) {
-        if (nodeConnections == null) return true;
         // Lets make it simple. The Cluster Coordinator is the master
-        if (clusterServices.amICoordinator()) return true;
-        return false;
+        return clusterServices.amICoordinator();
     }
 }
\ No newline at end of file
index 13ac14b5ea1f598ead7d083d338da75252030e05..efecbd3da74dc1f2494a0614d472432eaf6d3b5d 100644 (file)
@@ -36,7 +36,7 @@
       </activation>
       <modules>
         <!-- MD-SAL bundles -->
-        <module>../../sal/yang-prototype</module>
+        <module>../../md-sal</module>
       </modules>
     </profile>
   </profiles>
index 1ebc300c75ac80c05a5ae6e8dc8b88366468f1c6..a51409fc2d241b61f2180b20841a942cf5e2ca36 100644 (file)
@@ -36,6 +36,10 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
     private CountDownLatch waitingLatch;
     private Status retStatus;
     private static final Logger logger = LoggerFactory.getLogger(FlowEntryDistributionOrderFutureTask.class);
+    // Don't wait forever to program, rather timeout if there are issues, and
+    // log an error
+    private long timeout;
+    private static final Long DEFAULTTIMEOUT = 30000L;
 
     /**
      * @param order
@@ -49,6 +53,14 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
         this.waitingLatch = new CountDownLatch(1);
         // No return status yet!
         this.retStatus = new Status(StatusCode.UNDEFINED);
+        // Set the timeout
+        String strTimeout = System.getProperty("FlowEntryDistributionOrderFutureTask.timeout",
+                                               DEFAULTTIMEOUT.toString());
+        try {
+            timeout = Long.parseLong(strTimeout);
+        } catch (Exception e) {
+            timeout = DEFAULTTIMEOUT;
+        }
     }
 
     @Override
@@ -58,6 +70,7 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
 
     @Override
     public Status get() throws InterruptedException, ExecutionException {
+        boolean didFinish = false;
         logger.trace("Getting status for order {}", this.order);
         // If i'm done lets return the status as many times as caller wants
         if (this.waitingLatch.getCount() == 0L) {
@@ -67,16 +80,22 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
 
         logger.trace("Start waiting for status to come back");
         // Wait till someone signal that we are done
-        this.waitingLatch.await();
+        didFinish = this.waitingLatch.await(this.timeout, TimeUnit.MILLISECONDS);
 
-        logger.trace("Waiting for the status is over, returning it");
-        // Return the known status
-        return retStatus;
+        if (didFinish) {
+            logger.trace("Waiting for the status of order {} is over, returning it", this.order);
+            // Return the known status
+            return retStatus;
+        } else {
+            logger.error("Timing out, the workStatus for order {} has not come back in time!", this.order);
+            return new Status(StatusCode.TIMEOUT);
+        }
     }
 
     @Override
     public Status get(long timeout, TimeUnit unit) throws InterruptedException,
             ExecutionException, TimeoutException {
+        boolean didFinish = false;
         logger.trace("Getting status for order {}", this.order);
         // If i'm done lets return the status as many times as caller wants
         if (this.waitingLatch.getCount() == 0L) {
@@ -86,11 +105,18 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
 
         logger.trace("Start waiting for status to come back");
         // Wait till someone signal that we are done
-        this.waitingLatch.await(timeout, unit);
+        didFinish = this.waitingLatch.await(timeout, unit);
 
-        logger.trace("Waiting for the status is over, returning it");
-        // Return the known status, could also be null if didn't return
-        return retStatus;
+        if (didFinish) {
+            logger.trace("Waiting for the status is over, returning it");
+            // Return the known status, could also be null if didn't return
+            return retStatus;
+        } else {
+            // No need to bark here as long as this routine could indeed
+            // timeout
+            logger.trace("Timing out, the workStatus for order {} has not come back in time!", this.order);
+            return new Status(StatusCode.TIMEOUT);
+        }
     }
 
     @Override
@@ -123,4 +149,12 @@ final class FlowEntryDistributionOrderFutureTask implements Future<Status> {
         this.waitingLatch.countDown();
         logger.trace("Unlocked the Future");
     }
+
+    /**
+     * Getter for the workOrder for which the order is waiting for
+     * @return the order
+     */
+    public FlowEntryDistributionOrder getOrder() {
+        return order;
+    }
 }
index a6cdf2c466ab579986234f2a5a4c884fe8e7fd33..9c2afe42be0860df310516ff2f5b85ec1dd0261f 100644 (file)
@@ -214,7 +214,8 @@ public class ForwardingRulesManager implements
      * @return a Future object for monitoring the progress of the result, or
      *         null in case the processing should take place locally
      */
-    private Future<Status> distributeWorkOrder(FlowEntryInstall e, FlowEntryInstall u, UpdateType t) {
+    private FlowEntryDistributionOrderFutureTask distributeWorkOrder(FlowEntryInstall e, FlowEntryInstall u,
+            UpdateType t) {
         // A null entry it's an unexpected condition, anyway it's safe to keep
         // the handling local
         if (e == null) {
@@ -544,11 +545,17 @@ public class ForwardingRulesManager implements
      *         contain the unique id assigned to this request
      */
     private Status modifyEntryInternal(FlowEntryInstall currentEntries, FlowEntryInstall newEntries, boolean async) {
-        Future<Status> futureStatus = distributeWorkOrder(currentEntries, newEntries, UpdateType.CHANGED);
+        FlowEntryDistributionOrderFutureTask futureStatus =
+                distributeWorkOrder(currentEntries, newEntries, UpdateType.CHANGED);
         if (futureStatus != null) {
             Status retStatus = new Status(StatusCode.UNDEFINED);
             try {
                 retStatus = futureStatus.get();
+                if (retStatus.getCode()
+                        .equals(StatusCode.TIMEOUT)) {
+                    // A timeout happened, lets cleanup the workMonitor
+                    workMonitor.remove(futureStatus.getOrder());
+                }
             } catch (InterruptedException e) {
                 log.error("", e);
             } catch (ExecutionException e) {
@@ -656,11 +663,16 @@ public class ForwardingRulesManager implements
      *         contain the unique id assigned to this request
      */
     private Status removeEntryInternal(FlowEntryInstall entry, boolean async) {
-        Future<Status> futureStatus = distributeWorkOrder(entry, null, UpdateType.REMOVED);
+        FlowEntryDistributionOrderFutureTask futureStatus = distributeWorkOrder(entry, null, UpdateType.REMOVED);
         if (futureStatus != null) {
             Status retStatus = new Status(StatusCode.UNDEFINED);
             try {
                 retStatus = futureStatus.get();
+                if (retStatus.getCode()
+                        .equals(StatusCode.TIMEOUT)) {
+                    // A timeout happened, lets cleanup the workMonitor
+                    workMonitor.remove(futureStatus.getOrder());
+                }
             } catch (InterruptedException e) {
                 log.error("", e);
             } catch (ExecutionException e) {
@@ -704,11 +716,16 @@ public class ForwardingRulesManager implements
      *         contain the unique id assigned to this request
      */
     private Status addEntriesInternal(FlowEntryInstall entry, boolean async) {
-        Future<Status> futureStatus = distributeWorkOrder(entry, null, UpdateType.ADDED);
+        FlowEntryDistributionOrderFutureTask futureStatus = distributeWorkOrder(entry, null, UpdateType.ADDED);
         if (futureStatus != null) {
             Status retStatus = new Status(StatusCode.UNDEFINED);
             try {
                 retStatus = futureStatus.get();
+                if (retStatus.getCode()
+                        .equals(StatusCode.TIMEOUT)) {
+                    // A timeout happened, lets cleanup the workMonitor
+                    workMonitor.remove(futureStatus.getOrder());
+                }
             } catch (InterruptedException e) {
                 log.error("", e);
             } catch (ExecutionException e) {
@@ -3171,7 +3188,7 @@ public class ForwardingRulesManager implements
              */
             if (fe.getRequestorController()
                     .equals(clusterContainerService.getMyAddress())) {
-                FlowEntryDistributionOrderFutureTask fet = workMonitor.get(fe);
+                FlowEntryDistributionOrderFutureTask fet = workMonitor.remove(fe);
                 if (fet != null) {
                     logsync.trace("workStatus response is for us {}", fe);
                     // Signal we got the status
diff --git a/opendaylight/md-sal/model/model-flow-base/src/main/yang/flow-types.yang b/opendaylight/md-sal/model/model-flow-base/src/main/yang/flow-types.yang
new file mode 100644 (file)
index 0000000..634c8db
--- /dev/null
@@ -0,0 +1,241 @@
+module opendaylight-flow-types {
+    namespace "urn:opendaylight:flow:types";
+    prefix flow;
+
+    import ietf-inet-types {prefix inet;}
+    import opendaylight-match-types {prefix match;}
+    import ietf-yang-types {prefix yang;}
+    import opendaylight-l2-types {prefix l2t;}
+
+    revision "2013-08-19" {
+        description "Initial revision of flow service";
+    }
+    
+    
+    typedef vlan-cfi {
+           type int32;    
+    }
+    
+    grouping address {
+        choice address {
+            case ipv4 {
+                leaf ipv4-address {
+                    type inet:ipv4-prefix;
+                }
+            }
+            case ipv6 {
+                leaf ipv6-address {
+                    type inet:ipv6-prefix;
+                }
+            }
+        }
+    }    
+
+    grouping action {
+        choice action {
+            case output-action {
+                leaf-list output-node-connector {
+                    type inet:uri;
+                }
+            }
+
+            case controller-action {
+                leaf max-length {
+                    type uint16 {
+                        range "0..65294";
+                    }
+                }
+            }
+
+            case set-queue-action {
+                leaf queue {
+                    type string; // TODO: define queues
+                }
+            }
+
+            case pop-mpls-action {
+                leaf ethernet-type {
+                        type uint16; // TODO: define ethertype type
+                }
+            }
+
+            case set-mpls-ttl-action {
+                leaf mpls-ttl {
+                    type uint8;
+                }
+            }
+
+            case set-nw-ttl-action {
+                leaf nw-ttl {
+                    type uint8;
+                }
+            }
+
+            case push-pbb-action {
+
+            }
+
+            case push-mpls-action {
+
+            }
+
+            case drop-action {
+            }
+            
+            case flood-action {
+            }
+            
+            case flood-all-action {
+            }
+            
+            case hw-path-action {
+            }
+            
+            case loopback-action {
+            }
+            
+            case pop-vlan-action {
+            }
+            
+            case push-vlan-action {
+                leaf tag {               // TPID - 16 bits
+                    type int32;
+                } 
+                leaf pcp {               // PCP - 3 bits
+                    type int32;
+                }
+                leaf cfi {               // CFI - 1 bit (drop eligible)
+                    type vlan-cfi;
+                }
+                leaf vlan-id {           // VID - 12 bits
+                    type l2t:vlan-id;
+                }
+//                leaf tci {               //TCI = [PCP + CFI + VID]
+//                }
+//                leaf header {            //header = [TPID + TCI] 
+//                }
+            }
+            case set-dl-dst-action {
+                leaf address {
+                    type yang:mac-address;
+                }
+            }
+            
+            case set-dl-src-action {
+                leaf address {
+                    type yang:mac-address;
+                }
+            }
+            case set-dl-type-action {
+                leaf dl-type {
+                    type l2t:ether-type;
+                }
+            }
+            case set-next-hop-action {
+                uses address;
+            }
+            case set-nw-dst-action {
+                uses address;            
+            }
+            case set-nw-src-action{
+                uses address;            
+            }
+            case set-nw-tos-action {
+                leaf tos {
+                    type int32;
+                }
+            }
+            
+            case set-tp-dst-action {
+                leaf port {
+                    type inet:port-number;
+                }                
+            }
+            case set-tp-src-action {
+                leaf port {
+                    type inet:port-number;
+                }                
+            }
+            case set-vlan-cfi-action {
+                leaf vlan-cfi {
+                    type vlan-cfi;
+                }
+            }
+            case set-vlan-id-action {
+                leaf vlan-id {
+                    type l2t:vlan-id;
+                } 
+            }
+            case set-vlan-pcp-action {
+                leaf vlan-pcp {
+                    type l2t:vlan-pcp;
+                }            
+            }
+            case sw-path-action {            
+            }
+            
+            
+        }
+    }
+
+    grouping flow {
+        container match {
+            uses match:match;
+        }
+        list action {
+            key "order";
+            leaf order {
+                type int32;
+            }
+            uses action;
+        }
+        leaf priority {
+            type uint16;
+        }
+        
+        leaf idle-timeout {
+            type uint16;
+        }
+        
+        leaf hard-timeout {
+            type uint16;
+        }
+        
+        leaf cookie {
+            type uint64;
+        }
+    }
+
+    grouping flow-statistics {
+        leaf packet-count {
+            type yang:counter64;
+        } 
+
+        leaf byte-count {
+            type yang:counter64;
+        }
+
+        container duration {
+            leaf second {
+                type yang:counter64;
+            }
+            leaf nanosecond {
+                type yang:counter64;
+            }
+        }
+    }
+
+    grouping flow-table-statistics {
+        leaf active {
+            type yang:counter64;
+        } 
+
+        leaf lookup {
+            type yang:counter64;
+        }
+
+        leaf matched {
+            type yang:counter64;   
+        }
+    }
+}
\ No newline at end of file
similarity index 85%
rename from opendaylight/sal/yang-prototype/sal/pom.xml
rename to opendaylight/md-sal/pom.xml
index 441d8576c665df8d88c82ddbe96ce561e4b759a3..bf1b95decf22abaf3620c6bff3be25b14037bfbb 100644 (file)
        <modules>
                <module>sal-common</module>
                <module>sal-common-util</module>
-               <module>sal-data-api</module>
+        <!-- Binding Independent -->
+        <module>sal-dom-api</module>
+        <module>sal-dom-broker</module>
+        <module>sal-dom-spi</module>
+        <!-- Binding Aware -->
                <module>sal-binding-api</module>
-               <module>sal-binding-broker-impl</module>
+               <module>sal-binding-broker</module>
+        <!-- Samples -->
         <module>samples</module>
+        <!-- Base Models -->
         <module>model</module>
+        <!-- Compability Packages -->
+        <module>sal-compability</module>
        </modules>
 
        <properties>
             <name>opendaylight.snapshot</name>
             <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
         </pluginRepository>
+        <pluginRepository>
+            <id>opendaylight.release</id>
+            <name>opendaylight.release</name>
+            <url>${nexusproxy}/repositories/opendaylight.release/</url>
+        </pluginRepository>
     </pluginRepositories>
 
 
        <repositories>
-      <repository>
+      
+        <repository>
+            <id>opendaylight-release</id>
+            <name>opendaylight-release</name>
+            <url>${nexusproxy}/repositories/opendaylight.release/</url>
+        </repository>
+        <!-- OpenDayLight Snapshot artifact -->
+        <repository>
+            <id>opendaylight-snapshot</id>
+            <name>opendaylight-snapshot</name>
+            <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
+        </repository>
+        <repository>
         <id>central</id>
         <name>central</name>
         <url>http://repo1.maven.org/maven2</url>
                <repository>
                        <id>jboss.releases</id>
                        <name>jboss.releases</name>
-                       <url>${nexusproxy}/repositories/jboss.releases/</url>
+            <url>${nexusproxy}/repositories/jboss.releases/</url>
+            <snapshots>
+              <enabled>false</enabled>
+            </snapshots>
+            <releases>
+              <enabled>true</enabled>
+            </releases>
                </repository>
                <!-- OpenDayLight Released artifact -->
-               <repository>
-                       <id>opendaylight-release</id>
-                       <name>opendaylight-release</name>
-                       <url>${nexusproxy}/repositories/opendaylight.release/</url>
-               </repository>
-               <!-- OpenDayLight Snapshot artifact -->
-               <repository>
-                       <id>opendaylight-snapshot</id>
-                       <name>opendaylight-snapshot</name>
-                       <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-               </repository>
+               
        </repositories>
 
   <distributionManagement>
similarity index 98%
rename from opendaylight/sal/yang-prototype/sal/sal-binding-broker-impl/pom.xml
rename to opendaylight/md-sal/sal-binding-broker/pom.xml
index cfd8de6f8c2d21f4b0602d568245c5185aa07d51..8e06c9d71e426589ddf78b6df93322b024275153 100644 (file)
@@ -19,7 +19,6 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>${maven.bundle.version}</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -36,7 +35,6 @@
                     </instructions>
                 </configuration>
             </plugin>
-
             <plugin>
                 <groupId>org.eclipse.xtend</groupId>
                 <artifactId>xtend-maven-plugin</artifactId>
index e3d8c589f7e135037ffd57738a0a7e4d700fe7a4..40301a379fe404463adae6e65987fb4260dcbdd9 100644 (file)
@@ -5,7 +5,6 @@
                <groupId>org.opendaylight.controller</groupId>
                <artifactId>sal-parent</artifactId>
                <version>1.0-SNAPSHOT</version>
-               <relativePath>../../sal/yang-prototype/sal/pom.xml</relativePath>
        </parent>
        <artifactId>sal-compability</artifactId>
 
@@ -38,7 +37,6 @@
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
-                       <type>bundle</type>
                        <version>14.0.1</version>
                </dependency>
        </dependencies>
index e77375fc41a0d53367008064dc67f1a9b21b5d63..1d4f42c7999ebb4269fa9a047f0261715f4aedb4 100644 (file)
@@ -12,43 +12,21 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.opendaylight.controller.sal.action.Controller;
-import org.opendaylight.controller.sal.action.Drop;
-import org.opendaylight.controller.sal.action.Flood;
-import org.opendaylight.controller.sal.action.FloodAll;
-import org.opendaylight.controller.sal.action.HwPath;
-import org.opendaylight.controller.sal.action.Loopback;
-import org.opendaylight.controller.sal.action.Output;
-import org.opendaylight.controller.sal.action.PopVlan;
-import org.opendaylight.controller.sal.action.PushVlan;
-import org.opendaylight.controller.sal.action.SetDlDst;
-import org.opendaylight.controller.sal.action.SetDlSrc;
-import org.opendaylight.controller.sal.action.SetDlType;
-import org.opendaylight.controller.sal.action.SetNextHop;
-import org.opendaylight.controller.sal.action.SetNwDst;
-import org.opendaylight.controller.sal.action.SetNwSrc;
-import org.opendaylight.controller.sal.action.SetNwTos;
-import org.opendaylight.controller.sal.action.SetTpDst;
-import org.opendaylight.controller.sal.action.SetTpSrc;
-import org.opendaylight.controller.sal.action.SetVlanCfi;
-import org.opendaylight.controller.sal.action.SetVlanId;
-import org.opendaylight.controller.sal.action.SetVlanPcp;
-import org.opendaylight.controller.sal.action.SwPath;
+import org.opendaylight.controller.sal.action.*;
 import org.opendaylight.controller.sal.core.NodeConnector;
 import org.opendaylight.controller.sal.flowprogrammer.Flow;
 import org.opendaylight.controller.sal.match.Match;
 import org.opendaylight.controller.sal.match.MatchField;
 import org.opendaylight.controller.sal.match.MatchType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.*;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAddedBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.ControllerActionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.OutputActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.VlanCfi;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.*;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.address.Ipv4Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.address.Ipv6Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType;
@@ -59,14 +37,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.ethernet.match.fields.EthernetDestinationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.ethernet.match.fields.EthernetSourceBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.ethernet.match.fields.EthernetTypeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.EthernetMatch;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.EthernetMatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.IpMatch;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.IpMatchBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.Layer3Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.Layer4Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.VlanMatch;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.VlanMatchBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.*;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.layer._3.match.ArpMatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.layer._3.match.Ipv4MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.layer._3.match.Ipv6MatchBuilder;
@@ -120,15 +91,15 @@ public class FromSalConversionsUtils {
         if (sourceAction instanceof Controller) {
             targetAction = new ControllerActionBuilder().build();
         } else if (sourceAction instanceof Drop) {
-            // TODO: define maping
+            targetAction = new DropActionBuilder().build();
         } else if (sourceAction instanceof Flood) {
-            // TODO: define maping
+            targetAction = new FloodActionBuilder().build();
         } else if (sourceAction instanceof FloodAll) {
-            // TODO: define maping
+            targetAction = new FloodAllActionBuilder().build();
         } else if (sourceAction instanceof HwPath) {
-            // TODO: define maping
+            targetAction = new HwPathActionBuilder().build();
         } else if (sourceAction instanceof Loopback) {
-            // TODO: define maping
+            targetAction = new LoopbackActionBuilder().build();
         } else if (sourceAction instanceof Output) {
             NodeConnector nodeConnector = ((Output) sourceAction).getPort();
 
@@ -137,35 +108,101 @@ public class FromSalConversionsUtils {
             targetAction = outputActionBuilder.build();
 
         } else if (sourceAction instanceof PopVlan) {
-            // TODO: define maping
+            targetAction = new PopVlanActionBuilder().build();
         } else if (sourceAction instanceof PushVlan) {
-            // TODO: define maping
+            PushVlan pushVlan = (PushVlan) sourceAction;
+            PushVlanActionBuilder pushVlanActionBuilder = new PushVlanActionBuilder();
+
+            pushVlanActionBuilder.setCfi(new VlanCfi(pushVlan.getCfi()));
+            pushVlanActionBuilder.setVlanId(new VlanId(pushVlan.getVlanId()));
+            pushVlanActionBuilder.setPcp(pushVlan.getPcp());
+            pushVlanActionBuilder.setTag(pushVlan.getTag());
+            targetAction = pushVlanActionBuilder.build();
         } else if (sourceAction instanceof SetDlDst) {
-            // TODO: define maping
+            SetDlDst setDlDst = (SetDlDst) sourceAction;
+            SetDlDstActionBuilder setDlDstActionBuilder = new SetDlDstActionBuilder();
+
+            setDlDstActionBuilder.setAddress(new MacAddress(Arrays.toString(setDlDst.getDlAddress())));
+            targetAction = setDlDstActionBuilder.build();
         } else if (sourceAction instanceof SetDlSrc) {
-            // TODO: define maping
+            SetDlSrc setDlSrc = (SetDlSrc) sourceAction;
+            SetDlSrcActionBuilder setDlSrcActionBuilder = new SetDlSrcActionBuilder();
+
+            setDlSrcActionBuilder.setAddress(new MacAddress(Arrays.toString(setDlSrc.getDlAddress())));
+            targetAction = setDlSrcActionBuilder.build();
         } else if (sourceAction instanceof SetDlType) {
-            // TODO: define maping
+            SetDlType setDlType = (SetDlType) sourceAction;
+            SetDlTypeActionBuilder setDlTypeActionBuilder = new SetDlTypeActionBuilder();
+
+            setDlTypeActionBuilder.setDlType(new EtherType(new Long(setDlType.getDlType())));
+            targetAction = setDlTypeActionBuilder.build();
         } else if (sourceAction instanceof SetNextHop) {
-            // TODO: define maping
+            SetNextHop setNextHop = (SetNextHop) sourceAction;
+            SetNextHopActionBuilder setNextHopActionBuilder = new SetNextHopActionBuilder();
+
+            InetAddress inetAddress = setNextHop.getAddress();
+            setNextHopActionBuilder.setAddress(addressFromAction(inetAddress));
+
+            targetAction = setNextHopActionBuilder.build();
         } else if (sourceAction instanceof SetNwDst) {
-            // TODO: define maping
+            SetNwDst setNwDst = (SetNwDst) sourceAction;
+            SetNwDstActionBuilder setNwDstActionBuilder = new SetNwDstActionBuilder();
+
+            InetAddress inetAddress = setNwDst.getAddress();
+            setNwDstActionBuilder.setAddress(addressFromAction(inetAddress));
+
+            targetAction = setNwDstActionBuilder.build();
         } else if (sourceAction instanceof SetNwSrc) {
-            // TODO: define maping
+            SetNwSrc setNwSrc = (SetNwSrc) sourceAction;
+            SetNwSrcActionBuilder setNwSrcActionBuilder = new SetNwSrcActionBuilder();
+
+            InetAddress inetAddress = setNwSrc.getAddress();
+            setNwSrcActionBuilder.setAddress(addressFromAction(inetAddress));
+
+            targetAction = setNwSrcActionBuilder.build();
         } else if (sourceAction instanceof SetNwTos) {
-            // TODO: define maping
+            SetNwTos setNwTos = (SetNwTos) sourceAction;
+            SetNwTosActionBuilder setNwTosActionBuilder = new SetNwTosActionBuilder();
+
+            setNwTosActionBuilder.setTos(setNwTos.getNwTos());
+            targetAction = setNwTosActionBuilder.build();
         } else if (sourceAction instanceof SetTpDst) {
-            // TODO: define maping
+            SetTpDst setTpDst = (SetTpDst) sourceAction;
+            SetTpDstActionBuilder setTpDstActionBuilder = new SetTpDstActionBuilder();
+
+            setTpDstActionBuilder.setPort(new PortNumber(setTpDst.getPort()));
+
+            targetAction = setTpDstActionBuilder.build();
         } else if (sourceAction instanceof SetTpSrc) {
-            // TODO: define maping
+            SetTpSrc setTpSrc = (SetTpSrc) sourceAction;
+            SetTpSrcActionBuilder setTpSrcActionBuilder = new SetTpSrcActionBuilder();
+
+            setTpSrcActionBuilder.setPort(new PortNumber(setTpSrc.getPort()));
+
+            targetAction = setTpSrcActionBuilder.build();
         } else if (sourceAction instanceof SetVlanCfi) {
-            // TODO: define maping
+            SetVlanCfi setVlanCfi = (SetVlanCfi) sourceAction;
+            SetVlanCfiActionBuilder setVlanCfiActionBuilder = new SetVlanCfiActionBuilder();
+
+            setVlanCfiActionBuilder.setVlanCfi(new VlanCfi(setVlanCfi.getCfi()));
+
+            targetAction = setVlanCfiActionBuilder.build();
         } else if (sourceAction instanceof SetVlanId) {
-            // TODO: define maping
+            SetVlanId setVlanId = (SetVlanId) sourceAction;
+            SetVlanIdActionBuilder setVlanIdActionBuilder = new SetVlanIdActionBuilder();
+
+            setVlanIdActionBuilder.setVlanId(new VlanId(setVlanId.getVlanId()));
+
+            targetAction = setVlanIdActionBuilder.build();
         } else if (sourceAction instanceof SetVlanPcp) {
-            // TODO: define maping
+            SetVlanPcp setVlanPcp = (SetVlanPcp) sourceAction;
+            SetVlanPcpActionBuilder setVlanPcpActionBuilder = new SetVlanPcpActionBuilder();
+
+            setVlanPcpActionBuilder.setVlanPcp(new VlanPcp((short) setVlanPcp.getPcp()));
+
+            targetAction = setVlanPcpActionBuilder.build();
         } else if (sourceAction instanceof SwPath) {
-            // TODO: define maping
+            targetAction = new SwPathActionBuilder().build();
         }
 
         targetActionBuilder.setAction(targetAction);
@@ -173,6 +210,20 @@ public class FromSalConversionsUtils {
         return targetActionBuilder.build();
     }
 
+    private static Address addressFromAction(InetAddress inetAddress) {
+        byte[] byteInetAddresss = inetAddress.getAddress();
+        if (inetAddress instanceof Inet4Address) {
+            Ipv4Builder ipv4Builder = new Ipv4Builder();
+            ipv4Builder.setIpv4Address(new Ipv4Prefix(Arrays.toString(byteInetAddresss)));
+            return ipv4Builder.build();
+        } else if (inetAddress instanceof Inet6Address) {
+            Ipv6Builder ipv6Builder = new Ipv6Builder();
+            ipv6Builder.setIpv6Address(new Ipv6Prefix(Arrays.toString(byteInetAddresss)));
+            return ipv6Builder.build();
+        }
+        return null;
+    }
+
     private static List<Uri> nodeConnectorToUri(NodeConnector nodeConnector) {
         // TODO Define mapping
         return null;
@@ -312,13 +363,9 @@ public class FromSalConversionsUtils {
                 .setAddress(ethernetSourceAddressFrom(sourceMatch));
         targetEthMatchBuild.setEthernetSource(ethSourBuild.build());
 
-        final MatchField dataLinkDest = sourceMatch.getField(DL_DST);
-        if (dataLinkDest != null && dataLinkDest.getValue() != null) {
-            final MacAddress macDestAddress;
-            macDestAddress = new MacAddress((String) (dataLinkDest.getValue()));
-            EthernetDestinationBuilder ethDestBuild = new EthernetDestinationBuilder().setAddress(macDestAddress);
-            targetEthMatchBuild.setEthernetDestination(ethDestBuild.build());
-        }
+        EthernetDestinationBuilder ethDestBuild = new EthernetDestinationBuilder()
+                .setAddress(ethernetDestAddressFrom(sourceMatch));
+        targetEthMatchBuild.setEthernetDestination(ethDestBuild.build());
 
         final MatchField dataLinkType = sourceMatch.getField(MatchType.DL_TYPE);
         if (dataLinkType != null && dataLinkType.getValue() != null) {
index c113cd8924d1f7909fff02cec96323a984646ffb..ad1a2f93872df143a84ffbfe338d7f8d11649ae9 100644 (file)
@@ -17,37 +17,24 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.opendaylight.controller.sal.action.Controller;
-import org.opendaylight.controller.sal.action.Output;
+import org.opendaylight.controller.sal.action.*;
 import org.opendaylight.controller.sal.core.NodeConnector;
 import org.opendaylight.controller.sal.flowprogrammer.Flow;
 import org.opendaylight.controller.sal.match.Match;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.*;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeFlow;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.ControllerAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.OutputAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.PopMplsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.PushMplsAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.PushPbbAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.PushVlanAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.SetMplsTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.SetNwTtlAction;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.SetQueueAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.VlanCfi;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.action.action.*;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.Address;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.address.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.address.address.Ipv6;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev130819.flow.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.MacAddressFilter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.ethernet.match.fields.EthernetType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.EthernetMatch;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.IpMatch;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.Layer3Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.Layer4Match;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.VlanMatch;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.*;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.layer._3.match.ArpMatch;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.layer._3.match.Ipv4Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev130819.match.layer._3.match.Ipv6Match;
@@ -128,11 +115,161 @@ public class ToSalConversionsUtils {
         } else if (sourceAction instanceof SetQueueAction) {
             // TODO: define maping
             // targetAction = //no action to map
+        } else if (sourceAction instanceof DropAction) {
+            targetAction.add(new Drop());
+        } else if (sourceAction instanceof FloodAction) {
+            targetAction.add(new Flood());
+        } else if (sourceAction instanceof FloodAllAction) {
+            targetAction.add(new FloodAll());
+        } else if (sourceAction instanceof HwPathAction) {
+            targetAction.add(new HwPath());
+        } else if (sourceAction instanceof LoopbackAction) {
+            targetAction.add(new Loopback());
+        } else if (sourceAction instanceof PopVlanAction) {
+            targetAction.add(new PopVlan());
+        } else if (sourceAction instanceof PushVlanAction) {
+            PushVlanAction pushVlanAction = (PushVlanAction) sourceAction;
+            PushVlan pushVlan = pushVlanFrom(pushVlanAction);
+            if (pushVlan != null) {
+                targetAction.add(pushVlan);
+            }
+        } else if (sourceAction instanceof SetDlDstAction) {
+            MacAddress addressL2Dest = ((SetDlDstAction) sourceAction).getAddress();
+            if (addressL2Dest != null) {
+                String addressValue = addressL2Dest.getValue();
+                if (addressValue != null) {
+                    targetAction.add(new SetDlDst(addressValue.getBytes()));
+                }
+            }
+        } else if (sourceAction instanceof SetDlSrcAction) {
+            MacAddress addressL2Src = ((SetDlSrcAction) sourceAction).getAddress();
+            if (addressL2Src != null) {
+                String addressValue = addressL2Src.getValue();
+                if (addressValue != null) {
+                    targetAction.add(new SetDlSrc(addressValue.getBytes()));
+                }
+            }
+        } else if (sourceAction instanceof SetDlTypeAction) {
+            EtherType dlType = ((SetDlTypeAction) sourceAction).getDlType();
+            if (dlType != null) {
+                Long dlTypeValue = dlType.getValue();
+                if (dlTypeValue != null) {
+                    targetAction.add(new SetDlType(dlTypeValue.intValue()));
+                }
+            }
+        } else if (sourceAction instanceof SetNextHopAction) {
+            Address addressL3 = ((SetNextHopAction) sourceAction).getAddress();
+
+            InetAddress inetAddress = inetAddressFrom(addressL3);
+            if (inetAddress != null) {
+                targetAction.add(new SetNextHop(inetAddress));
+            }
+        } else if (sourceAction instanceof SetNwDstAction) {
+            Address addressL3 = ((SetNwDstAction) sourceAction).getAddress();
+
+            InetAddress inetAddress = inetAddressFrom(addressL3);
+            if (inetAddress != null) {
+                targetAction.add(new SetNwDst(inetAddress));
+            }
+        } else if (sourceAction instanceof SetNwSrcAction) {
+            Address addressL3 = ((SetNwDstAction) sourceAction).getAddress();
+
+            InetAddress inetAddress = inetAddressFrom(addressL3);
+            if (inetAddress != null) {
+                targetAction.add(new SetNwSrc(inetAddress));
+            }
+        } else if (sourceAction instanceof SetNwTosAction) {
+            Integer tos = ((SetNwTosAction) sourceAction).getTos();
+            if (tos != null) {
+                targetAction.add(new SetNwTos(tos));
+            }
+        } else if (sourceAction instanceof SetTpDstAction) {
+            PortNumber port = ((SetTpDstAction) sourceAction).getPort();
+            if (port != null) {
+                Integer portValue = port.getValue();
+                if (port.getValue() != null) {
+                    targetAction.add(new SetTpDst(portValue));
+                }
+            }
+        } else if (sourceAction instanceof SetTpSrcAction) {
+            PortNumber port = ((SetTpSrcAction) sourceAction).getPort();
+            if (port != null) {
+                Integer portValue = port.getValue();
+                if (port.getValue() != null) {
+                    targetAction.add(new SetTpSrc(portValue));
+                }
+            }
+        } else if (sourceAction instanceof SetVlanCfiAction) {
+            VlanCfi vlanCfi = ((SetVlanCfiAction) sourceAction).getVlanCfi();
+            if (vlanCfi != null) {
+                Integer vlanCfiValue = vlanCfi.getValue();
+                if (vlanCfiValue != null) {
+                    targetAction.add(new SetVlanCfi(vlanCfiValue));
+                }
+            }
+        } else if (sourceAction instanceof SetVlanIdAction) {
+            org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId vlanID = ((SetVlanIdAction) sourceAction)
+                    .getVlanId();
+            if (vlanID != null) {
+                Integer vlanIdValue = vlanID.getValue();
+                if (vlanIdValue != null) {
+                    targetAction.add(new SetVlanId(vlanIdValue));
+                }
+            }
+        } else if (sourceAction instanceof SetVlanPcpAction) {
+            VlanPcp vlanPcp = ((SetVlanPcpAction) sourceAction).getVlanPcp();
+            if (vlanPcp != null) {
+                Short vlanPcpValue = vlanPcp.getValue();
+                if (vlanPcpValue != null) {
+                    targetAction.add(new SetVlanPcp(vlanPcpValue));
+                }
+            }
+        } else if (sourceAction instanceof SwPathAction) {
+            targetAction.add(new SwPath());
         }
 
         return targetAction;
     }
 
+    private static InetAddress inetAddressFrom(Address addressL3) {
+        if (addressL3 != null) {
+            if (addressL3 instanceof Ipv4) {
+                Ipv4Prefix addressL3Ipv4 = ((Ipv4) addressL3).getIpv4Address();
+                if (addressL3Ipv4 != null) {
+                    return inetAddressFrom(addressL3Ipv4);
+                }
+            } else if (addressL3 instanceof Ipv6) {
+                Ipv6Prefix addressL3Ipv6 = ((Ipv6) addressL3).getIpv6Address();
+                if (addressL3Ipv6 != null) {
+                    return inetAddressFrom(addressL3Ipv6);
+                }
+            }
+        }
+        return null;
+    }
+
+    private static PushVlan pushVlanFrom(PushVlanAction pushVlanAction) {
+        final int tag;
+        final int pcp;
+        final int cfi;
+        final int vlanId;
+
+        if (pushVlanAction.getTag() != null) {
+            tag = pushVlanAction.getTag();
+            if (pushVlanAction.getPcp() != null) {
+                pcp = pushVlanAction.getPcp();
+                if (pushVlanAction.getCfi() != null && pushVlanAction.getCfi().getValue() != null) {
+                    cfi = pushVlanAction.getCfi().getValue();
+                    if (pushVlanAction.getVlanId() != null && pushVlanAction.getVlanId().getValue() != null) {
+                        vlanId = pushVlanAction.getVlanId().getValue();
+                        return new PushVlan(tag, pcp, cfi, vlanId);
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
     private static NodeConnector fromNodeConnectorRef(Uri uri) {
         // TODO: Define mapping
         return null;
similarity index 88%
rename from opendaylight/sal/yang-prototype/sal/sal-core-api/pom.xml
rename to opendaylight/md-sal/sal-dom-api/pom.xml
index ce91b8ea20ea0f7b20aacd3b370f0d5e8ad85410..b9aedbe96a8089992a998db915745e4960baf6bf 100644 (file)
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-model-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>5.0.0</version>
+        </dependency>
     </dependencies>
 </project>
diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractConsumer.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractConsumer.java
new file mode 100644 (file)
index 0000000..5e13aad
--- /dev/null
@@ -0,0 +1,40 @@
+package org.opendaylight.controller.sal.core.api;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+public abstract class AbstractConsumer implements Consumer, BundleActivator {
+
+    Broker broker;
+    ServiceReference<Broker> brokerRef;
+    @Override
+    public final void start(BundleContext context) throws Exception {
+        brokerRef = context.getServiceReference(Broker.class);
+        broker = context.getService(brokerRef);
+
+        this.startImpl(context);
+
+        broker.registerConsumer(this,context);
+    }
+
+    public abstract void startImpl(BundleContext context);
+
+    @Override
+    public final void stop(BundleContext context) throws Exception {
+        broker = null;
+        if(brokerRef != null) {
+            context.ungetService(brokerRef);
+        }
+    }
+
+    
+    @Override
+    public Collection<ConsumerFunctionality> getConsumerFunctionality() {
+        return Collections.emptySet();
+    }
+
+}
diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractProvider.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractProvider.java
new file mode 100644 (file)
index 0000000..c25b2f9
--- /dev/null
@@ -0,0 +1,39 @@
+package org.opendaylight.controller.sal.core.api;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+public abstract class AbstractProvider implements BundleActivator, Provider {
+
+    private ServiceReference<Broker> brokerRef;
+    private Broker broker;
+
+    @Override
+    public Collection<ProviderFunctionality> getProviderFunctionality() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public final void start(BundleContext context) throws Exception {
+        brokerRef = context.getServiceReference(Broker.class);
+        broker = context.getService(brokerRef);
+
+        this.startImpl(context);
+
+        broker.registerProvider(this,context);
+    }
+
+    public abstract void startImpl(BundleContext context);
+
+    @Override
+    public final void stop(BundleContext context) throws Exception {
+        // TODO Auto-generated method stub
+
+    }
+
+}
similarity index 97%
rename from opendaylight/sal/yang-prototype/sal/sal-core-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java
rename to opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java
index f26ed901a569f9c585b9b18be456acbb055de257..b2c35507837dab1dde9ed73e5f9b635161613d98 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.controller.sal.core.api.notify.NotificationService;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import org.osgi.framework.BundleContext;
 
 
 /**
@@ -77,13 +78,14 @@ public interface Broker {
      * 
      * @param cons
      *            Consumer to be registered.
+     * @param context 
      * @return a session specific to consumer registration
      * @throws IllegalArgumentException
      *             If the consumer is <code>null</code>.
      * @throws IllegalStateException
      *             If the consumer is already registered.
      */
-    ConsumerSession registerConsumer(Consumer cons);
+    ConsumerSession registerConsumer(Consumer cons, BundleContext context);
 
     /**
      * Registers the {@link Provider}, which will use the SAL layer.
@@ -108,13 +110,14 @@ public interface Broker {
      * 
      * @param prov
      *            Provider to be registered.
+     * @param context 
      * @return a session unique to the provider registration.
      * @throws IllegalArgumentException
      *             If the provider is <code>null</code>.
      * @throws IllegalStateException
      *             If the consumer is already registered.
      */
-    ProviderSession registerProvider(Provider prov);
+    ProviderSession registerProvider(Provider prov, BundleContext context);
 
     /**
      * {@link Consumer} specific access to the SAL functionality.
similarity index 59%
rename from opendaylight/sal/yang-prototype/sal/sal-broker-impl/pom.xml
rename to opendaylight/md-sal/sal-dom-broker/pom.xml
index 0965e2523109f5d24b9f23bc055523dd05f93e90..b3f3f3e8d5b69ebe1ed0bc0d9b0b29b7fda2e3c0 100644 (file)
@@ -8,9 +8,9 @@
     </parent>\r
     <artifactId>sal-broker-impl</artifactId>\r
     <scm>\r
-      <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
-      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
-      <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>\r
+        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+        <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>\r
     </scm>\r
 \r
     <dependencies>\r
             <artifactId>guava</artifactId>\r
         </dependency>\r
     </dependencies>\r
+\r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <groupId>org.apache.felix</groupId>\r
+                <artifactId>maven-bundle-plugin</artifactId>\r
+                <extensions>true</extensions>\r
+                <configuration>\r
+                    <instructions>\r
+                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>\r
+                        <Bundle-Activator>org.opendaylight.controller.sal.dom.broker.BrokerActivator</Bundle-Activator>\r
+                    </instructions>\r
+                </configuration>\r
+            </plugin>\r
+        </plugins>\r
+    </build>\r
 </project>\r
diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerActivator.java
new file mode 100644 (file)
index 0000000..e3f5e4b
--- /dev/null
@@ -0,0 +1,28 @@
+package org.opendaylight.controller.sal.dom.broker;
+
+import java.util.Hashtable;
+
+import org.opendaylight.controller.sal.core.api.Broker;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class BrokerActivator implements BundleActivator {
+
+    BrokerImpl broker;
+    private ServiceRegistration<Broker> brokerReg;
+    
+    @Override
+    public void start(BundleContext context) throws Exception {
+        broker = new BrokerImpl();
+        broker.setBundleContext(context);
+        brokerReg = context.registerService(Broker.class, broker, new Hashtable<String,String>());
+    }
+
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        if(brokerReg != null) {
+            brokerReg.unregister();
+        }
+    }
+}
@@ -5,7 +5,7 @@
  * 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.core.impl;
+package org.opendaylight.controller.sal.dom.broker;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -25,6 +25,7 @@ import org.opendaylight.controller.sal.core.spi.BrokerModule;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,21 +49,23 @@ public class BrokerImpl implements Broker {
     // Implementation specific
     private ExecutorService executor;
 
+    private BundleContext bundleContext;
+
     @Override
-    public ConsumerSession registerConsumer(Consumer consumer) {
+    public ConsumerSession registerConsumer(Consumer consumer,BundleContext ctx) {
         checkPredicates(consumer);
         log.info("Registering consumer " + consumer);
-        ConsumerSessionImpl session = newSessionFor(consumer);
+        ConsumerSessionImpl session = newSessionFor(consumer,ctx);
         consumer.onSessionInitiated(session);
         sessions.add(session);
         return session;
     }
 
     @Override
-    public ProviderSession registerProvider(Provider provider) {
+    public ProviderSession registerProvider(Provider provider,BundleContext ctx) {
         checkPredicates(provider);
 
-        ProviderSessionImpl session = newSessionFor(provider);
+        ProviderSessionImpl session = newSessionFor(provider,ctx);
         provider.onSessionInitiated(session);
         providerSessions.add(session);
         return session;
@@ -153,12 +156,12 @@ public class BrokerImpl implements Broker {
 
     // Private Factory methods
     
-    private ConsumerSessionImpl newSessionFor(Consumer cons) {
-        return new ConsumerSessionImpl(cons);
+    private ConsumerSessionImpl newSessionFor(Consumer provider, BundleContext ctx) {
+        return new ConsumerSessionImpl(provider,ctx);
     }
 
-    private ProviderSessionImpl newSessionFor(Provider provider) {
-        return new ProviderSessionImpl(provider);
+    private ProviderSessionImpl newSessionFor(Provider provider, BundleContext ctx) {
+        return new ProviderSessionImpl(provider,ctx);
     }
 
     private void consumerSessionClosed(ConsumerSessionImpl consumerSessionImpl) {
@@ -187,12 +190,15 @@ public class BrokerImpl implements Broker {
                 .synchronizedMap(new HashMap<Class<? extends BrokerService>, BrokerService>());
         private boolean closed = false;
 
+        private BundleContext context;
+
         public Consumer getConsumer() {
             return consumer;
         }
 
-        public ConsumerSessionImpl(Consumer consumer) {
+        public ConsumerSessionImpl(Consumer consumer, BundleContext ctx) {
             this.consumer = consumer;
+            this.context = ctx;
         }
 
         @Override
@@ -239,8 +245,8 @@ public class BrokerImpl implements Broker {
         private Provider provider;
         private Map<QName, RpcImplementation> sessionRpcImpls = Collections.synchronizedMap(new HashMap<QName, RpcImplementation>());
 
-        public ProviderSessionImpl(Provider provider) {
-            super(null);
+        public ProviderSessionImpl(Provider provider, BundleContext ctx) {
+            super(null,ctx);
             this.provider = provider;
         }
 
@@ -277,4 +283,8 @@ public class BrokerImpl implements Broker {
         }
 
     }
+
+    public void setBundleContext(BundleContext context) {
+        this.bundleContext = context;
+    }
 }
@@ -5,7 +5,7 @@
  * 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.core.impl;
+package org.opendaylight.controller.sal.dom.broker;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -5,7 +5,7 @@
  * 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.core.impl;
+package org.opendaylight.controller.sal.dom.broker;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -1,8 +1,8 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+/*
+ * 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.sal.core.impl;
\ No newline at end of file
+package org.opendaylight.controller.sal.dom.broker;
\ No newline at end of file
diff --git a/opendaylight/md-sal/sal-dom-demo/pom.xml b/opendaylight/md-sal/sal-dom-demo/pom.xml
new file mode 100644 (file)
index 0000000..322bad7
--- /dev/null
@@ -0,0 +1,62 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <parent>\r
+        <groupId>org.opendaylight.controller</groupId>\r
+        <artifactId>sal-parent</artifactId>\r
+        <version>1.0-SNAPSHOT</version>\r
+    </parent>\r
+    <artifactId>sal-core-demo</artifactId>\r
+    <scm>\r
+        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
+        <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>\r
+    </scm>\r
+\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>sal-broker-impl</artifactId>\r
+            <version>1.0-SNAPSHOT</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.opendaylight.controller</groupId>\r
+            <artifactId>yang-data-util</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-simple</artifactId>\r
+            <version>1.7.2</version>\r
+            <scope>runtime</scope>\r
+        </dependency>\r
+    </dependencies>\r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <artifactId>maven-assembly-plugin</artifactId>\r
+                <version>2.4</version>\r
+                <configuration>\r
+                    <descriptorRefs>\r
+                        <descriptorRef>jar-with-dependencies</descriptorRef>\r
+                    </descriptorRefs>\r
+                    <archive>\r
+                        <manifest>\r
+                            <mainClass>org.opendaylight.controller.sal.demo.SALDemo</mainClass>\r
+                        </manifest>\r
+                    </archive>\r
+                </configuration>\r
+                <executions>\r
+                    <execution>\r
+                        <id>make-assembly</id>\r
+                        <phase>package</phase>\r
+                        <goals>\r
+                            <goal>single</goal>\r
+                        </goals>\r
+                    </execution>\r
+                </executions>\r
+            </plugin>\r
+\r
+        </plugins>\r
+\r
+    </build>\r
+</project>\r
index 15bba670d2a7b9e4387317e91f12e50e18cb5e29..6401ec52f81faba1694302314882affb0d818ca5 100644 (file)
@@ -255,8 +255,7 @@ public class InventoryServiceShim implements IContainerListener,
                 props.addAll(prop);
             }
             nodeConnectorProps.put(entry.getKey(), props);
-            notifyInventoryShimListener(entry.getKey(), UpdateType.ADDED,
-                    entry.getValue());
+            notifyInventoryShimListener(entry.getKey(), UpdateType.ADDED, entry.getValue());
         }
 
         // Add this node
@@ -357,15 +356,13 @@ public class InventoryServiceShim implements IContainerListener,
         }
     }
 
-    private void notifyInventoryShimExternalListener(Node node,
-            UpdateType type, Set<Property> props) {
+    private void notifyInventoryShimExternalListener(Node node, UpdateType type, Set<Property> props) {
         for (IInventoryShimExternalListener s : this.inventoryShimExternalListeners) {
             s.updateNode(node, type, props);
         }
     }
 
-    private void notifyInventoryShimExternalListener(
-            NodeConnector nodeConnector, UpdateType type, Set<Property> props) {
+    private void notifyInventoryShimExternalListener(NodeConnector nodeConnector, UpdateType type, Set<Property> props) {
         for (IInventoryShimExternalListener s : this.inventoryShimExternalListeners) {
             s.updateNodeConnector(nodeConnector, type, props);
         }
@@ -373,14 +370,11 @@ public class InventoryServiceShim implements IContainerListener,
 
     private void notifyInventoryShimInternalListener(String container,
             NodeConnector nodeConnector, UpdateType type, Set<Property> props) {
-        IInventoryShimInternalListener inventoryShimInternalListener = inventoryShimInternalListeners
-                .get(container);
+        IInventoryShimInternalListener inventoryShimInternalListener = inventoryShimInternalListeners.get(container);
         if (inventoryShimInternalListener != null) {
-            inventoryShimInternalListener.updateNodeConnector(nodeConnector,
-                    type, props);
-            logger.trace(
-                    "notifyInventoryShimInternalListener {} type {} for container {}",
-                    new Object[] { nodeConnector, type, container });
+            inventoryShimInternalListener.updateNodeConnector(nodeConnector, type, props);
+            logger.trace("notifyInventoryShimInternalListener {} type {} for container {}", new Object[] {
+                    nodeConnector, type, container });
         }
     }
 
@@ -409,7 +403,7 @@ public class InventoryServiceShim implements IContainerListener,
                 notifyInventoryShimInternalListener(container, nodeConnector, type, props);
             }
 
-            // Notify DiscoveryService
+            // Notify plugin listeners (Discovery, DataPacket, OFstats etc.)
             notifyInventoryShimExternalListener(nodeConnector, type, props);
 
             logger.debug("Connection service accepted the inventory notification for {} {}", nodeConnector, type);
@@ -436,13 +430,14 @@ public class InventoryServiceShim implements IContainerListener,
 
         if (isNodeLocal) {
             // Now notify other containers
-            Set<String> containers = (nodeContainerMap.get(node) == null) ? new HashSet<String>() : new HashSet<String>(
-                    nodeContainerMap.get(node));
+            Set<String> containers = (nodeContainerMap.get(node) == null) ? new HashSet<String>()
+                    : new HashSet<String>(nodeContainerMap.get(node));
             containers.add(GlobalConstants.DEFAULT.toString());
             for (String container : containers) {
                 notifyInventoryShimInternalListener(container, node, type, props);
             }
-            // Notify external listener
+
+            // Notify plugin listeners (Discovery, DataPacket, OFstats etc.)
             notifyInventoryShimExternalListener(node, type, props);
 
             logger.debug("Connection service accepted the inventory notification for {} {}", node, type);
@@ -454,9 +449,7 @@ public class InventoryServiceShim implements IContainerListener,
     private void notifyGlobalInventoryShimInternalListener(Node node, UpdateType type, Set<Property> props) {
         for (IInventoryShimInternalListener globalListener : globalInventoryShimInternalListeners) {
             globalListener.updateNode(node, type, props);
-            logger.trace(
-                    "notifyGlobalInventoryShimInternalListener {} type {}",
-                    new Object[] { node, type });
+            logger.trace("notifyGlobalInventoryShimInternalListener {} type {}", new Object[] { node, type });
         }
     }
 
index 3ab38cc41f6db686b273864801c238f3cb36eb11..48b46eac85b9fc467387fc6454e21bb156d74796 100644 (file)
@@ -63,12 +63,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * It periodically polls the different OF statistics from the OF switches and
- * caches them for quick retrieval for the above layers' modules It also
- * provides an API to directly query the switch about the statistics
+ * Periodically polls the different OF statistics from the OF switches, caches
+ * them, and publishes results towards SAL. It also provides an API to directly
+ * query the switch for any specific statistics.
  */
-public class OFStatisticsManager implements IOFStatisticsManager,
-IInventoryShimExternalListener, CommandProvider {
+public class OFStatisticsManager implements IOFStatisticsManager, IInventoryShimExternalListener, CommandProvider {
     private static final Logger log = LoggerFactory.getLogger(OFStatisticsManager.class);
     private static final int INITIAL_SIZE = 64;
     private static final long FLOW_STATS_PERIOD = 10000;
index ad4a5fba94e4b34f69bbb658421693305bd82888..e2132fb8a09ed5144ab27abe3c907766e4961a94 100644 (file)
@@ -100,7 +100,7 @@ public class ConnectionService implements IPluginOutConnectionService, IConnecti
      * @return true if node is local to this controller. false otherwise.
      */
     public boolean isLocal(Node node) {
-        if (this.connectionListener == null) return true;
+        if (this.connectionListener == null) return false;
         return connectionListener.isLocal(node);
     }
 
diff --git a/opendaylight/sal/yang-prototype/pom.xml b/opendaylight/sal/yang-prototype/pom.xml
deleted file mode 100644 (file)
index 3f84ff0..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>yang-prototype</artifactId>
-    <version>0.5-SNAPSHOT</version>
-    <packaging>pom</packaging>
-    <name>${project.artifactId}</name>
-    <description>
-        yang-prototype
-    </description>
-    <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:MD-SAL</url>
-    </scm>
-
-    <modules>
-        <module>sal</module>
-        <module>concepts-lang</module>
-    </modules>
-
-    <properties>
-        <yangtools.version>0.5.5-SNAPSHOT</yangtools.version>
-        <sonar.host.url>https://sonar.opendaylight.org/</sonar.host.url>
-        <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
-        <sitedeploy>dav:http://nexus.opendaylight.org/content/sites/site</sitedeploy>
-        <siteplugin>3.2</siteplugin>
-        <defaultStylesheet>${project.basedir}/src/site/resources/stylesheet.css</defaultStylesheet>
-        <projectinfo>2.6</projectinfo>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <compiler.version>2.3.2</compiler.version>
-        <surefire.version>2.13</surefire.version>
-        <exam.version>3.0.0</exam.version>
-        <url.version>1.5.0</url.version>
-        <enunciate.version>1.26.2</enunciate.version>
-        <sonar.branch>${user.name}-private-view</sonar.branch>
-        <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>
-        <logback.version>1.0.9</logback.version>
-        <slf4j.version>1.7.2</slf4j.version>
-    </properties>
-
-    <pluginRepositories>
-        <pluginRepository>
-          <id>central</id>
-          <name>maven repo1</name>
-          <url>http://repo1.maven.org/maven2</url>
-          <snapshots>
-             <enabled>false</enabled>
-          </snapshots>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-        </pluginRepository>
-        <pluginRepository>
-            <id>opendaylight.snapshot</id>
-            <name>opendaylight.snapshot</name>
-            <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-        </pluginRepository>
-    </pluginRepositories>
-
-
-    <repositories>
-        <!-- EBR release -->
-        <!-- http://repository.springsource.com/maven/bundles/release -->
-        <repository>
-            <id>ebr-bundles-release</id>
-            <name>ebr-bundles-release</name>
-            <url>${nexusproxy}/repositories/ebr-bundles-release/</url>
-        </repository>
-        <!-- EBR external -->
-        <!-- http://repository.springsource.com/maven/bundles/external -->
-        <repository>
-            <id>ebr-bundles-external</id>
-            <name>ebr-bundles-external</name>
-            <url>${nexusproxy}/repositories/ebr-bundles-external/</url>
-        </repository>
-        <repository>
-          <id>central</id>
-          <name>central</name>
-          <url>http://repo1.maven.org/maven2</url>
-          <snapshots>
-             <enabled>false</enabled>
-          </snapshots>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-        </repository>
-        <!-- Pax mirror -->
-        <!-- https://oss.sonatype.org/content/repositories/ops4j-releases -->
-        <repository>
-            <id>ops4j-releases</id>
-            <name>ops4j-releases</name>
-            <url>${nexusproxy}/repositories/ops4j-releases/</url>
-        </repository>
-        <!-- Third Packages hosted in local maven because not available in 
-            other places -->
-        <repository>
-            <id>thirdparty</id>
-            <name>thirdparty</name>
-            <url>${nexusproxy}/repositories/thirdparty/</url>
-        </repository>
-        <!-- Jboss mirror -->
-        <!-- https://repository.jboss.org/nexus/content/repositories/releases -->
-        <repository>
-            <id>jboss.releases</id>
-            <name>jboss.releases</name>
-            <url>${nexusproxy}/repositories/jboss.releases/</url>
-        </repository>
-        <!-- OpenDayLight Released artifact -->
-        <repository>
-            <id>opendaylight-release</id>
-            <name>opendaylight-release</name>
-            <url>${nexusproxy}/repositories/opendaylight.release/</url>
-        </repository>
-        <!-- OpenDayLight Snapshot artifact -->
-        <repository>
-            <id>opendaylight-snapshot</id>
-            <name>opendaylight-snapshot</name>
-            <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-        </repository>
-    </repositories>
-
-    <distributionManagement>
-        <!-- OpenDayLight Released artifact -->
-        <repository>
-            <id>opendaylight-release</id>
-            <url>${nexusproxy}/repositories/opendaylight.release/</url>
-        </repository>
-        <!-- OpenDayLight Snapshot artifact -->
-        <snapshotRepository>
-            <id>opendaylight-snapshot</id>
-            <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-        </snapshotRepository>
-        <site>
-            <id>${project.artifactId}-site</id>
-            <url>./</url>
-        </site>
-    </distributionManagement>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>4.10</version>
-                <scope>test</scope>
-                <optional>true</optional>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>1.7.2</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${compiler.version}</version>
-                <inherited>true</inherited>
-                <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-source-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <!-- explicitly define maven-deploy-plugin after other to 
-                    force exec order -->
-                <artifactId>maven-deploy-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>deploy</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>deploy</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheetfile>${defaultStylesheet}</stylesheetfile>
-                    <excludePackageNames>
-                        *.opendaylight.controller.antlrv4.code.gen
-                    </excludePackageNames>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>aggregate</id>
-                        <goals>
-                            <goal>aggregate</goal>
-                        </goals>
-                        <phase>site</phase>
-                    </execution>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-site-plugin</artifactId>
-                <version>${siteplugin}</version>
-                <inherited>false</inherited>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.maven.doxia</groupId>
-                        <artifactId>doxia-module-markdown</artifactId>
-                        <version>1.3</version>
-                    </dependency>
-                </dependencies>
-                <configuration>
-                    <siteDirectory>${project.basedir}/src/site</siteDirectory>
-                    <inputEncoding>UTF-8</inputEncoding>
-                    <outputEncoding>UTF-8</outputEncoding>
-                </configuration>
-            </plugin>
-        </plugins>
-
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-source-plugin</artifactId>
-                    <version>2.2.1</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.7</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.15</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>${siteplugin}</version>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.apache.maven.doxia</groupId>
-                            <artifactId>doxia-module-markdown</artifactId>
-                            <version>1.3</version>
-                        </dependency>
-                    </dependencies>
-                    <configuration>
-                        <siteDirectory>${project.parent.basedir}/src/site</siteDirectory>
-                        <inputEncoding>UTF-8</inputEncoding>
-                        <outputEncoding>UTF-8</outputEncoding>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>2.9.1</version>
-                    <configuration>
-                        <stylesheetfile>${defaultStylesheet}</stylesheetfile>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>aggregate</id>
-                            <goals>
-                                <goal>aggregate</goal>
-                            </goals>
-                            <phase>site</phase>
-                        </execution>
-                        <execution>
-                            <id>attach-javadocs</id>
-                            <phase>deploy</phase>
-                            <goals>
-                                <goal>jar</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-
-    </build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.9.1</version>
-                <reportSets>
-                    <reportSet>
-                        <reports>
-                            <report>javadoc</report>
-                        </reports>
-                    </reportSet>
-                </reportSets>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <version>2.4.0</version>
-                <configuration>
-                    <effort>Max</effort>
-                    <threshold>Low</threshold>
-                    <goal>site</goal>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>jdepend-maven-plugin</artifactId>
-                <version>2.0-beta-2</version>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <profiles>
-        <profile>
-            <id>viewbuild</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <properties>
-                <build.suffix>${project.version}</build.suffix>
-            </properties>
-        </profile>
-        <profile>
-            <id>jenkins</id>
-            <activation>
-                <property>
-                    <name>BUILDSUFFIX</name>
-                </property>
-            </activation>
-            <properties>
-                <build.suffix>${BUILDSUFFIX}</build.suffix>
-            </properties>
-        </profile>
-    </profiles>
-
-</project>
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/flow-types.yang b/opendaylight/sal/yang-prototype/sal/model/model-flow-base/src/main/yang/flow-types.yang
deleted file mode 100644 (file)
index cd364b5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-module opendaylight-flow-types {
-    namespace "urn:opendaylight:flow:types";
-    prefix flow;
-
-    import ietf-inet-types {prefix inet;}
-    import opendaylight-match-types {prefix match;}
-    import ietf-yang-types {prefix yang;}
-
-
-    revision "2013-08-19" {
-        description "Initial revision of flow service";
-    }
-
-    grouping action {
-        choice action {
-            case output-action {
-                leaf-list output-node-connector {
-                    type inet:uri;
-                }
-            }
-
-            case controller-action {
-                leaf max-length {
-                    type uint16 {
-                        range "0..65294";
-                    }
-                }
-            }
-
-            case set-queue-action {
-                leaf queue {
-                    type string; // TODO: define queues
-                }
-            }
-
-            case pop-mpls-action {
-                leaf ethernet-type {
-                        type uint16; // TODO: define ethertype type
-                }
-            }
-
-            case set-mpls-ttl-action {
-                leaf mpls-ttl {
-                    type uint8;
-                }
-            }
-
-            case set-nw-ttl-action {
-                leaf nw-ttl {
-                    type uint8;
-                }
-            }
-
-            case push-pbb-action {
-
-            }
-
-            case push-mpls-action {
-
-            }
-
-            case push-vlan-action {
-
-            }
-        }
-    }
-
-    grouping flow {
-        container match {
-            uses match:match;
-        }
-        list action {
-            key "order";
-            leaf order {
-                type int32;
-            }
-            uses action;
-        }
-        leaf priority {
-            type uint16;
-        }
-        
-        leaf idle-timeout {
-            type uint16;
-        }
-        
-        leaf hard-timeout {
-            type uint16;
-        }
-        
-        leaf cookie {
-            type uint64;
-        }
-    }
-
-    grouping flow-statistics {
-        leaf packet-count {
-            type yang:counter64;
-        } 
-
-        leaf byte-count {
-            type yang:counter64;
-        }
-
-        container duration {
-            leaf second {
-                type yang:counter64;
-            }
-            leaf nanosecond {
-                type yang:counter64;
-            }
-        }
-    }
-
-    grouping flow-table-statistics {
-        leaf active {
-            type yang:counter64;
-        } 
-
-        leaf lookup {
-            type yang:counter64;
-        }
-
-        leaf matched {
-            type yang:counter64;   
-        }
-    }
-}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/sal/sal-core-demo/pom.xml b/opendaylight/sal/yang-prototype/sal/sal-core-demo/pom.xml
deleted file mode 100644 (file)
index a99425c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <parent>\r
-               <groupId>org.opendaylight.controller</groupId>\r
-               <artifactId>sal-parent</artifactId>\r
-               <version>1.0-SNAPSHOT</version>\r
-       </parent>\r
-       <artifactId>sal-core-demo</artifactId>\r
-    <scm>\r
-      <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>\r
-      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>\r
-      <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>\r
-    </scm>\r
-\r
-       <dependencies>\r
-               <dependency>\r
-\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>sal-broker-impl</artifactId>\r
-                       <version>1.0-SNAPSHOT</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.opendaylight.controller</groupId>\r
-                       <artifactId>yang-data-util</artifactId>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.slf4j</groupId>\r
-                       <artifactId>slf4j-simple</artifactId>\r
-                       <version>1.7.2</version>\r
-                       <scope>runtime</scope>\r
-               </dependency>\r
-       </dependencies>\r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <artifactId>maven-assembly-plugin</artifactId>\r
-                               <version>2.4</version>\r
-                               <configuration>\r
-                                       <descriptorRefs>\r
-                                               <descriptorRef>jar-with-dependencies</descriptorRef>\r
-                                       </descriptorRefs>\r
-                                       <archive>\r
-                                               <manifest>\r
-                                                       <mainClass>org.opendaylight.controller.sal.demo.SALDemo</mainClass>\r
-                                               </manifest>\r
-                                       </archive>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>make-assembly</id>\r
-                                               <phase>package</phase>\r
-                                               <goals>\r
-                                                       <goal>single</goal>\r
-                                               </goals>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-\r
-               </plugins>\r
-\r
-       </build>\r
-</project>\r
index 49cdabfeb3055a3f8a3a35237ec1e6168f84d09e..0581aa49ea574a214faf2c78acfbf9ecb449ceb1 100644 (file)
@@ -414,9 +414,8 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
         }
         for (InetAddress i : IPs) {
             Subnet existingSubnet = subnets.get(i);
-            if ((existingSubnet != null)
-                    && !existingSubnet.isMutualExclusive(newSubnet)) {
-                return new Status(StatusCode.CONFLICT);
+            if ((existingSubnet != null) && !existingSubnet.isMutualExclusive(newSubnet)) {
+                return new Status(StatusCode.CONFLICT, "This subnet conflicts with an existing one.");
             }
         }
         return new Status(StatusCode.SUCCESS);
@@ -434,7 +433,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
             // Presence check
             if (subnetsConfigList.containsKey(conf.getName())) {
                 return new Status(StatusCode.CONFLICT,
-                        "Subnet with the specified name already configured.");
+                        "Subnet with the specified name already exists.");
             }
             // Semantic check
             status = semanticCheck(conf);
index 8f905a999a02f3b2c5f3d12395bc0d1a97ac5cc1..5ecddcfc88bd501e65164303e946a29ef36ec46e 100644 (file)
@@ -79,7 +79,6 @@ public class TopologyManagerImpl implements
     static final String TOPONODECONNECTORDB = "topologymanager.nodeConnectorDB";
     static final String TOPOUSERLINKSDB = "topologymanager.userLinksDB";
     private static final Logger log = LoggerFactory.getLogger(TopologyManagerImpl.class);
-    private static final String SAVE = "Save";
     private ITopologyService topoService;
     private IClusterContainerServices clusterContainerService;
     // DB of all the Edges with properties which constitute our topology
index e6f75c2c3847d57b7c2b71f46ec5972550706f08..90352602cd119daca080abbaf2ff1fb956576d9c 100644 (file)
@@ -326,9 +326,9 @@ one.f.switchmanager.nodesLearnt = {
                         if (portsMatch != null) {
                             portsLength = portsMatch.length;
                         }
-                        item.ports = '<span class="nodePorts" style="cursor:pointer;color: #08c" ports='+encodeURIComponent(JSON.stringify(item.ports)) + ' nodeId=' + item.nodeId 
-                            + ' nodeName=' + nodeName  
-                            + '>' + portsLength +'</span>';
+                        item.ports = '<span class="nodePorts" style="cursor:pointer;color: #08c" ports='+encodeURIComponent(JSON.stringify(item.ports)) + ' nodeId="' + item.nodeId
+                            + '" nodeName="' + nodeName
+                            + '">' + portsLength +'</span>';
                     }); 
                     },
                     delay: 0
@@ -374,9 +374,9 @@ one.f.switchmanager.nodesLearnt = {
                             if (portsMatch != null) {
                                 portsLength = portsMatch.length;
                             }
-                            item.ports = '<span class="nodePorts" style="cursor: pointer;color: #08c" ports='+encodeURIComponent(JSON.stringify(item.ports)) + ' nodeId=' + item.nodeId 
-                                + ' nodeName=' + item.nodeName  
-                                + '>' + portsLength +'</span>';
+                            item.ports = '<span class="nodePorts" style="cursor: pointer;color: #08c" ports='+encodeURIComponent(JSON.stringify(item.ports)) + ' nodeId="' + item.nodeId
+                                + '" nodeName="' + item.nodeName
+                                + '">' + portsLength +'</span>';
                         }); 
                     },
                     delay: 0
@@ -808,17 +808,17 @@ one.f.switchmanager.subnetGatewayConfig = {
                     data: data.nodeData,
                     formatter: function(items) {
                         $.each(items, function(index, tableRow) {
-                            tableRow["selector"] = '<input type="checkbox" class="subnetGatewayConfig" id=
-                                + tableRow["name"] + '></input>';
+                            tableRow["selector"] = '<input type="checkbox" class="subnetGatewayConfig" id="'
+                                + tableRow["name"] + '"></input>';
                             var json = tableRow["nodePorts"];
                             var nodePorts = JSON.parse(json);
                             var nodePortHtml = "<div>";
                             $.each(nodePorts, function(index, nodePort) {
                                 nodePortHtml += nodePort["nodePortName"] + " @ " + nodePort["nodeName"];
                                 nodePortHtml += "&nbsp;";
-                                nodePortHtml += '<a href="#" id=' + encodeURIComponent(nodePort["nodePortId"]) + 
-                                    ' gatewayName=' + tableRow["name"] + 
-                                    ' onclick="javascript:one.f.switchmanager.subnetGatewayConfig.actions.deleteNodePort(this);">Remove</a>';
+                                nodePortHtml += '<a href="#" id="' + encodeURIComponent(nodePort["nodePortId"]) +
+                                    '" gatewayName="' + tableRow["name"] +
+                                    '" onclick="javascript:one.f.switchmanager.subnetGatewayConfig.actions.deleteNodePort(this);">Remove</a>';
                                 nodePortHtml += "<br/>";
                             });
                             nodePortHtml += "</div>";
@@ -1159,7 +1159,7 @@ one.f.switchmanager.staticRouteConfig = {
                     data: data.nodeData,
                     formatter: function(items) {
                         $.each(items, function(index, item) {
-                            item["selector"] = '<input type="checkbox" class="staticRoute" id=' + item["name"] + '></input>';
+                            item["selector"] = '<input type="checkbox" class="staticRoute" id="' + item["name"] + '"></input>';
                         });
 
                     },
@@ -1470,7 +1470,7 @@ one.f.switchmanager.spanPortConfig = {
                     data: data.nodeData,
                     formatter: function(items) {
                         $.each(items, function(index, item) {
-                            item["selector"] = '<input type="checkbox" class="spanPortConfig" spanPort=' + encodeURIComponent(item["json"]) + ' spanPortNode=' + item["nodeName"] + ' spanPortPort=' + item["spanPortName"] + '></input>';
+                            item["selector"] = '<input type="checkbox" class="spanPortConfig" spanPort=' + encodeURIComponent(item["json"]) + ' spanPortNode="' + item["nodeName"] + '" spanPortPort="' + item["spanPortName"] + '"></input>';
                         });
                     },
                     delay: 0
index 24f0b4d80c77eb52cbff414f1900614b0521eaac..78f4b5449760e09f9d752e7477b53b49c16f10a7 100644 (file)
@@ -100,8 +100,7 @@ public class DaylightWeb {
     }
 
     @RequestMapping(value = "logout")
-    public String login(Map<String, Object> model,
-            final HttpServletRequest request) {
+    public String logout(Map<String, Object> model, final HttpServletRequest request) {
 
         IUserManager userManager = (IUserManager) ServiceHelper
                 .getGlobalInstance(IUserManager.class, this);