From 380e19d353dada1515d82ad349e053da1958f4cb Mon Sep 17 00:00:00 2001 From: Skip Wonnell Date: Wed, 1 Nov 2017 14:21:31 -0500 Subject: Update initialization of VNF_DG_MAPPING table Update the data to be loaded into the table Move source location of the data to the sqlData.dump file Remove old source location (VNF_DG_MAPPING.sql) Update install.sh to remove call to VNF_DG_MAPPING.sql Issue-ID: [APPC-295] Change-Id: I525fb0f717237388d04989fe49eca3e6498b09ef Signed-off-by: Skip Wonnell --- installation/appc/src/main/resources/sqlData.dump | 9 +++- .../src/main/resources/VNF_DG_MAPPING.sql | 50 ---------------------- .../installer/src/main/scripts/install.sh | 9 ---- 3 files changed, 8 insertions(+), 60 deletions(-) delete mode 100644 platform-logic/installer/src/main/resources/VNF_DG_MAPPING.sql diff --git a/installation/appc/src/main/resources/sqlData.dump b/installation/appc/src/main/resources/sqlData.dump index 88355d9..05545ac 100644 --- a/installation/appc/src/main/resources/sqlData.dump +++ b/installation/appc/src/main/resources/sqlData.dump @@ -1,10 +1,17 @@ USE sdnctl; + + +LOCK TABLES `VNF_DG_MAPPING` WRITE; +INSERT INTO `VNF_DG_MAPPING` VALUES ('Restart','2.01','','','Generic_Restart','3.0.0','APPC'),('Restart','2.00','','','Generic_Restart','3.0.0','APPC'),('Configure',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('ConfigModify',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Rebuild',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Restart',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('HealthCheck',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('StartApplication',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('StopApplication',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Migrate',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Snapshot',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('ConfigRestore',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('ConfigBackup',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Evacuate',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Stop',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'),('Start',NULL,NULL,NULL,'DGOrchestrator','4.0.0','APPC'); +UNLOCK TABLES; + + LOCK TABLES `ACTION_LEVEL_REFERENCE` WRITE; INSERT INTO `ACTION_LEVEL_REFERENCE` VALUES (1,'vnf-id','vnf'),(2,'vserver-id','vm'),(3,'vnfc-name','vnfc'),(4,'vf-module-id','vf-module'); UNLOCK TABLES; LOCK TABLES `MULTISTEP_FLOW_REFERENCE` WRITE; -INSERT INTO `MULTISTEP_FLOW_REFERENCE` VALUES (1,'Restart','vnf','vFW',NULL,'multistep_flow_reference.category',NULL,NULL,'ac204h','2017-10-30 19:23:07'); +INSERT INTO `MULTISTEP_FLOW_REFERENCE` VALUES (1,'Restart','vnf','vFW',NULL,'multistep_flow_reference.category',NULL,NULL,'userid','2017-10-30 19:23:07'); UNLOCK TABLES; LOCK TABLES `PROCESS_FLOW_REFERENCE` WRITE; diff --git a/platform-logic/installer/src/main/resources/VNF_DG_MAPPING.sql b/platform-logic/installer/src/main/resources/VNF_DG_MAPPING.sql deleted file mode 100644 index c54e06a..0000000 --- a/platform-logic/installer/src/main/resources/VNF_DG_MAPPING.sql +++ /dev/null @@ -1,50 +0,0 @@ - --- ============LICENSE_START======================================================= --- APPC --- ================================================================================ --- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. --- ================================================================================ --- 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. --- ============LICENSE_END========================================================= - - --- --- Table structure for table `VNF_DG_MAPPING` --- - -USE sdnctl; -DROP TABLE IF EXISTS `VNF_DG_MAPPING`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `VNF_DG_MAPPING` ( - `action` varchar(50) NOT NULL, - `api_version` varchar(50) DEFAULT NULL, - `vnf_type` varchar(50) DEFAULT NULL, - `vnf_version` varchar(50) DEFAULT NULL, - `dg_name` varchar(50) NOT NULL, - `dg_version` varchar(50) DEFAULT NULL, - `dg_module` varchar(50) NOT NULL, - UNIQUE KEY `INPUT_CONSTRAINT` (`action`,`api_version`,`vnf_type`,`vnf_version`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `VNF_DG_MAPPING` --- - -LOCK TABLES `VNF_DG_MAPPING` WRITE; -/*!40000 ALTER TABLE `VNF_DG_MAPPING` DISABLE KEYS */; -INSERT INTO `VNF_DG_MAPPING` VALUES ('Restart','2.01','','','Generic_Restart','3.0.0','APPC'), ('Restart','2.00','','','Generic_Restart','3.0.0','APPC'); - -/*!40000 ALTER TABLE `VNF_DG_MAPPING` ENABLE KEYS */; -UNLOCK TABLES; diff --git a/platform-logic/installer/src/main/scripts/install.sh b/platform-logic/installer/src/main/scripts/install.sh index 77052ae..a557711 100644 --- a/platform-logic/installer/src/main/scripts/install.sh +++ b/platform-logic/installer/src/main/scripts/install.sh @@ -45,12 +45,3 @@ do $BASEDIR/bin/svclogic.sh activate $module $rpc $version $mode $BASEDIR/config/svclogic.properties done < <(cat $graphlist) done - -MYSQL_USER=${MYSQL_USER:-sdnctl} -MYSQL_PWD=${MYSQL_PWD:-gamma} -MYSQL_DB=${MYSQL_DB:-sdnctl} -MYSQL_HOST=${MYSQL_HOST:-dbhost} - -mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host=${MYSQL_HOST} ${MYSQL_DB} <<-END -SOURCE /opt/openecomp/appc/svclogic/config/VNF_DG_MAPPING.sql -END -- cgit 1.2.3-korg