Modifying code to point to AAIService Properties
[appc/deployment.git] / platform-logic / installer / src / main / scripts / setenv.sh
1 #!/bin/bash
2
3 ###
4 # ============LICENSE_START=======================================================
5 # APPC
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
12
13 #      http://www.apache.org/licenses/LICENSE-2.0
14
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END=========================================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 ###
23
24 SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/data/properties}
25 APPC_CONFIG_DIR=${APPC_CONFIG_DIR:-/opt/appc/data/properties}
26
27 AAIURI=$(grep org.openecomp.sdnc.sli.aai.uri ${APPC_CONFIG_DIR}/aaiclient.properties | grep -v '#' | cut -d'=' -f2)
28
29 MYSQL_USER=$(grep org.openecomp.sdnc.sli.jdbc.user ${APPC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
30 MYSQL_PWD=$(grep org.openecomp.sdnc.sli.jdbc.password ${APPC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
31 MYSQL_DB=$(grep org.openecomp.sdnc.sli.jdbc.database ${APPCC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
32 MYSQL_SERVER=$(grep org.openecomp.sdnc.sli.jdbc.hosts ${APPC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2 | cut -d',' -f1)
33
34 ODLUSER=$(grep controllerUser ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
35 ODLPWD=$(grep controllerPass ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
36
37 ODLHOST=$(grep odlNodes ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2|cut -d',' -f1)
38 ODLPORT=$(grep controllerPort ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
39 if [ $ODLPORT = 8443 ]
40 then
41   ODLPROTO=https
42 else
43   ODLPROTO=http
44 fi
45
46 unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy