Merge "Fixed serialization of InstanceIdentifier's which contains Augmentation in...
authorEd Warnicke <eaw@cisco.com>
Mon, 2 Dec 2013 20:38:38 +0000 (20:38 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 2 Dec 2013 20:38:38 +0000 (20:38 +0000)
22 files changed:
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/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]

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
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