Add feature aggregator for sdnc-northbound 29/56629/2
authorTimoney, Dan (dt5972) <dt5972@att.com>
Tue, 17 Jul 2018 15:23:42 +0000 (11:23 -0400)
committerTimoney, Dan (dt5972) <dt5972@att.com>
Tue, 17 Jul 2018 17:17:04 +0000 (13:17 -0400)
Add feature aggregator sdnc-northbound-all to install all features
from SDNC northbound repo.

Change-Id: Ibe74a5d1880fb3c62d535a7367327a1bef610c19
Issue-ID: SDNC-393
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
16 files changed:
features/features-sdnc-northbound/pom.xml [new file with mode: 0644]
features/installer/pom.xml [new file with mode: 0755]
features/installer/src/assembly/assemble_installer_zip.xml [new file with mode: 0755]
features/installer/src/assembly/assemble_mvnrepo_zip.xml [new file with mode: 0755]
features/installer/src/main/resources/scripts/install-feature.sh [new file with mode: 0644]
features/pom.xml [new file with mode: 0755]
features/sdnc-northbound-all/pom.xml [new file with mode: 0644]
generic-resource-api/installer/pom.xml
generic-resource-api/installer/src/assembly/assemble_mvnrepo_zip.xml
generic-resource-api/provider/pom.xml
pom.xml
vnfapi/installer/pom.xml
vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
vnfapi/provider/pom.xml
vnftools/installer/pom.xml
vnftools/installer/src/assembly/assemble_mvnrepo_zip.xml

diff --git a/features/features-sdnc-northbound/pom.xml b/features/features-sdnc-northbound/pom.xml
new file mode 100644 (file)
index 0000000..abf98b7
--- /dev/null
@@ -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.1.0-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.onap.sdnc.northbound</groupId>
+    <artifactId>features-sdnc-northbound</artifactId>
+    <version>1.4.0-SNAPSHOT</version>
+    <packaging>feature</packaging>
+
+    <name>sdnc-northbound :: features :: ${project.artifactId}</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sdnc-northbound-all</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/features/installer/pom.xml b/features/installer/pom.xml
new file mode 100755 (executable)
index 0000000..7e447e6
--- /dev/null
@@ -0,0 +1,137 @@
+<?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>odlparent-lite</artifactId>
+               <version>1.1.0-SNAPSHOT</version>
+               <relativePath />
+       </parent>
+
+       <groupId>org.onap.sdnc.northbound</groupId>
+       <artifactId>sdnc-northbound-features-installer</artifactId>
+       <version>1.4.0-SNAPSHOT</version>
+       <packaging>pom</packaging>
+
+       <name>sdnc-northbound :: features :: ${project.artifactId}</name>
+
+       <properties>
+               <application.name>sdnc-northbound-all</application.name>
+               <features.boot>${application.name}</features.boot>
+               <features.repositories>mvn:org.onap.sdnc.northbound/${features.boot}/${project.version}/xml/features</features.repositories>
+               <include.transitive.dependencies>false</include.transitive.dependencies>
+       </properties>
+
+       <dependencies>
+
+               <dependency>
+                       <groupId>org.onap.sdnc.northbound</groupId>
+                       <artifactId>${application.name}</artifactId>
+                       <version>${project.version}</version>
+                       <type>xml</type>
+                       <classifier>features</classifier>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>*</groupId>
+                                       <artifactId>*</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+
+       </dependencies>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-assembly-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>maven-repo-zip</id>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                               <phase>package</phase>
+                                               <configuration>
+                                                       <attach>true</attach>
+                                                       <finalName>stage/${application.name}-${project.version}</finalName>
+                                                       <descriptors>
+                                                               <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+                                                       </descriptors>
+                                                       <appendAssemblyId>true</appendAssemblyId>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>installer-zip</id>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                               <phase>package</phase>
+                                               <configuration>
+                                                       <attach>true</attach>
+                                                       <finalName>${application.name}-${project.version}-installer</finalName>
+                                                       <descriptors>
+                                                               <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+                                                       </descriptors>
+                                                       <appendAssemblyId>false</appendAssemblyId>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>copy-dependencies</id>
+                                               <goals>
+                                                       <goal>copy-dependencies</goal>
+                                               </goals>
+                                               <phase>prepare-package</phase>
+                                               <configuration>
+                                                       <transitive>false</transitive>
+                                                       <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+                                                       <overWriteReleases>false</overWriteReleases>
+                                                       <overWriteSnapshots>true</overWriteSnapshots>
+                                                       <overWriteIfNewer>true</overWriteIfNewer>
+                                                       <useRepositoryLayout>true</useRepositoryLayout>
+                                                       <addParentPoms>false</addParentPoms>
+                                                       <copyPom>false</copyPom>
+                             <includeGroupIds>org.onap.sdnc.northbound</includeGroupIds>
+                                                       <scope>provided</scope>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <version>2.6</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-version</id>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals><!-- here the phase you need -->
+                                               <phase>validate</phase>
+                                               <configuration>
+                                                       <outputDirectory>${basedir}/target/stage</outputDirectory>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>src/main/resources/scripts</directory>
+                                                                       <includes>
+                                                                               <include>install-feature.sh</include>
+                                                                       </includes>
+                                                                       <filtering>true</filtering>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+
+                               </executions>
+                       </plugin>
+
+               </plugins>
+       </build>
+</project>
diff --git a/features/installer/src/assembly/assemble_installer_zip.xml b/features/installer/src/assembly/assemble_installer_zip.xml
new file mode 100755 (executable)
index 0000000..a6a22a9
--- /dev/null
@@ -0,0 +1,39 @@
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+       <id>bin</id>
+
+       <formats>
+               <format>zip</format>
+       </formats>
+
+       <!--  we want "system" and related files right at the root level
+                 as this file is suppose to be unzip on top of a karaf
+                 distro. -->
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       <fileSets>
+               <fileSet>
+                       <directory>target/stage/</directory>
+                       <outputDirectory>${application.name}</outputDirectory>
+                       <fileMode>755</fileMode>
+                       <includes>
+                               <include>*.sh</include>
+                       </includes>
+               </fileSet>
+               <fileSet>
+                       <directory>target/stage/</directory>
+                       <outputDirectory>${application.name}</outputDirectory>
+                       <fileMode>644</fileMode>
+                       <excludes>
+                               <exclude>*.sh</exclude>
+                       </excludes>
+               </fileSet>
+       </fileSets>
+
+
+
+</assembly>
diff --git a/features/installer/src/assembly/assemble_mvnrepo_zip.xml b/features/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100755 (executable)
index 0000000..86b07f1
--- /dev/null
@@ -0,0 +1,29 @@
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+       <id>repo</id>
+
+       <formats>
+               <format>zip</format>
+       </formats>
+
+       <!--  we want "system" and related files right at the root level
+                 as this file is suppose to be unzip on top of a karaf
+                 distro. -->
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+       <fileSets>
+               <fileSet>
+                       <directory>target/assembly/</directory>
+                       <outputDirectory>.</outputDirectory>
+                       <excludes>
+                       </excludes>
+               </fileSet>
+       </fileSets>
+
+
+
+</assembly>
diff --git a/features/installer/src/main/resources/scripts/install-feature.sh b/features/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644 (file)
index 0000000..e16e79a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+       unzip -d ${ODL_HOME} ${REPOZIP}
+else
+       echo "ERROR : repo zip ($REPOZIP) not found"
+       exit 1
+fi
+
+${ODL_KARAF_CLIENT} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} feature:install ${features.boot}
diff --git a/features/pom.xml b/features/pom.xml
new file mode 100755 (executable)
index 0000000..4b5c068
--- /dev/null
@@ -0,0 +1,24 @@
+<?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>odlparent-lite</artifactId>
+               <version>1.1.0-SNAPSHOT</version>
+               <relativePath/>
+       </parent>
+
+       <groupId>org.onap.sdnc.northbound</groupId>
+       <artifactId>sdnc-northbound-feature-aggregator</artifactId>
+       <version>1.4.0-SNAPSHOT</version>
+       <packaging>pom</packaging>
+
+       <name>sdnc-northbound :: features</name>
+
+       <modules>
+        <module>sdnc-northbound-all</module>
+        <module>features-sdnc-northbound</module>
+        <module>installer</module>
+    </modules>
+</project>
diff --git a/features/sdnc-northbound-all/pom.xml b/features/sdnc-northbound-all/pom.xml
new file mode 100644 (file)
index 0000000..59e5ba0
--- /dev/null
@@ -0,0 +1,64 @@
+<?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.1.0-SNAPSHOT</version>
+               <relativePath />
+       </parent>
+
+       <groupId>org.onap.sdnc.northbound</groupId>
+       <artifactId>sdnc-northbound-all</artifactId>
+       <version>1.4.0-SNAPSHOT</version>
+       <packaging>feature</packaging>
+
+       <name>sdnc-northbound :: features :: ${project.artifactId}</name>
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.opendaylight.mdsal.model</groupId>
+                               <artifactId>mdsal-model-artifacts</artifactId>
+                               <version>${odl.mdsal.model.version}</version>
+                               <type>pom</type>
+                               <scope>import</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.opendaylight.controller</groupId>
+                               <artifactId>mdsal-artifacts</artifactId>
+                               <version>${odl.mdsal.version}</version>
+                               <type>pom</type>
+                               <scope>import</scope>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+
+       <dependencies>
+               <dependency>
+                       <groupId>${project.groupId}</groupId>
+                       <artifactId>sdnc-generic-resource-api</artifactId>
+                       <version>${project.version}</version>
+                       <type>xml</type>
+                       <classifier>features</classifier>
+               </dependency>
+               <dependency>
+                       <groupId>${project.groupId}</groupId>
+                       <artifactId>sdnc-vnfapi</artifactId>
+                       <version>${project.version}</version>
+                       <type>xml</type>
+                       <classifier>features</classifier>
+               </dependency>
+               <dependency>
+                       <groupId>${project.groupId}</groupId>
+                       <artifactId>sdnc-vnftools</artifactId>
+                       <version>${project.version}</version>
+                       <type>xml</type>
+                       <classifier>features</classifier>
+               </dependency>
+
+       
+       </dependencies>
+</project>
index 16b41db..c95641a 100755 (executable)
@@ -61,7 +61,7 @@
                                                </goals>
                                                <phase>package</phase>
                                                <configuration>
-                                                       <attach>false</attach>
+                                                       <attach>true</attach>
                                                        <finalName>stage/${application.name}-${project.version}</finalName>
                                                        <descriptors>
                                                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
index 89d9c14..6a74ae5 100644 (file)
@@ -15,7 +15,7 @@
     xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-    <id>mvnrepo_zip</id>
+    <id>repo</id>
     <formats>
         <format>zip</format>
     </formats>
index 4d5cb5a..589c96f 100644 (file)
             <artifactId>sal-test-model</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.netconf</groupId>
-            <artifactId>sal-rest-connector</artifactId>
-            <scope>test</scope>
-        </dependency>
+
 
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
diff --git a/pom.xml b/pom.xml
index e262713..7cc7496 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -25,6 +25,7 @@
                <module>generic-resource-api</module>
                <module>vnfapi</module>
                <module>vnftools</module>
+               <module>features</module>
        </modules>
 
        <scm>
index f9dc0e8..27a2db2 100755 (executable)
@@ -61,7 +61,7 @@
                         </goals>
                         <phase>package</phase>
                         <configuration>
-                            <attach>false</attach>
+                            <attach>true</attach>
                             <finalName>stage/${application.name}-${project.version}</finalName>
                             <descriptors>
                                 <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
index bfb308e..05f5259 100644 (file)
@@ -23,7 +23,7 @@
     xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-    <id>mvnrepo_zip</id>
+    <id>repo</id>
     <formats>
         <format>zip</format>
     </formats>
index a8b1254..64eaff8 100644 (file)
             <artifactId>sal-test-model</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.netconf</groupId>
-            <artifactId>sal-rest-connector</artifactId>
-            <scope>test</scope>
-        </dependency>
 
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
index 81c3f2c..684bf30 100755 (executable)
@@ -60,7 +60,7 @@
                                                </goals>
                                                <phase>package</phase>
                                                <configuration>
-                                                       <attach>false</attach>
+                                                       <attach>true</attach>
                                                        <finalName>stage/${application.name}-${project.version}</finalName>
                                                        <descriptors>
                                                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
index 6542ce0..4efecd8 100644 (file)
@@ -25,7 +25,7 @@
        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-       <id>mvnrepo_zip</id>
+       <id>repo</id>
        <formats>
                <format>zip</format>
        </formats>