4ee03e39415ba04f0e17544842549dc652678284
[ccsdk/distribution.git] / odlsli / src / main / scripts / installCcsdkFeatures.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 CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
27 CCSDK_FEATURE_DIR=${CCSDK_FEATURE_DIR:-${CCSDK_HOME}/features}
28
29 CCSDK_CORE_FEATURES=" \
30  slicore-utils \
31  dblib \
32  sli \
33  filters \
34  sliPluginUtils \
35  sliapi"
36
37 CCSDK_ADAPTORS_FEATURES=" \
38   aai-service \
39   mdsal-resource \
40   resource-assignment \
41   sql-resource"
42
43 CCSDK_NORTHBOUND_FEATURES=" \
44   asdcApi \
45  dataChange"
46
47 CCSDK_PLUGINS_FEATURES=" \
48   properties-node \
49   restapi-call-node"
50
51
52 CCSDK_CORE_VERSION=${CCSDK_CORE_VERSION:-0.0.1-SNAPSHOT}
53 CCSDK_ADAPTORS_VERSION=${CCSDK_ADAPTORS_VERSION:-0.0.1-SNAPSHOT}
54 CCSDK_NORTHBOUND_VERSION=${CCSDK_NORTHBOUND_VERSION:-0.0.1-SNAPSHOT}
55 CCSDK_PLUGINS_VERSION=${CCSDK_PLUGINS_VERSION:-0.0.1-SNAPSHOT}
56
57 echo "Enabling core features"
58 ${ODL_HOME}/bin/client feature:install odl-restconf-all odl-mdsal-all odl-mdsal-apidocs
59
60 # Remove etc/host.key if it exists to work around
61 # issue with client authentication
62 if [ -f ${ODL_HOME}/etc/host.key ]
63 then
64   rm ${ODL_HOME}/etc/host.key
65 fi
66
67
68 echo "Installing CCSDK sli/core"
69 for feature in ${CCSDK_CORE_FEATURES}
70 do
71   if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
72   then
73     ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
74   else
75     echo "No installer found for feature ccsdk-${feature}"
76   fi
77 done
78
79 echo "Installing CCSDK sli/adaptors"
80 for feature in ${CCSDK_ADAPTORS_FEATURES}
81 do
82   if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
83   then
84     ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
85   else
86     echo "No installer found for feature ccsdk-${feature}"
87   fi
88 done
89
90 echo "Installing CCSDK sli/northbound"
91 for feature in ${CCSDK_NORTHBOUND_FEATURES}
92 do
93   if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
94   then
95     ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
96   else
97     echo "No installer found for feature ccsdk-${feature}"
98   fi
99 done
100
101
102 echo "Installing CCSDK sli/plugins"
103 for feature in ${CCSDK_PLUGINS_FEATURES}
104 do
105   if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
106   then
107     ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
108   else
109     echo "No installer found for feature ccsdk-${feature}"
110   fi
111 done

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use