Chore: Add gerrit maven verify GHA workflow
[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 SDNC_NORTHBOUND_FEATURES=" \
38   generic-resource-api \
39   vnfapi \
40   vnftools"
41
42
43 # Install CCSDK features
44 ${CCSDK_HOME}/bin/installCcsdkFeatures.sh
45
46 # Install CCSDK extras, used by SDNC but not APP-C
47 echo "Installing CCSDK extras"
48 for feature in ${CCSDK_EXTRAS}
49 do
50         if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
51         then
52                 ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
53     else
54       echo "No installer found for ${feature}"
55     fi
56 done
57
58
59 echo "Installing SDN-C northbound"
60 for feature in ${SDNC_NORTHBOUND_FEATURES}
61 do
62   if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
63   then
64     ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
65   else
66     echo "No installer found for feature sdnc-${feature}"
67   fi
68 done
69
70