From 835142575e76466d46e98fbf7e73c5b6d65a8afe Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Mon, 13 Feb 2017 11:57:08 -0800 Subject: Initial OpenECOMP appc/deployment commit Change-Id: I46850ced2a3ff7a55dd1e92ec4509bf728466ce9 Signed-off-by: Patrick Brady --- platform-logic/.gitignore | 12 ++ platform-logic/appc/pom.xml | 58 ++++++++++ .../APPC_method_topology_operation_all_2.0.0.json | 1 + .../appc/src/main/resources/graph.versions | 1 + .../APPC_method_topology_operation_all_2.0.0.xml | 76 +++++++++++++ platform-logic/installer/pom.xml | 126 +++++++++++++++++++++ .../installer/src/assembly/assemble_zip.xml | 70 ++++++++++++ .../src/main/resources/svclogic.properties | 26 +++++ .../installer/src/main/scripts/install.sh | 27 +++++ .../installer/src/main/scripts/setenv.sh | 45 ++++++++ .../installer/src/main/scripts/showActiveGraphs.sh | 29 +++++ .../installer/src/main/scripts/svclogic.sh | 32 ++++++ platform-logic/pom.xml | 35 ++++++ 13 files changed, 538 insertions(+) create mode 100644 platform-logic/.gitignore create mode 100644 platform-logic/appc/pom.xml create mode 100644 platform-logic/appc/src/main/json/APPC_method_topology_operation_all_2.0.0.json create mode 100644 platform-logic/appc/src/main/resources/graph.versions create mode 100644 platform-logic/appc/src/main/xml/APPC_method_topology_operation_all_2.0.0.xml create mode 100644 platform-logic/installer/pom.xml create mode 100644 platform-logic/installer/src/assembly/assemble_zip.xml create mode 100644 platform-logic/installer/src/main/resources/svclogic.properties create mode 100644 platform-logic/installer/src/main/scripts/install.sh create mode 100644 platform-logic/installer/src/main/scripts/setenv.sh create mode 100644 platform-logic/installer/src/main/scripts/showActiveGraphs.sh create mode 100644 platform-logic/installer/src/main/scripts/svclogic.sh create mode 100644 platform-logic/pom.xml (limited to 'platform-logic') diff --git a/platform-logic/.gitignore b/platform-logic/.gitignore new file mode 100644 index 0000000..0f1b7db --- /dev/null +++ b/platform-logic/.gitignore @@ -0,0 +1,12 @@ +org.eclipse.core.resources.prefs +.classpath +.project +.settings +.idea +.externalToolBuilders +maven-eclipse.xml +*.class +target/ +MANIFEST.MF +.DS_STORE +.metadata diff --git a/platform-logic/appc/pom.xml b/platform-logic/appc/pom.xml new file mode 100644 index 0000000..c29e455 --- /dev/null +++ b/platform-logic/appc/pom.xml @@ -0,0 +1,58 @@ + + + + + org.openecomp.appc.deployment + platform-logic + 1.0.0 + + + 4.0.0 + pom + org.openecomp.appc.deployment + platform-logic-appc + 1.0.0 + + Platform Logic : APP-C + Contains platform-level service logic for the APP-C Platform + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ../target/graphs/appc + + + src/main/xml + + *.xml + + true + + + src/main/resources + + graph.versions + + true + + + + + + + + + + diff --git a/platform-logic/appc/src/main/json/APPC_method_topology_operation_all_2.0.0.json b/platform-logic/appc/src/main/json/APPC_method_topology_operation_all_2.0.0.json new file mode 100644 index 0000000..46844ee --- /dev/null +++ b/platform-logic/appc/src/main/json/APPC_method_topology_operation_all_2.0.0.json @@ -0,0 +1 @@ +[{"id":"7a758f5d.36f2a","type":"service-logic","name":"APPC 2.0.0","module":"APPC","version":"2.0.0","comments":"","xml":"","outputs":1,"x":140,"y":94,"z":"d1a301d8.219aa8","wires":[["1a700941.9439d7"]]},{"id":"9c06c4b3.52782","type":"dgstart","name":"DGSTART","outputs":1,"x":147,"y":44,"z":"d1a301d8.219aa8","wires":[["7a758f5d.36f2a"]]},{"id":"3c6a4d55.f97af2","type":"switchNode","name":"action","xml":"\n","comments":"What method should we try to call. Closely maps to __action__Server()","outputs":1,"x":138,"y":176,"z":"d1a301d8.219aa8","wires":[["2c19128d.9d02d6","8be03d03.7d96b","dd9e6d46.07b738","6fb02e14.175a68","b08d9f4.1b17fe","291bda8a.1c712e","2166e9a9.37316e"]]},{"id":"2c19128d.9d02d6","type":"outcome","name":"restart","xml":"\n","comments":"","outputs":1,"x":293,"y":191,"z":"d1a301d8.219aa8","wires":[["a9607cbc.3e9d9"]]},{"id":"8be03d03.7d96b","type":"outcome","name":"rebuild","xml":"\n","comments":"","outputs":1,"x":304.25,"y":317,"z":"d1a301d8.219aa8","wires":[["aa907476.8ca3a8"]]},{"id":"56bd2e0d.61dd88","type":"returnFailure","name":"Unknown Action","xml":"\n\n\n","comments":"","x":911.75,"y":801,"z":"d1a301d8.219aa8","wires":[]},{"id":"a9607cbc.3e9d9","type":"execute","name":"restartServer()","xml":"\n\n\n","comments":"","outputs":1,"x":456,"y":193,"z":"d1a301d8.219aa8","wires":[["50d932ab.8cca84","ebcec5e2.930378"]]},{"id":"50d932ab.8cca84","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":605,"y":194,"z":"d1a301d8.219aa8","wires":[["517fd692.1c6f3"]]},{"id":"517fd692.1c6f3","type":"returnSuccess","name":"return success","xml":"\n","comments":"","x":948,"y":318,"z":"d1a301d8.219aa8","wires":[]},{"id":"cb7f2c34.1b0738","type":"returnFailure","name":"return failure","xml":"\n","comments":"","x":946,"y":494,"z":"d1a301d8.219aa8","wires":[]},{"id":"aa907476.8ca3a8","type":"execute","name":"rebuildServer()","xml":"\n\n\n","comments":"","outputs":1,"x":467,"y":318,"z":"d1a301d8.219aa8","wires":[["342e7005.3e2bd8","7f14a01.4ac3e6"]]},{"id":"342e7005.3e2bd8","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":617,"y":317,"z":"d1a301d8.219aa8","wires":[["517fd692.1c6f3"]]},{"id":"1a700941.9439d7","type":"method","name":"method","xml":"\n","comments":"","outputs":1,"x":298,"y":94,"z":"d1a301d8.219aa8","wires":[["3c6a4d55.f97af2"]]},{"id":"dd9e6d46.07b738","type":"outcome","name":"migrate","xml":"\n","comments":"","outputs":1,"x":306.75,"y":437,"z":"d1a301d8.219aa8","wires":[["3355fed0.38abf2"]]},{"id":"3355fed0.38abf2","type":"execute","name":"migrateServer()","xml":"\n\n\n","comments":"","outputs":1,"x":469.75,"y":436,"z":"d1a301d8.219aa8","wires":[["af8c164c.f9e408","f2b9661b.faf0c8"]]},{"id":"af8c164c.f9e408","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":625.25,"y":436,"z":"d1a301d8.219aa8","wires":[["517fd692.1c6f3"]]},{"id":"f2b9661b.faf0c8","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":621.25,"y":476,"z":"d1a301d8.219aa8","wires":[["cb7f2c34.1b0738"]]},{"id":"7f14a01.4ac3e6","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":613,"y":355,"z":"d1a301d8.219aa8","wires":[["cb7f2c34.1b0738"]]},{"id":"c09eb09e.d88578","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":620.25,"y":716,"z":"d1a301d8.219aa8","wires":[["5cd5b3a.00a834c"]]},{"id":"ac9fdda8.635c5","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":623.25,"y":680,"z":"d1a301d8.219aa8","wires":[["5cd5b3a.00a834c"]]},{"id":"e4197510.21f14","type":"execute","name":"evacuateServer()","xml":"\n\n\n","comments":"","outputs":1,"x":467.75,"y":680,"z":"d1a301d8.219aa8","wires":[["c09eb09e.d88578","ac9fdda8.635c5"]]},{"id":"6fb02e14.175a68","type":"outcome","name":"migrate","xml":"\n","comments":"","outputs":1,"x":304.75,"y":681,"z":"d1a301d8.219aa8","wires":[["e4197510.21f14"]]},{"id":"ebcec5e2.930378","type":"failure","name":"failure","xml":"\n","comments":"","outputs":1,"x":608.25,"y":240,"z":"d1a301d8.219aa8","wires":[["cb7f2c34.1b0738"]]},{"id":"5cd5b3a.00a834c","type":"returnFailure","name":"Not Yet Implemented","xml":"\n\n\n","comments":"","x":923.25,"y":699,"z":"d1a301d8.219aa8","wires":[]},{"id":"b08d9f4.1b17fe","type":"outcome","name":"snapshot","xml":"\n","comments":"","outputs":1,"x":307.25,"y":549,"z":"d1a301d8.219aa8","wires":[["71679082.b68048"]]},{"id":"71679082.b68048","type":"execute","name":"createSnapshot()","xml":"\n\n\n","comments":"","outputs":1,"x":470.25,"y":548,"z":"d1a301d8.219aa8","wires":[["ddb50ec9.42b61","e37701d0.ff4a"]]},{"id":"ddb50ec9.42b61","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":625.75,"y":548,"z":"d1a301d8.219aa8","wires":[["517fd692.1c6f3"]]},{"id":"e37701d0.ff4a","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":621.75,"y":588,"z":"d1a301d8.219aa8","wires":[["cb7f2c34.1b0738"]]},{"id":"e3b1885c.6ba198","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":987.25,"y":572,"z":"d1a301d8.219aa8","wires":[["80007c3f.79526"]]},{"id":"80007c3f.79526","type":"returnSuccess","name":"return success","xml":"\n","comments":"","x":1300.25,"y":633,"z":"d1a301d8.219aa8","wires":[]},{"id":"4e5fecf4.18b5d4","type":"returnFailure","name":"return failure","xml":"\n","comments":"","x":1310.25,"y":828,"z":"d1a301d8.219aa8","wires":[]},{"id":"ac36b284.3e1bd8","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":999.25,"y":695,"z":"d1a301d8.219aa8","wires":[["80007c3f.79526"]]},{"id":"36c70977.075d06","type":"outcome","name":"migrate","xml":"\n","comments":"","outputs":1,"x":689,"y":815,"z":"d1a301d8.219aa8","wires":[["6c21a87b.083fa8"]]},{"id":"6c21a87b.083fa8","type":"execute","name":"migrateServer()","xml":"\n\n\n","comments":"","outputs":1,"x":852,"y":814,"z":"d1a301d8.219aa8","wires":[["c6e55d06.34f05","8067dd14.127b68"]]},{"id":"c6e55d06.34f05","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":1007.5,"y":814,"z":"d1a301d8.219aa8","wires":[["80007c3f.79526"]]},{"id":"8067dd14.127b68","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":1003.5,"y":854,"z":"d1a301d8.219aa8","wires":[["4e5fecf4.18b5d4"]]},{"id":"5a72cf37.b27dc8","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":995.25,"y":733,"z":"d1a301d8.219aa8","wires":[["4e5fecf4.18b5d4"]]},{"id":"f06b20cc.093cf","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":1004.5,"y":970,"z":"d1a301d8.219aa8","wires":[["2423b8c0.937798"]]},{"id":"aa701723.a923d8","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":1007.5,"y":934,"z":"d1a301d8.219aa8","wires":[["2423b8c0.937798"]]},{"id":"23a53072.a495a8","type":"execute","name":"evacuateServer()","xml":"\n\n\n","comments":"","outputs":1,"x":852,"y":934,"z":"d1a301d8.219aa8","wires":[["aa701723.a923d8","f06b20cc.093cf"]]},{"id":"fc6990e.a41c27","type":"outcome","name":"migrate","xml":"\n","comments":"","outputs":1,"x":689,"y":935,"z":"d1a301d8.219aa8","wires":[["23a53072.a495a8"]]},{"id":"ad4e7fd7.18b06","type":"failure","name":"failure","xml":"\n","comments":"","outputs":1,"x":990.5,"y":618,"z":"d1a301d8.219aa8","wires":[["4e5fecf4.18b5d4"]]},{"id":"2423b8c0.937798","type":"returnFailure","name":"Not Yet Implemented","xml":"\n\n\n","comments":"","x":1307.5,"y":953,"z":"d1a301d8.219aa8","wires":[]},{"id":"291bda8a.1c712e","type":"other","name":"Unknown","xml":"\n","comments":"Unknown action provided. Fail","outputs":1,"x":310.25,"y":801,"z":"d1a301d8.219aa8","wires":[["56bd2e0d.61dd88"]]},{"id":"2166e9a9.37316e","type":"other","name":"modifyConfig","xml":"\n","comments":"","outputs":1,"x":97.60003662109375,"y":827.9198608398438,"z":"d1a301d8.219aa8","wires":[["2a6a5cbd.5b01ac"]]},{"id":"9585b4b9.8a925","type":"execute","name":"put","xml":"\n\n\n\n","comments":"","outputs":1,"x":464.8887939453125,"y":954.1331787109375,"z":"d1a301d8.219aa8","wires":[["31d65a7b.2f1536","77aa00df.6d5f3"]]},{"id":"77aa00df.6d5f3","type":"success","name":"success","xml":"\n","comments":"","outputs":1,"x":672.0000305175781,"y":859.1199798583984,"z":"d1a301d8.219aa8","wires":[["517fd692.1c6f3"]]},{"id":"31d65a7b.2f1536","type":"other","name":"other","xml":"\n","comments":"","outputs":1,"x":672.7111511230469,"y":899.5866088867188,"z":"d1a301d8.219aa8","wires":[["517fd692.1c6f3"]]},{"id":"c5f8933.239dff","type":"execute","name":"delete","xml":"\n\n\n","comments":"","outputs":1,"x":431.64447021484375,"y":889.9199829101562,"z":"d1a301d8.219aa8","wires":[[]]},{"id":"2a6a5cbd.5b01ac","type":"block","name":"block","xml":"\n","atomic":"false","comments":"","outputs":1,"x":228.066650390625,"y":888.4888610839844,"z":"d1a301d8.219aa8","wires":[["c5f8933.239dff","9585b4b9.8a925"]]}] \ No newline at end of file diff --git a/platform-logic/appc/src/main/resources/graph.versions b/platform-logic/appc/src/main/resources/graph.versions new file mode 100644 index 0000000..ae6e958 --- /dev/null +++ b/platform-logic/appc/src/main/resources/graph.versions @@ -0,0 +1 @@ +APPC topology-operation-all 2.0.0 sync diff --git a/platform-logic/appc/src/main/xml/APPC_method_topology_operation_all_2.0.0.xml b/platform-logic/appc/src/main/xml/APPC_method_topology_operation_all_2.0.0.xml new file mode 100644 index 0000000..fbd10b0 --- /dev/null +++ b/platform-logic/appc/src/main/xml/APPC_method_topology_operation_all_2.0.0.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform-logic/installer/pom.xml b/platform-logic/installer/pom.xml new file mode 100644 index 0000000..0f59329 --- /dev/null +++ b/platform-logic/installer/pom.xml @@ -0,0 +1,126 @@ + + + + + org.openecomp.appc.deployment + platform-logic + 1.0.0 + + + 4.0.0 + pom + org.openecomp.appc.deployment + platform-logic-installer + 1.0.0 + + Platform Logic Installer for APP-C + Contains platform-level service logic installer for APP-C + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + target/resources + + + src/main/resources + + * + + true + + + + + + + + maven-assembly-plugin + + + create-zip + + single + + package + + true + + src/assembly/assemble_zip.xml + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/lib + false + true + true + false + false + false + provided + + + + + + + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + slf4j-simple + 1.7.5 + compile + + + org.openecomp.sdnc + sli-common + ${sdnctl.sli.version} + + + org.antlr + antlr4 + ${antlr.version} + jar + compile + + + mysql + mysql-connector-java + ${mysql.connector.version} + jar + compile + + + + diff --git a/platform-logic/installer/src/assembly/assemble_zip.xml b/platform-logic/installer/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..9f1cd35 --- /dev/null +++ b/platform-logic/installer/src/assembly/assemble_zip.xml @@ -0,0 +1,70 @@ + + + + + + + zip + + + false + + + + ../target/graphs + svclogic/graphs + + **/*.xml + **/graph.versions + + + + + src/main/scripts + svclogic/bin + + *.sh + + 0755 + + + target/resources + svclogic/config + + * + + + + target/lib + svclogic/lib + + *.jar + + + + + + + diff --git a/platform-logic/installer/src/main/resources/svclogic.properties b/platform-logic/installer/src/main/resources/svclogic.properties new file mode 100644 index 0000000..ec4f888 --- /dev/null +++ b/platform-logic/installer/src/main/resources/svclogic.properties @@ -0,0 +1,26 @@ +### +# ============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========================================================= +### + +org.openecomp.sdnc.sli.dbtype = jdbc +org.openecomp.sdnc.sli.jdbc.url = jdbc:mysql://sdnctldb01:3306/sdnctl +org.openecomp.sdnc.sli.jdbc.database = sdnctl +org.openecomp.sdnc.sli.jdbc.user = sdnctl +org.openecomp.sdnc.sli.jdbc.password = gamma diff --git a/platform-logic/installer/src/main/scripts/install.sh b/platform-logic/installer/src/main/scripts/install.sh new file mode 100644 index 0000000..5aae115 --- /dev/null +++ b/platform-logic/installer/src/main/scripts/install.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# BASEDIR env variable points to /opt/openecomp/appc/svclogic +BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" + + +# Load directed graphs +for graphlist in $(find $BASEDIR/graphs -name graph.versions -print) +do + curdir=$(dirname $graphlist) + + # Load files from directory containing graph.versions file + echo "Loading APP-C Directed Graphs from $curdir" + for file in $(ls $curdir/*.xml) + do + echo "Loading $file ..." + $BASEDIR/bin/svclogic.sh load $file $BASEDIR/config/svclogic.properties + done + + # Activate directed graphs + while read module rpc version mode + do + echo "Activating APP-C DG $module $rpc $version $mode" + $BASEDIR/bin/svclogic.sh activate $module $rpc $version $mode $BASEDIR/config/svclogic.properties + done < <(cat $graphlist) +done + diff --git a/platform-logic/installer/src/main/scripts/setenv.sh b/platform-logic/installer/src/main/scripts/setenv.sh new file mode 100644 index 0000000..6c26f89 --- /dev/null +++ b/platform-logic/installer/src/main/scripts/setenv.sh @@ -0,0 +1,45 @@ +#!/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========================================================= +### + +SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/data/properties} + +AAIURI=$(grep org.openecomp.sdnc.sli.aai.uri ${SDNC_CONFIG_DIR}/aaiclient.properties | grep -v '#' | cut -d'=' -f2) + +MYSQL_USER=$(grep org.openecomp.sdnc.sli.jdbc.user ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2) +MYSQL_PWD=$(grep org.openecomp.sdnc.sli.jdbc.password ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2) +MYSQL_DB=$(grep org.openecomp.sdnc.sli.jdbc.database ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2) +MYSQL_SERVER=$(grep org.openecomp.sdnc.sli.jdbc.hosts ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2 | cut -d',' -f1) + +ODLUSER=$(grep controllerUser ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2) +ODLPWD=$(grep controllerPass ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2) + +ODLHOST=$(grep odlNodes ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2|cut -d',' -f1) +ODLPORT=$(grep controllerPort ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2) +if [ $ODLPORT = 8443 ] +then + ODLPROTO=https +else + ODLPROTO=http +fi + +unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy diff --git a/platform-logic/installer/src/main/scripts/showActiveGraphs.sh b/platform-logic/installer/src/main/scripts/showActiveGraphs.sh new file mode 100644 index 0000000..80cb4aa --- /dev/null +++ b/platform-logic/installer/src/main/scripts/showActiveGraphs.sh @@ -0,0 +1,29 @@ +### +# ============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========================================================= +### + +MYSQL_USER=${MYSQL_USER:-sdnctl} +MYSQL_PWD=${MYSQL_PWD:-gamma} +MYSQL_DB=${MYSQL_DB:-sdnctl} +MYSQL_HOST=${MYSQL_HOST:-dbhost} + +mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<-END +SELECT module, rpc, version, mode from SVC_LOGIC where active='Y'; +END diff --git a/platform-logic/installer/src/main/scripts/svclogic.sh b/platform-logic/installer/src/main/scripts/svclogic.sh new file mode 100644 index 0000000..464a71c --- /dev/null +++ b/platform-logic/installer/src/main/scripts/svclogic.sh @@ -0,0 +1,32 @@ +#!/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========================================================= +### + +BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" +JARDIR=${BASEDIR}/lib + +for jar in $JARDIR/*.jar +do + CLASSPATH=$CLASSPATH:${jar} +done + +java -cp ${CLASSPATH}:${MYSQL_JDBC_DRIVER} org.openecomp.sdnc.sli.SvcLogicParser $* diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml new file mode 100644 index 0000000..a9245b3 --- /dev/null +++ b/platform-logic/pom.xml @@ -0,0 +1,35 @@ + + + + + org.openecomp.appc.deployment + appc-docker-project + 1.0.0 + + + 4.0.0 + pom + org.openecomp.appc.deployment + platform-logic + 1.0.0 + + Platform Logic + Contains platform-level service logic. Installs APP-C Directed Graphs during Docker instantiation. + + + platform-logic + yyMMdd-HHmmss + ${maven.build.timestamp} + + + + appc + installer + + + + openECOMP + + + -- cgit 1.2.3-korg