aboutsummaryrefslogtreecommitdiffstats
path: root/dgbuilder/tools/update_app_impl_yangs.sh
diff options
context:
space:
mode:
authorChinthakayala, Sheshashailavas <sc2914@att.com>2017-04-07 08:18:56 -0900
committerChinthakayala, Sheshashailavas <sc2914@att.com>2017-04-07 08:21:54 -0900
commit4cc1e4b946aedcf6c34550d1903e9bd13e6e160b (patch)
tree4f3369f83f381734fb9aebc3ae9d8ed026c21c99 /dgbuilder/tools/update_app_impl_yangs.sh
parent76825594b6c95cf09d5142c0f9384a5b2bf9721e (diff)
[SDNC-5] added yang upload
and added break node Change-Id: I8d36b5d400a51a6ebc248b100f04284cf27abcad Signed-off-by: Chinthakayala, Sheshashailavas <sc2914@att.com> Former-commit-id: ae6804f3c5805f78198b26de88ceb6dfa9bb335b
Diffstat (limited to 'dgbuilder/tools/update_app_impl_yangs.sh')
-rwxr-xr-xdgbuilder/tools/update_app_impl_yangs.sh51
1 files changed, 0 insertions, 51 deletions
diff --git a/dgbuilder/tools/update_app_impl_yangs.sh b/dgbuilder/tools/update_app_impl_yangs.sh
deleted file mode 100755
index 612f97d3..00000000
--- a/dgbuilder/tools/update_app_impl_yangs.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-toolsDir=$PROJECT_HOME/tools
-appRootDir=$1
-yangFilesDirFullPath=$2
-baseYangFile=$3
-
-#echo ${appRootDir}
-#echo ${yangFilesDirFullPath}
-#echo ${baseYangFile}
-if [ "$#" -lt "3" ]
-then
- echo "Usage: $0 appRootDir yangFilesDirectoryFullPath baseYangFile example:$0 asdcApi /home/brocade/sdnc/asdcApi ASDC-API.yang"
- exit
-fi
-cd ${toolsDir}/tmpws
-#cp ${toolsDir}/module-provider-impl.yang ${toolsDir}/tmpws
-
-if [ ! -e "${toolsDir}/module-provider-impl.yang" ]
-then
- echo "module-provider-impl.yang should exist in the current directory"
- exit
-fi
-
-#echo "appRootDir:$appRootDir"
-#echo "yangFileFullPath:$yangFileFullPath"
-#echo "yangFile:$yangFile"
-cp ${yangFilesDirFullPath}/*.yang ${appRootDir}/model/src/main/yang
-if [ "$?" != "0" ]
-then
- echo "Could not copy the yang file. Exiting ..."
- exit
-fi
-
-moduleName=$(cat ${yangFilesDirFullPath}/${baseYangFile}|egrep "module .*{"|cut -d' ' -f2|cut -d'{' -f1)
-sed -i.bak s/\$MODULE/$1/g ${toolsDir}/module-provider-impl.yang
-cp ${toolsDir}/module-provider-impl.yang ${appRootDir}/provider/src/main/yang/${appRootDir}-provider-impl.yang
-cd $appRootDir
-mvn clean install >${toolsDir}/tmpws/logs/mvn_install.log 2>&1
-if [ "$?" != "0" ]
-then
- echo "mvn compile failed"
- exit 1
-fi
-mkdir ${toolsDir}/tmpws/jars
-cp ./model/target/${appRootDir}.model-1.0.0-SNAPSHOT.jar ${toolsDir}/tmpws/jars
-
-mv ${toolsDir}/output_js/${moduleName}.js ${toolsDir}/output_js/${moduleName}.js_prev >/dev/null 2>&1
-${toolsDir}/getRpcsClassFromYangs.sh ${yangFilesDirFullPath}/${baseYangFile} ${toolsDir}/tmpws/${appRootDir}/model/target/${appRootDir}.model-1.0.0-SNAPSHOT.jar > ${toolsDir}/output_js/${moduleName}.js
-
-mv ${toolsDir}/output_js/${moduleName}_inputs.js ${toolsDir}/output_js/${moduleName}_inputs_prev.js >/dev/null 2>&1
-node ${toolsDir}/dot_to_json.js ${toolsDir}/output_js/${moduleName}.js $moduleName >>${toolsDir}/output_js/${moduleName}_inputs.js
-cp ${toolsDir}/output_js/${moduleName}_inputs.js $PROJECT_HOME/generatedJS