summaryrefslogtreecommitdiffstats
path: root/platform-logic/installer/src/main/scripts/install.sh
blob: 5aae115bfafe355cfd16e94a8e3daebd91d93668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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