aboutsummaryrefslogtreecommitdiffstats
path: root/properties-node
diff options
context:
space:
mode:
Diffstat (limited to 'properties-node')
-rwxr-xr-xproperties-node/features/pom.xml238
-rw-r--r--properties-node/features/src/main/resources/features.xml22
-rwxr-xr-xproperties-node/installer/pom.xml254
-rw-r--r--properties-node/installer/src/assembly/assemble_installer_zip.xml58
-rw-r--r--properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml38
-rw-r--r--properties-node/installer/src/main/resources/scripts/install-feature.sh6
-rwxr-xr-xproperties-node/pom.xml68
-rwxr-xr-xproperties-node/provider/pom.xml152
-rw-r--r--properties-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/prop/PropertiesNode.java100
-rw-r--r--properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml4
-rw-r--r--properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml8
11 files changed, 474 insertions, 474 deletions
diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml
index d23d9979..5573d1e7 100755
--- a/properties-node/features/pom.xml
+++ b/properties-node/features/pom.xml
@@ -1,135 +1,135 @@
<?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>properties-node</artifactId>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <version>0.1.0-SNAPSHOT</version>
- <artifactId>properties-node-features</artifactId>
- <name>Properties Node - Features</name>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>properties-node</artifactId>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <version>0.1.0-SNAPSHOT</version>
+ <artifactId>properties-node-features</artifactId>
+ <name>Properties Node - Features</name>
- <packaging>jar</packaging>
+ <packaging>jar</packaging>
- <dependencies>
+ <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node-provider</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- <scope>compile</scope>
- </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <scope>compile</scope>
+ </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>features-mdsal</artifactId>
- <version>${odl.mdsal.features.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
+ <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>
+ <scope>runtime</scope>
+ </dependency>
- <!-- dependency for opendaylight-karaf-empty for use by testing -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>opendaylight-karaf-empty</artifactId>
- <version>${odl.karaf.empty.distro.version}</version>
- <type>zip</type>
- </dependency>
+ <!-- dependency for opendaylight-karaf-empty for use by testing -->
+ <dependency>
+ <groupId>org.opendaylight.controller</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>
- <version>${odl.commons.opendaylight.version}</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <!-- Required for launching the feature tests -->
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <version>${odl.commons.opendaylight.version}</version>
+ <scope>test</scope>
+ </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>
+ <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>
- <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>
+ <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>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.16</version>
- <configuration>
- <systemPropertyVariables>
- <karaf.distro.groupId>org.opendaylight.controller</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>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <systemPropertyVariables>
+ <karaf.distro.groupId>org.opendaylight.controller</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>
</project>
diff --git a/properties-node/features/src/main/resources/features.xml b/properties-node/features/src/main/resources/features.xml
index 5f0d7b55..96f37a9e 100644
--- a/properties-node/features/src/main/resources/features.xml
+++ b/properties-node/features/src/main/resources/features.xml
@@ -22,18 +22,18 @@
<features name="sdnc-properties-node-${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">
+ 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>
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
- <feature name='sdnc-properties-node' description="sdnc-properties-node"
- version='${project.version}'>
- <feature version="${sdnctl.sli.version}">sdnc-sli</feature>
- <feature>spring</feature>
- <feature>spring-dm</feature>
- <bundle>mvn:org.onap.ccsdk.sli.plugins/properties-node-provider/${project.version}
- </bundle>
- </feature>
+ <feature name='sdnc-properties-node' description="sdnc-properties-node"
+ version='${project.version}'>
+ <feature version="${sdnctl.sli.version}">sdnc-sli</feature>
+ <feature>spring</feature>
+ <feature>spring-dm</feature>
+ <bundle>mvn:org.onap.ccsdk.sli.plugins/properties-node-provider/${project.version}
+ </bundle>
+ </feature>
</features>
diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml
index 7e6ae174..570eced7 100755
--- a/properties-node/installer/pom.xml
+++ b/properties-node/installer/pom.xml
@@ -1,139 +1,139 @@
<?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>properties-node</artifactId>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
- <artifactId>properties-node-installer</artifactId>
- <name>Properties node - Karaf Installer</name>
- <packaging>pom</packaging>
+ 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>properties-node</artifactId>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>properties-node-installer</artifactId>
+ <name>Properties node - Karaf Installer</name>
+ <packaging>pom</packaging>
- <properties>
- <application.name>sdnc-properties-node</application.name>
- <features.boot>sdnc-properties-node</features.boot>
- <features.repositories>mvn:org.onap.ccsdk.sli.plugins/properties-node-features/${project.version}/xml/features</features.repositories>
- <include.transitive.dependencies>false</include.transitive.dependencies>
- </properties>
+ <properties>
+ <application.name>sdnc-properties-node</application.name>
+ <features.boot>sdnc-properties-node</features.boot>
+ <features.repositories>mvn:org.onap.ccsdk.sli.plugins/properties-node-features/${project.version}/xml/features</features.repositories>
+ <include.transitive.dependencies>false</include.transitive.dependencies>
+ </properties>
- <dependencies>
+ <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node-features</artifactId>
- <version>${project.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node-provider</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- </dependencies>
+ </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>maven-repo-zip</id>
- <goals>
- <goal>single</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <attach>false</attach>
- <finalName>stage/${application.name}-${project.version}</finalName>
- <descriptors>
- <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
- </descriptors>
- <appendAssemblyId>false</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.ccsdk.sli</includeGroupIds>
- <excludeArtifactIds>sli-common,sli-provider,dblib-provider</excludeArtifactIds>
- <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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>false</attach>
+ <finalName>stage/${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</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.ccsdk.sli</includeGroupIds>
+ <excludeArtifactIds>sli-common,sli-provider,dblib-provider</excludeArtifactIds>
+ <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>
+ </executions>
+ </plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
</project>
diff --git a/properties-node/installer/src/assembly/assemble_installer_zip.xml b/properties-node/installer/src/assembly/assemble_installer_zip.xml
index 3bed4b5e..b6fd6558 100644
--- a/properties-node/installer/src/assembly/assemble_installer_zip.xml
+++ b/properties-node/installer/src/assembly/assemble_installer_zip.xml
@@ -22,37 +22,37 @@
<!-- 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>installer_zip</id>
- <formats>
- <format>zip</format>
- </formats>
+ 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>installer_zip</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>
+ <!-- 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>
+ <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>
diff --git a/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml b/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml
index cb56f2cd..2ee22447 100644
--- a/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -22,27 +22,27 @@
<!-- 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>mvnrepo_zip</id>
- <formats>
- <format>zip</format>
- </formats>
+ 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>
+ <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>
+ <!-- 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>
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
diff --git a/properties-node/installer/src/main/resources/scripts/install-feature.sh b/properties-node/installer/src/main/resources/scripts/install-feature.sh
index e986764b..df03392c 100644
--- a/properties-node/installer/src/main/resources/scripts/install-feature.sh
+++ b/properties-node/installer/src/main/resources/scripts/install-feature.sh
@@ -30,10 +30,10 @@ REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
if [ -f ${REPOZIP} ]
then
- unzip -d ${ODL_HOME} ${REPOZIP}
+ unzip -d ${ODL_HOME} ${REPOZIP}
else
- echo "ERROR : repo zip ($REPOZIP) not found"
- exit 1
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
fi
${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
diff --git a/properties-node/pom.xml b/properties-node/pom.xml
index 44d89f92..066db5e0 100755
--- a/properties-node/pom.xml
+++ b/properties-node/pom.xml
@@ -1,43 +1,43 @@
<?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">
- <parent>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>sdnc-plugins</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>sdnc-plugins</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>pom</packaging>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
- <name>Properties Node</name>
- <description>This is an implementation of DG Execute Node that reads property file and
- puts the properties in the DG context</description>
+ <name>Properties Node</name>
+ <description>This is an implementation of DG Execute Node that reads property file and
+ puts the properties in the DG context</description>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node-features</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node-provider</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node-features</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <modules>
- <module>provider</module>
- <module>features</module>
- <module>installer</module>
- </modules>
+ <modules>
+ <module>provider</module>
+ <module>features</module>
+ <module>installer</module>
+ </modules>
</project>
diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml
index 1c5eff74..a5249d98 100755
--- a/properties-node/provider/pom.xml
+++ b/properties-node/provider/pom.xml
@@ -1,89 +1,89 @@
<?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.sli.plugins</groupId>
- <artifactId>properties-node</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </parent>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <version>0.1.0-SNAPSHOT</version>
- <artifactId>properties-node-provider</artifactId>
- <packaging>bundle</packaging>
- <name>Properties Node - Provider</name>
- <url>http://maven.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${spring.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-common</artifactId>
- <version>${sdnctl.sli.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-provider</artifactId>
- <version>${sdnctl.sli.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.version}</version>
- </dependency>
- </dependencies>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <version>0.1.0-SNAPSHOT</version>
+ <artifactId>properties-node-provider</artifactId>
+ <packaging>bundle</packaging>
+ <name>Properties Node - Provider</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sli-provider</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
- <build>
- <plugins>
+ <build>
+ <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>org.onap.ccsdk.sli.prop</Bundle-SymbolicName>
- <Export-Package>org.onap.ccsdk.sli.prop</Export-Package>
- <Import-Package>*</Import-Package>
- </instructions>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>org.onap.ccsdk.sli.prop</Bundle-SymbolicName>
+ <Export-Package>org.onap.ccsdk.sli.prop</Export-Package>
+ <Import-Package>*</Import-Package>
+ </instructions>
- </configuration>
+ </configuration>
- </plugin>
+ </plugin>
- </plugins>
+ </plugins>
- </build>
+ </build>
</project>
diff --git a/properties-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/prop/PropertiesNode.java b/properties-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/prop/PropertiesNode.java
index 165b706b..b4886d55 100644
--- a/properties-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/prop/PropertiesNode.java
+++ b/properties-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/prop/PropertiesNode.java
@@ -35,63 +35,63 @@ import org.slf4j.LoggerFactory;
public class PropertiesNode implements SvcLogicJavaPlugin {
- private static final Logger log = LoggerFactory.getLogger(PropertiesNode.class);
+ private static final Logger log = LoggerFactory.getLogger(PropertiesNode.class);
- public void readProperties(Map<String, String> paramMap, SvcLogicContext ctx) throws SvcLogicException {
- String fileName = parseParam(paramMap, "fileName", true, null);
- String contextPrefix = parseParam(paramMap, "contextPrefix", false, null);
+ public void readProperties(Map<String, String> paramMap, SvcLogicContext ctx) throws SvcLogicException {
+ String fileName = parseParam(paramMap, "fileName", true, null);
+ String contextPrefix = parseParam(paramMap, "contextPrefix", false, null);
- try {
- Properties pp = new Properties();
- InputStream in = new FileInputStream(fileName);
- pp.load(in);
- for (Object key : pp.keySet()) {
- String pfx = contextPrefix != null ? contextPrefix + '.' : "";
- String name = (String) key;
- String value = pp.getProperty(name);
- if (value != null && value.trim().length() > 0) {
- ctx.setAttribute(pfx + name, value.trim());
- log.info("+++ " + pfx + name + ": [" + value + "]");
- }
- }
- } catch (IOException e) {
- throw new SvcLogicException("Cannot read property file: " + fileName + ": " + e.getMessage(), e);
- }
- }
+ try {
+ Properties pp = new Properties();
+ InputStream in = new FileInputStream(fileName);
+ pp.load(in);
+ for (Object key : pp.keySet()) {
+ String pfx = contextPrefix != null ? contextPrefix + '.' : "";
+ String name = (String) key;
+ String value = pp.getProperty(name);
+ if (value != null && value.trim().length() > 0) {
+ ctx.setAttribute(pfx + name, value.trim());
+ log.info("+++ " + pfx + name + ": [" + value + "]");
+ }
+ }
+ } catch (IOException e) {
+ throw new SvcLogicException("Cannot read property file: " + fileName + ": " + e.getMessage(), e);
+ }
+ }
- private String parseParam(Map<String, String> paramMap, String name, boolean required, String def)
- throws SvcLogicException {
- String s = paramMap.get(name);
+ private String parseParam(Map<String, String> paramMap, String name, boolean required, String def)
+ throws SvcLogicException {
+ String s = paramMap.get(name);
- if (s == null || s.trim().length() == 0) {
- if (!required)
- return def;
- throw new SvcLogicException("Parameter " + name + " is required in PropertiesNode");
- }
+ if (s == null || s.trim().length() == 0) {
+ if (!required)
+ return def;
+ throw new SvcLogicException("Parameter " + name + " is required in PropertiesNode");
+ }
- s = s.trim();
- String value = "";
- int i = 0;
- int i1 = s.indexOf('%');
- while (i1 >= 0) {
- int i2 = s.indexOf('%', i1 + 1);
- if (i2 < 0)
- throw new SvcLogicException("Cannot parse parameter " + name + ": " + s + ": no matching %");
+ s = s.trim();
+ String value = "";
+ int i = 0;
+ int i1 = s.indexOf('%');
+ while (i1 >= 0) {
+ int i2 = s.indexOf('%', i1 + 1);
+ if (i2 < 0)
+ throw new SvcLogicException("Cannot parse parameter " + name + ": " + s + ": no matching %");
- String varName = s.substring(i1 + 1, i2);
- String varValue = System.getenv(varName);
- if (varValue == null)
- varValue = "";
+ String varName = s.substring(i1 + 1, i2);
+ String varValue = System.getenv(varName);
+ if (varValue == null)
+ varValue = "";
- value += s.substring(i, i1);
- value += varValue;
+ value += s.substring(i, i1);
+ value += varValue;
- i = i2 + 1;
- i1 = s.indexOf('%', i);
- }
- value += s.substring(i);
+ i = i2 + 1;
+ i1 = s.indexOf('%', i);
+ }
+ value += s.substring(i);
- log.info("Parameter " + name + ": " + value);
- return value;
- }
+ log.info("Parameter " + name + ": " + value);
+ return value;
+ }
}
diff --git a/properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml b/properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml
index fd7ace8a..52d1cd96 100644
--- a/properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml
+++ b/properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml
@@ -26,7 +26,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="propertiesNode" class="org.onap.ccsdk.sli.plugins.prop.PropertiesNode">
- </bean>
+ <bean id="propertiesNode" class="org.onap.ccsdk.sli.plugins.prop.PropertiesNode">
+ </bean>
</beans>
diff --git a/properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml b/properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml
index 19275fc9..a46e37c7 100644
--- a/properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml
+++ b/properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml
@@ -21,12 +21,12 @@
-->
<beans:beans xmlns="http://www.springframework.org/schema/osgi"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
- http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
- <service ref="propertiesNode" interface="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" />
+ <service ref="propertiesNode" interface="org.onap.ccsdk.sli.plugins.prop.PropertiesNode" />
</beans:beans>