From 827edc452055afa431080d04c5668db5e16964fd Mon Sep 17 00:00:00 2001 From: "Smokowski, Steve (ss835w)" Date: Wed, 14 Nov 2018 15:29:20 -0500 Subject: Update Schema Issue-ID: SO-1211 Change-Id: I7a7c6788010c3c3bbaba0d72ec656cebc124d6e6 Signed-off-by: Smokowski, Steve (ss835w) --- .../db/migration/V4.13__Add_Default_NeutronNetwork.sql | 10 ---------- .../db/migration/V4.16__Add_Default_NeutronNetwork.sql | 10 ++++++++++ .../resources/db/migration/V4.17__UpdateCloudSiteColumn.sql | 5 +++++ .../main/resources/db/migration/V4.3__Expand_Column_Size.sql | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) delete mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__Add_Default_NeutronNetwork.sql create mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.16__Add_Default_NeutronNetwork.sql create mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.17__UpdateCloudSiteColumn.sql diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__Add_Default_NeutronNetwork.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__Add_Default_NeutronNetwork.sql deleted file mode 100644 index dd821cab78..0000000000 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__Add_Default_NeutronNetwork.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE catalogdb; - -INSERT INTO `heat_template` (`ARTIFACT_UUID`,`NAME`,`VERSION`,`BODY`,`TIMEOUT_MINUTES`,`DESCRIPTION`,`CREATION_TIMESTAMP`,`ARTIFACT_CHECKSUM`) VALUES -('efee1d84-b8ec-11e7-abc4-cec278b6b50a','Generic NeutronNet','1','heat_template_version: 2013-05-23\n\ndescription:\n HOT template that creates a Generic Neutron Network\n\nparameters:\n network_name:\n type: string\n description: Name of direct network (e.g. core, dmz)\n default: ECOMPNetwork\n network_subnet_name:\n type: string\n description: Name of subnet network (e.g. core, dmz)\n default: ECOMPNetwork\n network_subnet_cidr:\n type: string\n description: CIDR of subnet network (e.g. core, dmz)\n default: 10.0.0.0/16\n\noutputs:\n network_id:\n description: Openstack network identifier\n value: { get_resource: network }\n network_fqdn:\n description: Openstack network identifier\n value: {list_join: [\':\', { get_attr: [network, fq_name] } ] }\n\nresources:\n network:\n type: OS::Neutron::Net\n properties:\n name: {get_param: network_name }\n\n subnet:\n type: OS::Neutron::Subnet\n properties:\n name: { get_param: network_subnet_name }\n network_id: { get_resource: network }\n cidr: { get_param: network_subnet_cidr }\n enable_dhcp: false\n',10,'Generic Neutron Template','2017-10-26 14:44:00', 'MANUAL RECORD'); - - - -INSERT INTO `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`, `HEAT_TEMPLATE_ARTIFACT_UUID`,`AIC_VERSION_MIN` , `AIC_VERSION_MAX` ) -VALUES ('Generic NeutronNet','efee1d84-b8ec-11e7-abc4-cec278b6b50a','2.0','NULL'); - diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.16__Add_Default_NeutronNetwork.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.16__Add_Default_NeutronNetwork.sql new file mode 100644 index 0000000000..dd821cab78 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.16__Add_Default_NeutronNetwork.sql @@ -0,0 +1,10 @@ +USE catalogdb; + +INSERT INTO `heat_template` (`ARTIFACT_UUID`,`NAME`,`VERSION`,`BODY`,`TIMEOUT_MINUTES`,`DESCRIPTION`,`CREATION_TIMESTAMP`,`ARTIFACT_CHECKSUM`) VALUES +('efee1d84-b8ec-11e7-abc4-cec278b6b50a','Generic NeutronNet','1','heat_template_version: 2013-05-23\n\ndescription:\n HOT template that creates a Generic Neutron Network\n\nparameters:\n network_name:\n type: string\n description: Name of direct network (e.g. core, dmz)\n default: ECOMPNetwork\n network_subnet_name:\n type: string\n description: Name of subnet network (e.g. core, dmz)\n default: ECOMPNetwork\n network_subnet_cidr:\n type: string\n description: CIDR of subnet network (e.g. core, dmz)\n default: 10.0.0.0/16\n\noutputs:\n network_id:\n description: Openstack network identifier\n value: { get_resource: network }\n network_fqdn:\n description: Openstack network identifier\n value: {list_join: [\':\', { get_attr: [network, fq_name] } ] }\n\nresources:\n network:\n type: OS::Neutron::Net\n properties:\n name: {get_param: network_name }\n\n subnet:\n type: OS::Neutron::Subnet\n properties:\n name: { get_param: network_subnet_name }\n network_id: { get_resource: network }\n cidr: { get_param: network_subnet_cidr }\n enable_dhcp: false\n',10,'Generic Neutron Template','2017-10-26 14:44:00', 'MANUAL RECORD'); + + + +INSERT INTO `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`, `HEAT_TEMPLATE_ARTIFACT_UUID`,`AIC_VERSION_MIN` , `AIC_VERSION_MAX` ) +VALUES ('Generic NeutronNet','efee1d84-b8ec-11e7-abc4-cec278b6b50a','2.0','NULL'); + diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.17__UpdateCloudSiteColumn.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.17__UpdateCloudSiteColumn.sql new file mode 100644 index 0000000000..7077032fca --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.17__UpdateCloudSiteColumn.sql @@ -0,0 +1,5 @@ +use catalogdb; + +ALTER TABLE cloud_sites + MODIFY IF EXISTS REGION_ID varchar(50) NULL, + MODIFY IF EXISTS CLLI varchar(50) NULL; \ No newline at end of file diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql index 96fe5a44e1..87401ade13 100644 --- a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql +++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql @@ -2,10 +2,10 @@ use requestdb; ALTER TABLE infra_active_requests MODIFY IF EXISTS AIC_CLOUD_REGION varchar(50) NULL, - MODIFY IF EXISTS AIC_NODE_CLLI varchar(45) NULL; + MODIFY IF EXISTS AIC_NODE_CLLI varchar(50) NULL; ALTER TABLE archived_infra_requests MODIFY IF EXISTS AIC_CLOUD_REGION varchar(50) NULL, - MODIFY IF EXISTS AIC_NODE_CLLI varchar(45) NULL; + MODIFY IF EXISTS AIC_NODE_CLLI varchar(50) NULL; -- cgit 1.2.3-korg