bugfix - accessibility of RESTful APIs 96/121696/2
authorGuangrongFu <fu.guangrong@zte.com.cn>
Fri, 4 Jun 2021 08:31:47 +0000 (16:31 +0800)
committerGuangrong Fu <fu.guangrong@zte.com.cn>
Fri, 4 Jun 2021 08:43:04 +0000 (08:43 +0000)
Change-Id: I85ecff0afa49f5588a5f0d63697b40d9a663233f
Issue-ID: HOLMES-454
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
engine-d-standalone/src/main/assembly/bin/find_kill_process.bat [deleted file]
engine-d-standalone/src/main/assembly/bin/initDB.bat [deleted file]
engine-d-standalone/src/main/assembly/bin/initDB.sh
engine-d-standalone/src/main/assembly/bin/run.bat [deleted file]
engine-d-standalone/src/main/assembly/bin/run.sh
engine-d-standalone/src/main/assembly/bin/stop.bat [deleted file]

diff --git a/engine-d-standalone/src/main/assembly/bin/find_kill_process.bat b/engine-d-standalone/src/main/assembly/bin/find_kill_process.bat
deleted file mode 100644 (file)
index 6c61d50..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-@REM\r
-@REM Copyright 2017 ZTE Corporation.\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM     http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-echo %1 | findstr %2 >NUL\r
-echo ERRORLEVEL=%ERRORLEVEL%\r
-IF ERRORLEVEL 1 goto findend\r
-for /f "tokens=1" %%a in (%1) do (  \r
-    echo kill %1\r
-    taskkill /F /pid %%a\r
-)\r
-:findend
\ No newline at end of file
diff --git a/engine-d-standalone/src/main/assembly/bin/initDB.bat b/engine-d-standalone/src/main/assembly/bin/initDB.bat
deleted file mode 100644 (file)
index 84b2e54..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-@REM
-@REM Copyright 2017 ZTE Corporation.
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM     http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-@echo off
-set HOME=%~dp0
-set user=%1
-set password=%2
-set port=%3
-set host=%4
-echo start init holmes engine-d db
-echo HOME=%HOME%
-set main_path=%HOME%..\
-cd /d %main_path%
-mysql -u%user% -p%password% -P%port% -h%host% < %main_path%\dbscripts\mysql\onap-holmes_engine_d-createobj.sql
-set "err=%errorlevel%"
-if "%err%"=="0" (
-   echo init engine-d db success
-  ) else (
-    echo failed init engine-d db
-    pause
-  )
\ No newline at end of file
index 94e7607..dac6878 100644 (file)
@@ -47,11 +47,11 @@ if [ -z `env | grep PGPASSWORD` ]; then
     need_unset=1
 fi
 
-psql -U "'$user'" -p "'$port'" -h "'$host'" -d "'$dbname'" -f $main_path/dbscripts/postgresql/onap-holmes_engine-createobj.sql
-psql -U "'$user'" -p "'$port'" -h "'$host'" -d "'$dbname'" --command 'select * from alarm_info;'
+psql -U "$user" -p "$port" -h "$host" -d "$dbname" -f $main_path/dbscripts/postgresql/onap-holmes_engine-createobj.sql
+psql -U "$user" -p "$port" -h "$host" -d "$dbname" --command 'select * from alarm_info;'
 sql_result=$?
 
-if [ "$need_unset"x == "1"x ]; then
+if [ "$need_unset"x = "1"x ]; then
     unset PGPASSWORD
 fi
 
diff --git a/engine-d-standalone/src/main/assembly/bin/run.bat b/engine-d-standalone/src/main/assembly/bin/run.bat
deleted file mode 100644 (file)
index e61f25a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-@REM\r
-@REM Copyright 2017 ZTE Corporation.\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM     http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-@echo off\r
-title holmes-engine-d-service\r
-\r
-set RUNHOME=%~dp0\r
-echo ### RUNHOME: %RUNHOME%\r
-echo ### Starting engine-d-service\r
-set main_path=%RUNHOME%..\\r
-cd /d %main_path%\r
-set JAVA="%JAVA_HOME%\bin\java.exe"\r
-set port=8312\r
-set jvm_opts=-Xms50m -Xmx128m\r
-rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n\r
-set class_path=%main_path%;%main_path%holmes-engine-d.jar\r
-echo ### jvm_opts: %jvm_opts%\r
-echo ### class_path: %class_path%\r
-\r
-%JAVA% -classpath %class_path% %jvm_opts% EngineDActiveApp server %main_path%conf/engine-d.yml\r
-\r
-IF ERRORLEVEL 1 goto showerror\r
-exit\r
-:showerror\r
-echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!\r
-echo After checking, press any key to close \r
-pause\r
-exit
\ No newline at end of file
index f565e2e..b7aea04 100644 (file)
@@ -94,7 +94,7 @@ echo "KEY_PASS=$KEY_PASSWORD"
 sed -i "s|keyStorePath:.*|keyStorePath: $KEY_PATH|" "$main_path/conf/engine-d.yml"
 sed -i "s|keyStorePassword:.*|keyStorePassword: $KEY_PASSWORD|" "$main_path/conf/engine-d.yml"
 
-if [ ${ENABLE_ENCRYPT} = true ]; then
+if [ "${ENABLE_ENCRYPT}"x = "true"x ]; then
     sed -i "s|type:\s*https\?$|type: https|" "$main_path/conf/engine-d.yml"
     sed -i "s|#\?keyStorePath|keyStorePath|" "$main_path/conf/engine-d.yml"
     sed -i "s|#\?keyStorePassword|keyStorePassword|" "$main_path/conf/engine-d.yml"
diff --git a/engine-d-standalone/src/main/assembly/bin/stop.bat b/engine-d-standalone/src/main/assembly/bin/stop.bat
deleted file mode 100644 (file)
index f4ed01b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-@REM\r
-@REM Copyright 2017 ZTE Corporation.\r
-@REM\r
-@REM Licensed under the Apache License, Version 2.0 (the "License");\r
-@REM you may not use this file except in compliance with the License.\r
-@REM You may obtain a copy of the License at\r
-@REM\r
-@REM     http://www.apache.org/licenses/LICENSE-2.0\r
-@REM\r
-@REM Unless required by applicable law or agreed to in writing, software\r
-@REM distributed under the License is distributed on an "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-@REM See the License for the specific language governing permissions and\r
-@REM limitations under the License.\r
-@REM\r
-\r
-@echo off\r
-title stopping engine-d-service\r
-\r
-set HOME=%~dp0\r
-set Main_Class="EngineDActiveApp"\r
-\r
-echo ================== engine-d-service info =============================================\r
-echo HOME=$HOME\r
-echo Main_Class=%Main_Class%\r
-echo ===============================================================================\r
-\r
-echo ### Stopping engine-d-service\r
-cd /d %HOME%\r
-\r
-for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do (\r
-  call find_kill_process "%%i" %Main_Class%\r
-)\r
-exit
\ No newline at end of file