diff options
Diffstat (limited to 'catalog-core/distribution/catalog-standalone/src')
9 files changed, 135 insertions, 137 deletions
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 index f077c2de..998bb8c0 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml @@ -1,5 +1,5 @@ # -# Copyright 2016 [ZTE] and others. +# 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. 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 index 308a416a..4259c9a8 100644 --- 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 @@ -1,95 +1,95 @@ --- --- Copyright 2016 [ZTE] and others. --- --- 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, - - 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) -); - +--
+-- 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,
+
+ 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-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat index e3644ddf..a4a2f069 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat @@ -1,5 +1,5 @@ @REM
-@REM Copyright 2016 [ZTE] and others.
+@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.
diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat index 0276d6f1..67ed4447 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat @@ -1,6 +1,5 @@ @REM -@REM -@REM Copyright 2016 [ZTE] and others. +@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. diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh index 70d78fef..40569e9b 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh @@ -1,7 +1,6 @@ #!/bin/bash # -# -# Copyright 2016 [ZTE] and others. +# 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. diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat index 7dbcab0e..2a53942e 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat @@ -1,5 +1,5 @@ @REM
-@REM Copyright 2016 [ZTE] and others.
+@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.
diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh index 4eda12c4..b82a7fb3 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh @@ -1,5 +1,5 @@ # -# Copyright 2016 [ZTE] and others. +# 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. diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat index f3e7c08f..7036ade3 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat @@ -1,34 +1,34 @@ -@REM -@REM Copyright 2016 [ZTE] and others. -@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% -) +@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/stop.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.sh index 40ae2dad..841a4401 100644 --- a/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.sh +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2016 [ZTE] and others. +# 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. |