From e5e2526b12d60e6b65468964372eb0395e8c9ca9 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 30 Aug 2017 10:54:16 -0400 Subject: Prune plugins moved to ccsdk Replace code moved to CCSDK with README.md files redirecting developers to the proper CCSDK repository Change-Id: I6299a50f8116c653e88949a0ff23a1f2dbebb20d Issue-ID: CCSDK-59 Signed-off-by: Dan Timoney --- properties-node/README.md | 3 + properties-node/features/pom.xml | 135 -------------------- .../features/src/main/resources/features.xml | 39 ------ properties-node/installer/pom.xml | 139 --------------------- .../src/assembly/assemble_installer_zip.xml | 59 --------- .../src/assembly/assemble_mvnrepo_zip.xml | 49 -------- .../src/main/resources/scripts/install-feature.sh | 40 ------ properties-node/pom.xml | 43 ------- properties-node/provider/pom.xml | 89 ------------- .../org/openecomp/sdnc/prop/PropertiesNode.java | 97 -------------- .../META-INF/spring/properties-node-context.xml | 32 ----- .../spring/properties-node-osgi-context.xml | 32 ----- 12 files changed, 3 insertions(+), 754 deletions(-) create mode 100644 properties-node/README.md delete mode 100755 properties-node/features/pom.xml delete mode 100644 properties-node/features/src/main/resources/features.xml delete mode 100755 properties-node/installer/pom.xml delete mode 100644 properties-node/installer/src/assembly/assemble_installer_zip.xml delete mode 100644 properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml delete mode 100644 properties-node/installer/src/main/resources/scripts/install-feature.sh delete mode 100755 properties-node/pom.xml delete mode 100755 properties-node/provider/pom.xml delete mode 100644 properties-node/provider/src/main/java/org/openecomp/sdnc/prop/PropertiesNode.java delete mode 100644 properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml delete mode 100644 properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml (limited to 'properties-node') diff --git a/properties-node/README.md b/properties-node/README.md new file mode 100644 index 0000000..e989462 --- /dev/null +++ b/properties-node/README.md @@ -0,0 +1,3 @@ +PROPERTIES-NODE HAS MOVED TO CCSDK! + +The code for properties-node is now in the repository ccsdk/sli/plugins diff --git a/properties-node/features/pom.xml b/properties-node/features/pom.xml deleted file mode 100755 index b27017d..0000000 --- a/properties-node/features/pom.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - 4.0.0 - - properties-node - org.openecomp.sdnc.plugins - 1.1.2-SNAPSHOT - - org.openecomp.sdnc.plugins - 1.1.2-SNAPSHOT - properties-node-features - Properties Node - Features - - jar - - - - - org.openecomp.sdnc.plugins - properties-node-provider - ${project.version} - - - - commons-lang - commons-lang - 2.6 - compile - - - - org.opendaylight.mdsal - features-mdsal - ${odl.mdsal.features.version} - features - xml - - runtime - - - - - - org.opendaylight.controller - opendaylight-karaf-empty - ${odl.karaf.empty.distro.version} - zip - - - - - - org.opendaylight.odlparent - features-test - ${odl.commons.opendaylight.version} - test - - - - org.opendaylight.yangtools - features-yangtools - ${odl.yangtools.version} - features - xml - runtime - - - - - - - true - src/main/resources - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - - resources - - generate-resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/${features.file} - xml - features - - - - - - - - - diff --git a/properties-node/features/src/main/resources/features.xml b/properties-node/features/src/main/resources/features.xml deleted file mode 100644 index 67e1d05..0000000 --- a/properties-node/features/src/main/resources/features.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - sdnc-sli - spring - spring-dm - mvn:org.openecomp.sdnc.plugins/properties-node-provider/${project.version} - - - - diff --git a/properties-node/installer/pom.xml b/properties-node/installer/pom.xml deleted file mode 100755 index 57a45e3..0000000 --- a/properties-node/installer/pom.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - 4.0.0 - - properties-node - org.openecomp.sdnc.plugins - 1.1.2-SNAPSHOT - - properties-node-installer - Properties node - Karaf Installer - pom - - - sdnc-properties-node - sdnc-properties-node - mvn:org.openecomp.sdnc.plugins/properties-node-features/${project.version}/xml/features - false - - - - - - org.openecomp.sdnc.plugins - properties-node-features - ${project.version} - features - xml - - - * - * - - - - - - org.openecomp.sdnc.plugins - properties-node-provider - ${project.version} - - - - - - - - maven-assembly-plugin - 2.6 - - - maven-repo-zip - - single - - package - - false - stage/${application.name}-${project.version} - - src/assembly/assemble_mvnrepo_zip.xml - - false - - - - installer-zip - - single - - package - - true - ${application.name}-${project.version}-installer - - src/assembly/assemble_installer_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/system - false - true - true - true - false - false - org.openecomp.sdnc - sli-common,sli-provider,dblib-provider - provided - - - - - - maven-resources-plugin - 2.6 - - - copy-version - - copy-resources - - validate - - ${basedir}/target/stage - - - src/main/resources/scripts - - install-feature.sh - - true - - - - - - - - - - - - diff --git a/properties-node/installer/src/assembly/assemble_installer_zip.xml b/properties-node/installer/src/assembly/assemble_installer_zip.xml deleted file mode 100644 index 10b53b9..0000000 --- a/properties-node/installer/src/assembly/assemble_installer_zip.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - installer_zip - - zip - - - - false - - - - target/stage/ - ${application.name} - 755 - - *.sh - - - - target/stage/ - ${application.name} - 644 - - *.sh - - - - - - - diff --git a/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml b/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml deleted file mode 100644 index 6542ce0..0000000 --- a/properties-node/installer/src/assembly/assemble_mvnrepo_zip.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - mvnrepo_zip - - zip - - - - false - - - - target/assembly/ - . - - - - - - - - diff --git a/properties-node/installer/src/main/resources/scripts/install-feature.sh b/properties-node/installer/src/main/resources/scripts/install-feature.sh deleted file mode 100644 index 6e8620e..0000000 --- a/properties-node/installer/src/main/resources/scripts/install-feature.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -### -# ============LICENSE_START======================================================= -# openECOMP : SDN-C -# ================================================================================ -# 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========================================================= -### - -ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} -ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client} -ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"} -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} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} -${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} diff --git a/properties-node/pom.xml b/properties-node/pom.xml deleted file mode 100755 index 76754cb..0000000 --- a/properties-node/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - org.openecomp.sdnc.plugins - sdnc-plugins - 1.1.2-SNAPSHOT - - - 4.0.0 - pom - - org.openecomp.sdnc.plugins - properties-node - 1.1.2-SNAPSHOT - - Properties Node - This is an implementation of DG Execute Node that reads property file and - puts the properties in the DG context - - - - - org.openecomp.sdnc.plugins - properties-node-features - features - xml - ${project.version} - - - org.openecomp.sdnc.plugins - properties-node-provider - ${project.version} - - - - - - provider - features - installer - - - diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml deleted file mode 100755 index 9fe040e..0000000 --- a/properties-node/provider/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - 4.0.0 - - org.openecomp.sdnc.plugins - properties-node - 1.1.2-SNAPSHOT - - org.openecomp.sdnc.plugins - 1.1.2-SNAPSHOT - properties-node-provider - bundle - Properties Node - Provider - http://maven.apache.org - - UTF-8 - - - - junit - junit - test - - - org.springframework - spring-test - ${spring.version} - test - - - org.openecomp.sdnc.core - sli-common - ${sdnctl.sli.version} - compile - - - org.openecomp.sdnc.core - sli-provider - ${sdnctl.sli.version} - compile - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - - - org.springframework - spring-beans - ${spring.version} - - - org.springframework - spring-context - ${spring.version} - - - - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.openecomp.sdnc.prop - org.openecomp.sdnc.prop - * - - - - - - - - - - - - diff --git a/properties-node/provider/src/main/java/org/openecomp/sdnc/prop/PropertiesNode.java b/properties-node/provider/src/main/java/org/openecomp/sdnc/prop/PropertiesNode.java deleted file mode 100644 index 34736bb..0000000 --- a/properties-node/provider/src/main/java/org/openecomp/sdnc/prop/PropertiesNode.java +++ /dev/null @@ -1,97 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * 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.openecomp.sdnc.prop; - -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; -import java.util.Properties; - -import org.openecomp.sdnc.sli.SvcLogicContext; -import org.openecomp.sdnc.sli.SvcLogicException; -import org.openecomp.sdnc.sli.SvcLogicJavaPlugin; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class PropertiesNode implements SvcLogicJavaPlugin { - - private static final Logger log = LoggerFactory.getLogger(PropertiesNode.class); - - public void readProperties(Map 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); - } - } - - private String parseParam(Map 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"); - } - - 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 = ""; - - value += s.substring(i, i1); - value += varValue; - - i = i2 + 1; - i1 = s.indexOf('%', i); - } - value += s.substring(i); - - 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 deleted file mode 100644 index 4c57b08..0000000 --- a/properties-node/provider/src/main/resources/META-INF/spring/properties-node-context.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - 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 deleted file mode 100644 index a5cd89c..0000000 --- a/properties-node/provider/src/main/resources/META-INF/spring/properties-node-osgi-context.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - -- cgit 1.2.3-korg