Relocate config subsystem. 37/24437/6
authorAlexis de Talhouët <adetalhouet@inocybe.com>
Wed, 22 Jul 2015 18:07:41 +0000 (14:07 -0400)
committerAlexis de Talhouët <adetalhouet@inocybe.com>
Wed, 22 Jul 2015 21:18:48 +0000 (17:18 -0400)
This patch remove packetcable-policy-config and relocate the config
substystem under packetcable-policy-server/src/main/config

Change-Id: I4a27208d3ddb4bb9a5f8bd63bd01d6ae7eac85e3
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
features-packetcable-policy/pom.xml
features-packetcable-policy/src/main/features/features.xml
packetcable-policy-config/pom.xml [deleted file]
packetcable-policy-model/pom.xml
packetcable-policy-server/src/main/config/default-config.xml [moved from packetcable-policy-config/src/main/resources/default-config.xml with 100% similarity]
packetcable-policy-server/src/main/java/org/opendaylight/controller/packetcable/provider/PacketcableProvider.java
pom.xml

index 7ba3dc371b00981d31b4551ea0f24dbc2760a033..d3fd71ee977705e2fff43b72dcaf29f349c6c28f 100644 (file)
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>org.opendaylight.packetcable</groupId>
-            <artifactId>packetcable-policy-config</artifactId>
-            <version>${project.version}</version>
-            <classifier>config</classifier>
-            <type>xml</type>
+          <groupId>org.opendaylight.packetcable</groupId>
+          <artifactId>packetcable-policy-server</artifactId>
+          <version>${project.version}</version>
+          <classifier>config</classifier>
+          <type>xml</type>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.packetcable</groupId>
@@ -78,4 +78,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index aa96f1acde6f143a57cd1f03759a59a24e936abd..0670e98c0841941903a270e52d1cd78c7cca2799 100644 (file)
@@ -29,6 +29,6 @@
         <feature version='${project.version}'>odl-packetcable-policy-model</feature>
         <bundle>mvn:org.opendaylight.packetcable/packetcable-policy-server/${project.version}</bundle>
         <bundle>mvn:org.opendaylight.packetcable/packetcable-driver/${project.version}</bundle>
-        <configfile finalname="etc/opendaylight/karaf/80-packetcable.xml">mvn:org.opendaylight.packetcable/packetcable-policy-config/${project.version}/xml/config</configfile>
+        <configfile finalname="etc/opendaylight/karaf/80-packetcable.xml">mvn:org.opendaylight.packetcable/packetcable-policy-server/${project.version}/xml/config</configfile>
     </feature>
 </features>
\ No newline at end of file
diff --git a/packetcable-policy-config/pom.xml b/packetcable-policy-config/pom.xml
deleted file mode 100644 (file)
index 4af5f07..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>packetcable</artifactId>
-    <groupId>org.opendaylight.packetcable</groupId>
-    <version>1.3.0-SNAPSHOT</version>
-  </parent>
-  <!--
-    Necessary TODO: Hookup your parent pom here, else you will not get necessary versions,
-    maven repos etc.  If you run this archetype in a subdirectory of your project, it
-    will pick the pom.xml from the parent directory as the parent pom, which may or may
-    not be correct.
-  -->
-  <!-- 
-    Necessary TODO: Replace the contents of src/main/resources/80-packetcable.xml with
-    the proper config subsystem contents for your module
-  -->
-  <artifactId>packetcable-policy-config</artifactId>
-  <groupId>org.opendaylight.packetcable</groupId>
-  <description>Configuration files for md-sal</description>
-  <!-- Optional TODO: Uncomment version if you are not using a parent pom.xml
-   <version>1.2.0-SNAPSHOT</version>
-   -->
-  <packaging>jar</packaging>
-  <properties>
-      <!-- Optional TODO: Rename your configfile to taste -->
-      <configfile>default-config.xml</configfile>
-  </properties>
-  <build>
-    <plugins>
-        <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/${configfile}</file>
-                  <type>xml</type>
-                  <classifier>config</classifier>
-                </artifact>
-                <!--
-                  Optional TODO: Add additional config files
-                    You may need to add more than one config file
-                    if so, you just need to add additional <artifact> entries
-                    here WITH DIFFERENT CLASSIFIERS
-                    Example:
-                    <artifact>
-                      <file>${project.build.directory}/classes/<another-configfile></file>
-                      <type>xml</type>
-                      <classifier>config-<meaningful suffix to describe your other configfile></classifier>
-                    </artifact>
-                -->
-              </artifacts>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-  <scm>
-      <connection>scm:git:ssh://git.opendaylight.org:29418/packetcable.git</connection>
-      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/packetcable.git</developerConnection>
-      <tag>HEAD</tag>
-      <url>https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=summary</url>
-   </scm>
-</project>
index 4ed190f6a7b257e3535fe970fce3f27446fc20d0..c30ce93b68b72b18a8f3dd4f321fcd31f86b921d 100644 (file)
@@ -31,4 +31,4 @@
             <artifactId>yang-common</artifactId>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index 87f54000ee597809a522f13eefea3b1a6ad0ad87..c66a71ff06cbc2d6bacfaf8d07ba3e9740521a45 100644 (file)
@@ -38,9 +38,6 @@ import org.opendaylight.yang.gen.v1.urn.packetcable.rev150327.pcmm.qos.gates.app
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.ServiceRegistration;
 import org.pcmm.rcd.IPCMMClient;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -65,8 +62,6 @@ public class PacketcableProvider implements BindingAwareProvider, DataChangeList
      */
     private DataBroker dataBroker;
 
-    private ServiceRegistration<PacketcableProvider> packetcableProviderRegistration;
-
     private ListenerRegistration<DataChangeListener> ccapDataChangeListenerRegistration;
     private ListenerRegistration<DataChangeListener> qosDataChangeListenerRegistration;
 
@@ -102,9 +97,6 @@ public class PacketcableProvider implements BindingAwareProvider, DataChangeList
 
         dataBroker =  session.getSALService(DataBroker.class);
 
-        BundleContext context = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
-        packetcableProviderRegistration = context.registerService(PacketcableProvider.class, this, null);
-
         ccapDataChangeListenerRegistration =
                 dataBroker.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
                         PacketcableProvider.ccapIID, this, DataBroker.DataChangeScope.SUBTREE );
@@ -119,9 +111,6 @@ public class PacketcableProvider implements BindingAwareProvider, DataChangeList
     @Override
     public void close() throws ExecutionException, InterruptedException {
         executor.shutdown();
-        if (packetcableProviderRegistration != null) {
-            packetcableProviderRegistration.unregister();
-        }
         if (ccapDataChangeListenerRegistration != null) {
             ccapDataChangeListenerRegistration.close();
         }
diff --git a/pom.xml b/pom.xml
index 70e8302e730447ab7c6a1eef2694d8109b1492cc..db67ce5283e50588a853be3118ab6c645bd426ab 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,6 @@
                <module>packetcable-policy-model</module>
                <module>packetcable-policy-server</module>
                <module>features-packetcable-policy</module>
-               <module>packetcable-policy-config</module>
                <module>packetcable-policy-karaf</module>
 
                <!-- Jar module CMTS emulator for testing -->