aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/energysavings/installer/src/main
diff options
context:
space:
mode:
authorCLAPP, GEORGE H (gc731h) <gc731h@att.com>2018-07-06 20:12:26 +0000
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-07-13 16:15:28 -0400
commit10cd619b5e6e34b22b3239a2516f1ca491c87a3a (patch)
treebd1d1b7a2bdc2b837cecb216f25e01b0f9a65311 /sdnr/northbound/energysavings/installer/src/main
parentfd23f3cf7c22ef284de0338c9fd380d5f189a87f (diff)
First draft Energy Savings POLICY_TO_SDNR handler
Initial commit of a karaf feature to process a DMaaP topic sent by Policy to SDNR as part of the Energy Savings project. The topic name is POLICY_TO_SDNR, and the content is a large and complex JSON structure. Currently, this feature simply forwards the JSON string to a server and returns the response of the server to Policy in topic SDNR_TO_POLICY. Change-Id: I84cb891c98fb23f5dfe44a9e3ad8ce69afb72405 Issue-ID: CCSDK-350 Signed-off-by: George Clapp <gc731h@att.com>
Diffstat (limited to 'sdnr/northbound/energysavings/installer/src/main')
-rw-r--r--sdnr/northbound/energysavings/installer/src/main/resources/scripts/install-feature.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/sdnr/northbound/energysavings/installer/src/main/resources/scripts/install-feature.sh b/sdnr/northbound/energysavings/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 000000000..aef7a4cce
--- /dev/null
+++ b/sdnr/northbound/energysavings/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ONAP : CCSDK
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+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}