9aff1d8ca40854e4675d41c44055bed7ef01925a
[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  filters \
33  sli \
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-mdsal-all
59 ${ODL_HOME}/bin/client feature:install odl-mdsal-apidocs
60 ${ODL_HOME}/bin/client feature:install odl-restconf-all
61
62
63
64
65 echo "Installing CCSDK sli/core"
66 for feature in ${CCSDK_CORE_FEATURES}
67 do
68   if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
69   then
70     ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
71   else
72     echo "No installer found for feature sdnc-${feature}"
73   fi
74 done
75
76 echo "Installing CCSDK sli/adaptors"
77 for feature in ${CCSDK_ADAPTORS_FEATURES}
78 do
79   if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
80   then
81     ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
82   else
83     echo "No installer found for feature ccsdk-${feature}"
84   fi
85 done
86
87 echo "Installing CCSDK sli/northbound"
88 for feature in ${CCSDK_NORTHBOUND_FEATURES}
89 do
90   if [ -f ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
91   then
92     ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
93   else
94     echo "No installer found for feature sdnc-${feature}"
95   fi
96 done
97
98
99 echo "Installing CCSDK sli/plugins"
100 for feature in ${CCSDK_PLUGINS_FEATURES}
101 do
102   if [ -f ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
103   then
104     ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
105   else
106     echo "No installer found for feature sdnc-${feature}"
107   fi
108 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