<?xml version="1.0" encoding="UTF-8"?>
<!--
+ Copyright (c) 2015 CableLabs, 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>
+-->
+<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>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-parent</artifactId>
+ <version>1.6.0-SNAPSHOT</version>
+ <relativePath />
+ </parent>
+ <artifactId>features-packetcable-policy</artifactId>
<groupId>org.opendaylight.packetcable</groupId>
+ <name>${project.artifactId}</name>
<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.
- -->
- <artifactId>features-packetcable-policy</artifactId>
- <groupId>org.opendaylight.packetcable</groupId>
- <!-- Optional Uncomment version if you are not using a parent pom.xml
- <version>1.3.0-SNAPSHOT</version>
- -->
- <packaging>jar</packaging>
- <properties>
- <features.file>features.xml</features.file>
- <!-- Optional: Move these properties to your parent pom and possibly
- DependencyManagement section of your parent pom -->
- <branding.version>1.2.0-SNAPSHOT</branding.version>
- <karaf.resources.version>1.6.0-SNAPSHOT</karaf.resources.version>
- <karaf.empty.version>1.6.0-SNAPSHOT</karaf.empty.version>
- <surefire.version>2.16</surefire.version>
- </properties>
- <dependencies>
- <!--
- Necessary: Put dependencies on any feature repos
- you use in your features.xml file.
-
- Note: they will need to be <type>xml</xml>
- and <classifier>features</classifier>.
- One other thing to watch for is to make sure they are
- <scope>compile</compile>, which they should be by default,
- but be cautious lest they be at a different scope in a parent pom.
-
- Examples:
- -->
+ <properties>
+ <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
+ <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
+ <feature.test.version>1.6.0-SNAPSHOT</feature.test.version>
+ </properties>
+ <dependencies>
<dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>features-yangtools</artifactId>
- <version>0.8.0-SNAPSHOT</version>
- <classifier>features</classifier>
- <type>xml</type>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>features-yangtools</artifactId>
+ <version>${yangtools.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- <classifier>features</classifier>
- <type>xml</type>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>features-mdsal</artifactId>
+ <version>${mdsal.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <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.controller</groupId>
+ <artifactId>features-restconf</artifactId>
+ <classifier>features</classifier>
+ <version>${mdsal.version}</version>
+ <type>xml</type>
+ <scope>runtime</scope>
</dependency>
-
-
-
-
- <!--
- Necessary TODO: Put dependencies for bundles directly referenced
- in your features.xml file. For every <bundle> reference in your
- features.xml file, you need a corresponding dependency here.
-
- Examples:
- -->
- <dependency>
- <groupId>org.opendaylight.packetcable</groupId>
- <artifactId>packetcable-policy-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.packetcable</groupId>
- <artifactId>packetcable-policy-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.packetcable</groupId>
- <artifactId>packetcable-driver</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- test to validate features.xml -->
- <dependency>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>features-test</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- dependency for opendaylight-karaf-empty for use by testing -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>opendaylight-karaf-empty</artifactId>
- <version>${karaf.empty.version}</version>
- <type>zip</type>
- </dependency>
- <!-- Uncomment this if you get an error : java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.7.2</version>
- </dependency>
- -->
-
- </dependencies>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>filter</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/classes/${features.file}</file>
- <type>xml</type>
- <classifier>features</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${surefire.version}</version>
- <configuration>
- <systemPropertyVariables>
- <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
- <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
- <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>
- </systemPropertyVariables>
- <dependenciesToScan>
- <dependency>org.opendaylight.odlparent:features-test</dependency>
- </dependenciesToScan>
- </configuration>
- </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>
+ <dependency>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <artifactId>packetcable-policy-config</artifactId>
+ <version>${project.version}</version>
+ <classifier>config</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <artifactId>packetcable-policy-server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <artifactId>packetcable-policy-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <artifactId>packetcable-driver</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <version>${feature.test.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 CableLabs, 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
+-->
+<features name="odl-packetcable-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+ <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.controller/features-restconf/${mdsal.version}/xml/features</repository>
+ <feature name='odl-packetcable-policy-server-all' version='${project.version}'
+ description='OpenDaylight :: packetcable :: policy :: All'>
+ <feature version='${project.version}'>odl-packetcable-policy-server</feature>
+ </feature>
+ <feature name='odl-packetcable-policy-model' version='${project.version}'
+ description='OpenDaylight :: packetcable :: policy :: Model'>
+ <feature version='${yangtools.version}'>odl-yangtools-binding</feature>
+ <feature version='${yangtools.version}'>odl-yangtools-models</feature>
+ <bundle>mvn:org.opendaylight.packetcable/packetcable-policy-model/${project.version}</bundle>
+ </feature>
+ <feature name='odl-packetcable-policy-server' version='${project.version}'
+ description='OpenDaylight :: packetcable :: policy :: Provider'>
+ <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
+ <feature version="${mdsal.version}">odl-mdsal-apidocs</feature>
+ <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>
+ </feature>
+</features>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- 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
--->
-<features name="odl-packetcable-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
- <!--
- Please read the features guidelines:
- https://wiki.opendaylight.org/view/Runtime:Karaf_Features_Guidelines#Feature_Best_Practices
- -->
- <!--
- Add repo entries for the repositories of features you refer to in this feature file but do not define here.
- <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin/0.2.0-SNAPSHOT/xml/features</repository>
- <repository>mvn:org.opendaylight.controller/features-adsal/${feature.adsal.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.controller/features-adsal-compatibility/1.6.0-SNAPSHOT/xml/features</repository>
- -->
- <repository>mvn:org.opendaylight.yangtools/features-yangtools/0.8.0-SNAPSHOT/xml/features</repository>
- <repository>mvn:org.opendaylight.controller/features-mdsal/1.3.0-SNAPSHOT/xml/features</repository>
- <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin/${openflowplugin.version}/xml/features</repository>
-
- <feature name='odl-packetcable-policy-server-all' version='${project.version}' description='OpenDaylight :: packetcable :: policy :: All'>
- <feature version='${project.version}'>odl-packetcable-policy-server</feature>
- <feature version='${project.version}'>odl-packetcable-policy-model</feature>
- <feature version='${project.version}'>odl-packetcable-driver</feature>
- </feature>
-
- <!--
- Define your features. It is useful to list then in order of dependency. So if A depends on B, list A first.
- It's also nice to list inside a feature, first the features it needs, then the bundles it needs, then the configfiles.
- <feature version='0.2.0-SNAPSHOT'>odl-openflowplugin-flow-services</feature>
- <bundle>mvn:com.google.common.collect/collect/14.0</bundle>
-
- -->
- <!--- * Basic MD-SAL Consumer -->
- <!--- * Basic MD-SAL Model feature -->
- <feature name='odl-packetcable-policy-model' version='${project.version}' description='OpenDaylight :: packetcable :: policy :: Model'>
- <feature version='0.8.0-SNAPSHOT'>odl-yangtools-binding</feature>
- <feature version='0.8.0-SNAPSHOT'>odl-yangtools-models</feature>
- <bundle>mvn:org.opendaylight.packetcable/packetcable-policy-model/${project.version}</bundle>
- </feature>
-
- <!--- * Basic MD-SAL Provider -->
- <feature name='odl-packetcable-policy-server' version='${project.version}' description='OpenDaylight :: packetcable :: policy :: Provider'>
- <feature version='1.3.0-SNAPSHOT'>odl-mdsal-broker</feature>
- <bundle>mvn:org.opendaylight.packetcable/packetcable-policy-server/${project.version}</bundle>
- <bundle>mvn:org.opendaylight.packetcable/packetcable-driver/${project.version}</bundle>
- <feature version='${project.version}'>odl-packetcable-policy-model</feature>
- <feature version='${project.version}'>odl-packetcable-driver</feature>
- <configfile finalname="etc/opendaylight/karaf/80-packetcable.xml">mvn:org.opendaylight.packetcable/packetcable-policy-config/${project.version}/xml/config</configfile>
- </feature>
-
- <!--- * * -->
- <feature name='odl-packetcable-driver' version='${project.version}' description='OpenDaylight :: packetcable :: Driver'>
- <feature version='1.3.0-SNAPSHOT'>odl-mdsal-broker</feature>
- </feature>
-
-</features>
<packaging>jar</packaging>
<properties>
<!-- Optional TODO: Rename your configfile to taste -->
- <configfile>80-packetcable.xml</configfile>
+ <configfile>default-config.xml</configfile>
</properties>
<build>
<plugins>
<snapshot>
<required-capabilities>
<capability>urn:opendaylight:params:xml:ns:yang:packetcable:packetcable-policy-server:impl?module=packetcable-policy-server-impl&revision=2014-01-31</capability>
+ <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
</required-capabilities>
<configuration>
</type>
<name>packetcable-policy-server-default-impl</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>
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
+ <name>binding-osgi-broker</name>
</data-broker>
<rpc-registry>
<type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
<?xml version="1.0" encoding="UTF-8"?>
-<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>
+<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>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>karaf-parent</artifactId>
+ <version>1.6.0-SNAPSHOT</version>
+ <relativePath />
+ </parent>
+ <artifactId>packetcable-policy-karaf</artifactId>
<groupId>org.opendaylight.packetcable</groupId>
+ <name>${project.artifactId}</name>
<version>1.3.0-SNAPSHOT</version>
- </parent>
- <artifactId>packetcable-policy-karaf</artifactId>
- <packaging>pom</packaging>
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
- <properties>
- <!-- Optional TODO: Move these properties to your parent pom and possibly
- DependencyManagement section of your parent pom -->
- <branding.version>1.2.0-SNAPSHOT</branding.version>
- <karaf.resources.version>1.6.0-SNAPSHOT</karaf.resources.version>
- </properties>
-
- <dependencies>
- <!-- Basic Karaf dependencies -->
- <dependency>
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>framework</artifactId>
- <version>${karaf.version}</version>
- <type>kar</type>
- </dependency>
- <dependency>
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>standard</artifactId>
- <version>${karaf.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
-
- <!-- ODL Branding -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>karaf.branding</artifactId>
- <version>${branding.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <!-- ODL Resources needed for karaf -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>opendaylight-karaf-resources</artifactId>
- <version>${karaf.resources.version}</version>
- </dependency>
-
- <!-- Project local feautures -->
- <!--
- Necessary TODO put your features here.
-
- Note: they will need to be <type>xml</xml>
- and <classifier>features</classifier>.
-
- Note: they must be <scope>runtime</scope>
-
- Note: usually you would only need to depend
- on your own feature file here for your local distro,
- and possible the features-mdsal for odl-restconf
- (although, strange situations do exist :) )
-
- Example:
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.openflowplugin</groupId>
- <artifactId>features-openflowplugin</artifactId>
- <version>0.2.0-SNAPSHOT</version>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <classifier>features</classifier>
- <version>${project.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
-<!--
- <dependency>
- <groupId>org.opendaylight.l2switch</groupId>
- <artifactId>features-l2switch</artifactId>
- <classifier>features</classifier>
- <version>0.3.0-SNAPSHOT</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
--->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-restconf</artifactId>
- <classifier>features</classifier>
- <version>1.3.0-SNAPSHOT</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.dlux</groupId>
- <artifactId>features-dlux</artifactId>
- <classifier>features</classifier>
- <version>0.3.0-SNAPSHOT</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.packetcable</groupId>
- <artifactId>features-packetcable-policy</artifactId>
- <classifier>features</classifier>
- <version>${project.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <versionRange>[0,)</versionRange>
- <goals>
- <goal>cleanVersions</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <versionRange>[0,)</versionRange>
- <goals>
- <goal>copy</goal>
- <goal>unpack</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <versionRange>[0,)</versionRange>
- <goals>
- <goal>commands-generate-help</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.fusesource.scalate</groupId>
- <artifactId>maven-scalate-plugin</artifactId>
- <versionRange>[0,)</versionRange>
- <goals>
- <goal>sitegen</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.servicemix.tooling</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <versionRange>[0,)</versionRange>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore></ignore>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>${karaf.version}</version>
- <extensions>true</extensions>
- <configuration>
- <bootFeatures>
- <feature>standard</feature>
- <!-- Uncomment the following lines to ensure restconf & dlux are automatically installed -->
- <!--<feature>odl-restconf</feature>-->
- <!--<feature>odl-dlux-core</feature>-->
- <feature>odl-mdsal-apidocs</feature>
- <feature>odl-packetcable-policy-server-all</feature>
- <!--
- Optional TODO: Add entries here for the features you want in your local distro
- Note: odl-restconf is a separate feature from odl-mdsal-broker. If you want
- restconf, you need to list it here explicitely.
- Examples:
- <feature>odl-openflowplugin-flow-services</feature>
- <feature>odl-restconf</feature>
- -->
- <!-- Final TODO: Remove TODO Comments ;) -->
- </bootFeatures>
- </configuration>
- <executions>
- <execution>
- <id>process-resources</id>
- <goals>
- <goal>install-kars</goal>
- </goals>
- <phase>process-resources</phase>
- </execution>
- <execution>
- <id>package</id>
- <goals>
- <goal>instance-create-archive</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>copy</id>
- <goals>
- <goal>copy</goal>
- </goals>
- <phase>generate-resources</phase>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>karaf.branding</artifactId>
- <version>${karaf.branding.version}</version>
- <outputDirectory>target/assembly/lib</outputDirectory>
- <destFileName>karaf.branding-${branding.version}.jar</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- <execution>
- <id>unpack-karaf-resources</id>
- <goals>
- <goal>unpack-dependencies</goal>
- </goals>
- <phase>prepare-package</phase>
- <configuration>
- <outputDirectory>${project.build.directory}/assembly</outputDirectory>
- <groupId>org.opendaylight.controller</groupId>
- <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
- <excludes>META-INF\/**</excludes>
- <excludeTransitive>true</excludeTransitive>
- <ignorePermissions>false</ignorePermissions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
+ <prerequisites>
+ <maven>3.1.1</maven>
+ </prerequisites>
+ <properties>
+ <karaf.localFeature>odl-packetcable-policy-server-all</karaf.localFeature>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>framework</artifactId>
+ <type>kar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <artifactId>features-packetcable-policy</artifactId>
+ <classifier>features</classifier>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
<configuration>
- <tasks>
- <chmod perm="755">
- <fileset dir="${project.build.directory}/assembly/bin">
- <include name="karaf" />
- <include name="instance" />
- <include name="start" />
- <include name="stop" />
- <include name="status" />
- <include name="client" />
- <include name="shell" />
- </fileset>
- </chmod>
- </tasks>
+ <skip>true</skip>
</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>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
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>
- <groupId>org.opendaylight.packetcable</groupId>
- <artifactId>packetcable</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>binding-parent</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <relativePath />
</parent>
<artifactId>packetcable-policy-model</artifactId>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <name>${project.artifactId}</name>
+ <version>1.3.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<artifactId>yang-common</artifactId>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${yangtools.version}</version>
- <type>jar</type>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <goals>
- <goal>generate-sources</goal>
- </goals>
- <configuration>
- <yangFilesRootDir>src/main/yang</yangFilesRootDir>
- <codeGenerators>
- <generator>
- <codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
- <outputBaseDir>${salGeneratorPath}</outputBaseDir>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <scm>
- <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
- </scm>
-</project>
+</project>
\ No newline at end of file
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>
- <groupId>org.opendaylight.packetcable</groupId>
- <artifactId>packetcable</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>config-parent</artifactId>
+ <version>0.4.0-SNAPSHOT</version>
+ <relativePath />
</parent>
<artifactId>packetcable-policy-server</artifactId>
+ <groupId>org.opendaylight.packetcable</groupId>
+ <name>${project.artifactId}</name>
+ <version>1.3.0-SNAPSHOT</version>
<packaging>bundle</packaging>
-
<properties>
<sal-binding-api.version>1.3.0-SNAPSHOT</sal-binding-api.version>
<powermock.version>1.5.1</powermock.version>
</properties>
-
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>packetcable-policy-model</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools.model</groupId>
- <artifactId>ietf-inet-types</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools.model</groupId>
- <artifactId>ietf-yang-types</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-api</artifactId>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-config</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-common-util</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
-
<build>
<plugins>
<plugin>
<skip>true</skip>
</configuration>
</plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Export-Package>org.opendaylight.controller.config.yang.toaster_provider,</Export-Package>
- <Import-Package>*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>config</id>
- <goals>
- <goal>generate-sources</goal>
- </goals>
- <configuration>
- <codeGenerators>
- <generator>
- <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
- <outputBaseDir>${jmxGeneratorPath}</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>${salGeneratorPath}</outputBaseDir>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
- <scm>
- <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
- </scm>
-</project>
+</project>
\ No newline at end of file
package org.opendaylight.controller.packetcable.provider;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import javax.annotation.concurrent.ThreadSafe;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
-import org.opendaylight.controller.md.sal.common.api.data.AsyncReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;
import org.opendaylight.yang.gen.v1.urn.packetcable.rev150327.Ccap;
import org.opendaylight.yang.gen.v1.urn.packetcable.rev150327.pcmm.qos.gates.apps.SubsKey;
import org.opendaylight.yang.gen.v1.urn.packetcable.rev150327.pcmm.qos.gates.apps.subs.Gates;
import org.opendaylight.yang.gen.v1.urn.packetcable.rev150327.pcmm.qos.gates.apps.subs.GatesKey;
+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;
-import javax.annotation.concurrent.ThreadSafe;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
/**
* Called by ODL framework to start this bundle.
*
* TODO - Remove some of these state maps and move some of this into the PCMMService
*/
@ThreadSafe
-public class PacketcableProvider implements DataChangeListener, AutoCloseable {
+public class PacketcableProvider implements BindingAwareProvider, DataChangeListener, AutoCloseable {
private static final Logger logger = LoggerFactory.getLogger(PacketcableProvider.class);
/**
* The ODL object used to broker messages throughout the framework
*/
- private final DataBroker dataBroker;
+ private DataBroker dataBroker;
+
+ private ServiceRegistration<PacketcableProvider> packetcableProviderRegistration;
+
+ private ListenerRegistration<DataChangeListener> ccapDataChangeListenerRegistration;
+ private ListenerRegistration<DataChangeListener> qosDataChangeListenerRegistration;
/**
* The thread pool executor
/**
* Constructor
*/
- public PacketcableProvider(final DataBroker dataBroker) {
+ public PacketcableProvider() {
logger.info("Starting provider");
- this.dataBroker = dataBroker;
executor = Executors.newCachedThreadPool();
}
+ @Override
+ public void onSessionInitiated(ProviderContext session) {
+ logger.info("Packetcable Session Initiated");
+
+ 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 );
+
+ qosDataChangeListenerRegistration =
+ dataBroker.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
+ PacketcableProvider.qosIID, this, DataBroker.DataChangeScope.SUBTREE );
+ }
/**
* Implemented from the AutoCloseable interface.
*/
@Override
public void close() throws ExecutionException, InterruptedException {
executor.shutdown();
+ if (packetcableProviderRegistration != null) {
+ packetcableProviderRegistration.unregister();
+ }
+ if (ccapDataChangeListenerRegistration != null) {
+ ccapDataChangeListenerRegistration.close();
+ }
+
+ if (qosDataChangeListenerRegistration != null) {
+ qosDataChangeListenerRegistration.close();
+ }
}
public InetAddress getInetAddress(final String subId){
}
}
}
-
}
package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.packetcable.packetcable.policy.server.impl.rev140131;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.packetcable.provider.PacketcableProvider;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Override
public java.lang.AutoCloseable createInstance() {
logger.info("Creating PacketcableProvider instance");
-
- final DataBroker dataBrokerService = getDataBrokerDependency();
- final PacketcableProvider provider = new PacketcableProvider(dataBrokerService);
-
- final ListenerRegistration<DataChangeListener> ccapDataChangeListenerRegistration =
- dataBrokerService.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
- PacketcableProvider.ccapIID, provider, DataBroker.DataChangeScope.SUBTREE );
-
- final ListenerRegistration<DataChangeListener> qosDataChangeListenerRegistration =
- dataBrokerService.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION,
- PacketcableProvider.qosIID, provider, DataBroker.DataChangeScope.SUBTREE );
-
- logger.info("PacketCableProvider Registered with DataBroker");
-
- AutoCloseable close = new AutoCloseable() {
-
- @Override
- public void close() throws Exception {
- if (ccapDataChangeListenerRegistration != null) {
- ccapDataChangeListenerRegistration.close();
- }
- if (qosDataChangeListenerRegistration != null) {
- qosDataChangeListenerRegistration.close();
- }
- if (provider != null) {
- provider.close();
- }
- }
- };
-
- return close;
+ final PacketcableProvider provider = new PacketcableProvider();
+ getDataBrokerDependency().registerProvider(provider);
+ return provider;
}
}
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity mdsal:binding-async-data-broker;
+ config:required-identity mdsal:binding-broker-osgi-registry;
}
}
}