Merge "Exposed binding-rpc-registry to config subsystem."
authorEd Warnicke <eaw@cisco.com>
Tue, 3 Dec 2013 12:20:46 +0000 (12:20 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 3 Dec 2013 12:20:46 +0000 (12:20 +0000)
54 files changed:
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigRegistryImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ModuleInternalInfo.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ModuleInternalTransactionalInfo.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DependencyResolverManager.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/ModulesHolder.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/TransactionHolder.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BlankTransactionServiceTracker.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerImplTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DependencyResolverManagerTest.java
opendaylight/config/config-persister-directory-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/directory/DirectoryPersister.java
opendaylight/config/threadpool-config-impl/pom.xml
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FixedThreadPoolModuleFactory.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FlexibleThreadPoolModuleFactory.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/ScheduledThreadPoolModule.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/ScheduledThreadPoolModuleFactory.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/fixed/FixedThreadPoolModule.java [moved from opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FixedThreadPoolModule.java with 50% similarity]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/fixed/FixedThreadPoolModuleFactory.java [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/flexible/FlexibleThreadPoolModule.java [moved from opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FlexibleThreadPoolModule.java with 62% similarity]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/flexible/FlexibleThreadPoolModuleFactory.java [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/scheduled/ScheduledThreadPoolModule.java [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/scheduled/ScheduledThreadPoolModuleFactory.java [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-fixed.yang [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-flexible.yang [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-scheduled.yang [new file with mode: 0644]
opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl.yang
opendaylight/config/threadpool-config-impl/src/test/java/org/opendaylight/controller/config/threadpool/fixed/FixedThreadPoolConfigBeanTest.java
opendaylight/config/threadpool-config-impl/src/test/java/org/opendaylight/controller/config/threadpool/flexible/FlexibleThreadPoolConfigBeanTest.java
opendaylight/config/threadpool-config-impl/src/test/java/org/opendaylight/controller/config/threadpool/scheduled/ScheduledThreadPoolConfigBeanTest.java
opendaylight/config/threadpool-config-impl/src/test/java/org/opendaylight/controller/config/threadpool/scheduled/TestingScheduledThreadPoolModule.java
opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini
opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/00-netty.conf [new file with mode: 0644]
opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/01-md-sal.conf [moved from opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/controller-config.2.txt with 100% similarity]
opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/controller-config.1.txt [deleted file]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.xtend
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/NodeWrapper.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java
opendaylight/md-sal/sal-rest-connector/src/main/resources/WEB-INF/web.xml
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/FromJsonToCompositeNodeTest.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/FromXmlToCompositeNodeTest.java
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPersisterNotificationHandler.java
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronNetwork.java
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronPort.java
opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java
opendaylight/northbound/flowprogrammer/src/main/resources/WEB-INF/web.xml
opendaylight/northbound/hosttracker/src/main/resources/WEB-INF/web.xml
opendaylight/northbound/staticrouting/src/main/resources/WEB-INF/web.xml
opendaylight/northbound/statistics/src/main/resources/WEB-INF/web.xml
opendaylight/northbound/switchmanager/src/main/resources/WEB-INF/web.xml
opendaylight/northbound/topology/src/main/resources/WEB-INF/web.xml
opendaylight/samples/northbound/loadbalancer/src/main/resources/WEB-INF/web.xml
opendaylight/web/root/src/main/resources/WEB-INF/web.xml

index 0fd6c5279409e3412de86a33735c3dc4daddf058..1b695a9bda2fe42a2fcdd042636e9bff4b0a511d 100644 (file)
@@ -129,10 +129,18 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
      */
     @Override
     public synchronized ObjectName beginConfig() {
-        return beginConfigInternal().getControllerObjectName();
+        return beginConfig(false);
     }
 
-    private synchronized ConfigTransactionControllerInternal beginConfigInternal() {
+    /**
+     * @param blankTransaction true if this transaction is created automatically by
+     *                         org.opendaylight.controller.config.manager.impl.osgi.BlankTransactionServiceTracker
+     */
+    public synchronized ObjectName beginConfig(boolean blankTransaction) {
+        return beginConfigInternal(blankTransaction).getControllerObjectName();
+    }
+
+    private synchronized ConfigTransactionControllerInternal beginConfigInternal(boolean blankTransaction) {
         versionCounter++;
         String transactionName = "ConfigTransaction-" + version + "-" + versionCounter;
         TransactionJMXRegistrator transactionRegistrator = baseJMXRegistrator
@@ -140,7 +148,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
         Map<String, Map.Entry<ModuleFactory, BundleContext>> allCurrentFactories = Collections.unmodifiableMap(resolver.getAllFactories());
         ConfigTransactionControllerInternal transactionController = new ConfigTransactionControllerImpl(
                 transactionName, transactionRegistrator, version,
-                versionCounter, allCurrentFactories, transactionsMBeanServer, configMBeanServer, bundleContext);
+                versionCounter, allCurrentFactories, transactionsMBeanServer, configMBeanServer, blankTransaction);
         try {
             transactionRegistrator.registerMBean(transactionController, transactionController.getControllerObjectName());
         } catch (InstanceAlreadyExistsException e) {
@@ -223,7 +231,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
             RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator;
             if (entry.hasOldModule() == false) {
                 runtimeBeanRegistrator = baseJMXRegistrator
-                        .createRuntimeBeanRegistrator(entry.getName());
+                        .createRuntimeBeanRegistrator(entry.getIdentifier());
             } else {
                 // reuse old JMX registrator
                 runtimeBeanRegistrator = entry.getOldInternalInfo()
@@ -236,7 +244,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
                         .setRuntimeBeanRegistrator(runtimeBeanRegistrator);
             }
             // save it to info so it is accessible afterwards
-            runtimeRegistrators.put(entry.getName(), runtimeBeanRegistrator);
+            runtimeRegistrators.put(entry.getIdentifier(), runtimeBeanRegistrator);
         }
 
         // can register runtime beans
@@ -264,8 +272,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
             // determine if current instance was recreated or reused or is new
 
             // rules for closing resources:
-            // osgi registration - will be (re)created every time, so it needs
-            // to be closed here
+            // osgi registration - will be reused if possible.
             // module jmx registration - will be (re)created every time, needs
             // to be closed here
             // runtime jmx registration - should be taken care of by module
@@ -279,7 +286,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
                 ModuleInternalInfo oldInternalInfo = entry.getOldInternalInfo();
                 DynamicReadableWrapper oldReadableConfigBean = oldInternalInfo
                         .getReadableModule();
-                currentConfig.remove(entry.getName());
+                currentConfig.remove(entry.getIdentifier());
 
                 // test if old instance == new instance
                 if (oldReadableConfigBean.getInstance().equals(module.getInstance())) {
@@ -324,7 +331,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
                     BundleContext bc = configTransactionController.
                             getModuleFactoryBundleContext(moduleFactory.getImplementationName());
                     osgiRegistration = beanToOsgiServiceManager.registerToOsgi(module.getClass(),
-                            newReadableConfigBean.getInstance(), entry.getName(), bc);
+                            newReadableConfigBean.getInstance(), entry.getIdentifier(), bc);
                 } else {
                     throw new NullPointerException(entry.getIdentifier().getFactoryName() + " ModuleFactory not found.");
                 }
@@ -332,11 +339,11 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
             }
 
             RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator = runtimeRegistrators
-                    .get(entry.getName());
+                    .get(entry.getIdentifier());
             ModuleInternalInfo newInfo = new ModuleInternalInfo(
-                    entry.getName(), newReadableConfigBean, osgiRegistration,
+                    entry.getIdentifier(), newReadableConfigBean, osgiRegistration,
                     runtimeBeanRegistrator, newModuleJMXRegistrator,
-                    orderingIdx);
+                    orderingIdx, entry.isDefaultBean());
 
             newConfigEntries.put(module, newInfo);
             orderingIdx++;
@@ -367,7 +374,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
     /**
      * Abort open transactions and unregister read only modules. Since this
      * class is not responsible for registering itself under
-     * {@link ConfigRegistryMXBean#OBJECT_NAME}, it will not unregister itself
+     * {@link org.opendaylight.controller.config.api.ConfigRegistry#OBJECT_NAME}, it will not unregister itself
      * here.
      */
     @Override
index a9ab664fd6d44cd19a4b38c02248a96d938b41b9..3e53a7a217e1855dedb596a2b5f1dedcd707ca85 100644 (file)
@@ -78,13 +78,14 @@ class ConfigTransactionControllerImpl implements
             configBeanModificationDisabled);
     private final MBeanServer configMBeanServer;
 
-    private final BundleContext bundleContext;
+    private final boolean blankTransaction;
 
     public ConfigTransactionControllerImpl(String transactionName,
                                            TransactionJMXRegistrator transactionRegistrator,
                                            long parentVersion, long currentVersion,
                                            Map<String, Map.Entry<ModuleFactory, BundleContext>> currentlyRegisteredFactories,
-                                           MBeanServer transactionsMBeanServer, MBeanServer configMBeanServer, BundleContext bundleContext) {
+                                           MBeanServer transactionsMBeanServer, MBeanServer configMBeanServer,
+                                           boolean blankTransaction) {
 
         this.transactionIdentifier = new TransactionIdentifier(transactionName);
         this.controllerON = ObjectNameUtil
@@ -100,7 +101,7 @@ class ConfigTransactionControllerImpl implements
         this.dependencyResolverManager = new DependencyResolverManager(transactionName, transactionStatus);
         this.transactionsMBeanServer = transactionsMBeanServer;
         this.configMBeanServer = configMBeanServer;
-        this.bundleContext = bundleContext;
+        this.blankTransaction = blankTransaction;
     }
 
     @Override
@@ -143,7 +144,8 @@ class ConfigTransactionControllerImpl implements
                 // ensure default module to be registered to jmx even if its module factory does not use dependencyResolverFactory
                 DependencyResolver dependencyResolver = dependencyResolverManager.getOrCreate(module.getIdentifier());
                 try {
-                    putConfigBeanToJMXAndInternalMaps(module.getIdentifier(), module, moduleFactory, null, dependencyResolver);
+                    boolean defaultBean = true;
+                    putConfigBeanToJMXAndInternalMaps(module.getIdentifier(), module, moduleFactory, null, dependencyResolver, defaultBean);
                 } catch (InstanceAlreadyExistsException e) {
                     throw new IllegalStateException(e);
                 }
@@ -184,7 +186,8 @@ class ConfigTransactionControllerImpl implements
                     "Error while copying old configuration from %s to %s",
                     oldConfigBeanInfo, moduleFactory), e);
         }
-        putConfigBeanToJMXAndInternalMaps(moduleIdentifier, module, moduleFactory, oldConfigBeanInfo, dependencyResolver);
+        putConfigBeanToJMXAndInternalMaps(moduleIdentifier, module, moduleFactory, oldConfigBeanInfo, dependencyResolver,
+                oldConfigBeanInfo.isDefaultBean());
     }
 
     @Override
@@ -201,14 +204,15 @@ class ConfigTransactionControllerImpl implements
         DependencyResolver dependencyResolver = dependencyResolverManager.getOrCreate(moduleIdentifier);
         Module module = moduleFactory.createModule(instanceName, dependencyResolver,
                 getModuleFactoryBundleContext(moduleFactory.getImplementationName()));
+        boolean defaultBean = false;
         return putConfigBeanToJMXAndInternalMaps(moduleIdentifier, module,
-                moduleFactory, null, dependencyResolver);
+                moduleFactory, null, dependencyResolver, defaultBean);
     }
 
     private synchronized ObjectName putConfigBeanToJMXAndInternalMaps(
             ModuleIdentifier moduleIdentifier, Module module,
             ModuleFactory moduleFactory,
-            @Nullable ModuleInternalInfo maybeOldConfigBeanInfo, DependencyResolver dependencyResolver)
+            @Nullable ModuleInternalInfo maybeOldConfigBeanInfo, DependencyResolver dependencyResolver, boolean isDefaultBean)
             throws InstanceAlreadyExistsException {
 
         logger.debug("Adding module {} to transaction {}", moduleIdentifier, this);
@@ -232,14 +236,14 @@ class ConfigTransactionControllerImpl implements
                 .registerMBean(writableDynamicWrapper, writableON);
         ModuleInternalTransactionalInfo moduleInternalTransactionalInfo = new ModuleInternalTransactionalInfo(
                 moduleIdentifier, module, moduleFactory,
-                maybeOldConfigBeanInfo, transactionModuleJMXRegistration);
+                maybeOldConfigBeanInfo, transactionModuleJMXRegistration, isDefaultBean);
 
         dependencyResolverManager.put(moduleInternalTransactionalInfo);
         return writableON;
     }
 
     @Override
-    public void destroyModule(ObjectName objectName)
+    public synchronized void destroyModule(ObjectName objectName)
             throws InstanceNotFoundException {
         String foundTransactionName = ObjectNameUtil
                 .getTransactionName(objectName);
@@ -253,9 +257,17 @@ class ConfigTransactionControllerImpl implements
         destroyModule(moduleIdentifier);
     }
 
-    private void destroyModule(ModuleIdentifier moduleIdentifier) {
+    private synchronized void destroyModule(ModuleIdentifier moduleIdentifier) {
         logger.debug("Destroying module {} in transaction {}", moduleIdentifier, this);
         transactionStatus.checkNotAborted();
+
+        if (blankTransaction == false) {
+            ModuleInternalTransactionalInfo found =
+                    dependencyResolverManager.findModuleInternalTransactionalInfo(moduleIdentifier);
+            if (found.isDefaultBean()) {
+                logger.warn("Warning: removing default bean. This will be forbidden in next version of config-subsystem");
+            }
+        }
         ModuleInternalTransactionalInfo removedTInfo = dependencyResolverManager.destroyModule(moduleIdentifier);
         // remove from jmx
         removedTInfo.getTransactionModuleJMXRegistration().close();
index c675db5bff87d9c3b88bd109c68687454cfc559a..14a706dd9b990e9251233aacef2db022502fb1dc 100644 (file)
@@ -35,12 +35,14 @@ public class ModuleInternalInfo implements Comparable<ModuleInternalInfo>,
     private final OsgiRegistration osgiRegistration;
     private final ModuleJMXRegistrator moduleJMXRegistrator;
     private final int orderingIdx;
+    private final boolean isDefaultBean;
 
     public ModuleInternalInfo(ModuleIdentifier name,
             @Nullable DynamicReadableWrapper readableModule,
             OsgiRegistration osgiRegistration,
             RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator,
-            ModuleJMXRegistrator moduleJMXRegistrator, int orderingIdx) {
+            ModuleJMXRegistrator moduleJMXRegistrator, int orderingIdx,
+            boolean isDefaultBean) {
 
         if (osgiRegistration == null) {
             throw new IllegalArgumentException(
@@ -56,6 +58,7 @@ public class ModuleInternalInfo implements Comparable<ModuleInternalInfo>,
         this.name = name;
         this.moduleJMXRegistrator = moduleJMXRegistrator;
         this.orderingIdx = orderingIdx;
+        this.isDefaultBean = isDefaultBean;
     }
 
     public DynamicReadableWrapper getReadableModule() {
@@ -117,4 +120,8 @@ public class ModuleInternalInfo implements Comparable<ModuleInternalInfo>,
     public ModuleIdentifier getIdentifier() {
         return name;
     }
+
+    public boolean isDefaultBean() {
+        return isDefaultBean;
+    }
 }
index c4f40fbeeb42a6c05e08a6213fc2d928d2a912da..0a4ceacb439c363a5884b0e2296089d6f10ab6ef 100644 (file)
@@ -24,27 +24,22 @@ public class ModuleInternalTransactionalInfo implements Identifiable<ModuleIdent
     @Nullable
     private final ModuleInternalInfo maybeOldInternalInfo;
     private final TransactionModuleJMXRegistration transactionModuleJMXRegistration;
+    private final boolean isDefaultBean;
 
     ModuleInternalTransactionalInfo(ModuleIdentifier name, Module module,
             ModuleFactory moduleFactory,
             ModuleInternalInfo maybeOldInternalInfo,
-            TransactionModuleJMXRegistration transactionModuleJMXRegistration) {
+            TransactionModuleJMXRegistration transactionModuleJMXRegistration,
+            boolean isDefaultBean) {
         this.name = name;
         this.module = module;
         this.moduleFactory = moduleFactory;
         this.maybeOldInternalInfo = maybeOldInternalInfo;
         this.transactionModuleJMXRegistration = transactionModuleJMXRegistration;
+        this.isDefaultBean = isDefaultBean;
     }
 
 
-    /**
-     * Use {@link #getIdentifier()} instead.
-     */
-    @Deprecated
-    public ModuleIdentifier getName() {
-        return name;
-    }
-
     public boolean hasOldModule() {
         return maybeOldInternalInfo != null;
     }
@@ -85,4 +80,8 @@ public class ModuleInternalTransactionalInfo implements Identifiable<ModuleIdent
     public ModuleIdentifier getIdentifier() {
         return name;
     }
+
+    public boolean isDefaultBean() {
+        return isDefaultBean;
+    }
 }
index dea78c8b155d9f125783232bd7c5b531e673bce0..645aab37ff770cfc3cbe6399f139a7cf68a07470 100644 (file)
@@ -117,6 +117,11 @@ public class DependencyResolverManager implements TransactionHolder, DependencyR
                 jmxAttributeForReporting);
     }
 
+    @Override
+    public ModuleInternalTransactionalInfo findModuleInternalTransactionalInfo(ModuleIdentifier moduleIdentifier) {
+        return modulesHolder.findModuleInternalTransactionalInfo(moduleIdentifier);
+    }
+
     @Override
     public ModuleFactory findModuleFactory(ModuleIdentifier moduleIdentifier,
             JmxAttribute jmxAttributeForReporting) {
@@ -139,7 +144,7 @@ public class DependencyResolverManager implements TransactionHolder, DependencyR
         List<ModuleIdentifier> result = new ArrayList<>();
         for( ModuleInternalTransactionalInfo  info : modulesHolder.getAllInfos()) {
             if (factory.equals(info.getModuleFactory())) {
-                result.add(info.getName());
+                result.add(info.getIdentifier());
             }
         }
         return result;
index 6bbd7875a94b1fa8a1d4dd8662b2a9cb835420ea..7c7d9f95a4e71899ff5feec39bdb5433ebc6baa6 100644 (file)
@@ -85,7 +85,7 @@ class ModulesHolder implements TransactionHolder {
     public Map<ModuleIdentifier, Module> getAllModules() {
         Map<ModuleIdentifier, Module> result = new HashMap<>();
         for (ModuleInternalTransactionalInfo entry : commitMap.values()) {
-            ModuleIdentifier name = entry.getName();
+            ModuleIdentifier name = entry.getIdentifier();
             result.put(name, entry.getModule());
         }
         return result;
@@ -94,17 +94,17 @@ class ModulesHolder implements TransactionHolder {
     @Override
     public void put(
             ModuleInternalTransactionalInfo moduleInternalTransactionalInfo) {
-        commitMap.put(moduleInternalTransactionalInfo.getName(),
+        commitMap.put(moduleInternalTransactionalInfo.getIdentifier(),
                 moduleInternalTransactionalInfo);
     }
 
     @Override
     public ModuleInternalTransactionalInfo destroyModule(
             ModuleIdentifier moduleIdentifier) {
-        ModuleInternalTransactionalInfo found = commitMap
-                .remove(moduleIdentifier);
-        if (found == null)
+        ModuleInternalTransactionalInfo found = commitMap.remove(moduleIdentifier);
+        if (found == null) {
             throw new IllegalStateException("Not found:" + moduleIdentifier);
+        }
         if (found.hasOldModule()) {
             unorderedDestroyedFromPreviousTransactions.add(found);
         }
@@ -123,4 +123,13 @@ class ModulesHolder implements TransactionHolder {
     public Collection<ModuleInternalTransactionalInfo> getAllInfos(){
         return commitMap.values();
     }
+
+    @Override
+    public ModuleInternalTransactionalInfo findModuleInternalTransactionalInfo(ModuleIdentifier moduleIdentifier) {
+        ModuleInternalTransactionalInfo found = commitMap.get(moduleIdentifier);
+        if (found == null) {
+            throw new IllegalStateException("Not found:" + moduleIdentifier);
+        }
+        return found;
+    }
 }
index 8f05ed75ae74a64d4c45c42969ee32d235880395..bccd453af061080841349cf783c3e0ad40d39b21 100644 (file)
@@ -36,4 +36,6 @@ interface TransactionHolder {
     void assertNotExists(ModuleIdentifier moduleIdentifier)
             throws InstanceAlreadyExistsException;
 
+    ModuleInternalTransactionalInfo findModuleInternalTransactionalInfo(ModuleIdentifier moduleIdentifier);
+
 }
index 3d0decb93d3c98d5238de6bfc856906147141151..ec1a290cd204dedaf2c744dbcc97dc4cfcb36ce5 100644 (file)
@@ -44,7 +44,8 @@ public class BlankTransactionServiceTracker implements ServiceTrackerCustomizer<
         for (int i = 0; i < 10; i++) {
             try {
                 // create transaction
-                ObjectName tx = configRegistry.beginConfig();
+                boolean blankTransaction = true;
+                ObjectName tx = configRegistry.beginConfig(blankTransaction);
                 CommitStatus commitStatus = configRegistry.commitConfig(tx);
                 logger.debug("Committed blank transaction with status {}", commitStatus);
                 return;
index 3cb0f447b464d89efd32f69c84378d0de77a5671..22a959060cfaca6d598e8e84a41225352bd00eb1 100644 (file)
@@ -67,7 +67,7 @@ public class ConfigTransactionControllerImplTest extends
         testedTxController = new ConfigTransactionControllerImpl(
                 transactionName123, jmxRegistrator123, 1, 1,
                 currentlyRegisteredFactories, transactionsMBeanServer,
-                ManagementFactory.getPlatformMBeanServer(), null);
+                ManagementFactory.getPlatformMBeanServer(), false);
         TransactionModuleJMXRegistrator transactionModuleJMXRegistrator123 = testedTxController
                 .getTxModuleJMXRegistrator();
         transactionModuleJMXRegistrator123.registerMBean(
index a79cb83a3834230ff3b1bba45f3f70a234dff345..65b010532bfe342dd7db6b155ca8190d61e7b5b9 100644 (file)
@@ -86,7 +86,7 @@ public class DependencyResolverManagerTest {
     private static void mockGetInstance(DependencyResolverManager tested,
             ModuleIdentifier moduleIdentifier) {
         ModuleInternalTransactionalInfo mock = mock(ModuleInternalTransactionalInfo.class);
-        doReturn(moduleIdentifier).when(mock).getName();
+        doReturn(moduleIdentifier).when(mock).getIdentifier();
         doReturn(mockedModule()).when(mock).getModule();
         tested.put(mock);
     }
index cf4ef98bdc95ecc95700d18191135191660052c1..25628b6041de94cc099eef49314756b77171324d 100644 (file)
@@ -78,7 +78,7 @@ public class DirectoryPersister implements Persister {
         for (File file : sortedFiles) {
             logger.trace("Adding file '{}' to combined result", file);
 
-            final MyLineProcessor lineProcessor = new MyLineProcessor();
+            final MyLineProcessor lineProcessor = new MyLineProcessor(file.getAbsolutePath());
             Files.readLines(file, ENCODING, lineProcessor);
 
             modulesBuilder.append(lineProcessor.getModules());
@@ -103,11 +103,16 @@ public class DirectoryPersister implements Persister {
 }
 
 class MyLineProcessor implements com.google.common.io.LineProcessor<String> {
+    private final String fileNameForReporting;
 
     private boolean inModules, inServices, inCapabilities;
     private final StringBuffer modulesBuffer = new StringBuffer(), servicesBuilder = new StringBuffer();
     private final SortedSet<String> caps = new TreeSet<>();
 
+    MyLineProcessor(String fileNameForReporting) {
+        this.fileNameForReporting = fileNameForReporting;
+    }
+
     @Override
     public String getResult() {
         return null;
@@ -138,18 +143,25 @@ class MyLineProcessor implements com.google.common.io.LineProcessor<String> {
         return true;
     }
 
+    private void checkFileConsistency(){
+        checkState(inCapabilities, "File {} is missing delimiters in this order: {}", fileNameForReporting,
+                Arrays.asList(DirectoryPersister.MODULES_START,
+                        DirectoryPersister.SERVICES_START,
+                        DirectoryPersister.CAPABILITIES_START));
+    }
+
     String getModules() {
-        checkState(inCapabilities);
+        checkFileConsistency();
         return modulesBuffer.toString();
     }
 
     String getServices() {
-        checkState(inCapabilities);
+        checkFileConsistency();
         return servicesBuilder.toString();
     }
 
     SortedSet<String> getCapabilities() {
-        checkState(inCapabilities);
+        checkFileConsistency();
         return caps;
     }
 
index 4cbe3976933afc070b3b0d81578bfe3f68e7033b..53b8b2b53ceab9ea205d964b3416249a31c9777b 100644 (file)
@@ -69,7 +69,7 @@
                   <Private-Package>
                      org.opendaylight.controller.config.threadpool.util,
                      javax.annotation.*,
-                     org.opendaylight.controller.config.yang.threadpool.impl,
+                     org.opendaylight.controller.config.yang.threadpool.impl*,
                   </Private-Package>
                   <Export-Package>
                       org.opendaylight.controller.config.threadpool.util,
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FixedThreadPoolModuleFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FixedThreadPoolModuleFactory.java
deleted file mode 100644 (file)
index 2803448..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: threadpool-impl  yang module local name: threadpool-fixed
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 06 16:19:33 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.threadpool.impl;
-
-/**
-*
-*/
-public class FixedThreadPoolModuleFactory extends
-        org.opendaylight.controller.config.yang.threadpool.impl.AbstractFixedThreadPoolModuleFactory {
-
-}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FlexibleThreadPoolModuleFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/FlexibleThreadPoolModuleFactory.java
deleted file mode 100644 (file)
index ef6ebd2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: threadpool-impl  yang module local name: threadpool-flexible
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 06 16:19:33 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.threadpool.impl;
-
-/**
-*
-*/
-public class FlexibleThreadPoolModuleFactory extends
-        org.opendaylight.controller.config.yang.threadpool.impl.AbstractFlexibleThreadPoolModuleFactory {
-
-}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/ScheduledThreadPoolModule.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/ScheduledThreadPoolModule.java
deleted file mode 100644 (file)
index 42739b4..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: threadpool-impl  yang module local name: threadpool-scheduled
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 06 16:19:33 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.threadpool.impl;
-
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper;
-
-/**
-*
-*/
-public final class ScheduledThreadPoolModule extends
-        org.opendaylight.controller.config.yang.threadpool.impl.AbstractScheduledThreadPoolModule {
-
-    public ScheduledThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public ScheduledThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            ScheduledThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void validate() {
-        super.validate();
-        JmxAttributeValidationException.checkNotNull(getMaxThreadCount(), maxThreadCountJmxAttribute);
-        JmxAttributeValidationException.checkCondition(getMaxThreadCount() > 0, "must be greater than zero",
-                maxThreadCountJmxAttribute);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new ScheduledThreadPoolWrapper(getMaxThreadCount(), getThreadFactoryDependency());
-    }
-}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/ScheduledThreadPoolModuleFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/ScheduledThreadPoolModuleFactory.java
deleted file mode 100644 (file)
index 489af82..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Generated file
-
- * Generated from: yang module name: threadpool-impl  yang module local name: threadpool-scheduled
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 06 16:19:33 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.threadpool.impl;
-
-/**
-*
-*/
-public class ScheduledThreadPoolModuleFactory extends
-        org.opendaylight.controller.config.yang.threadpool.impl.AbstractScheduledThreadPoolModuleFactory {
-
-}
@@ -1,13 +1,13 @@
 /**
- * Generated file
+* Generated file
 
- * Generated from: yang module name: threadpool-impl  yang module local name: threadpool-fixed
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 06 16:19:33 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.threadpool.impl;
+* Generated from: yang module name: threadpool-impl-fixed  yang module local name: threadpool-fixed
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun Dec 01 17:13:32 CET 2013
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.threadpool.impl.fixed;
 
 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
 import org.opendaylight.controller.config.threadpool.util.FixedThreadPoolWrapper;
@@ -15,22 +15,19 @@ import org.opendaylight.controller.config.threadpool.util.FixedThreadPoolWrapper
 /**
 *
 */
-public final class FixedThreadPoolModule extends
-        org.opendaylight.controller.config.yang.threadpool.impl.AbstractFixedThreadPoolModule {
+public final class FixedThreadPoolModule extends org.opendaylight.controller.config.yang.threadpool.impl.fixed.AbstractFixedThreadPoolModule
+{
 
-    public FixedThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+    public FixedThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
     }
 
-    public FixedThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            FixedThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
+    public FixedThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, FixedThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
         super(identifier, dependencyResolver, oldModule, oldInstance);
     }
 
     @Override
-    public void validate() {
+    public void validate(){
         super.validate();
 
         JmxAttributeValidationException.checkNotNull(getMaxThreadCount(), maxThreadCountJmxAttribute);
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/fixed/FixedThreadPoolModuleFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/fixed/FixedThreadPoolModuleFactory.java
new file mode 100644 (file)
index 0000000..1d3a37c
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+* Generated file
+
+* Generated from: yang module name: threadpool-impl-fixed  yang module local name: threadpool-fixed
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun Dec 01 17:13:32 CET 2013
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.threadpool.impl.fixed;
+
+/**
+*
+*/
+public class FixedThreadPoolModuleFactory extends org.opendaylight.controller.config.yang.threadpool.impl.fixed.AbstractFixedThreadPoolModuleFactory
+{
+
+
+}
@@ -1,13 +1,13 @@
 /**
- * Generated file
+* Generated file
 
- * Generated from: yang module name: threadpool-impl  yang module local name: threadpool-flexible
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 06 16:19:33 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.threadpool.impl;
+* Generated from: yang module name: threadpool-impl-flexible  yang module local name: threadpool-flexible
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun Dec 01 17:13:32 CET 2013
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.threadpool.impl.flexible;
 
 import java.util.concurrent.TimeUnit;
 
@@ -17,22 +17,19 @@ import org.opendaylight.controller.config.threadpool.util.FlexibleThreadPoolWrap
 /**
 *
 */
-public final class FlexibleThreadPoolModule extends
-        org.opendaylight.controller.config.yang.threadpool.impl.AbstractFlexibleThreadPoolModule {
+public final class FlexibleThreadPoolModule extends org.opendaylight.controller.config.yang.threadpool.impl.flexible.AbstractFlexibleThreadPoolModule
+{
 
-    public FlexibleThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+    public FlexibleThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
     }
 
-    public FlexibleThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            FlexibleThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
+    public FlexibleThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, FlexibleThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
         super(identifier, dependencyResolver, oldModule, oldInstance);
     }
 
     @Override
-    public void validate() {
+    public void validate(){
         super.validate();
         JmxAttributeValidationException.checkNotNull(getKeepAliveMillis(), keepAliveMillisJmxAttribute);
         JmxAttributeValidationException.checkCondition(getKeepAliveMillis() > 0, "must be greater than zero",
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/flexible/FlexibleThreadPoolModuleFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/flexible/FlexibleThreadPoolModuleFactory.java
new file mode 100644 (file)
index 0000000..878adcf
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+* Generated file
+
+* Generated from: yang module name: threadpool-impl-flexible  yang module local name: threadpool-flexible
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun Dec 01 17:13:32 CET 2013
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.threadpool.impl.flexible;
+
+/**
+*
+*/
+public class FlexibleThreadPoolModuleFactory extends org.opendaylight.controller.config.yang.threadpool.impl.flexible.AbstractFlexibleThreadPoolModuleFactory
+{
+
+
+}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/scheduled/ScheduledThreadPoolModule.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/scheduled/ScheduledThreadPoolModule.java
new file mode 100644 (file)
index 0000000..83c4ccc
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+* Generated file
+
+* Generated from: yang module name: threadpool-impl-scheduled  yang module local name: threadpool-scheduled
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun Dec 01 17:13:32 CET 2013
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.threadpool.impl.scheduled;
+
+import org.opendaylight.controller.config.api.JmxAttributeValidationException;
+import org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper;
+
+/**
+*
+*/
+public final class ScheduledThreadPoolModule extends org.opendaylight.controller.config.yang.threadpool.impl.scheduled.AbstractScheduledThreadPoolModule
+{
+
+    public ScheduledThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public ScheduledThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, ScheduledThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void validate(){
+        super.validate();
+        JmxAttributeValidationException.checkNotNull(getMaxThreadCount(), maxThreadCountJmxAttribute);
+        JmxAttributeValidationException.checkCondition(getMaxThreadCount() > 0, "must be greater than zero",
+                maxThreadCountJmxAttribute);
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        return new ScheduledThreadPoolWrapper(getMaxThreadCount(), getThreadFactoryDependency());
+    }
+}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/scheduled/ScheduledThreadPoolModuleFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/yang/threadpool/impl/scheduled/ScheduledThreadPoolModuleFactory.java
new file mode 100644 (file)
index 0000000..ea345ba
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+* Generated file
+
+* Generated from: yang module name: threadpool-impl-scheduled  yang module local name: threadpool-scheduled
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Sun Dec 01 17:13:32 CET 2013
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.threadpool.impl.scheduled;
+
+/**
+*
+*/
+public class ScheduledThreadPoolModuleFactory extends org.opendaylight.controller.config.yang.threadpool.impl.scheduled.AbstractScheduledThreadPoolModuleFactory
+{
+
+
+}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-fixed.yang b/opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-fixed.yang
new file mode 100644 (file)
index 0000000..b09ce5b
--- /dev/null
@@ -0,0 +1,55 @@
+module threadpool-impl-fixed {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:fixed";
+    prefix "th-java-fixed";
+
+    import threadpool { prefix th; revision-date 2013-04-09; }
+    import config { prefix config; revision-date 2013-04-05; }
+    import rpc-context { prefix rpcx; revision-date 2013-06-17; }
+
+    organization "Cisco Systems, Inc.";
+
+    contact "Robert Varga <rovarga@cisco.com>";
+
+    description
+        "This module contains the base YANG definitions for
+         thread services pure Java implementation.
+
+        Copyright (c)2013 Cisco Systems, Inc. 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";
+
+    revision "2013-12-01" {
+        description
+            "Initial revision";
+    }
+
+
+    identity threadpool-fixed {
+        base config:module-type;
+        config:provided-service th:threadpool;
+        config:java-name-prefix FixedThreadPool;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case threadpool-fixed {
+            when "/config:modules/config:module/config:type = 'threadpool-fixed'";
+            leaf max-thread-count {
+                type uint16;
+            }
+
+            container threadFactory {
+                uses config:service-ref {
+                    refine type {
+                        //mandatory true;
+                        config:required-identity th:threadfactory;
+                    }
+                }
+            }
+        }
+    }
+}
+
diff --git a/opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-flexible.yang b/opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-flexible.yang
new file mode 100644 (file)
index 0000000..8d1a630
--- /dev/null
@@ -0,0 +1,59 @@
+module threadpool-impl-flexible {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:flexible";
+    prefix "th-java-flexible";
+
+    import threadpool { prefix th; revision-date 2013-04-09; }
+    import config { prefix config; revision-date 2013-04-05; }
+    import rpc-context { prefix rpcx; revision-date 2013-06-17; }
+
+    organization "Cisco Systems, Inc.";
+
+    contact "Robert Varga <rovarga@cisco.com>";
+
+    description
+        "This module contains the base YANG definitions for
+         thread services pure Java implementation.
+
+        Copyright (c)2013 Cisco Systems, Inc. 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";
+
+    revision "2013-12-01" {
+        description
+            "Initial revision";
+    }
+
+    identity threadpool-flexible {
+        base config:module-type;
+        config:provided-service th:threadpool;
+        config:java-name-prefix FlexibleThreadPool;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case threadpool-flexible {
+            when "/config:modules/config:module/config:type = 'threadpool-flexible'";
+            leaf max-thread-count {
+                type uint16;
+            }
+            leaf minThreadCount {
+                type uint16;
+            }
+            leaf keepAliveMillis {
+                type uint32;
+            }
+
+            container threadFactory {
+                uses config:service-ref {
+                    refine type {
+                       // mandatory true;
+                        config:required-identity th:threadfactory;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-scheduled.yang b/opendaylight/config/threadpool-config-impl/src/main/yang/threadpool-impl-scheduled.yang
new file mode 100644 (file)
index 0000000..07f6c5b
--- /dev/null
@@ -0,0 +1,53 @@
+module threadpool-impl-scheduled {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:scheduled";
+    prefix "th-java-scheduled";
+
+    import threadpool { prefix th; revision-date 2013-04-09; }
+    import config { prefix config; revision-date 2013-04-05; }
+    import rpc-context { prefix rpcx; revision-date 2013-06-17; }
+
+    organization "Cisco Systems, Inc.";
+
+    contact "Robert Varga <rovarga@cisco.com>";
+
+    description
+        "This module contains the base YANG definitions for
+         thread services pure Java implementation.
+
+        Copyright (c)2013 Cisco Systems, Inc. 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";
+
+    revision "2013-12-01" {
+        description
+            "Initial revision";
+    }
+
+    identity threadpool-scheduled {
+        base config:module-type;
+        config:provided-service th:scheduled-threadpool;
+        config:java-name-prefix ScheduledThreadPool;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case threadpool-scheduled {
+            when "/config:modules/config:module/config:type = 'threadpool-scheduled'";
+            leaf max-thread-count {
+                type uint16;
+            }
+
+            container threadFactory {
+                uses config:service-ref {
+                    refine type {
+                     //   mandatory true;
+                        config:required-identity th:threadfactory;
+                    }
+                }
+            }
+        }
+    }
+}
index a2366f285a0c0b8682b1093f18fb5ee184c9cde3..cc4af4d5969fec0fab92146b0732df31fa47b430 100644 (file)
@@ -1,4 +1,3 @@
-// vi: set smarttab et sw=4 tabstop=4:
 module threadpool-impl {
     yang-version 1;
     namespace "urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl";
@@ -17,11 +16,11 @@ module threadpool-impl {
          thread services pure Java implementation.
 
         Copyright (c)2013 Cisco Systems, Inc. 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";
+        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";
 
     revision "2013-04-05" {
         description
@@ -40,21 +39,21 @@ module threadpool-impl {
         config:java-name-prefix EventBus;
     }
 
-       augment "/config:modules/config:module/config:configuration" {
-               case eventbus {
-                       when "/config:modules/config:module/config:type = 'eventbus'";
-                       // No real configuration
+    augment "/config:modules/config:module/config:configuration" {
+        case eventbus {
+            when "/config:modules/config:module/config:type = 'eventbus'";
+            // No real configuration
         }
     }
 
-       augment "/config:modules/config:module/config:state" {
-               case eventbus {
-                       when "/config:modules/config:module/config:type = 'eventbus'";
-                       rpcx:rpc-context-instance "event-bus-rpc";
+    augment "/config:modules/config:module/config:state" {
+        case eventbus {
+            when "/config:modules/config:module/config:type = 'eventbus'";
+            rpcx:rpc-context-instance "event-bus-rpc";
         }
     }
 
-       identity event-bus-rpc;
+    identity event-bus-rpc;
 
     identity async-eventbus {
         base config:module-type;
@@ -62,134 +61,56 @@ module threadpool-impl {
         config:java-name-prefix AsyncEventBus;
     }
 
-       augment "/config:modules/config:module/config:configuration" {
-               case async-eventbus {
-                       when "/config:modules/config:module/config:type = 'async-eventbus'";
-                       container threadpool {
-                               uses config:service-ref {
-                                       refine type {
-                                               //mandatory true;
-                                               config:required-identity th:threadpool;
-                                       }
-                               }
-                       }
-               }
-       }
-
-       augment "/config:modules/config:module/config:state" {
-               case async-eventbus {
-                       when "/config:modules/config:module/config:type = 'async-eventbus'";
-                       rpcx:rpc-context-instance "event-bus-rpc";
+    augment "/config:modules/config:module/config:configuration" {
+        case async-eventbus {
+            when "/config:modules/config:module/config:type = 'async-eventbus'";
+            container threadpool {
+                uses config:service-ref {
+                    refine type {
+                        //mandatory true;
+                        config:required-identity th:threadpool;
+                    }
+                }
+            }
         }
     }
 
-       rpc get-dead-events-count {
-               config:java-name-prefix countDeadEvents;
-               input {
-                       uses rpcx:rpc-context-ref {
-                               refine context-instance {
-                                       rpcx:rpc-context-instance event-bus-rpc;
-                               }
-                       }
-               }
-               output {
-                       leaf result {
-                               type uint32;
-                       }
-               }
-       }
-       
-       identity threadfactory-naming {
-        base config:module-type;
-               config:provided-service th:threadfactory;
-        config:java-name-prefix NamingThreadFactory;
+    augment "/config:modules/config:module/config:state" {
+        case async-eventbus {
+            when "/config:modules/config:module/config:type = 'async-eventbus'";
+            rpcx:rpc-context-instance "event-bus-rpc";
+        }
     }
 
-       augment "/config:modules/config:module/config:configuration" {
-               case threadfactory-naming {
-                       when "/config:modules/config:module/config:type = 'threadfactory-naming'";
-                       leaf name-prefix {
-                               type string;
-                       }
+    rpc get-dead-events-count {
+        config:java-name-prefix countDeadEvents;
+        input {
+            uses rpcx:rpc-context-ref {
+                refine context-instance {
+                    rpcx:rpc-context-instance event-bus-rpc;
+                }
+            }
+        }
+        output {
+            leaf result {
+                type uint32;
+            }
         }
     }
 
-    identity threadpool-fixed {
-       base config:module-type;
-       config:provided-service th:threadpool;
-       config:java-name-prefix FixedThreadPool;
+    identity threadfactory-naming {
+        base config:module-type;
+        config:provided-service th:threadfactory;
+        config:java-name-prefix NamingThreadFactory;
     }
 
-       augment "/config:modules/config:module/config:configuration" {
-               case threadpool-fixed {
-                       when "/config:modules/config:module/config:type = 'threadpool-fixed'";
-                       leaf max-thread-count {
-                               type uint16;
-                       }
-
-                       container threadFactory {
-                               uses config:service-ref {
-                                       refine type {
-                                               //mandatory true;
-                                               config:required-identity th:threadfactory;
-                                       }
-                               }
-                       }
+    augment "/config:modules/config:module/config:configuration" {
+        case threadfactory-naming {
+            when "/config:modules/config:module/config:type = 'threadfactory-naming'";
+            leaf name-prefix {
+                type string;
+            }
         }
-       }
-
-       identity threadpool-flexible {
-               base config:module-type;
-               config:provided-service th:threadpool;
-               config:java-name-prefix FlexibleThreadPool;
-       }
-
-       augment "/config:modules/config:module/config:configuration" {
-               case threadpool-flexible {
-                       when "/config:modules/config:module/config:type = 'threadpool-flexible'";
-                       leaf max-thread-count {
-                               type uint16;
-                       }
-                       leaf minThreadCount {
-                               type uint16;
-                       }
-                       leaf keepAliveMillis {
-                               type uint32;
-                       }
-
-                       container threadFactory {
-                               uses config:service-ref {
-                                       refine type {
-                                          // mandatory true;
-                                               config:required-identity th:threadfactory;
-                                       }
-                               }
-                       }
-        }
-       }
-
-    identity threadpool-scheduled {
-               base config:module-type;
-               config:provided-service th:scheduled-threadpool;
-               config:java-name-prefix ScheduledThreadPool;
-       }
-
-       augment "/config:modules/config:module/config:configuration" {
-               case threadpool-scheduled {
-                       when "/config:modules/config:module/config:type = 'threadpool-scheduled'";
-                       leaf max-thread-count {
-                               type uint16;
-                       }
-
-                       container threadFactory {
-                               uses config:service-ref {
-                                       refine type {
-                                        //   mandatory true;
-                                               config:required-identity th:threadfactory;
-                                       }
-                               }
-                       }
-               }
-       }
+    }
 }
 
index 4fda06bf4c27cebb6a211c96f285124c847759f6..81455a9b21497c4cf1082cdf19542b5276facb92 100644 (file)
@@ -1,13 +1,5 @@
 package org.opendaylight.controller.config.threadpool.fixed;\r
 \r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.fail;\r
-import static org.junit.matchers.JUnitMatchers.containsString;\r
-\r
-import javax.management.InstanceAlreadyExistsException;\r
-import javax.management.InstanceNotFoundException;\r
-import javax.management.ObjectName;\r
-\r
 import org.junit.Before;\r
 import org.junit.Test;\r
 import org.opendaylight.controller.config.api.ConflictingVersionException;\r
@@ -16,10 +8,18 @@ import org.opendaylight.controller.config.api.jmx.CommitStatus;
 import org.opendaylight.controller.config.manager.impl.AbstractConfigTest;\r
 import org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver;\r
 import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.FixedThreadPoolModuleFactory;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.FixedThreadPoolModuleMXBean;\r
 import org.opendaylight.controller.config.yang.threadpool.impl.NamingThreadFactoryModuleFactory;\r
 import org.opendaylight.controller.config.yang.threadpool.impl.NamingThreadFactoryModuleMXBean;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.fixed.FixedThreadPoolModuleFactory;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.fixed.FixedThreadPoolModuleMXBean;\r
+\r
+import javax.management.InstanceAlreadyExistsException;\r
+import javax.management.InstanceNotFoundException;\r
+import javax.management.ObjectName;\r
+\r
+import static org.junit.Assert.assertThat;\r
+import static org.junit.Assert.fail;\r
+import static org.junit.matchers.JUnitMatchers.containsString;\r
 \r
 public class FixedThreadPoolConfigBeanTest extends AbstractConfigTest {\r
 \r
index ee1de8f8ab633f7d277834a6761ed504aecaa446..5f1a3ee95723d737ce1ad2a7de2d1355fbf7cc45 100644 (file)
@@ -1,13 +1,5 @@
 package org.opendaylight.controller.config.threadpool.flexible;\r
 \r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.fail;\r
-import static org.junit.matchers.JUnitMatchers.containsString;\r
-\r
-import javax.management.InstanceAlreadyExistsException;\r
-import javax.management.InstanceNotFoundException;\r
-import javax.management.ObjectName;\r
-\r
 import org.junit.Before;\r
 import org.junit.Test;\r
 import org.opendaylight.controller.config.api.ConflictingVersionException;\r
@@ -16,10 +8,18 @@ import org.opendaylight.controller.config.api.jmx.CommitStatus;
 import org.opendaylight.controller.config.manager.impl.AbstractConfigTest;\r
 import org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver;\r
 import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.FlexibleThreadPoolModuleFactory;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.FlexibleThreadPoolModuleMXBean;\r
 import org.opendaylight.controller.config.yang.threadpool.impl.NamingThreadFactoryModuleFactory;\r
 import org.opendaylight.controller.config.yang.threadpool.impl.NamingThreadFactoryModuleMXBean;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.flexible.FlexibleThreadPoolModuleFactory;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.flexible.FlexibleThreadPoolModuleMXBean;\r
+\r
+import javax.management.InstanceAlreadyExistsException;\r
+import javax.management.InstanceNotFoundException;\r
+import javax.management.ObjectName;\r
+\r
+import static org.junit.Assert.assertThat;\r
+import static org.junit.Assert.fail;\r
+import static org.junit.matchers.JUnitMatchers.containsString;\r
 \r
 public class FlexibleThreadPoolConfigBeanTest extends AbstractConfigTest {\r
 \r
index b4b1b60ffef8f6cabccf4c069f74edccb0dc5de6..1567896701f47e46b725fbc0af13d3c45388bc2c 100644 (file)
@@ -1,15 +1,5 @@
 package org.opendaylight.controller.config.threadpool.scheduled;\r
 \r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertThat;\r
-import static org.junit.Assert.assertTrue;\r
-import static org.junit.Assert.fail;\r
-import static org.junit.matchers.JUnitMatchers.containsString;\r
-\r
-import javax.management.InstanceAlreadyExistsException;\r
-import javax.management.InstanceNotFoundException;\r
-import javax.management.ObjectName;\r
-\r
 import org.junit.Before;\r
 import org.junit.Test;\r
 import org.opendaylight.controller.config.api.ConflictingVersionException;\r
@@ -20,8 +10,18 @@ import org.opendaylight.controller.config.manager.impl.factoriesresolver.Hardcod
 import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;\r
 import org.opendaylight.controller.config.yang.threadpool.impl.NamingThreadFactoryModuleFactory;\r
 import org.opendaylight.controller.config.yang.threadpool.impl.NamingThreadFactoryModuleMXBean;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.ScheduledThreadPoolModuleFactory;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.ScheduledThreadPoolModuleMXBean;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.scheduled.ScheduledThreadPoolModuleFactory;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.scheduled.ScheduledThreadPoolModuleMXBean;\r
+\r
+import javax.management.InstanceAlreadyExistsException;\r
+import javax.management.InstanceNotFoundException;\r
+import javax.management.ObjectName;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertThat;\r
+import static org.junit.Assert.assertTrue;\r
+import static org.junit.Assert.fail;\r
+import static org.junit.matchers.JUnitMatchers.containsString;\r
 \r
 public class ScheduledThreadPoolConfigBeanTest extends AbstractConfigTest {\r
 \r
index 27e60eef5cab734c64ba33622df00e2b230af020..d1464baa6e0ffb48d2aa7ebf84ac83b484846527 100644 (file)
@@ -1,27 +1,25 @@
 package org.opendaylight.controller.config.threadpool.scheduled;\r
 \r
-import static org.mockito.Matchers.any;\r
-import static org.mockito.Matchers.anyBoolean;\r
-import static org.mockito.Matchers.anyLong;\r
-import static org.mockito.Mockito.doNothing;\r
-import static org.mockito.Mockito.doReturn;\r
-import static org.mockito.Mockito.mock;\r
-\r
-import java.util.concurrent.ScheduledExecutorService;\r
-import java.util.concurrent.ScheduledFuture;\r
-import java.util.concurrent.TimeUnit;\r
-\r
-import javax.management.ObjectName;\r
-\r
+import com.google.common.util.concurrent.ListenableFutureTask;\r
 import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;\r
 import org.opendaylight.controller.config.api.ModuleIdentifier;\r
 import org.opendaylight.controller.config.manager.impl.AbstractMockedModule;\r
 import org.opendaylight.controller.config.spi.Module;\r
 import org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper;\r
 import org.opendaylight.controller.config.yang.threadpool.ScheduledThreadPoolServiceInterface;\r
-import org.opendaylight.controller.config.yang.threadpool.impl.ScheduledThreadPoolModuleMXBean;\r
+import org.opendaylight.controller.config.yang.threadpool.impl.scheduled.ScheduledThreadPoolModuleMXBean;\r
 \r
-import com.google.common.util.concurrent.ListenableFutureTask;\r
+import javax.management.ObjectName;\r
+import java.util.concurrent.ScheduledExecutorService;\r
+import java.util.concurrent.ScheduledFuture;\r
+import java.util.concurrent.TimeUnit;\r
+\r
+import static org.mockito.Matchers.any;\r
+import static org.mockito.Matchers.anyBoolean;\r
+import static org.mockito.Matchers.anyLong;\r
+import static org.mockito.Mockito.doNothing;\r
+import static org.mockito.Mockito.doReturn;\r
+import static org.mockito.Mockito.mock;\r
 \r
 public class TestingScheduledThreadPoolModule extends AbstractMockedModule implements\r
         ScheduledThreadPoolServiceInterface, Module, ScheduledThreadPoolModuleMXBean {\r
index b5bdb9e903d64e5a490b7f1e4f0530613d46e96c..b9b9c7337d8922e82b8f1f8927c40be8422d8d51 100644 (file)
@@ -28,6 +28,7 @@ netconf.config.persister.1.readonly=true
 
 netconf.config.persister.2.storageAdapterClass=org.opendaylight.controller.config.persist.storage.file.FileStorageAdapter
 netconf.config.persister.2.properties.fileStorage=configuration/current/controller.currentconfig.txt
+netconf.config.persister.2.properties.numberOfBackups=1
 
 
 yangstore.blacklist=.*controller.model.*
diff --git a/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/00-netty.conf b/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/00-netty.conf
new file mode 100644 (file)
index 0000000..ffee9c6
--- /dev/null
@@ -0,0 +1,48 @@
+//MODULES START
+       <module>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup">netty:netty-threadgroup-fixed</type>
+               <name>global-boss-group</name>
+       </module>
+       <module>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup">netty:netty-threadgroup-fixed</type>
+               <name>global-worker-group</name>
+       </module>
+       <module>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:timer">netty:netty-hashed-wheel-timer</type>
+               <name>global-timer</name>
+       </module>
+       <module>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor">netty:netty-global-event-executor</type>
+               <name>global-event-executor</name>
+       </module>
+//SERVICES START
+       <service>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
+               <instance>
+                       <name>global-boss-group</name>
+                       <provider>/config/modules/module[name='netty-threadgroup-fixed']/instance[name='global-boss-group']</provider>
+               </instance>
+               <instance>
+                       <name>global-worker-group</name>
+                       <provider>/config/modules/module[name='netty-threadgroup-fixed']/instance[name='global-worker-group']</provider>
+               </instance>
+       </service>
+       <service>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
+               <instance>
+                       <name>global-event-executor</name>
+                       <provider>/config/modules/module[name='netty-global-eventexecutor']/instance[name='global-event-executor']</provider>
+               </instance>
+       </service>
+       <service>
+               <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-timer</type>
+               <instance>
+                       <name>global-timer</name>
+                       <provider>/config/modules/module[name='netty-hashed-wheel-timer']/instance[name='global-timer']</provider>
+               </instance>
+       </service>
+//CAPABILITIES START
+urn:opendaylight:params:xml:ns:yang:controller:netty?module=netty&revision=2013-11-19
+urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12
+urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup?module=threadgroup&revision=2013-11-07
+urn:opendaylight:params:xml:ns:yang:controller:netty:timer?module=netty-timer&revision=2013-11-19
diff --git a/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/controller-config.1.txt b/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/controller-config.1.txt
deleted file mode 100644 (file)
index 689b45a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-//MODULES START
-//SERVICES START
-
-//CAPABILITIES START
-urn:opendaylight:params:xml:ns:yang:controller:logback:config?module=config-logging&revision=2013-07-16
index c741c9aa19cbc1d6c27db7734aa79cb9d39b00de..fc146256e8ed7d2a0168944f3d16170fbd85bd07 100644 (file)
@@ -26,11 +26,11 @@ public final class CompositeNodeWrapper implements NodeWrapper<CompositeNode>, C
     private URI namespace;
     private QName name;
     private List<NodeWrapper<?>> values = new ArrayList<>();
-    
+
     public CompositeNodeWrapper(String localName) {
         this.localName = Preconditions.checkNotNull(localName);
     }
-    
+
     public CompositeNodeWrapper(URI namespace, String localName) {
         this(localName);
         this.namespace = namespace;
@@ -80,19 +80,18 @@ public final class CompositeNodeWrapper implements NodeWrapper<CompositeNode>, C
     }
 
     @Override
-    public CompositeNode unwrap(CompositeNode parent) {
+    public CompositeNode unwrap() {
         if (compositeNode == null) {
             if (name == null) {
                 Preconditions.checkNotNull(namespace);
                 name = new QName(namespace, localName);
             }
-            compositeNode = NodeFactory.createMutableCompositeNode(name, parent, new ArrayList<Node<?>>(), null, null);
             
             List<Node<?>> nodeValues = new ArrayList<>();
             for (NodeWrapper<?> nodeWrapper : values) {
-                nodeValues.add(nodeWrapper.unwrap(compositeNode));
+                nodeValues.add(nodeWrapper.unwrap());
             }
-            compositeNode.setValue(nodeValues);
+            compositeNode = NodeFactory.createMutableCompositeNode(name, null, nodeValues, null, null);
             
             values = null;
             namespace = null;
@@ -104,132 +103,132 @@ public final class CompositeNodeWrapper implements NodeWrapper<CompositeNode>, C
 
     @Override
     public QName getNodeType() {
-        return unwrap(null).getNodeType();
+        return unwrap().getNodeType();
     }
 
     @Override
     public CompositeNode getParent() {
-        return unwrap(null).getParent();
+        return unwrap().getParent();
     }
 
     @Override
     public List<Node<?>> getValue() {
-        return unwrap(null).getValue();
+        return unwrap().getValue();
     }
 
     @Override
     public ModifyAction getModificationAction() {
-        return unwrap(null).getModificationAction();
+        return unwrap().getModificationAction();
     }
 
     @Override
     public List<Node<?>> getChildren() {
-        return unwrap(null).getChildren();
+        return unwrap().getChildren();
     }
 
     @Override
     public List<CompositeNode> getCompositesByName(QName children) {
-        return unwrap(null).getCompositesByName(children);
+        return unwrap().getCompositesByName(children);
     }
 
     @Override
     public List<CompositeNode> getCompositesByName(String children) {
-        return unwrap(null).getCompositesByName(children);
+        return unwrap().getCompositesByName(children);
     }
 
     @Override
     public List<SimpleNode<?>> getSimpleNodesByName(QName children) {
-        return unwrap(null).getSimpleNodesByName(children);
+        return unwrap().getSimpleNodesByName(children);
     }
 
     @Override
     public List<SimpleNode<?>> getSimpleNodesByName(String children) {
-        return unwrap(null).getSimpleNodesByName(children);
+        return unwrap().getSimpleNodesByName(children);
     }
 
     @Override
     public CompositeNode getFirstCompositeByName(QName container) {
-        return unwrap(null).getFirstCompositeByName(container);
+        return unwrap().getFirstCompositeByName(container);
     }
 
     @Override
     public SimpleNode<?> getFirstSimpleByName(QName leaf) {
-        return unwrap(null).getFirstSimpleByName(leaf);
+        return unwrap().getFirstSimpleByName(leaf);
     }
 
     @Override
     public MutableCompositeNode asMutable() {
-        return unwrap(null).asMutable();
+        return unwrap().asMutable();
     }
 
     @Override
     public QName getKey() {
-        return unwrap(null).getKey();
+        return unwrap().getKey();
     }
 
     @Override
     public List<Node<?>> setValue(List<Node<?>> value) {
-        return unwrap(null).setValue(value);
+        return unwrap().setValue(value);
     }
 
     @Override
     public int size() {
-        return unwrap(null).size();
+        return unwrap().size();
     }
 
     @Override
     public boolean isEmpty() {
-        return unwrap(null).isEmpty();
+        return unwrap().isEmpty();
     }
 
     @Override
     public boolean containsKey(Object key) {
-        return unwrap(null).containsKey(key);
+        return unwrap().containsKey(key);
     }
 
     @Override
     public boolean containsValue(Object value) {
-        return unwrap(null).containsValue(value);
+        return unwrap().containsValue(value);
     }
 
     @Override
     public List<Node<?>> get(Object key) {
-        return unwrap(null).get(key);
+        return unwrap().get(key);
     }
 
     @Override
     public List<Node<?>> put(QName key, List<Node<?>> value) {
-        return unwrap(null).put(key, value);
+        return unwrap().put(key, value);
     }
 
     @Override
     public List<Node<?>> remove(Object key) {
-        return unwrap(null).remove(key);
+        return unwrap().remove(key);
     }
 
     @Override
     public void putAll(Map<? extends QName, ? extends List<Node<?>>> m) {
-        unwrap(null).putAll(m);
+        unwrap().putAll(m);
     }
 
     @Override
     public void clear() {
-        unwrap(null).clear();
+        unwrap().clear();
     }
 
     @Override
     public Set<QName> keySet() {
-        return unwrap(null).keySet();
+        return unwrap().keySet();
     }
 
     @Override
     public Collection<List<Node<?>>> values() {
-        return unwrap(null).values();
+        return unwrap().values();
     }
 
     @Override
     public Set<java.util.Map.Entry<QName, List<Node<?>>>> entrySet() {
-        return unwrap(null).entrySet();
+        return unwrap().entrySet();
     }
 
 }
index 882c73d001071dea11ee8bfb1d253887780a0875..eca4bd257298b78706cbd10321e8484ea06cab87 100644 (file)
@@ -36,8 +36,7 @@ class ControllerContext implements SchemaServiceListener {
 
     val static NULL_VALUE = "null"
 
-    @Property
-    SchemaContext schemas;
+    var SchemaContext schemas;
 
     private val BiMap<URI, String> uriToModuleName = HashBiMap.create();
     private val Map<String, URI> moduleNameToUri = uriToModuleName.inverse();
@@ -60,6 +59,10 @@ class ControllerContext implements SchemaServiceListener {
         }
     }
 
+    def setSchemas(SchemaContext schemas) {
+        onGlobalContextUpdated(schemas)
+    }
+
     public def InstanceIdWithSchemaNode toInstanceIdentifier(String restconfInstance) {
         val ret = InstanceIdentifier.builder();
         val pathArgs = restconfInstance.split("/");
@@ -73,7 +76,7 @@ class ControllerContext implements SchemaServiceListener {
         if (schemaNode === null) {
             return null
         }
-        new InstanceIdWithSchemaNode(ret.toInstance, schemaNode)
+        return new InstanceIdWithSchemaNode(ret.toInstance, schemaNode)
     }
 
     private def findModule(String restconfInstance) {
@@ -85,13 +88,13 @@ class ControllerContext implements SchemaServiceListener {
         }
         val modulWithFirstYangStatement = pathArgs.filter[s|s.contains(":")].head
         val startModule = modulWithFirstYangStatement.toModuleName();
-        schemas.getLatestModule(startModule)
+        return getLatestModule(startModule)
     }
 
-    private def getLatestModule(SchemaContext schema, String moduleName) {
-        checkNotNull(schema)
+    private def getLatestModule(String moduleName) {
+        checkPreconditions
         checkArgument(moduleName !== null && !moduleName.empty)
-        val modules = schema.modules.filter[m|m.name == moduleName]
+        val modules = schemas.modules.filter[m|m.name == moduleName]
         var latestModule = modules.head
         for (module : modules) {
             if (module.revision.after(latestModule.revision)) {
@@ -308,13 +311,17 @@ class ControllerContext implements SchemaServiceListener {
             return str;
         }
     }
-
-    public def QName toQName(String name) {
+    
+    private def QName toQName(String name) {
         val module = name.toModuleName;
         val node = name.toNodeName;
         val namespace = moduleNameToUri.get(module);
         return new QName(namespace,null,node);
     }
+    
+    def getRpcDefinition(String name) {
+        return qnameToRpc.get(name.toQName)
+    }
 
     override onGlobalContextUpdated(SchemaContext context) {
         this.schemas = context;
@@ -324,12 +331,4 @@ class ControllerContext implements SchemaServiceListener {
         }
     }
     
-    def ContainerSchemaNode getRpcOutputSchema(QName name) {
-        qnameToRpc.get(name)?.output;
-    }
-    
-    def ContainerSchemaNode getRpcInputSchema(QName name) {
-        qnameToRpc.get(name)?.input;
-    }
-
 }
index db7770fc68797504dc969a89eaddda832aa5c1d4..675e1194396147334509e35d5a6b4ebb21e40b35 100644 (file)
@@ -3,14 +3,13 @@ package org.opendaylight.controller.sal.restconf.impl;
 import java.net.URI;
 
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
 import org.opendaylight.yangtools.yang.data.api.Node;
 
 public interface NodeWrapper<T extends Node<?>> {
 
     void setQname(QName name);
     
-    T unwrap(CompositeNode parent);
+    T unwrap();
     
     URI getNamespace();
 
index b7307544397b06e4bf544a71b0fd59471cfa72fd..a6a71fef55e6d3055901406734be06e05aca6c6d 100644 (file)
@@ -1,11 +1,14 @@
 package org.opendaylight.controller.sal.restconf.impl
 
+import java.util.ArrayList
 import java.util.List
 import java.util.Set
 import javax.ws.rs.core.Response
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus
 import org.opendaylight.controller.sal.rest.api.RestconfService
 import org.opendaylight.yangtools.yang.data.api.CompositeNode
+import org.opendaylight.yangtools.yang.data.api.Node
+import org.opendaylight.yangtools.yang.data.impl.NodeFactory
 import org.opendaylight.yangtools.yang.model.api.ChoiceNode
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode
@@ -70,11 +73,16 @@ class RestconfImpl implements RestconfService {
     }
 
     override invokeRpc(String identifier, CompositeNode payload) {
-        val rpc = identifier.toQName;
-        val value = resolveNodeNamespaceBySchema(payload, controllerContext.getRpcInputSchema(rpc))
-        val rpcResult = broker.invokeRpc(rpc, value);
-        val schema = controllerContext.getRpcOutputSchema(rpc);
-        return new StructuredData(rpcResult.result, schema);
+        val rpc = identifier.rpcDefinition
+        if (rpc === null) {
+            throw new ResponseException(Response.Status.NOT_FOUND, "RPC does not exist.");
+        }
+        val value = resolveNodeNamespaceBySchema(payload, rpc.input)
+        val List<Node<?>> input = new ArrayList
+        input.add(value)
+        val rpcRequest = NodeFactory.createMutableCompositeNode(rpc.QName, null, input, null, null)
+        val rpcResult = broker.invokeRpc(rpc.QName, rpcRequest);
+        return new StructuredData(rpcResult.result, rpc.output);
     }
     
     override readConfigurationData(String identifier) {
@@ -108,7 +116,7 @@ class RestconfImpl implements RestconfService {
     private def CompositeNode resolveNodeNamespaceBySchema(CompositeNode node, DataSchemaNode schema) {
         if (node instanceof CompositeNodeWrapper) {
             addNamespaceToNodeFromSchemaRecursively(node as CompositeNodeWrapper, schema)
-            return (node as CompositeNodeWrapper).unwrap(null)
+            return (node as CompositeNodeWrapper).unwrap()
         }
         return node
     }
index 1b103b43c25219f60a482fcc7b9a459666ece55f..c1576895fd70bc8fc5c23a706c1fe26501af4b03 100644 (file)
@@ -59,13 +59,13 @@ public final class SimpleNodeWrapper implements NodeWrapper<SimpleNode<?>>, Simp
     }
 
     @Override
-    public SimpleNode<String> unwrap(CompositeNode parent) {
+    public SimpleNode<String> unwrap() {
         if (simpleNode == null) {
             if (name == null) {
                 Preconditions.checkNotNull(namespace);
                 name = new QName(namespace, localName);
             }
-            simpleNode = NodeFactory.createImmutableSimpleNode(name, parent, value);
+            simpleNode = NodeFactory.createImmutableSimpleNode(name, null, value);
             
             value = null;
             namespace = null;
@@ -77,37 +77,37 @@ public final class SimpleNodeWrapper implements NodeWrapper<SimpleNode<?>>, Simp
 
     @Override
     public QName getNodeType() {
-        return unwrap(null).getNodeType();
+        return unwrap().getNodeType();
     }
 
     @Override
     public CompositeNode getParent() {
-        return unwrap(null).getParent();
+        return unwrap().getParent();
     }
 
     @Override
     public String getValue() {
-        return unwrap(null).getValue();
+        return unwrap().getValue();
     }
 
     @Override
     public ModifyAction getModificationAction() {
-        return unwrap(null).getModificationAction();
+        return unwrap().getModificationAction();
     }
 
     @Override
     public MutableSimpleNode<String> asMutable() {
-        return unwrap(null).asMutable();
+        return unwrap().asMutable();
     }
 
     @Override
     public QName getKey() {
-        return unwrap(null).getKey();
+        return unwrap().getKey();
     }
 
     @Override
     public String setValue(String value) {
-        return unwrap(null).setValue(value);
+        return unwrap().setValue(value);
     }
 
 
index eb2b516d969cdcd3ccc95e0471c3ecea12930ff8..840887ecec60920372b9d343283e4fd852c68dd4 100644 (file)
@@ -27,7 +27,7 @@
         </init-param>
         <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
         </init-param>
         <init-param>
             <param-name>cors.allowed.headers</param-name>
index 2e8b07151914b12c9b0c2a360b1c9b075c0a880a..f55e92f9c9afbfefb1707d0f96ca4f071d9b1d03 100644 (file)
@@ -3,25 +3,24 @@ package org.opendaylight.controller.sal.restconf.impl.test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import java.util.concurrent.*;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URISyntaxException;
+import java.util.List;
 
 import javax.ws.rs.WebApplicationException;
 
-import org.junit.*;
+import org.junit.Test;
 import org.opendaylight.controller.sal.rest.impl.JsonToCompositeNodeProvider;
-import org.opendaylight.controller.sal.restconf.impl.*;
-import org.opendaylight.yangtools.yang.data.api.*;
-import org.slf4j.*;
-import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-import org.opendaylight.yangtools.yang.model.api.*;
+import org.opendaylight.controller.sal.restconf.impl.CompositeNodeWrapper;
+import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import org.opendaylight.yangtools.yang.data.api.Node;
+import org.opendaylight.yangtools.yang.data.api.SimpleNode;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.gson.JsonSyntaxException;
 
@@ -203,7 +202,7 @@ public class FromJsonToCompositeNodeTest {
         TestUtils.supplementNamespace(dataSchemaNode1, compositeNode);
 
         assertTrue(compositeNode instanceof CompositeNodeWrapper);
-        CompositeNode compNode = ((CompositeNodeWrapper) compositeNode).unwrap(null);
+        CompositeNode compNode = ((CompositeNodeWrapper) compositeNode).unwrap();
 
         assertEquals("lst", compNode.getNodeType().getLocalName());
         verifyCompositeNode(compNode, "simple:list:yang1");
@@ -232,7 +231,7 @@ public class FromJsonToCompositeNodeTest {
         TestUtils.supplementNamespace(dataSchemaNode, compositeNode);
 
         assertTrue(compositeNode instanceof CompositeNodeWrapper);
-        CompositeNode compNode = ((CompositeNodeWrapper) compositeNode).unwrap(null);
+        CompositeNode compNode = ((CompositeNodeWrapper) compositeNode).unwrap();
 
         assertEquals(topLevelElementName, compNode.getNodeType().getLocalName());
         verifyCompositeNode(compNode, namespace);
@@ -334,7 +333,7 @@ public class FromJsonToCompositeNodeTest {
             if (dummyNamespaces) {
                 try {
                     TestUtils.addDummyNamespaceToAllNodes((CompositeNodeWrapper) compositeNode);
-                    return ((CompositeNodeWrapper) compositeNode).unwrap(null);
+                    return ((CompositeNodeWrapper) compositeNode).unwrap();
                 } catch (URISyntaxException e) {
                     LOG.error(e.getMessage());
                     assertTrue(e.getMessage(), false);
index ef122dd8d7f68cba55088831d9ebe639c869b646..5aa6d0339db6264e8e1c38157d118fd7dc2e8121 100644 (file)
@@ -262,7 +262,7 @@ public class FromXmlToCompositeNodeTest {
             if (dummyNamespaces) {
                 try {
                     TestUtils.addDummyNamespaceToAllNodes((CompositeNodeWrapper) compositeNode);
-                    return ((CompositeNodeWrapper) compositeNode).unwrap(null);
+                    return ((CompositeNodeWrapper) compositeNode).unwrap();
                 } catch (URISyntaxException e) {
                     LOG.error(e.getMessage());
                     assertTrue(e.getMessage(), false);
index d83b1eaaf341931571ce723378f41145a3342154..b20577afd23fcdde6bb8f3ab50b3f7f73c0c0a6f 100644 (file)
@@ -229,7 +229,7 @@ public class ConfigPersisterNotificationHandler implements NotificationListener,
         // Socket should not be closed at this point
         // Activator unregisters this as JMX listener before close is called
 
-        logger.debug("Received notification {}", notification);
+        logger.info("Received notification {}", notification);
         if (notification instanceof CommitJMXNotification) {
             try {
                 handleAfterCommitNotification((CommitJMXNotification) notification);
@@ -246,7 +246,7 @@ public class ConfigPersisterNotificationHandler implements NotificationListener,
         try {
             persister.persistConfig(new CapabilityStrippingConfigSnapshotHolder(notification.getConfigSnapshot(),
                     notification.getCapabilities(), ignoredMissingCapabilityRegex));
-            logger.debug("Configuration persisted successfully");
+            logger.info("Configuration persisted successfully");
         } catch (IOException e) {
             throw new RuntimeException("Unable to persist configuration snapshot", e);
         }
index f7f7982947467d11d13615c28f01638b32b8493c..9d7ba5d58a8535dec530c37e4e29c2c821031fec 100644 (file)
@@ -240,5 +240,13 @@ public class NeutronNetwork {
         return ans;
     }
 
+    @Override
+    public String toString() {
+        return "NeutronNetwork [networkUUID=" + networkUUID + ", networkName=" + networkName + ", adminStateUp="
+                + adminStateUp + ", shared=" + shared + ", tenantID=" + tenantID + ", routerExternal=" + routerExternal
+                + ", providerNetworkType=" + providerNetworkType + ", providerPhysicalNetwork="
+                + providerPhysicalNetwork + ", providerSegmentationID=" + providerSegmentationID + ", status=" + status
+                + ", subnets=" + subnets + ", myPorts=" + myPorts + "]";
+    }
 }
 
index b585554bf873734da16cc9f6b4871174b4f3645d..536fc3fd6e5ac1f2594cd8850afe8f9bd5538297 100644 (file)
@@ -248,4 +248,12 @@ public class NeutronPort {
     public boolean isBoundToFloatingIP(String fixedIP) {
         return floatingIPMap.containsKey(fixedIP);
     }
+
+    @Override
+    public String toString() {
+        return "NeutronPort [portUUID=" + portUUID + ", networkUUID=" + networkUUID + ", name=" + name
+                + ", adminStateUp=" + adminStateUp + ", status=" + status + ", macAddress=" + macAddress
+                + ", fixedIPs=" + fixedIPs + ", deviceID=" + deviceID + ", deviceOwner=" + deviceOwner + ", tenantID="
+                + tenantID + ", floatingIPMap=" + floatingIPMap + "]";
+    }
 }
index e53c3d4b1a9ddee674c231bdf400f0beed22a162..1dbe253a5815ce75e4cea142ed2903a42cc31bdd 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.controller.networkconfig.neutron;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
@@ -428,4 +429,13 @@ public class NeutronSubnet {
     public void resetGatewayIPAllocated() {
         gatewayIPAssigned = false;
     }
+
+    @Override
+    public String toString() {
+        return "NeutronSubnet [subnetUUID=" + subnetUUID + ", networkUUID=" + networkUUID + ", name=" + name
+                + ", ipVersion=" + ipVersion + ", cidr=" + cidr + ", gatewayIP=" + gatewayIP + ", dnsNameservers="
+                + dnsNameservers + ", allocationPools=" + allocationPools + ", hostRoutes=" + hostRoutes
+                + ", enableDHCP=" + enableDHCP + ", tenantID=" + tenantID + ", myPorts=" + myPorts
+                + ", gatewayIPAssigned=" + gatewayIPAssigned + "]";
+    }
 }
index f5c1ae5f9234afd435928bb9f2b8e0e1770af4d2..315403054df1ebfe7ff307f0b7a51c21dbee82b2 100644 (file)
@@ -27,7 +27,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index d4ace8d89d8fb4fb0372e12ae5023702c0ed2835..2e9d9d0f684b36f7d2be3b28a7847877afc7c016 100644 (file)
@@ -26,7 +26,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index 9f7c21a8b0cc9ef0a03e4645396df30089931cda..ef58aab0b581f095a9ec1d9232b968e0e8a3b478 100644 (file)
@@ -26,7 +26,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index 179db608adffdfb043002cfba7b60a78867fe0cc..3fa41fee2b2e9290301ebd3a3bc3f70dc2f868d0 100644 (file)
@@ -26,7 +26,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index cce0dfb259bc8f0d30f6e99f8b41fc9867735e77..2efd81c44e1c2c234e348b8ac6d4fd999eadb2d2 100644 (file)
@@ -26,7 +26,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index 29f2049c2715f95b2fdc99ea287617f1d061ea7f..dac8cf622c245e028925234899bdaa76f1606889 100644 (file)
@@ -26,7 +26,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index ae2fce582ae34b9fc49c5a4c32381f1d83dfa25f..20529e90b4df3c06570852b4cff2bd81873882d8 100644 (file)
@@ -26,7 +26,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>
index 0c5cb3ac2719341726cb1235c2c714490feafdf5..89812af53df5447ef4426dd49ce312aff6f87a43 100644 (file)
@@ -15,7 +15,7 @@
           </init-param>
           <init-param>
             <param-name>cors.allowed.methods</param-name>
-            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
+            <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
           </init-param>
           <init-param>
             <param-name>cors.allowed.headers</param-name>