diff options
Diffstat (limited to 'catalog-standalone/src')
12 files changed, 0 insertions, 487 deletions
diff --git a/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql b/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql deleted file mode 100644 index 482d6cb5..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql +++ /dev/null @@ -1,34 +0,0 @@ --- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) --- --- 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'; diff --git a/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql b/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql deleted file mode 100644 index 8039a715..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql +++ /dev/null @@ -1,75 +0,0 @@ --- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) --- --- 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. --- - -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, - - 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) NULL, - TYPE VARCHAR(50) NULL, - PROPERTIES LONGTEXT NULL, - RELATIONSHIPS LONGTEXT NULL, - - CONSTRAINT catalog_node_template_table PRIMARY KEY(NODETEMPLATEID) -); -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) -); diff --git a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql b/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql deleted file mode 100644 index e3d0522e..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql +++ /dev/null @@ -1,17 +0,0 @@ --- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) --- --- 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. --- - ---
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql b/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql deleted file mode 100644 index 41fd7a18..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql +++ /dev/null @@ -1,20 +0,0 @@ --- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) --- --- 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. --- - -SET autocommit = 0; - -COMMIT; -SET autocommit = 1;
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/conf/catalog.yml b/catalog-standalone/src/main/assembly/conf/catalog.yml deleted file mode 100644 index 3785c38b..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog.yml +++ /dev/null @@ -1,92 +0,0 @@ -#
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# 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}
-
-msbServerAddr: http://127.0.0.1:80
-
-httpServerAddr: http://127.0.0.1:8080
-
-opentoscaServerAddr: http://127.0.0.1:1337
-
-yamlParseAddr: http://127.0.0.1:8210
-
-#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://10.74.148.157:3306/catalog
-#LDAP
-ldapServerIp: 127.0.0.1
-ldapServerPort: 20096
-ldapLogindn: uid=admin,ou=system
-ldapPassword: nsoc
-ldapVersion: 3
-
-# 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: 8212
-
-# 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.orchestrator.nfv.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: ./logs/catalog.log
- archivedLogFilenamePattern: ./logs/zip/catalog-%d{yyyy-MM-dd}.log.gz
- archivedFileCount: 7
- timeZone: UTC
-
diff --git a/catalog-standalone/src/main/assembly/find_kill_process.bat b/catalog-standalone/src/main/assembly/find_kill_process.bat deleted file mode 100644 index 728eec53..00000000 --- a/catalog-standalone/src/main/assembly/find_kill_process.bat +++ /dev/null @@ -1,24 +0,0 @@ -@REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-@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-standalone/src/main/assembly/initDB.bat b/catalog-standalone/src/main/assembly/initDB.bat deleted file mode 100644 index bafc036f..00000000 --- a/catalog-standalone/src/main/assembly/initDB.bat +++ /dev/null @@ -1,42 +0,0 @@ -@REM -@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -@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 init catalog db - -set RUNHOME=%~dp0 -echo ### RUNHOME: %RUNHOME% - -echo ### init catalog db -rem cd /d %RUNHOME% - -set JAVA="%JAVA_HOME%\bin\java.exe" -set port=8777 -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=%RUNHOME%;%RUNHOME%catalog-service.jar -echo ### jvm_opts: %jvm_opts% -echo ### class_path: %class_path% - -%JAVA% -classpath %class_path% %jvm_opts% org.openo.orchestrator.nfv.catalog.CatalogApp db migrate %RUNHOME%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-standalone/src/main/assembly/initDB.sh b/catalog-standalone/src/main/assembly/initDB.sh deleted file mode 100644 index 109d119f..00000000 --- a/catalog-standalone/src/main/assembly/initDB.sh +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# 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 - -title catalog Database setup - -echo ### Starting catalog Database setup -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA - -class_path="$RUNHOME/:$RUNHOME/catalog-service.jar" -echo @class_path@ $class_path - -"$JAVA" -classpath "$class_path" org.openo.orchestrator.nfv.catalog.CatalogApp db migrate "$RUNHOME/conf/catalog.yml" diff --git a/catalog-standalone/src/main/assembly/run.bat b/catalog-standalone/src/main/assembly/run.bat deleted file mode 100644 index 4d389704..00000000 --- a/catalog-standalone/src/main/assembly/run.bat +++ /dev/null @@ -1,40 +0,0 @@ -@REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-@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 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=%RUNHOME%;%RUNHOME%catalog-service.jar
-echo ### jvm_opts: %jvm_opts%
-echo ### class_path: %class_path%
-
-%JAVA% -classpath %class_path% %jvm_opts% org.openo.orchestrator.nfv.catalog.CatalogApp server %RUNHOME%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-standalone/src/main/assembly/run.sh b/catalog-standalone/src/main/assembly/run.sh deleted file mode 100644 index c3849fa0..00000000 --- a/catalog-standalone/src/main/assembly/run.sh +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# 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 - -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="$RUNHOME/:$RUNHOME/catalog-service.jar" -echo @class_path@ $class_path - -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.orchestrator.nfv.catalog.CatalogApp server "$RUNHOME/conf/catalog.yml" - diff --git a/catalog-standalone/src/main/assembly/stop.bat b/catalog-standalone/src/main/assembly/stop.bat deleted file mode 100644 index 82f65a52..00000000 --- a/catalog-standalone/src/main/assembly/stop.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM -@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -@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.orchestrator.nfv.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-standalone/src/main/assembly/stop.sh b/catalog-standalone/src/main/assembly/stop.sh deleted file mode 100644 index f66e77b7..00000000 --- a/catalog-standalone/src/main/assembly/stop.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# 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.orchestrator.nfv.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 |