diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2017-08-18 15:00:17 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2017-08-18 15:00:17 +0800 |
commit | 169a896f8fc4db5a0054d31bb5bfd254f2352bb0 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /catalog-core/distribution/catalog-standalone/src/main/assembly | |
parent | 40f14a360b080c804935ddfc277bf05c526ff9ee (diff) |
Remove abandoned codes of catalog
Change-Id: Id258c64b6fbf0e25da8c033991e4a3ba21ad806e
Issue-Id: VFC-107
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'catalog-core/distribution/catalog-standalone/src/main/assembly')
9 files changed, 0 insertions, 428 deletions
diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/find_kill_process.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/find_kill_process.bat deleted file mode 100644 index a4a2f069..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/find_kill_process.bat +++ /dev/null @@ -1,24 +0,0 @@ -@REM
-@REM Copyright 2016 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 %1 | findstr %2 >NUL
-echo ERRORLEVEL=%ERRORLEVEL%
-IF ERRORLEVEL 1 goto findend
-for /f "tokens=1" %%a in (%1) do (
- echo kill %1
- taskkill /F /pid %%a
-)
-:findend
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/initDB.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/initDB.bat deleted file mode 100644 index 10749c3a..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/initDB.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM -@REM Copyright 2016 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 catalog 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\openo-common_tosca-catalog-createobj.sql -set "err=%errorlevel%" -if "%err%"=="0" ( - echo init catalog db success - ) else ( - echo failed init catalog db - pause - )
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/initDB.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/initDB.sh deleted file mode 100644 index 9cde0cd7..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/initDB.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 ZTE Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -user=$1 -password=$2 -port=$3 -host=$4 -echo "start init catalog db" -main_path=$HOME/../ -mysql -u$user -p$password -P$port -h$host <$main_path/dbscripts/mysql/openo-common_tosca-catalog-createobj.sql -sql_result=$? -if [ $sql_result != 0 ] ; then - echo "failed to init catalog database!" - exit 1 -fi -echo "init catalog database success!" -exit 0 - diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/run.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/run.bat deleted file mode 100644 index 74c64b1f..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/run.bat +++ /dev/null @@ -1,41 +0,0 @@ -@REM
-@REM Copyright 2016 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
-title catalog-service
-
-set RUNHOME=%~dp0
-echo ### RUNHOME: %RUNHOME%
-echo ### Starting catalog-service
-set main_path=%RUNHOME%..\
-cd /d %main_path%
-set JAVA="%JAVA_HOME%\bin\java.exe"
-set port=8312
-set jvm_opts=-Xms50m -Xmx128m
-rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n
-set class_path=%main_path%;%main_path%catalog-service.jar
-echo ### jvm_opts: %jvm_opts%
-echo ### class_path: %class_path%
-
-%JAVA% -classpath %class_path% %jvm_opts% org.openo.commontosca.catalog.CatalogApp server %main_path%conf/catalog.yml
-
-IF ERRORLEVEL 1 goto showerror
-exit
-:showerror
-echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
-echo After checking, press any key to close
-pause
-exit
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/run.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/run.sh deleted file mode 100644 index 3d251af8..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/run.sh +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright 2016 ZTE Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -DIRNAME=`dirname $0` -RUNHOME=`cd $DIRNAME/; pwd` -echo @RUNHOME@ $RUNHOME - -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA -main_path=$RUNHOME/../ -cd $main_path -JAVA_OPTS="-Xms50m -Xmx128m" -port=8312 -#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n" -echo @JAVA_OPTS@ $JAVA_OPTS - -class_path="$main_path/:$main_path/catalog-service.jar" -echo @class_path@ $class_path - -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.commontosca.catalog.CatalogApp server "$main_path/conf/catalog.yml" - diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/stop.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/stop.bat deleted file mode 100644 index 7036ade3..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/stop.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM
-@REM Copyright 2016 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
-title stopping catalog-service
-
-set HOME=%~dp0
-set Main_Class="org.openo.commontosca.catalog.CatalogApp"
-
-echo ================== catalog-service info =============================================
-echo HOME=$HOME
-echo Main_Class=%Main_Class%
-echo ===============================================================================
-
-echo ### Stopping catalog-service
-cd /d %HOME%
-
-for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do (
- call find_kill_process "%%i" %Main_Class%
-)
-exit
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/stop.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/stop.sh deleted file mode 100644 index 841a4401..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/bin/stop.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 ZTE Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -Main_Class="org.openo.commontosca.catalog.CatalogApp" - -echo ================== catalog-service info ============================================= -echo HOME=$HOME -echo Main_Class=$Main_Class -echo =============================================================================== -cd $HOME; pwd - -echo @WORK_DIR@ $HOME - -function save_service_pid(){ - service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` - echo @service_pid@ $service_pid -} - -function kill_service_process(){ - ps -p $service_pid - if [ $? == 0 ]; then - kill -9 $service_pid - fi -} - -save_service_pid; -echo @C_CMD@ kill -9 $service_pid -kill_service_process;
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml deleted file mode 100644 index 7bb6a5f7..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml +++ /dev/null @@ -1,85 +0,0 @@ -# -# Copyright 2016 ZTE Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -template: Hello, %s! - -defaultName: ${DW_DEFAULT_NAME:-Stranger} -# the micro service ip -serviceIp: -msbServerAddr: http://127.0.0.1:80 - -httpServerAddr: http://127.0.0.1:8201 - -parserType: aria - -#catalogue path to store csar temperarily -cataloguePath: ./catalog -httpServerPath: ../tomcat/webapps/ROOT/ -#database -database: - - # the name of your JDBC driver - driverClass: com.mysql.jdbc.Driver - - # the username - user: catalog - - # the password - password: catalog - - # the JDBC URL - url: jdbc:mysql://127.0.0.1:3306/catalog - -# use the simple server factory if you only want to run on a single port -#server: -# type: simple -# connector: -# type: http -# port: 8080 -server: - type: simple - rootPath: '/openoapi/catalog/v1/*' - applicationContextPath: / - adminContextPath: /admin - connector: - type: http - port: 8200 - -# Logging settings. -logging: - - # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. - level: ALL - - # Logger-specific levels. - loggers: - - # Sets the level for 'com.example.app' to DEBUG. - org.openo.commontosca.catalog.catalog.CatalogApp: INFO - - appenders: - - type: console - threshold: INFO - timeZone: UTC - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - - type: file - threshold: INFO - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - currentLogFilename: ./works/logs/catalog.log - archivedLogFilenamePattern: ./works/logs/zip/catalog-%d{yyyy-MM-dd}.log.gz - archivedFileCount: 7 - timeZone: UTC - diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/dbscripts/mysql/openo-common_tosca-catalog-createobj.sql b/catalog-core/distribution/catalog-standalone/src/main/assembly/dbscripts/mysql/openo-common_tosca-catalog-createobj.sql deleted file mode 100644 index 2efd5650..00000000 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/dbscripts/mysql/openo-common_tosca-catalog-createobj.sql +++ /dev/null @@ -1,97 +0,0 @@ ---
--- Copyright 2016 ZTE Corporation.
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-/******************drop old database and user***************************/
-use mysql;
-drop database IF EXISTS catalog;
-delete from user where User='catalog';
-FLUSH PRIVILEGES;
-
-/******************create new database and user***************************/
-create database catalog CHARACTER SET utf8;
-
-GRANT ALL PRIVILEGES ON catalog.* TO 'catalog'@'%' IDENTIFIED BY 'catalog' WITH GRANT OPTION;
-GRANT ALL PRIVILEGES ON mysql.* TO 'catalog'@'%' IDENTIFIED BY 'catalog' WITH GRANT OPTION;
-
-GRANT ALL PRIVILEGES ON catalog.* TO 'catalog'@'localhost' IDENTIFIED BY 'catalog' WITH GRANT OPTION;
-GRANT ALL PRIVILEGES ON mysql.* TO 'catalog'@'localhost' IDENTIFIED BY 'catalog' WITH GRANT OPTION;
-FLUSH PRIVILEGES;
-
-use catalog;
-set Names 'utf8';
-/******************delete old table and create new***************************/
-use catalog;
-DROP TABLE IF EXISTS catalog_package_table;
-
-CREATE TABLE catalog_package_table (
- CSARID VARCHAR(200) NOT NULL,
- DOWNLOADURI VARCHAR(200) NULL,
- SIZE VARCHAR(100) NULL,
- FORMAT VARCHAR(100) NULL,
- CREATETIME VARCHAR(100) NULL,
- DELETIONPENDING VARCHAR(100) NULL,
- MODIFYTIME VARCHAR(100) NULL,
- OPERATIONALSTATE VARCHAR(100) NULL,
- USAGESTATE VARCHAR(100) NULL,
- ONBOARDSTATE VARCHAR(100) NULL,
- NAME VARCHAR(100) NULL,
- VERSION VARCHAR(20) NULL,
- PROVIDER VARCHAR(300) NULL,
- TYPE VARCHAR(300) NULL,
- PROCESSSTATE VARCHAR(100) NULL,
- CONSTRAINT CATALOG_PACKAGE_TABLE_OID PRIMARY KEY(CSARID)
-);
-
-DROP TABLE IF EXISTS catalog_service_template_table;
-CREATE TABLE catalog_service_template_table (
- SERVICETEMPLATEID VARCHAR(200) NOT NULL,
- TEMPLATENAME VARCHAR(100) NULL,
- TYPE VARCHAR(50) NULL,
- VENDOR VARCHAR(100) NULL,
- VERSION VARCHAR(20) NULL,
- CSARID VARCHAR(100) NULL,
- INPUTS LONGTEXT NULL,
- ROWDATA LONGTEXT NULL,
- OPERATIONS LONGTEXT NULL,
- DOWNLOADURI VARCHAR(200) NULL,
- SERVICETEMPLATEORIGINALID VARCHAR(100) NULL,
- METADATA LONGTEXT NULL,
-
- CONSTRAINT CATALOG_SERVICE_TEMPLATE_TABLE_OID PRIMARY KEY(SERVICETEMPLATEID)
-);
-
-DROP TABLE IF EXISTS catalog_node_template_table;
-CREATE TABLE catalog_node_template_table (
- NODETEMPLATEID VARCHAR(200) NOT NULL,
- NAME VARCHAR(100) NULL,
- SERVICETEMPLATEID VARCHAR(200) NOT NULL,
- TYPE VARCHAR(50) NULL,
- PROPERTIES LONGTEXT NULL,
- RELATIONSHIPS LONGTEXT NULL,
-
- CONSTRAINT catalog_node_template_table PRIMARY KEY(NODETEMPLATEID,SERVICETEMPLATEID)
-);
-DROP TABLE IF EXISTS catalog_model_substitution_mapping_table;
-CREATE TABLE catalog_model_substitution_mapping_table (
- MAPPINGID VARCHAR(200) NOT NULL,
- NODETYPE VARCHAR(100) NULL,
- SERVICETEMPLATEID VARCHAR(200) NULL,
- REQUIREMENTS LONGTEXT NULL,
- CAPABILITIES LONGTEXT NULL,
-
- CONSTRAINT catalog_model_substitution_mapping_table PRIMARY KEY(MAPPINGID)
-);
-
|