Remove protocol-framework config yang 77/58377/4
authorTom Pantelis <tompantelis@gmail.com>
Tue, 6 Jun 2017 21:24:15 +0000 (17:24 -0400)
committerRobert Varga <nite@hq.sk>
Sun, 11 Jun 2017 07:52:56 +0000 (07:52 +0000)
The protocol-framework config yang modules aren't used, ie aren't
instantiated in any config XML file, so remove them.

Change-Id: I8cc8c8c8666ef731a2e7da20a3046300ce5aad45
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/commons/protocol-framework/pom.xml
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/NeverReconnectStrategyFactoryModule.java [deleted file]
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/NeverReconnectStrategyFactoryModuleFactory.java [deleted file]
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/ReconnectImmediatelyStrategyFactoryModule.java [deleted file]
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/ReconnectImmediatelyStrategyFactoryModuleFactory.java [deleted file]
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/TimedReconnectStrategyFactoryModule.java [deleted file]
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/TimedReconnectStrategyFactoryModuleFactory.java [deleted file]
opendaylight/commons/protocol-framework/src/main/yang/odl-protocol-framework-cfg.yang [deleted file]

index 89668163cda53dabb9bea34384e2231ca5d9d085..44b7ae69bcfbca9a17a57fc8909be4e18eb2f079 100644 (file)
@@ -5,10 +5,10 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>config-parent</artifactId>
-    <version>0.7.0-SNAPSHOT</version>
-    <relativePath>../../config/config-parent</relativePath>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>bundle-parent</artifactId>
+    <version>1.8.0-Carbon</version>
+    <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.controller</groupId>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>config-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>netty-config-api</artifactId>
-    </dependency>
 
     <!-- Testing dependencies -->
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>mockito-configuration</artifactId>
+      <version>1.2.0-SNAPSHOT</version>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.osgi</groupId>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>config-manager</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>config-manager</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>config-util</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>netty-event-executor-config</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>ch.qos.logback</groupId>
       <artifactId>logback-classic</artifactId>
diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/NeverReconnectStrategyFactoryModule.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/NeverReconnectStrategyFactoryModule.java
deleted file mode 100644 (file)
index cd80239..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.protocol.framework;
-
-import io.netty.util.concurrent.EventExecutor;
-
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.protocol.framework.NeverReconnectStrategy;
-import org.opendaylight.protocol.framework.ReconnectStrategy;
-import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
-
-/**
-*
-*/
-@Deprecated
-public final class NeverReconnectStrategyFactoryModule extends org.opendaylight.controller.config.yang.protocol.framework.AbstractNeverReconnectStrategyFactoryModule
- {
-
-    public NeverReconnectStrategyFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public NeverReconnectStrategyFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final NeverReconnectStrategyFactoryModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    protected void customValidation(){
-        JmxAttributeValidationException.checkNotNull(getTimeout(), "value is not set.", timeoutJmxAttribute);
-        JmxAttributeValidationException.checkCondition(getTimeout() >= 0, "value " + getTimeout() + " is less than 0",
-                timeoutJmxAttribute);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new NeverReconnectStrategyFactoryCloseable(getExecutorDependency(), getTimeout());
-    }
-
-    private static final class NeverReconnectStrategyFactoryCloseable implements ReconnectStrategyFactory, AutoCloseable {
-
-        private final EventExecutor executor;
-        private final int timeout;
-
-        public NeverReconnectStrategyFactoryCloseable(final EventExecutor executor, final int timeout) {
-            this.executor = executor;
-            this.timeout = timeout;
-        }
-
-        @Override
-        public void close() throws Exception {
-            // no-op
-        }
-
-        @Override
-        public ReconnectStrategy createReconnectStrategy() {
-            return new NeverReconnectStrategy(this.executor, this.timeout);
-        }
-
-    }
-}
diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/NeverReconnectStrategyFactoryModuleFactory.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/NeverReconnectStrategyFactoryModuleFactory.java
deleted file mode 100644 (file)
index 7dfe2c9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.protocol.framework;
-
-/**
-*
-*/
-@Deprecated
-public class NeverReconnectStrategyFactoryModuleFactory extends org.opendaylight.controller.config.yang.protocol.framework.AbstractNeverReconnectStrategyFactoryModuleFactory
-{
-
-
-}
diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/ReconnectImmediatelyStrategyFactoryModule.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/ReconnectImmediatelyStrategyFactoryModule.java
deleted file mode 100644 (file)
index 40219f8..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.protocol.framework;
-
-import io.netty.util.concurrent.EventExecutor;
-
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.protocol.framework.ReconnectImmediatelyStrategy;
-import org.opendaylight.protocol.framework.ReconnectStrategy;
-import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
-
-/**
-*
-*/
-@Deprecated
-public final class ReconnectImmediatelyStrategyFactoryModule extends org.opendaylight.controller.config.yang.protocol.framework.AbstractReconnectImmediatelyStrategyFactoryModule
- {
-
-    public ReconnectImmediatelyStrategyFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public ReconnectImmediatelyStrategyFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final ReconnectImmediatelyStrategyFactoryModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    protected void customValidation(){
-        JmxAttributeValidationException.checkNotNull(getReconnectTimeout(), "value is not set.", reconnectTimeoutJmxAttribute);
-        JmxAttributeValidationException.checkCondition(getReconnectTimeout() >= 0, "value " + getReconnectTimeout() + " is less than 0",
-                reconnectTimeoutJmxAttribute);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new ReconnectImmediatelyStrategyFactoryCloseable(getReconnectExecutorDependency(), getReconnectTimeout());
-    }
-
-    private static final class ReconnectImmediatelyStrategyFactoryCloseable implements ReconnectStrategyFactory, AutoCloseable {
-
-        private final EventExecutor executor;
-        private final int timeout;
-
-        public ReconnectImmediatelyStrategyFactoryCloseable(final EventExecutor executor, final int timeout) {
-            this.executor = executor;
-            this.timeout = timeout;
-        }
-
-        @Override
-        public void close() throws Exception {
-            // no-op
-        }
-
-        @Override
-        public ReconnectStrategy createReconnectStrategy() {
-            return new ReconnectImmediatelyStrategy(this.executor, this.timeout);
-        }
-
-    }
-}
diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/ReconnectImmediatelyStrategyFactoryModuleFactory.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/ReconnectImmediatelyStrategyFactoryModuleFactory.java
deleted file mode 100644 (file)
index 7aa31f3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.protocol.framework;
-
-/**
-*
-*/
-@Deprecated
-public class ReconnectImmediatelyStrategyFactoryModuleFactory extends org.opendaylight.controller.config.yang.protocol.framework.AbstractReconnectImmediatelyStrategyFactoryModuleFactory
-{
-
-
-}
diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/TimedReconnectStrategyFactoryModule.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/TimedReconnectStrategyFactoryModule.java
deleted file mode 100644 (file)
index 1820d3d..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.protocol.framework;
-
-import io.netty.util.concurrent.EventExecutor;
-
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.protocol.framework.ReconnectStrategy;
-import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
-import org.opendaylight.protocol.framework.TimedReconnectStrategy;
-
-import com.google.common.base.Preconditions;
-
-/**
-*
-*/
-@Deprecated
-public final class TimedReconnectStrategyFactoryModule extends org.opendaylight.controller.config.yang.protocol.framework.AbstractTimedReconnectStrategyFactoryModule
- {
-
-    public TimedReconnectStrategyFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public TimedReconnectStrategyFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final TimedReconnectStrategyFactoryModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    protected void customValidation(){
-        JmxAttributeValidationException.checkNotNull(getSleepFactor(), "value is not set.", sleepFactorJmxAttribute);
-        JmxAttributeValidationException.checkCondition(getSleepFactor().doubleValue() >= 1, "value " + getSleepFactor()
-                + " is less than 1", sleepFactorJmxAttribute);
-
-        JmxAttributeValidationException.checkNotNull(getConnectTime(), "value is not set.", connectTimeJmxAttribute);
-        JmxAttributeValidationException.checkCondition(getConnectTime() >= 0, "value " + getConnectTime()
-                + " is less than 0", connectTimeJmxAttribute);
-
-        JmxAttributeValidationException.checkNotNull(getMinSleep(), "value is not set.", minSleepJmxAttribute);
-        JmxAttributeValidationException.checkCondition(getMaxSleep() == null || getMinSleep() <= getMaxSleep(),
-                "value " + getMinSleep() + " is greter than MaxSleep " + getMaxSleep(), minSleepJmxAttribute);
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        return new TimedReconnectStrategyFactoryCloseable(getTimedReconnectExecutorDependency(),
-                getConnectTime(), getMinSleep(), getSleepFactor().doubleValue(), getMaxSleep(), getMaxAttempts(),
-                getDeadline());
-    }
-
-    private static final class TimedReconnectStrategyFactoryCloseable implements ReconnectStrategyFactory, AutoCloseable {
-
-        private final EventExecutor executor;
-        private final Long deadline, maxAttempts, maxSleep;
-        private final double sleepFactor;
-        private final int connectTime;
-        private final long minSleep;
-
-        public TimedReconnectStrategyFactoryCloseable(final EventExecutor executor, final int connectTime, final long minSleep, final double sleepFactor,
-                final Long maxSleep, final Long maxAttempts, final Long deadline) {
-            Preconditions.checkArgument(maxSleep == null || minSleep <= maxSleep);
-            Preconditions.checkArgument(sleepFactor >= 1);
-            Preconditions.checkArgument(connectTime >= 0);
-            this.executor = Preconditions.checkNotNull(executor);
-            this.deadline = deadline;
-            this.maxAttempts = maxAttempts;
-            this.minSleep = minSleep;
-            this.maxSleep = maxSleep;
-            this.sleepFactor = sleepFactor;
-            this.connectTime = connectTime;
-        }
-
-        @Override
-        public void close() throws Exception {
-            // no-op
-        }
-
-        @Override
-        public ReconnectStrategy createReconnectStrategy() {
-            return new TimedReconnectStrategy(this.executor,
-                    this.connectTime, this.minSleep, this.sleepFactor, this.maxSleep, this.maxAttempts,
-                    this.deadline);
-        }
-
-    }
-}
diff --git a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/TimedReconnectStrategyFactoryModuleFactory.java b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/controller/config/yang/protocol/framework/TimedReconnectStrategyFactoryModuleFactory.java
deleted file mode 100644 (file)
index eac0c66..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.protocol.framework;
-
-/**
-*
-*/
-@Deprecated
-public class TimedReconnectStrategyFactoryModuleFactory extends org.opendaylight.controller.config.yang.protocol.framework.AbstractTimedReconnectStrategyFactoryModuleFactory
-{
-
-
-}
diff --git a/opendaylight/commons/protocol-framework/src/main/yang/odl-protocol-framework-cfg.yang b/opendaylight/commons/protocol-framework/src/main/yang/odl-protocol-framework-cfg.yang
deleted file mode 100644 (file)
index cd84d4a..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-// vi: set smarttab et sw=4 tabstop=4:
-module protocol-framework {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:protocol:framework";
-    prefix "pf";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import netty { prefix netty; revision-date 2013-11-19; }
-
-    organization "Cisco Systems, Inc.";
-
-    contact "Milos Fabian <milfabia@cisco.com>";
-
-    description
-        "This module contains the base YANG definitions for
-         protocol framework.
-
-        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 "2014-03-13" {
-        description
-            "Changed reconnect-strategy to reconnect-strategy-factory - represents ReconnectStrategyFactory.
-            reconnect-strategy-factory modules provides reconnect-strategy-factory service.";
-    }
-
-    revision "2013-11-09" {
-        description
-            "Initial revision";
-    }
-
-    identity reconnect-strategy-factory {
-        description
-            "Service representing a reconnect strategy factory.";
-
-        base "config:service-type";
-        config:java-class "org.opendaylight.protocol.framework.ReconnectStrategyFactory";
-    }
-
-    identity never-reconnect-strategy-factory {
-        base config:module-type;
-        config:provided-service reconnect-strategy-factory;
-        config:java-name-prefix NeverReconnectStrategyFactory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case never-reconnect-strategy-factory {
-            when "/config:modules/config:module/config:type = 'never-reconnect-strategy-factory'";
-
-            leaf timeout {
-                mandatory true;
-                type int32;
-            }
-
-            container executor {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity netty:netty-event-executor;
-                    }
-                }
-            }
-        }
-    }
-
-    identity reconnect-immediately-strategy-factory {
-        base config:module-type;
-        config:provided-service reconnect-strategy-factory;
-        config:java-name-prefix ReconnectImmediatelyStrategyFactory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case reconnect-immediately-strategy-factory {
-            when "/config:modules/config:module/config:type = 'reconnect-immediately-strategy-factory'";
-
-            leaf reconnect-timeout {
-                mandatory true;
-                type int32;
-            }
-
-            container reconnect-executor {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity netty:netty-event-executor;
-                    }
-                }
-            }
-        }
-    }
-
-    identity timed-reconnect-strategy-factory {
-        base config:module-type;
-        config:provided-service reconnect-strategy-factory;
-        config:java-name-prefix TimedReconnectStrategyFactory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case timed-reconnect-strategy-factory {
-            when "/config:modules/config:module/config:type = 'timed-reconnect-strategy-factory'";
-
-            leaf deadline {
-                type int64;
-                units "epoch nanoseconds";
-            }
-
-            leaf max-attempts {
-                mandatory true;
-                type int64;
-            }
-
-            leaf max-sleep {
-                mandatory true;
-                type int64;
-                units "milliseconds";
-            }
-
-            leaf min-sleep {
-                mandatory true;
-                type int64;
-                units "milliseconds";
-            }
-
-            leaf sleep-factor {
-                mandatory true;
-                type decimal64 {
-                    fraction-digits 2;
-                }
-            }
-
-            leaf connect-time {
-                mandatory true;
-                type int32;
-                units "milliseconds";
-            }
-
-            container timed-reconnect-executor {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity netty:netty-event-executor;
-                    }
-                }
-            }
-        }
-    }
-}
\ No newline at end of file