summaryrefslogtreecommitdiffstats
path: root/sliapi
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-02-01 16:57:00 -0500
committerDan Timoney <dtimoney@att.com>2018-02-09 17:08:35 -0500
commit131cb46f6109a6099a445cb8e1b12ff5b68ae6de (patch)
tree783f96f27c1bc9292fdd836c488c4dd8a86aeb2d /sliapi
parente36be89362fe80a7cd3da69a886c6c1f1c99a65c (diff)
Upgrade sli/core to Nitrogen
Use Apache derby for dblib SingleFeatureTest Change-Id: I6b41f7ede1a98b33824fceea9100e75c1ce8dda4 Issue-ID: CCSDK-175 Signed-off-by: Dan Timoney <dtimoney@att.com> Generalization of CCSDK core/utils framework Changes made: * Created generalized version of core/utils/dblib as core/utils/common * Deprecated core/utils/dblib package Change-Id: I0992c43910278fbe254674d1e39d7e4fcad0a592 Issue-ID: CCSDK-168 Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com> Use Apache derby for dblib test Use Apache derby for dblib SingleFeatureTest Change-Id: Ie497557f162e203fa5c5c82c17ddc55ba0c11b38 Issue-ID: CCSDK-175 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'sliapi')
-rw-r--r--sliapi/features/ccsdk-sliapi/pom.xml60
-rw-r--r--sliapi/features/features-sliapi/pom.xml29
-rwxr-xr-xsliapi/features/pom.xml139
-rw-r--r--sliapi/features/src/main/resources/features.xml39
-rwxr-xr-xsliapi/installer/pom.xml24
-rw-r--r--sliapi/installer/src/assembly/assemble_mvnrepo_zip.xml10
-rwxr-xr-xsliapi/model/pom.xml78
-rwxr-xr-xsliapi/pom.xml56
-rwxr-xr-xsliapi/provider/pom.xml116
-rw-r--r--sliapi/provider/src/main/java/org/onap/ccsdk/sli/core/sliapi/sliapiProvider.java17
-rw-r--r--sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModule.java64
-rw-r--r--sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModuleFactory.java34
-rw-r--r--sliapi/provider/src/main/resources/initial/sliapi-provider.xml70
-rw-r--r--sliapi/provider/src/main/resources/org/opendaylight/blueprint/sliapi-blueprint.xml28
14 files changed, 203 insertions, 561 deletions
diff --git a/sliapi/features/ccsdk-sliapi/pom.xml b/sliapi/features/ccsdk-sliapi/pom.xml
new file mode 100644
index 000000000..be4025b4a
--- /dev/null
+++ b/sliapi/features/ccsdk-sliapi/pom.xml
@@ -0,0 +1,60 @@
+<?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>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>single-feature-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>ccsdk-sliapi</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>mdsal-model-artifacts</artifactId>
+ <version>0.11.1</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>mdsal-artifacts</artifactId>
+ <version>1.6.1</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-mdsal-broker</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ccsdk-sli</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sliapi-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sliapi/features/features-sliapi/pom.xml b/sliapi/features/features-sliapi/pom.xml
new file mode 100644
index 000000000..f3481cba8
--- /dev/null
+++ b/sliapi/features/features-sliapi/pom.xml
@@ -0,0 +1,29 @@
+<?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>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>feature-repo-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>features-sliapi</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ccsdk-sliapi</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sliapi/features/pom.xml b/sliapi/features/pom.xml
index 78bfb89a4..17fa8fb41 100755
--- a/sliapi/features/pom.xml
+++ b/sliapi/features/pom.xml
@@ -1,134 +1,23 @@
<?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>sliapi</artifactId>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>odlparent-lite</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
- <artifactId>sliapi-features</artifactId>
-
- <packaging>jar</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-model</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-provider</artifactId>
- <classifier>config</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-provider</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>features-mdsal</artifactId>
- <version>${odl.mdsal.features.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
-
- <scope>runtime</scope>
- </dependency>
-
-
-
- <!-- dependency for opendaylight-karaf-empty for use by testing -->
- <dependency>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>opendaylight-karaf-empty</artifactId>
- <version>${odl.karaf.empty.distro.version}</version>
- <type>zip</type>
- </dependency>
-
-
- <dependency>
- <!-- Required for launching the feature tests-->
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>features-test</artifactId>
- <scope>test</scope>
- <version>${odl.commons.opendaylight.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>features-yangtools</artifactId>
- <version>${odl.yangtools.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sliapi-feature-aggregator</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
- <build>
- <resources>
- <resource>
- <filtering>true</filtering>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>filter</id>
- <goals>
- <goal>resources</goal>
- </goals>
- <phase>generate-resources</phase>
- </execution>
- </executions>
- </plugin>
- <!-- launches the feature test, which validates that your karaf feature can
- be installed inside of a karaf container. It doesn't validate that your
- functionality works correctly, just that you have all of the dependent
- bundles defined correctly.
- <plugin>
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.16</version>
- <configuration>
- <systemPropertyVariables>
- <karaf.distro.groupId>org.opendaylight.odlparent</karaf.distro.groupId>
- <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
- <karaf.distro.version>${odl.karaf.empty.distro.version}</karaf.distro.version>
- </systemPropertyVariables>
- <dependenciesToScan>
- <dependency>org.opendaylight.yangtools:features-test</dependency>
- </dependenciesToScan>
- </configuration>
- </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/${features.file}</file>
- <type>xml</type>
- <classifier>features</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <modules>
+ <module>features-sliapi</module>
+ <module>ccsdk-sliapi</module>
+ </modules>
</project>
diff --git a/sliapi/features/src/main/resources/features.xml b/sliapi/features/src/main/resources/features.xml
deleted file mode 100644
index c5df348fa..000000000
--- a/sliapi/features/src/main/resources/features.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ============LICENSE_START=======================================================
- ONAP : CCSDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights
- reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-
-<features name="sdnc-sliapi-${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.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
-
- <feature name='sdnc-sliapi' description="sdnc-sliapi" version='${project.version}'>
- <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
- <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature>
- <feature version="${sdnctl.sli.version}">sdnc-sli</feature>
- <bundle>mvn:org.onap.ccsdk.sli.core/sliapi-model/${project.version}</bundle>
- <bundle>mvn:org.onap.ccsdk.sli.core/sliapi-provider/${project.version}</bundle>
- <configfile finalname="etc/opendaylight/karaf/200-sliapiprovider.xml">mvn:org.onap.ccsdk.sli.core/sliapi-provider/${project.version}/xml/config</configfile>
- </feature>
-
-</features>
diff --git a/sliapi/installer/pom.xml b/sliapi/installer/pom.xml
index cddcf6dd7..290524e32 100755
--- a/sliapi/installer/pom.xml
+++ b/sliapi/installer/pom.xml
@@ -1,18 +1,25 @@
<?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>sliapi</artifactId>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>odlparent-lite</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sliapi-installer</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
<packaging>pom</packaging>
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+
<properties>
- <application.name>sdnc-sliapi</application.name>
- <features.boot>sdnc-sliapi</features.boot>
- <features.repositories>mvn:org.onap.ccsdk.sli.core/sliapi-features/${project.version}/xml/features</features.repositories>
+ <application.name>ccsdk-sliapi</application.name>
+ <features.boot>${application.name}</features.boot>
+ <features.repositories>mvn:org.onap.ccsdk.sli.core/${features.boot}/${project.version}/xml/features</features.repositories>
<include.transitive.dependencies>false</include.transitive.dependencies>
</properties>
@@ -20,10 +27,10 @@
<dependency>
<groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-features</artifactId>
+ <artifactId>${application.name}</artifactId>
<version>${project.version}</version>
- <classifier>features</classifier>
<type>xml</type>
+ <classifier>features</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
@@ -133,5 +140,4 @@
</plugins>
</build>
-
</project>
diff --git a/sliapi/installer/src/assembly/assemble_mvnrepo_zip.xml b/sliapi/installer/src/assembly/assemble_mvnrepo_zip.xml
index e22c6f567..5f3e3af31 100644
--- a/sliapi/installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/sliapi/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -8,9 +8,9 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,12 +44,6 @@
</fileSet>
</fileSets>
- <files>
- <file>
- <source>../provider/src/main/resources/initial/${feature-name}-provider.xml</source>
- <destName>./etc/opendaylight/karaf/200-${feature-name}provider.xml</destName>
- </file>
- </files>
</assembly>
diff --git a/sliapi/model/pom.xml b/sliapi/model/pom.xml
index 4ea88516a..bbdcea051 100755
--- a/sliapi/model/pom.xml
+++ b/sliapi/model/pom.xml
@@ -1,89 +1,29 @@
<?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>sliapi</artifactId>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>binding-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sliapi-model</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
- <build>
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Import-Package>*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <version>${odl.yangtools.yang.maven.plugin.version}</version>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${odl.sal.api.gen.plugin.version}</version>
- <type>jar</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>sal-rest-docgen-maven</artifactId>
- <version>${odl.restconf.version}</version>
- <type>jar</type>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <goals>
- <goal>generate-sources</goal>
- </goals>
- <configuration>
- <yangFilesRootDir>${yang.file.directory}</yangFilesRootDir>
- <codeGenerators>
- <generator>
- <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
- <outputBaseDir>${salGeneratorPath}</outputBaseDir>
- </generator>
- <generator>
- <codeGeneratorClass>org.opendaylight.netconf.sal.rest.doc.maven.StaticDocGenerator</codeGeneratorClass>
- <outputBaseDir>target/swagger</outputBaseDir>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>yang-binding</artifactId>
- <version>${odl.mdsal.yang.binding.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-common</artifactId>
- <version>${odl.yangtools.version}</version>
- </dependency>
- <dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-inet-types</artifactId>
- <version>${odl.ietf-inet-types.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-yang-types</artifactId>
- <version>${odl.ietf-yang-types.version}</version>
</dependency>
</dependencies>
</project>
diff --git a/sliapi/pom.xml b/sliapi/pom.xml
index a08d8fcb8..46057da0f 100755
--- a/sliapi/pom.xml
+++ b/sliapi/pom.xml
@@ -1,56 +1,20 @@
<?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/maven-v4_0_0.xsd">
+<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.onap.ccsdk.sli.core</groupId>
- <artifactId>ccsdk-sli-core</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>odlparent-lite</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
- <packaging>pom</packaging>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sliapi</artifactId>
- <version>0.2.0-SNAPSHOT</version>
-
- <properties>
- <feature-name>sliapi</feature-name>
- </properties>
-
- <dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-features</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-provider</artifactId>
- <version>${project.version}</version>
- <classifier>config</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliapi-provider</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
+ <version>0.2.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
- </dependencyManagement>
+ <name>ccsdk-sli-core :: sliapi</name>
<modules>
<module>model</module>
@@ -58,4 +22,8 @@
<module>provider</module>
<module>installer</module>
</modules>
+
+ <properties>
+ <feature-name>sliapi</feature-name>
+ </properties>
</project>
diff --git a/sliapi/provider/pom.xml b/sliapi/provider/pom.xml
index 5db9671d6..cb4dfc898 100755
--- a/sliapi/provider/pom.xml
+++ b/sliapi/provider/pom.xml
@@ -1,125 +1,53 @@
<?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>sliapi</artifactId>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>binding-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sliapi-provider</artifactId>
+ <version>0.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>org.opendaylight.controller.config.yang.config.sliapi.impl</Export-Package>
- <Import-Package>*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <version>${odl.yangtools.yang.maven.plugin.version}</version>
- <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>
- -->
- <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
- <outputBaseDir>${salGeneratorPath}</outputBaseDir>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${odl.sal.api.gen.plugin.version}</version>
- <type>jar</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>${odl.yang.jmx.generator.version}</version>
- </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/sliapi-provider.xml</file>
- <type>xml</type>
- <classifier>config</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>mdsal-artifacts</artifactId>
+ <version>1.6.1</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
<dependency>
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sliapi-model</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-api</artifactId>
- <version>${odl.controller.config.api.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-config</artifactId>
- <version>${odl.mdsal.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
- <version>${odl.mdsal.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-util</artifactId>
- <version>${odl.mdsal.version}</version>
</dependency>
@@ -136,12 +64,10 @@
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
- <version>${odl.mdsal.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
- <version>${odl.yangtools.version}</version>
</dependency>
</dependencies>
</project>
diff --git a/sliapi/provider/src/main/java/org/onap/ccsdk/sli/core/sliapi/sliapiProvider.java b/sliapi/provider/src/main/java/org/onap/ccsdk/sli/core/sliapi/sliapiProvider.java
index 82e660083..c3ad4ed60 100644
--- a/sliapi/provider/src/main/java/org/onap/ccsdk/sli/core/sliapi/sliapiProvider.java
+++ b/sliapi/provider/src/main/java/org/onap/ccsdk/sli/core/sliapi/sliapiProvider.java
@@ -31,6 +31,7 @@ import java.util.Properties;
import java.util.concurrent.Future;
import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -118,7 +119,7 @@ public class sliapiProvider implements AutoCloseable, SLIAPIService{
protected DataBroker dataBroker;
protected DOMDataBroker domDataBroker;
- protected NotificationProviderService notificationService;
+ protected NotificationPublishService notificationService;
protected RpcProviderRegistry rpcRegistry;
protected BindingAwareBroker.RpcRegistration<SLIAPIService> rpcRegistration;
@@ -142,16 +143,24 @@ public class sliapiProvider implements AutoCloseable, SLIAPIService{
}
- public sliapiProvider() {
+ public sliapiProvider(
+ DataBroker dataBroker,
+ NotificationPublishService notificationPublishService,
+ RpcProviderRegistry rpcProviderRegistry) {
this.LOG.info( "Creating provider for " + appName );
+ this.dataBroker = dataBroker;
+ this.notificationService = notificationPublishService;
+ this.rpcRegistry = rpcProviderRegistry;
+ initialize();
}
+
+
public void initialize(){
LOG.info( "Initializing provider for " + appName );
//initialization code goes here.
sdncStatusFile = System.getenv(SDNC_STATUS_FILE);
LOG.info( "SDNC STATUS FILE = " + sdncStatusFile );
- rpcRegistration = rpcRegistry.addRpcImplementation(SLIAPIService.class, this);
LOG.info( "Initialization complete for " + appName );
}
@@ -179,7 +188,7 @@ public class sliapiProvider implements AutoCloseable, SLIAPIService{
}
public void setNotificationService(
- NotificationProviderService notificationService) {
+ NotificationPublishService notificationService) {
this.notificationService = notificationService;
if( LOG.isDebugEnabled() ){
LOG.debug( "Notification Service set to " + (notificationService==null?"null":"non-null") + "." );
diff --git a/sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModule.java b/sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModule.java
deleted file mode 100644
index e7444e318..000000000
--- a/sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModule.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.provider.impl.rev140523;
-
-import org.onap.ccsdk.sli.core.sliapi.sliapiProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SliapiProviderModule extends org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.provider.impl.rev140523.AbstractSliapiProviderModule {
- private final Logger LOG = LoggerFactory.getLogger( SliapiProviderModule.class );
-
- public SliapiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public SliapiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.provider.impl.rev140523.SliapiProviderModule 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.info("Calling SliapiProviderModule.createInstance");
- final sliapiProvider provider = new sliapiProvider();
- provider.setDataBroker( getDataBrokerDependency() );
- provider.setNotificationService( getNotificationServiceDependency() );
- provider.setRpcRegistry( getRpcRegistryDependency() );
- provider.initialize();
- return new AutoCloseable() {
-
- @Override
- public void close() throws Exception {
- //TODO: CLOSE ANY REGISTRATION OBJECTS CREATED USING ABOVE BROKER/NOTIFICATION
- //SERVIE/RPC REGISTRY
- provider.close();
- }
- };
- }
-
-}
diff --git a/sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModuleFactory.java b/sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModuleFactory.java
deleted file mode 100644
index 6454d17c4..000000000
--- a/sliapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/core/sliapi/provider/impl/rev140523/SliapiProviderModuleFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-/*
-* Generated file
-*
-* Generated from: yang module name: sliapi-provider-impl yang module local name: sliapi-provider-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu Aug 03 16:10:18 EDT 2017
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.provider.impl.rev140523;
-public class SliapiProviderModuleFactory extends org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.sliapi.provider.impl.rev140523.AbstractSliapiProviderModuleFactory {
-
-}
diff --git a/sliapi/provider/src/main/resources/initial/sliapi-provider.xml b/sliapi/provider/src/main/resources/initial/sliapi-provider.xml
deleted file mode 100644
index 47d31d0ab..000000000
--- a/sliapi/provider/src/main/resources/initial/sliapi-provider.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ============LICENSE_START=======================================================
- ONAP : CCSDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights
- reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<!-- 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>
-
- <!-- This xmlns:prefix should match the namespace in the *-provider-impl.yang file
- The prefix: inside type should match the prefix of the yang file. -->
- <type xmlns:prefix="org:onap:ccsdk:sli:core:sliapi:provider:impl">
- prefix:sliapi-provider-impl
- </type>
- <name>sliapi-provider-impl</name>
-
- <!-- The following sections contain bindings to services defined in the
- *-provider-impl yang file. For example the rpc-registry is required
- because we have a dependency (or augmentation) named "rpc-registry"
- and which binds to the md-sa-binding-registry. If you remove those
- dependencies from the yang file then you can remove them from here. -->
- <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>
-
- <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>
-
- <notification-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
- binding:binding-notification-service
- </type>
- <name>binding-notification-broker</name>
- </notification-service>
- </module>
-
- </modules>
- </data>
-
- </configuration>
-
- <!-- Required capabilities are basically a listing of all modules that need to be imported before
- our service can be resolved. Capabilities for dependencies defined above are implied which is
- why we do not have define a required capability for the data broker, for example. -->
- <required-capabilities>
- <capability>org:onap:ccsdk:sli:core:sliapi:provider:impl?module=sliapi-provider-impl&amp;revision=2014-05-23</capability>
- </required-capabilities>
-
-</snapshot>
diff --git a/sliapi/provider/src/main/resources/org/opendaylight/blueprint/sliapi-blueprint.xml b/sliapi/provider/src/main/resources/org/opendaylight/blueprint/sliapi-blueprint.xml
new file mode 100644
index 000000000..761b014a0
--- /dev/null
+++ b/sliapi/provider/src/main/resources/org/opendaylight/blueprint/sliapi-blueprint.xml
@@ -0,0 +1,28 @@
+<?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="svcLogicService"
+ interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService" />
+
+
+ <reference id="dataBroker"
+ interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+ odl:type="default" />
+
+ <reference id="notificationService"
+ interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
+ odl:type="default" />
+
+ <reference id="rpcRegistry"
+ interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
+ odl:type="default" />
+
+ <bean id="provider" class="org.onap.ccsdk.sli.core.sliapi.sliapiProvider">
+ <argument ref="dataBroker" />
+ <argument ref="notificationService" />
+ <argument ref="rpcRegistry" />
+
+ </bean>
+</blueprint> \ No newline at end of file