Add blueprint wiring for the drop-test app 75/38875/4
authorTom Pantelis <tpanteli@brocade.com>
Fri, 13 May 2016 12:57:12 +0000 (08:57 -0400)
committerAnil Vishnoi <vishnoianil@gmail.com>
Fri, 3 Jun 2016 08:11:12 +0000 (08:11 +0000)
Also removed yhe config yang and XML file as this is a test app and
backeards compatibility is not needed.

Change-Id: I2415b81872ada6fd0d603cbe115b8cff02745d04
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
drop-test-karaf/pom.xml
drop-test-karaf/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/config/openflow/test/droptest/rev150327/DropTestProviderModule.java [deleted file]
drop-test-karaf/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/config/openflow/test/droptest/rev150327/DropTestProviderModuleFactory.java [deleted file]
drop-test-karaf/src/main/resources/OSGI-INF/blueprint/drop-test.xml [new file with mode: 0644]
drop-test-karaf/src/main/resources/initial/69-drop-test.xml [deleted file]
drop-test-karaf/src/main/yang/drop-test.yang [deleted file]
features-li/pom.xml
features-li/src/main/features/features.xml
features/pom.xml
features/src/main/features/features.xml

index 563de788ce3816f6d8eecf510d28da2e11a2fcb8..3cab424da1dc928ca6ee543dd21cdf5bf3e366f9 100644 (file)
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
 
     </dependencies>
 
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
-            <plugin>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>generate-sources</goal>
-                        </goals>
-                        <configuration>
-                            <codeGenerators>
-                                <generator>
-                                    <codeGeneratorClass>
-                                        org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-                                    </codeGeneratorClass>
-                                    <outputBaseDir>${project.build.directory}/generated-sources/config</outputBaseDir>
-                                    <additionalConfiguration>
-                                        <namespaceToPackage1>
-                                            urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
-                                        </namespaceToPackage1>
-                                    </additionalConfiguration>
-                                </generator>
-                                <generator>
-                                    <codeGeneratorClass>
-                                        org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
-                                    </codeGeneratorClass>
-                                    <outputBaseDir>${project.build.directory}/generated-sources/sal</outputBaseDir>
-                                </generator>
-                                <generator>
-                                    <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
-                                    <outputBaseDir>${project.build.directory}/site/models</outputBaseDir>
-                                </generator>
-                            </codeGenerators>
-                            <inspectDependencies>true</inspectDependencies>
-                        </configuration>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.opendaylight.controller</groupId>
-                        <artifactId>yang-jmx-generator-plugin</artifactId>
-                        <version>${config.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.opendaylight.mdsal</groupId>
-                        <artifactId>maven-sal-api-gen-plugin</artifactId>
-                        <version>${mdsal.model.version}</version>
-                        <type>jar</type>
-                    </dependency>
-                </dependencies>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-artifacts</id>
-                        <goals>
-                            <goal>attach-artifact</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>${project.build.directory}/classes/initial/69-drop-test.xml</file>
-                                    <type>xml</type>
-                                    <classifier>config</classifier>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/drop-test-karaf/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/config/openflow/test/droptest/rev150327/DropTestProviderModule.java b/drop-test-karaf/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/config/openflow/test/droptest/rev150327/DropTestProviderModule.java
deleted file mode 100644 (file)
index 8571428..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.test.droptest.rev150327;
-
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.NotificationService;
-import org.opendaylight.openflowplugin.droptestkaraf.DropTestProviderImpl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DropTestProviderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.test.droptest.rev150327.AbstractDropTestProviderModule {
-    private static final Logger LOG = LoggerFactory.getLogger(DropTestProviderModule.class);
-
-    public DropTestProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public DropTestProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.test.droptest.rev150327.DropTestProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        LOG.debug("Starting drop-test provider module.");
-        DataBroker dataBroker = getDataBrokerDependency();
-        NotificationService notificationAdapterDependency = getNotificationAdapterDependency();
-        SalFlowService salFlowService = getRpcRegistryDependency().getRpcService(SalFlowService.class);
-        DropTestProviderImpl dropTestProvider = new DropTestProviderImpl(dataBroker, notificationAdapterDependency, salFlowService);
-        LOG.info("Drop-test provider module initialized.");
-        return dropTestProvider;
-    }
-
-}
diff --git a/drop-test-karaf/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/config/openflow/test/droptest/rev150327/DropTestProviderModuleFactory.java b/drop-test-karaf/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/config/openflow/test/droptest/rev150327/DropTestProviderModuleFactory.java
deleted file mode 100644 (file)
index 4039d2a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: drop-test-provider yang module local name: drop-test-provider
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Sun Apr 26 11:04:30 CEST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.test.droptest.rev150327;
-public class DropTestProviderModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.test.droptest.rev150327.AbstractDropTestProviderModuleFactory {
-
-}
diff --git a/drop-test-karaf/src/main/resources/OSGI-INF/blueprint/drop-test.xml b/drop-test-karaf/src/main/resources/OSGI-INF/blueprint/drop-test.xml
new file mode 100644 (file)
index 0000000..855d2d9
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+        odl:use-default-for-reference-types="true">
+
+  <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" odl:type="pingpong"/>
+  <reference id="notificationService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationService"/>
+
+  <odl:rpc-service id="flowService"
+      interface="org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService"/>
+
+  <bean id="dropTestProvider" class="org.opendaylight.openflowplugin.droptestkaraf.DropTestProviderImpl">
+    <argument ref="dataBroker"/>
+    <argument ref="notificationService"/>
+    <argument ref="flowService"/>
+  </bean>
+</blueprint>
\ No newline at end of file
diff --git a/drop-test-karaf/src/main/resources/initial/69-drop-test.xml b/drop-test-karaf/src/main/resources/initial/69-drop-test.xml
deleted file mode 100644 (file)
index 00a3cd6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright (c) 2015 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
-  -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-
-<snapshot>
-    <configuration>
-        <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-            <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:config:openflow:test:droptest">prefix:drop-test-provider</type>
-                    <name>drop-test-provider</name>
-                    <data-broker>
-                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
-                        <name>binding-data-broker</name>
-                    </data-broker>
-                    <rpc-registry>
-                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
-                        <name>binding-rpc-broker</name>
-                    </rpc-registry>
-                    <notification-adapter>
-                        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-new-notification-service</type>
-                        <name>binding-notification-adapter</name>
-                    </notification-adapter>
-                </module>
-            </modules>
-        </data>
-    </configuration>
-</snapshot>
\ No newline at end of file
diff --git a/drop-test-karaf/src/main/yang/drop-test.yang b/drop-test-karaf/src/main/yang/drop-test.yang
deleted file mode 100644 (file)
index 512a37d..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-module drop-test-provider {
-       yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:config:openflow:test:droptest";
-    prefix "drop-test-provider";
-
-    import config {prefix config; revision-date 2013-04-05;}
-    import rpc-context { prefix rpcx; revision-date 2013-06-17; }
-    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
-    import opendaylight-sal-binding-broker-impl { prefix sal-broker; revision-date 2013-10-28;}
-
-    description
-        "drop-test-provider";
-
-    revision "2015-03-27" {
-        description
-            "Drop test implementation.";
-    }
-
-    identity drop-test-provider {
-        base config:module-type;
-        config:java-name-prefix DropTestProvider;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case drop-test-provider {
-            when "/config:modules/config:module/config:type = 'drop-test-provider'";
-
-            container data-broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity md-sal-binding:binding-async-data-broker;
-                    }
-                }
-            }
-            container rpc-registry {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity md-sal-binding:binding-rpc-registry;
-                    }
-                }
-            }
-            container notification-adapter {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity sal-broker:binding-new-notification-service;
-                    }
-                }
-            }
-        }
-    }
-}
index 7111c20fe03384fd10265233c547cd59bea4904c..e7119600b770be6928656c8d0a652f2f9c89c0ed 100644 (file)
             <groupId>org.opendaylight.openflowplugin</groupId>
             <artifactId>drop-test-karaf</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.openflowplugin</groupId>
-            <artifactId>drop-test-karaf</artifactId>
-            <classifier>config</classifier>
-            <type>xml</type>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.openflowplugin</groupId>
             <artifactId>test-common</artifactId>
index 638c8a073c6d16bca452f67a9aee8418c5f00c85..20c46692922cc75643289b4c815832ba647512f1 100644 (file)
@@ -91,7 +91,6 @@
         <feature version="${project.version}">odl-openflowplugin-flow-services-li</feature>
         <bundle>mvn:org.opendaylight.openflowplugin/test-common/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.openflowplugin/drop-test-karaf/{{VERSION}}</bundle>
-        <configfile finalname="etc/opendaylight/karaf/69-drop-test.xml">mvn:org.opendaylight.openflowplugin/drop-test-karaf/{{VERSION}}/xml/config</configfile>
     </feature>
 
     <!-- APPLICATIONS -->
index 5568bd2c1d9f8db8b4f005978888b1cf0df1cdf2..080dee7ceb96c3fc09e12569285ed53b549c8209 100644 (file)
             <groupId>org.opendaylight.openflowplugin</groupId>
             <artifactId>drop-test-karaf</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.openflowplugin</groupId>
-            <artifactId>drop-test-karaf</artifactId>
-            <classifier>config</classifier>
-            <type>xml</type>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.openflowplugin</groupId>
             <artifactId>test-common</artifactId>
index 214452365c5c7780c16f2063c94ed640cec524d3..02cb32f792beecb932b2756216e69de617d0518b 100644 (file)
@@ -92,7 +92,6 @@
         <feature version="${project.version}">odl-openflowplugin-flow-services</feature>
         <bundle>mvn:org.opendaylight.openflowplugin/test-common/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.openflowplugin/drop-test-karaf/{{VERSION}}</bundle>
-        <configfile finalname="etc/opendaylight/karaf/69-drop-test.xml">mvn:org.opendaylight.openflowplugin/drop-test-karaf/{{VERSION}}/xml/config</configfile>
     </feature>
 
     <!-- APPLICATIONS -->