Merge "DG changes for the closed loop and async support in MDONS"
[sdnc/oam.git] / installation / sdnc / src / main / scripts / installFeatures.sh
1 #!/bin/bash
2
3 ###
4 # ============LICENSE_START=======================================================
5 # openECOMP : SDN-C
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights
8 #                                                       reserved.
9 # ================================================================================
10 # Licensed under the Apache License, Version 2.0 (the "License");
11 # you may not use this file except in compliance with the License.
12 # You may obtain a copy of the License at
13 #
14 #      http://www.apache.org/licenses/LICENSE-2.0
15 #
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS,
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # See the License for the specific language governing permissions and
20 # limitations under the License.
21 # ============LICENSE_END=========================================================
22 ###
23
24 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
25 ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
26 SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
27 CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
28 CCSDK_FEATURE_DIR=${CCSDK_FEATURE_DIR:-${CCSDK_HOME}/features}
29 SDNC_FEATURE_DIR=${SDNC_FEATURE_DIR:-${SDNC_HOME}/features}
30
31 CCSDK_EXTRAS=" \
32    ansible-adapter \
33    lcm \
34    netbox-client"
35
36
37
38 SDNC_NORTHBOUND_FEATURES=" \
39   generic-resource-api \
40   vnfapi \
41   vnftools"
42
43
44 SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-1.3.1-SNAPSHOT}
45
46 # Install CCSDK features
47 ${CCSDK_HOME}/bin/installCcsdkFeatures.sh
48
49 # Install CCSDK extras, used by SDNC but not APP-C
50 echo "Installing CCSDK extras"
51 for feature in ${CCSDK_EXTRAS}
52 do
53         if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
54         then
55                 ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
56     else
57              echo "No installer found for ${feature}"
58     fi
59 done
60
61
62 echo "Installing SDN-C northbound"
63 for feature in ${SDNC_NORTHBOUND_FEATURES}
64 do
65   if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
66   then
67     ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
68   else
69     echo "No installer found for feature sdnc-${feature}"
70   fi
71 done
72
73