aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java2
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java56
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.1__Use_ID_To_Identify_Tables.sql153
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.2__AddResourceInput.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.22__AddResourceInput.sql)0
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.3__ChangeResourceInputLength.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.23__ChangeResourceInputLength.sql)0
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.4__UpdateHeatRelatedAttribute.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql)0
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.5__AddBluePrintNameVersion.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql)0
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CvnfcCatalogDbQueryTest.java144
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql120
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/resources/logback-test.xml16
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java1
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/data.sql43
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/schema.sql2003
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java343
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java5
-rw-r--r--asdc-controller/src/test/resources/schema.sql1995
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java29
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java20
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java12
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java7
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java18
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java14
-rw-r--r--common/src/main/java/org/onap/so/openpojo/rules/EqualsAndHashCodeTester.java11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java83
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json17
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json67
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql100
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql2033
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java15
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java (renamed from mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java)52
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java57
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/InstanceGroup.java3
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java35
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java78
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java110
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomization.java55
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomizationId.java79
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java550
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java (renamed from mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepository.java)6
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java4
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleCustomizationRepository.java7
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java4
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java11
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcInstanceGroupCustomizationRepository.java1
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java2
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/BeansTest.java1
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomizationTest.java (renamed from mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java)22
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java30
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java149
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepositoryTest.java77
-rw-r--r--mso-catalog-db/src/test/resources/data.sql102
-rw-r--r--mso-catalog-db/src/test/resources/logback-test.xml5
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql2089
67 files changed, 5800 insertions, 5167 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java
index 93e396bb94..374e597116 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java
@@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-@SpringBootApplication(scanBasePackages = {"org.onap.so.adapters.catalogdb", "org.onap.so.db.catalog.client","org.onap.so.logging.jaxrs.filter","org.onap.so.logging.spring.interceptor"})
+@SpringBootApplication(scanBasePackages = {"org.onap.so.adapters.catalogdb", "org.onap.so.db.catalog.client","org.onap.so.logging.jaxrs.filter","org.onap.so.logging.spring.interceptor","org.onap.so.client","org.onap.so.configuration"})
@EnableJpaRepositories("org.onap.so.db.catalog.data.repository")
@EntityScan("org.onap.so.db.catalog.beans")
public class CatalogDBApplication {
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
index dbb168bd15..5009dce020 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java
@@ -22,36 +22,20 @@
package org.onap.so.adapters.catalogdb.rest;
-/*
-Create an initial query to retrieve a VNF Resource definition (including a list of possible module types)
-within the context of a given service. Input is a vnf resource model customization ID (new field for 1702),
-or a composite key (from 1610) of service name, service version, vnf instance name
-Returns a structure (JSON?) containing VNF RESOURCE attributes, plus a list of VF Module structures.
-Query a NETWORK_RESOURCE from the MSO Catalog, based on a networkModelCustomizationUUID (new for 1702),
-a network type (unique type identifier in 1610), or based on network role within a service.
-
-Create Adapter framework for access to Catalog DB, including connection management,
-login/password access, transaction logic, etc. This can be modeled after the Request DB Adapter
-
-Update the MSO Catalog DB schema to include the new fields defined in this user story.
-
-Note that the resourceModelCustomizationUUID (or vfModuleModelCustomizationUUID) will be unique keys (indexes)
-on the VNF_RESOURCE and VF_MODULE tables respectively.
-The previously constructed "vnf-type" and "vf-module-type" field may continue to be populated,
-but should no longer be needed and can deprecate in future release.
-
-For migration, a new randomly generated UUID field may be generated for the *ModelCustomizationUUID" fields
-until such time that the model is redistributed from ASDC.
-
-All other fields Check with Mike Z for appropriate value for the vfModuleLabel.
-We might be able to derive it's value from the current vnf-type (using the "middle" piece that identifies the module type).
-
-min and initial counts can be 0. max can be null to indicate no maximum.
+import java.util.ArrayList;
+import java.util.List;
-Once the network-level distribution artifacts are defined, similar updates can be made to the NETWORK_RESOURCE table.
- */
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.GenericEntity;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
import org.apache.http.HttpStatus;
import org.onap.so.adapters.catalogdb.catalogrest.CatalogQuery;
@@ -73,7 +57,6 @@ import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.ToscaCsar;
import org.onap.so.db.catalog.beans.VfModule;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
-import org.onap.so.db.catalog.beans.VnfRecipe;
import org.onap.so.db.catalog.beans.VnfResource;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository;
@@ -95,23 +78,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.GenericEntity;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.util.ArrayList;
-import java.util.List;
-/**
- * This class services calls to the REST interface for VF Modules (http://host:port/ecomp/mso/catalog/v1)
- * Both XML and JSON can be produced/consumed. Set Accept: and Content-Type: headers appropriately. XML is the default.
- * Requests respond synchronously only
- */
@Path("/{version: v[0-9]+}")
@Component
public class CatalogDbAdapterRest {
@@ -160,7 +127,6 @@ public class CatalogDbAdapterRest {
public Response respond(String version, int respStatus, boolean isArray, CatalogQuery qryResp) {
return Response
.status(respStatus)
- //.entity(new GenericEntity<QueryServiceVnfs>(qryResp) {})
.entity(qryResp.toJsonString(version, isArray))
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.build();
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.1__Use_ID_To_Identify_Tables.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.1__Use_ID_To_Identify_Tables.sql
new file mode 100644
index 0000000000..4474d265db
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.1__Use_ID_To_Identify_Tables.sql
@@ -0,0 +1,153 @@
+use catalogdb;
+
+-- Drop Foreign Keys so we can migrate data
+ALTER TABLE vnf_res_custom_to_vf_module_custom DROP FOREIGN KEY IF EXISTS fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1;
+ALTER TABLE vnf_res_custom_to_vf_module_custom DROP FOREIGN KEY IF EXISTS fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1;
+ALTER TABLE cvnfc_customization DROP FOREIGN KEY IF EXISTS fk_cvnfc_customization__vf_module_customization1;
+ALTER TABLE vnf_vfmodule_cvnfc_configuration_customization DROP FOREIGN KEY IF EXISTS fk_vnf_configuration_cvnfc_customization__vf_module_customiza1;
+ALTER TABLE cvnfc_customization DROP FOREIGN KEY IF EXISTS fk_cvnfc_customization__vnf_resource_customization1;
+ALTER TABLE vnf_resource_customization_to_service DROP FOREIGN KEY IF EXISTS vnf_resource_customization_to_service_ibfk_2;
+ALTER TABLE vnf_vfmodule_cvnfc_configuration_customization DROP FOREIGN KEY IF EXISTS fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1;
+ALTER TABLE vnfc_instance_group_customization DROP FOREIGN KEY IF EXISTS fk_vnfc_instance_group_customization__vnf_resource_customizat1;
+DROP INDEX UK_cvnfc_customization on cvnfc_customization;
+DELETE FROM vf_module_customization WHERE vf_module_model_uuid NOT IN (SELECT model_uuid FROM vf_module);
+
+ALTER TABLE vnf_resource_customization
+CHANGE COLUMN MULTI_STAGE_DESIGN MULTI_STAGE_DESIGN VARCHAR(20) NULL DEFAULT NULL AFTER NF_NAMING_CODE;
+
+-- Generate Primary keys for tables
+ALTER TABLE vnf_resource_customization DROP PRIMARY KEY, ADD ID INT(13) NOT NULL AUTO_INCREMENT PRIMARY KEY;
+ALTER TABLE vf_module_customization DROP PRIMARY KEY, ADD ID INT(13) NOT NULL AUTO_INCREMENT PRIMARY KEY;
+
+-- Add columns for Joins between tables
+ALTER TABLE vnf_resource_customization ADD SERVICE_MODEL_UUID VARCHAR(200) DEFAULT NULL;
+ALTER TABLE vf_module_customization ADD VNF_RESOURCE_CUSTOMIZATION_ID INT(13) DEFAULT NULL;
+ALTER TABLE vnfc_instance_group_customization ADD VNF_RESOURCE_CUSTOMIZATION_ID INT(13) DEFAULT NULL;
+ALTER TABLE cvnfc_customization ADD VF_MODULE_CUSTOMIZATION_ID INT(13) DEFAULT NULL;
+
+
+-- Migrate linkage between VNF/Services, re-add foreign key
+INSERT INTO vnf_resource_customization (SELECT vrc.MODEL_CUSTOMIZATION_UUID,vrc.MODEL_INSTANCE_NAME, vrc.MIN_INSTANCES,vrc.MAX_INSTANCES,vrc.AVAILABILITY_ZONE_MAX_COUNT,vrc.NF_TYPE,vrc.NF_ROLE,vrc.NF_FUNCTION,
+vrc.NF_NAMING_CODE,vrc.MULTI_STAGE_DESIGN,vrc.CREATION_TIMESTAMP, vrc.VNF_RESOURCE_MODEL_UUID,vrc.INSTANCE_GROUP_MODEL_UUID,NULL,crcs.SERVICE_MODEL_UUID from vnf_resource_customization vrc, vnf_resource_customization_to_service crcs, service srv WHERE crcs.RESOURCE_MODEL_CUSTOMIZATION_UUID = vrc.MODEL_CUSTOMIZATION_UUID AND srv.MODEL_UUID=crcs.SERVICE_MODEL_UUID);
+
+DELETE FROM vnf_resource_customization where SERVICE_MODEL_UUID IS NULL;
+
+ALTER TABLE vnf_resource_customization CHANGE COLUMN SERVICE_MODEL_UUID SERVICE_MODEL_UUID VARCHAR(200) NOT NULL;
+
+ALTER TABLE vnf_resource_customization
+ ADD CONSTRAINT fk_vnf_resource_customization_to_service FOREIGN KEY (SERVICE_MODEL_UUID)
+ REFERENCES service(MODEL_UUID)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE;
+
+-- Migrate linkage between VNF/VNFCInstance Groups
+
+ALTER TABLE vnfc_instance_group_customization DROP PRIMARY KEY;
+
+INSERT INTO vnfc_instance_group_customization
+(SELECT vnfcgroup.VNF_RESOURCE_CUSTOMIZATION_MODEL_UUID, vnfcgroup.INSTANCE_GROUP_MODEL_UUID, vnfcgroup.FUNCTION, vnfcgroup.DESCRIPTION, vnfcgroup.CREATION_TIMESTAMP, vnfrc.ID
+FROM vnfc_instance_group_customization vnfcgroup, vnf_resource_customization vnfrc
+WHERE vnfrc.MODEL_CUSTOMIZATION_UUID = vnfcgroup.VNF_RESOURCE_CUSTOMIZATION_MODEL_UUID);
+
+DELETE FROM vnfc_instance_group_customization where VNF_RESOURCE_CUSTOMIZATION_ID IS NULL;
+
+ALTER TABLE vnfc_instance_group_customization ADD ID INT(13) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
+
+ALTER TABLE vnfc_instance_group_customization
+ ADD INDEX fk_vnfc_instance_group_customization__vnf_res_custom1_idx (VNF_RESOURCE_CUSTOMIZATION_ID ASC),
+ ADD CONSTRAINT fk_vnfc_instance_group_customization_vnf_customization FOREIGN KEY (VNF_RESOURCE_CUSTOMIZATION_ID)
+ REFERENCES vnf_resource_customization(ID)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE;
+
+ALTER TABLE vnfc_instance_group_customization DROP VNF_RESOURCE_CUSTOMIZATION_MODEL_UUID;
+
+-- Migrate linkage between VNF/VFMODULEs, re-add foreign key
+INSERT INTO vf_module_customization
+(SELECT vmc.MODEL_CUSTOMIZATION_UUID, vmc.LABEL, vmc.INITIAL_COUNT, vmc.MIN_INSTANCES, vmc.MAX_INSTANCES, vmc.AVAILABILITY_ZONE_COUNT, vmc.HEAT_ENVIRONMENT_ARTIFACT_UUID, vmc.VOL_ENVIRONMENT_ARTIFACT_UUID, vmc.CREATION_TIMESTAMP, vmc.VF_MODULE_MODEL_UUID, NULL,vnfrc.ID
+FROM vf_module_customization vmc, vnf_res_custom_to_vf_module_custom vnfcvf, vnf_resource_customization vnfrc
+WHERE vnfcvf.VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID = vmc.MODEL_CUSTOMIZATION_UUID AND vnfrc.MODEL_CUSTOMIZATION_UUID=vnfcvf.VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID);
+
+DELETE FROM vf_module_customization where VNF_RESOURCE_CUSTOMIZATION_ID IS NULL;
+
+-- Migrate Linkage between CVNFC_Customization and VF_Modules
+CREATE VIEW vf_module_vnf AS
+SELECT vmc.ID as vf_module_id, vnfrc.MODEL_CUSTOMIZATION_UUID as VNF_MODEL_CUST_UUID, vmc.MODEL_CUSTOMIZATION_UUID
+FROM vf_module_customization vmc
+JOIN vnf_res_custom_to_vf_module_custom vnfcvf ON vmc.MODEL_CUSTOMIZATION_UUID = vnfcvf.VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID
+JOIN vnf_resource_customization vnfrc ON vnfrc.MODEL_CUSTOMIZATION_UUID=vnfcvf.VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID;
+
+UPDATE cvnfc_customization as cvnfcc
+JOIN vf_module_vnf AS vfmvnf
+ ON vfmvnf.model_customization_uuid = cvnfcc.VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID
+ AND cvnfcc.VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID=vfmvnf.VNF_MODEL_CUST_UUID
+SET cvnfcc.VF_MODULE_CUSTOMIZATION_ID = vfmvnf.vf_module_id;
+
+
+DROP VIEW vf_module_vnf;
+
+ALTER TABLE cvnfc_customization
+ ADD CONSTRAINT fk_cvnfc_customization_to_vf_module_resource_customization FOREIGN KEY (VF_MODULE_CUSTOMIZATION_ID)
+ REFERENCES vf_module_customization(ID)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE;
+
+-- rename/clean up crazy table
+ALTER TABLE vnf_vfmodule_cvnfc_configuration_customization DROP VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID;
+ALTER TABLE vnf_vfmodule_cvnfc_configuration_customization DROP VF_MODULE_MODEL_CUSTOMIZATION_UUID;
+RENAME TABLE vnf_vfmodule_cvnfc_configuration_customization TO cvnfc_configuration_customization;
+
+-- DROP Tables/columns no longer used
+ALTER TABLE cvnfc_customization DROP VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID;
+ALTER TABLE cvnfc_customization DROP VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID;
+ALTER TABLE vnf_resource_customization DROP instance_group_model_uuid;
+
+
+-- Remove orphaned records, that hav ebeen migrated
+
+DROP TABLE vnf_res_custom_to_vf_module_custom;
+DROP TABLE vnf_resource_customization_to_service;
+
+ALTER TABLE vnf_resource_customization
+ADD UNIQUE INDEX UK_vnf_resource_customization (MODEL_CUSTOMIZATION_UUID ASC, SERVICE_MODEL_UUID ASC);
+
+-- Additional Clean Up
+ALTER TABLE vnf_resource_customization
+CHANGE COLUMN `ID` `ID` INT(13) NOT NULL AUTO_INCREMENT FIRST,
+ADD INDEX `vnf_resource_customization_mod_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID` ASC);
+
+ALTER TABLE service_proxy_customization
+DROP INDEX fk_service_proxy_customization__serv_prox_to_serv,
+DROP INDEX UK_service_proxy_customization;
+
+ALTER TABLE vf_module_customization
+ ADD CONSTRAINT fk_vf_module_customization_to_vnf_resource_customization FOREIGN KEY (VNF_RESOURCE_CUSTOMIZATION_ID)
+ REFERENCES vnf_resource_customization(ID)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE;
+
+ALTER TABLE collection_resource
+CHANGE COLUMN DESCRIPTION DESCRIPTION VARCHAR(1200) NULL DEFAULT NULL;
+
+ALTER TABLE building_block_detail
+CHANGE COLUMN BUILDING_BLOCK_NAME BUILDING_BLOCK_NAME VARCHAR(200) NOT NULL;
+
+ALTER TABLE vnfc_instance_group_customization CHANGE COLUMN VNF_RESOURCE_CUSTOMIZATION_ID VNF_RESOURCE_CUSTOMIZATION_ID INT(13) NOT NULL;
+
+-- clean up before making FK null
+DELETE from cvnfc_customization where vf_module_customization_id is NULL;
+ALTER TABLE cvnfc_customization CHANGE COLUMN VF_MODULE_CUSTOMIZATION_ID VF_MODULE_CUSTOMIZATION_ID INT(13) NOT NULL;
+
+ALTER TABLE vf_module_customization CHANGE COLUMN VNF_RESOURCE_CUSTOMIZATION_ID VNF_RESOURCE_CUSTOMIZATION_ID INT(13) NOT NULL;
+
+ALTER TABLE cvnfc_configuration_customization CHANGE COLUMN CVNFC_CUSTOMIZATION_ID CVNFC_CUSTOMIZATION_ID INT(11) NOT NULL;
+
+ALTER TABLE cvnfc_configuration_customization
+ ADD CONSTRAINT fk_cvnfc_config_custom__cvnfc_cust1 FOREIGN KEY (CVNFC_CUSTOMIZATION_ID)
+ REFERENCES cvnfc_customization(ID)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE;
+
+ALTER TABLE vf_module_customization
+CHANGE COLUMN ID ID INT(13) NOT NULL AUTO_INCREMENT FIRST,
+ADD INDEX vf_module_customization_model_cust_uuid_idx (MODEL_CUSTOMIZATION_UUID ASC);
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.22__AddResourceInput.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.2__AddResourceInput.sql
index 10d8789328..10d8789328 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.22__AddResourceInput.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.2__AddResourceInput.sql
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.23__ChangeResourceInputLength.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.3__ChangeResourceInputLength.sql
index dfb5075674..dfb5075674 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.23__ChangeResourceInputLength.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.3__ChangeResourceInputLength.sql
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.4__UpdateHeatRelatedAttribute.sql
index b1aefaf56c..b1aefaf56c 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.4__UpdateHeatRelatedAttribute.sql
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.5__AddBluePrintNameVersion.sql
index 97397df290..97397df290 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.3__AddBluePrintNameVersion.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.5__AddBluePrintNameVersion.sql
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CvnfcCatalogDbQueryTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CvnfcCatalogDbQueryTest.java
deleted file mode 100644
index 78ac4ca095..0000000000
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CvnfcCatalogDbQueryTest.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * 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=========================================================
- */
-
-package org.onap.so.adapters.catalogdb.catalogrest;
-
-import static com.shazam.shazamcrest.MatcherAssert.assertThat;
-import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.so.adapters.catalogdb.CatalogDBApplication;
-import org.onap.so.adapters.catalogdb.CatalogDbAdapterBaseTest;
-import org.onap.so.db.catalog.beans.ConfigurationResource;
-import org.onap.so.db.catalog.beans.CvnfcCustomization;
-import org.onap.so.db.catalog.beans.VfModule;
-import org.onap.so.db.catalog.beans.VfModuleCustomization;
-import org.onap.so.db.catalog.beans.VnfResource;
-import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
-import org.onap.so.db.catalog.beans.VnfcCustomization;
-import org.onap.so.db.catalog.client.CatalogDbClientPortChanger;
-import org.onap.so.db.catalog.data.repository.CvnfcCustomizationRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import org.springframework.beans.BeanUtils;
-
-public class CvnfcCatalogDbQueryTest extends CatalogDbAdapterBaseTest {
-
- @Autowired
- private CvnfcCustomizationRepository cvnfcCustomizationRepository;
-
- private static final Logger logger = LoggerFactory.getLogger(CvnfcCatalogDbQueryTest.class);
-
- @LocalServerPort
- private int port;
- boolean isInitialized;
-
- @Autowired
- CatalogDbClientPortChanger client;
-
- @Before
- public void initialize(){
- client.wiremockPort= String.valueOf(port);
- }
-
- @Test
- public void cVnfcTest() {
-
- CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization("dadc2c8c-2bab-11e9-b210-d663bd873d93");
-
- List<CvnfcCustomization> foundCvnfcCustomization = client.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID("68dc9a92-214c-11e7-93ae-92361f002671","cb82ffd8-252a-11e7-93ae-92361f002671");
- assertNotNull(foundCvnfcCustomization);
- assertTrue(foundCvnfcCustomization.size() > 0);
- CvnfcCustomization found = foundCvnfcCustomization.get(0);
-
- CvnfcCustomization templateCvnfcCustomization = new CvnfcCustomization();
- BeanUtils.copyProperties(found, templateCvnfcCustomization, "vnfVfmoduleCvnfcConfigurationCustomization", "vfModuleCustomization", "vnfcCustomization", "vnfResourceCustomization");
-
- assertThat(cvnfcCustomization, sameBeanAs(templateCvnfcCustomization)
- .ignoring("id")
- .ignoring("created")
- .ignoring("vnfVfmoduleCvnfcConfigurationCustomization")
- .ignoring("vnfResourceCusteModelCustomizationUUID"));
- }
-
- @Test
- public void cVnfcByCustomizationUUID_Test() {
-
- CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization("dadc2c8c-2bab-11e9-b210-d663bd873d93");
-
- CvnfcCustomization found = client.getCvnfcCustomizationByCustomizationUUID("dadc2c8c-2bab-11e9-b210-d663bd873d93");
- assertNotNull(found);
-
- CvnfcCustomization templateCvnfcCustomization = new CvnfcCustomization();
- BeanUtils.copyProperties(found, templateCvnfcCustomization, "vnfVfmoduleCvnfcConfigurationCustomization", "vfModuleCustomization", "vnfcCustomization", "vnfResourceCustomization");
-
- assertThat(cvnfcCustomization, sameBeanAs(templateCvnfcCustomization)
- .ignoring("id")
- .ignoring("created")
- .ignoring("vnfVfmoduleCvnfcConfigurationCustomization")
- .ignoring("vnfResourceCusteModelCustomizationUUID"));
- }
-
-
- protected CvnfcCustomization setUpCvnfcCustomization(String id){
- CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
- cvnfcCustomization.setModelCustomizationUUID(id);
- cvnfcCustomization.setModelInstanceName("testModelInstanceName");
- cvnfcCustomization.setModelUUID("b25735fe-9b37-11e8-98d0-529269fb1459");
- cvnfcCustomization.setModelInvariantUUID("ba7e6ef0-9b37-11e8-98d0-529269fb1459");
- cvnfcCustomization.setModelVersion("testModelVersion");
- cvnfcCustomization.setModelName("testModelName");
- cvnfcCustomization.setToscaNodeType("testToscaNodeType");
- cvnfcCustomization.setDescription("testCvnfcCustomzationDescription");
- cvnfcCustomization.setNfcFunction("testNfcFunction");
- cvnfcCustomization.setNfcNamingCode("testNfcNamingCode");
- return cvnfcCustomization;
- }
-
- protected VnfcCustomization setUpVnfcCustomization(){
- VnfcCustomization vnfcCustomization = new VnfcCustomization();
- vnfcCustomization.setModelInstanceName("testVnfcCustomizationModelInstanceName");
- vnfcCustomization.setModelUUID("321228a4-9f15-11e8-98d0-529269fb1459");
- vnfcCustomization.setModelInvariantUUID("c0659136-9f15-11e8-98d0-529269fb1459");
- vnfcCustomization.setModelVersion("testModelVersion");
- vnfcCustomization.setModelName("testModelName");
- vnfcCustomization.setToscaNodeType("testToscaModelType");
- vnfcCustomization.setDescription("testVnfcCustomizationDescription");
- return vnfcCustomization;
- }
-} \ No newline at end of file
diff --git a/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql b/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql
index 91deab8fff..6917c2e07e 100644
--- a/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql
+++ b/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql
@@ -1,55 +1,4 @@
-CREATE TABLE IF NOT EXISTS `identity_services` (
- `ID` varchar(50) NOT NULL,
- `IDENTITY_URL` varchar(200) DEFAULT NULL,
- `MSO_ID` varchar(255) DEFAULT NULL,
- `MSO_PASS` varchar(255) DEFAULT NULL,
- `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
- `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
- `ADMIN_TENANT` varchar(50) DEFAULT NULL,
- `MEMBER_ROLE` varchar(50) DEFAULT NULL,
- `TENANT_METADATA` tinyint(1) DEFAULT 0,
- `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
- `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
- `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`ID`)
-) ;
-
-
-
-CREATE TABLE IF NOT EXISTS `cloudify_managers` (
- `ID` varchar(50) NOT NULL,
- `CLOUDIFY_URL` varchar(200) DEFAULT NULL,
- `USERNAME` varchar(255) DEFAULT NULL,
- `PASSWORD` varchar(255) DEFAULT NULL,
- `VERSION` varchar(20) DEFAULT NULL,
- `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`ID`)
-) ;
-
-
-
-
-CREATE TABLE IF NOT EXISTS `cloud_sites` (
- `ID` varchar(50) NOT NULL,
- `REGION_ID` varchar(11) DEFAULT NULL,
- `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
- `CLOUD_VERSION` varchar(20) DEFAULT NULL,
- `CLLI` varchar(11) DEFAULT NULL,
- `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
- `PLATFORM` varchar(50) DEFAULT NULL,
- `ORCHESTRATOR` varchar(50) DEFAULT NULL,
- `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`ID`),
- KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
- CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
-) ;
CREATE TABLE IF NOT EXISTS `homing_instances` (
`SERVICE_INSTANCE_ID` varchar(50) NOT NULL,
@@ -111,26 +60,29 @@ insert into heat_environment(artifact_uuid, name, version, description, body, ar
('fefb1751-4333-11e7-9252-005056850d2e', 'module_nso.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n availability_zone_0: \"alln-zone-1\"\n nso_flavor_name: \"citeis.1vCPUx2GB\"\n nso_image_name: \"RHEL-6.8-BASE-20160912\"\n nso_name_0: \"zrdm3vamp01nso001\"\n nso_oam_ip_0: \"172.18.25.175\"\n nso_oam_net_gw: \"172.18.25.1\"\n nso_oam_net_mask: \"255.255.255.0\"\n nso_sec_grp_id: \"36f48d82-f099-4437-bfbc-70d9e5d420d1\"\n nso_srv_grp_id: \"e431c477-5bd1-476a-bfa9-e4ce16b8356b\"\n oam_net_id: \"nso_oam\"\n vf_module_id: \"145cd730797234b4a40aa99335abc143\"\n vnf_id: \"730797234b4a40aa99335157b02871cd\"\n vnf_name: \"Mobisupport\"\n', 'MWI2ODY0Yjc1NDJjNWU1NjdkMTAyMjVkNzFmZDU0MzA=', '2017-11-27 08:42:58');
insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values
-('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e');
+('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e'),
+('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e');
-insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design, resource_input) values
-('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null, "{\\\"vf_module_id\\\":\\\"vFirewall\\\",\\\"vfw_private_ip_1\\\":\\\"192.168.20.100\\\",\\\"public_net_id\\\":\\\"PUBLIC NET ID\\\",\\\"vfw_private_ip_0\\\":\\\"192.168.10.100\\\",\\\"onap_private_subnet_id\\\":\\\"PRIVATE NETWORK\\\",\\\"sec_group\\\":\\\"SECURITY GROUP\\\",\\\"vfw_private_ip_2\\\":\\\"10.0.100.1\\\",\\\"vfw_name_0\\\":\\\"zdfw1fwl01fwl01\\\",\\\"nexus_artifact_repo\\\":\\\"https://nexus.onap.org\\\",\\\"onap_private_net_cidr\\\":\\\"10.0.0.0/16\\\",\\\"dcae_collector_ip\\\":\\\"10.0.4.1\\\",\\\"vnf_id\\\":\\\"vFirewall_demo_app\\\",\\\"dcae_collector_port\\\":\\\"8081\\\",\\\"vpg_name_0\\\":\\\"zdfw1fwl01pgn01\\\",\\\"vsn_private_ip_0\\\":\\\"192.168.20.250\\\",\\\"vpg_private_ip_1\\\":\\\"10.0.100.2\\\",\\\"vsn_private_ip_1\\\":\\\"10.0.100.3\\\",\\\"vpg_private_ip_0\\\":\\\"192.168.10.200\\\",\\\"protected_private_net_cidr\\\":\\\"192.168.20.0/24\\\",\\\"unprotected_private_net_cidr\\\":\\\"192.168.10.0/24\\\",\\\"nf_naming\\\":\\\"true\\\",\\\"vsn_name_0\\\":\\\"zdfw1fwl01snk01\\\",\\\"multi_stage_design\\\":\\\"false\\\",\\\"onap_private_net_id\\\":\\\"PRIVATE NETWORK\\\",\\\"unprotected_private_net_id\\\":\\\"zdfw1fwl01_unprotected\\\",\\\"availability_zone_max_count\\\":\\\"1\\\",\\\"vfw_flavor_name\\\":\\\"(m1.medium suggested)\\\",\\\"demo_artifacts_version\\\":\\\"1.3.0-SNAPSHOT\\\",\\\"pub_key\\\":\\\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN\\\",\\\"key_name\\\":\\\"vfw_key\\\",\\\"install_script_version\\\":\\\"1.3.0-SNAPSHOT\\\",\\\"vfw_image_name\\\":\\\"(UBUNTU 1404 required)\\\",\\\"protected_private_net_id\\\":\\\"zdfw1fwl01_protected\\\",\\\"cloud_env\\\":\\\"openstack\\\"}");
+insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design,service_model_uuid) values
+('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null,'5df8b6de-2083-11e7-93ae-92361f002671'),
+('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null,'5df8b6de-2083-11e7-93ae-92361f002672');
-insert into vf_module(model_uuid, model_invariant_uuid, model_version, model_name, description, is_base, heat_template_artifact_uuid, vol_heat_template_artifact_uuid, creation_timestamp, vnf_resource_model_uuid) values
-('20c4431c-246d-11e7-93ae-92361f002671', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::base::module-0', 'vSAMP10a DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
-('066de97e-253e-11e7-93ae-92361f002671', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::PCM::module-1', 'vSAMP10a DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
+insert into vf_module(model_uuid, model_invariant_uuid, model_version, model_name, description, is_base, heat_template_artifact_uuid, vol_heat_template_artifact_uuid, creation_timestamp, vnf_resource_model_uuid) values
+('20c4431c-246d-11e7-93ae-92361f002671', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::base::module-0', 'vSAMP10a DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
+('066de97e-253e-11e7-93ae-92361f002671', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::PCM::module-1', 'vSAMP10a DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
+('20c4431c-246d-11e7-93ae-92361f002672', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::base::module-0', 'vSAMP10a DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
+('066de97e-253e-11e7-93ae-92361f002672', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::PCM::module-1', 'vSAMP10a DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
-insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid) values
-('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671'),
-('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671');
+insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid,VNF_RESOURCE_CUSTOMIZATION_ID) values
+('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671',1),
+('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671',1),
+('cb82ffd8-252a-11e7-93ae-92361f002672', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002672',2),
+('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672',2);
-insert into vnf_res_custom_to_vf_module_custom(vnf_resource_cust_model_customization_uuid, vf_module_cust_model_customization_uuid, creation_timestamp) values
-('68dc9a92-214c-11e7-93ae-92361f002671', 'cb82ffd8-252a-11e7-93ae-92361f002671', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002671', 'b4ea86b4-253f-11e7-93ae-92361f002671', '2017-05-26 15:08:24');
insert into allotted_resource(model_uuid, model_invariant_uuid, model_version, model_name, tosca_node_type, subcategory, description, creation_timestamp) values
('f6b7d4c6-e8a4-46e2-81bc-31cad5072842', 'b7a1b78e-6b6b-4b36-9698-8c9530da14af', '1.0', 'Tunnel_Xconn', '', '', '', '2017-05-26 15:08:24');
@@ -150,35 +102,7 @@ insert into network_resource_customization(model_customization_uuid, model_insta
insert into collection_network_resource_customization(model_customization_uuid, model_instance_name, network_technology, network_type, network_role, network_scope, creation_timestamp, network_resource_model_uuid, instance_group_model_uuid, crc_model_customization_uuid) values
('1a61be4b-3378-4c9a-91c8-c919519b2d01', 'CONTRAIL30_GNDIRECT 9', '', '', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c47fc', '0c8692ef-b9c0-435d-a738-edf31e71f38b', 'a07a5826-3281-485c-8f40-6988011ef3f2');
-insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values
-('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e');
-
-insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design) values
-('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null);
-
-
-
-
-
-insert into vf_module(model_uuid, model_invariant_uuid, model_version, model_name, description, is_base, heat_template_artifact_uuid, vol_heat_template_artifact_uuid, creation_timestamp, vnf_resource_model_uuid) values
-
-('20c4431c-246d-11e7-93ae-92361f002672', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::base::module-0', 'vSAMP10a DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
-('066de97e-253e-11e7-93ae-92361f002672', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::PCM::module-1', 'vSAMP10a DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
-
-
-
-insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid) values
-('cb82ffd8-252a-11e7-93ae-92361f002672', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002672'),
-('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672');
-
-
-insert into vnf_res_custom_to_vf_module_custom(vnf_resource_cust_model_customization_uuid, vf_module_cust_model_customization_uuid, creation_timestamp) values
-('68dc9a92-214c-11e7-93ae-92361f002672', 'cb82ffd8-252a-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002672', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24');
-
-
-
insert into vf_module_to_heat_files(vf_module_model_uuid, heat_files_artifact_uuid) values
('20c4431c-246d-11e7-93ae-92361f002671', '00535bdd-0878-4478-b95a-c575c742bfb0'),
('066de97e-253e-11e7-93ae-92361f002671', '00535bdd-0878-4478-b95a-c575c742bfb0');
@@ -189,9 +113,7 @@ insert into network_resource_customization_to_service(service_model_uuid, resour
('5df8b6de-2083-11e7-93ae-92361f002672', '3bdbb104-476c-483e-9f8b-c095b3d308ac');
-insert into vnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '68dc9a92-214c-11e7-93ae-92361f002671'),
-('5df8b6de-2083-11e7-93ae-92361f002672', '68dc9a92-214c-11e7-93ae-92361f002672');
+
insert into allotted_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
('5df8b6de-2083-11e7-93ae-92361f002671', '367a8ba9-057a-4506-b106-fbae818597c6' ),
@@ -275,9 +197,7 @@ INSERT INTO `cvnfc_customization`
`nfc_function`,
`nfc_naming_code`,
`creation_timestamp`,
- `vnf_resource_cust_model_customization_uuid`,
- `vf_module_cust_model_customization_uuid`,
- `vnfc_cust_model_customization_uuid`)
+ `vnfc_cust_model_customization_uuid`,VF_MODULE_CUSTOMIZATION_ID)
VALUES ( '1',
'dadc2c8c-2bab-11e9-b210-d663bd873d93',
'testModelInstanceName',
@@ -290,9 +210,7 @@ VALUES ( '1',
'testNfcFunction',
'testNfcNamingCode',
'2018-07-17 14:05:08',
- '68dc9a92-214c-11e7-93ae-92361f002671',
- 'cb82ffd8-252a-11e7-93ae-92361f002671',
- '9bcce658-9b37-11e8-98d0-529269fb1459');
+ '9bcce658-9b37-11e8-98d0-529269fb1459',1);
insert into service(model_uuid, model_name, model_invariant_uuid, model_version, description, creation_timestamp, tosca_csar_artifact_uuid, service_type, service_role, environment_context, workload_context) values
('5df8b6de-2083-11e7-93ae-92361f002676', 'PNF_routing_service', '9647dfc4-2083-11e7-93ae-92361f002676', '1.0', 'PNF service', '2019-03-08 12:00:29', null, 'NA', 'NA', 'Luna', 'Oxygen');
@@ -304,4 +222,4 @@ insert into pnf_resource_customization(model_customization_uuid, model_instance_
('68dc9a92-214c-11e7-93ae-92361f002680', 'PNF routing', 'routing', 'routing', 'routing', 'routing', '2019-03-08 12:00:29', 'ff2ae348-214a-11e7-93ae-92361f002680', null, "test_configuration_restconf", "1.0.0");
insert into pnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002676', '68dc9a92-214c-11e7-93ae-92361f002680'); \ No newline at end of file
+('5df8b6de-2083-11e7-93ae-92361f002676', '68dc9a92-214c-11e7-93ae-92361f002680');
diff --git a/adapters/mso-catalog-db-adapter/src/test/resources/logback-test.xml b/adapters/mso-catalog-db-adapter/src/test/resources/logback-test.xml
index 715cef8db1..463be2e527 100644
--- a/adapters/mso-catalog-db-adapter/src/test/resources/logback-test.xml
+++ b/adapters/mso-catalog-db-adapter/src/test/resources/logback-test.xml
@@ -1,19 +1,9 @@
<configuration>
- <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
- <property name="p_lvl" value="%level"/>
- <property name="p_log" value="%logger"/>
- <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/>
- <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
- <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
- <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
- <property name="p_thr" value="%thread"/>
- <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/>
-
-
+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
- <pattern>${pattern}</pattern>
- </encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern>
+ </encoder>
</appender>
<appender name="test"
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index 2e8c7990db..73e7143ae3 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -1315,7 +1315,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
networkResource = nrc.getNetworkResource();
}
}
-
String mode = "";
if (networkResource != null) {
logger.debug("Got Network definition from Catalog: {}", networkResource.toString());
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index b99e34eb9d..6e9656a213 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -876,7 +876,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
logger.debug("version: {}", vfVersion);
if (useMCUuid) {
// 1707 - db refactoring
- vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(mcu);
+ vfmc = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(mcu);
if(vfmc != null)
vf=vfmc.getVfModule();
else
@@ -1638,7 +1638,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
VfModule vf = null;
VfModuleCustomization vfmc = null;
if (useMCUuid){
- vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(modelCustomizationUuid);
+ vfmc = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(modelCustomizationUuid);
vf = vfmc != null ? vfmc.getVfModule() : null;
if (vf == null) {
logger.debug("Unable to find a vfModule matching modelCustomizationUuid={}", mcu);
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
index a07fff024b..dc695615cb 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
@@ -640,7 +640,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
VfModuleCustomization vfmc = null;
try {
- vfmc = vfModuleCustomRepo.findByModelCustomizationUUID(modelCustomizationUuid);
+ vfmc = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(modelCustomizationUuid);
if (vfmc == null) {
String error = "Create vfModule error: Unable to find vfModuleCust with modelCustomizationUuid="
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
index 0dad10b5cc..584c934843 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
@@ -681,7 +681,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
VfModuleCustomization vfModuleCust = null;
try {
- vfModuleCust = vfModuleCustomRepo.findByModelCustomizationUUID(modelCustomizationUuid);
+ vfModuleCust = vfModuleCustomRepo.findFirstByModelCustomizationUUIDOrderByCreatedDesc(modelCustomizationUuid);
if (vfModuleCust == null) {
String error = "Create vfModule error: Unable to find vfModuleCust with modelCustomizationUuid="
diff --git a/adapters/mso-openstack-adapters/src/test/resources/data.sql b/adapters/mso-openstack-adapters/src/test/resources/data.sql
index 77df06bb92..3f6abc4f63 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/data.sql
+++ b/adapters/mso-openstack-adapters/src/test/resources/data.sql
@@ -1,4 +1,4 @@
-
+set foreign_key_checks=0;
insert into heat_files(artifact_uuid, name, version, description, body, artifact_checksum, creation_timestamp) values
('00535bdd-0878-4478-b95a-c575c742bfb0', 'nimbus-ethernet-gw', '1', 'created from csar', 'DEVICE=$dev\nBOOTPROTO=none\nNM_CONTROLLED=no\nIPADDR=$ip\nNETMASK=$netmask\nGATEWAY=$gateway\n', 'MANUAL RECORD', '2017-01-21 23:56:43');
@@ -29,24 +29,19 @@ insert into heat_environment(artifact_uuid, name, version, description, body, ar
insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values
('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', null);
-insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design) values
-('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null);
+insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design,service_model_uuid) values
+('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null,'5df8b6de-2083-11e7-93ae-92361f002671');
insert into vf_module(model_uuid, model_invariant_uuid, model_version, model_name, description, is_base, heat_template_artifact_uuid, vol_heat_template_artifact_uuid, creation_timestamp, vnf_resource_model_uuid) values
-
('20c4431c-246d-11e7-93ae-92361f002671', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::base::module-0', 'vSAMP10a DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
('066de97e-253e-11e7-93ae-92361f002671', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::PCM::module-1', 'vSAMP10a DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
-insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid) values
-('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671'),
-('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671');
+insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid,VNF_RESOURCE_CUSTOMIZATION_ID) values
+('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671',2),
+('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671',2);
-insert into vnf_res_custom_to_vf_module_custom(vnf_resource_cust_model_customization_uuid, vf_module_cust_model_customization_uuid, creation_timestamp) values
-('68dc9a92-214c-11e7-93ae-92361f002671', 'cb82ffd8-252a-11e7-93ae-92361f002671', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002671', 'b4ea86b4-253f-11e7-93ae-92361f002671', '2017-05-26 15:08:24');
-
insert into allotted_resource(model_uuid, model_invariant_uuid, model_version, model_name, tosca_node_type, subcategory, description, creation_timestamp) values
('f6b7d4c6-e8a4-46e2-81bc-31cad5072842', 'b7a1b78e-6b6b-4b36-9698-8c9530da14af', '1.0', 'Tunnel_Xconn', '', '', '', '2017-05-26 15:08:24');
@@ -88,22 +83,15 @@ insert into collection_network_resource_customization(model_customization_uuid,
insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values
('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', null);
-insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design) values
-('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null);
insert into vf_module(model_uuid, model_invariant_uuid, model_version, model_name, description, is_base, heat_template_artifact_uuid, vol_heat_template_artifact_uuid, creation_timestamp, vnf_resource_model_uuid) values
('20c4431c-246d-11e7-93ae-92361f002672', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::base::module-0', 'vSAMP10a DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
('066de97e-253e-11e7-93ae-92361f002672', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'vSAMP10aDEV::PCM::module-1', 'vSAMP10a DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
-insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid) values
-('cb82ffd8-252a-11e7-93ae-92361f002672', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002672'),
-('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672');
-
-
-insert into vnf_res_custom_to_vf_module_custom(vnf_resource_cust_model_customization_uuid, vf_module_cust_model_customization_uuid, creation_timestamp) values
-('68dc9a92-214c-11e7-93ae-92361f002672', 'cb82ffd8-252a-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002672', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24');
+insert into vf_module_customization(model_customization_uuid, label, initial_count, min_instances, max_instances, availability_zone_count, heat_environment_artifact_uuid, vol_environment_artifact_uuid, creation_timestamp, vf_module_model_uuid,VNF_RESOURCE_CUSTOMIZATION_ID) values
+('cb82ffd8-252a-11e7-93ae-92361f002672', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002672',2),
+('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672',2);
insert into vf_module_to_heat_files(vf_module_model_uuid, heat_files_artifact_uuid) values
@@ -116,12 +104,8 @@ insert into network_resource_customization_to_service(service_model_uuid, resour
('5df8b6de-2083-11e7-93ae-92361f002672', '3bdbb104-476c-483e-9f8b-c095b3d308ac');
-insert into vnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '68dc9a92-214c-11e7-93ae-92361f002671'),
-('5df8b6de-2083-11e7-93ae-92361f002672', '68dc9a92-214c-11e7-93ae-92361f002672');
-
insert into allotted_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '367a8ba9-057a-4506-b106-fbae818597c6' ),
+('5df8b6de-2083-11e7-93ae-92361f002671', '367a8ba9-057a-4506-b106-fbae818597c6'),
('5df8b6de-2083-11e7-93ae-92361f002672', '367a8ba9-057a-4506-b106-fbae818597c6');
@@ -140,7 +124,7 @@ VALUES ('97b73b0f-2860-49e5-b9c5-b6f91e4ee4a8', 'fsb_volume_image_name_0', b'1',
('97b73b0f-2860-49e5-b9c5-b6f91e4ee4a8', 'fsb_volume_size_0', b'1', 'number', NULL),
('97b73b0f-2860-49e5-b9c5-b6f91e4ee4a8', 'fsb_volume_type_0', b'1', 'string', NULL);
- INSERT INTO `vf_module` (`MODEL_UUID`, `MODEL_INVARIANT_UUID`, `MODEL_VERSION`, `MODEL_NAME`, `DESCRIPTION`, `IS_BASE`, `HEAT_TEMPLATE_ARTIFACT_UUID`, `VOL_HEAT_TEMPLATE_ARTIFACT_UUID`, `CREATION_TIMESTAMP`, `VNF_RESOURCE_MODEL_UUID`)
+INSERT INTO `vf_module` (`MODEL_UUID`, `MODEL_INVARIANT_UUID`, `MODEL_VERSION`, `MODEL_NAME`, `DESCRIPTION`, `IS_BASE`, `HEAT_TEMPLATE_ARTIFACT_UUID`, `VOL_HEAT_TEMPLATE_ARTIFACT_UUID`, `CREATION_TIMESTAMP`, `VNF_RESOURCE_MODEL_UUID`)
VALUES ('207fe0dc-4c89-4e5d-9a78-345e99ef7fbe', '547e9ac6-0489-41b6-8289-a7705f6e5c9d', '1', 'TestVnfType::TestModule-0', NULL, 1, 'd187c228-71c6-4c6d-8f33-cd1243442d0a', '97b73b0f-2860-49e5-b9c5-b6f91e4ee4a8', '2018-05-13 12:12:09', 'c5efeb55-4ade-49b8-815c-6a6391f6c46b');
INSERT INTO `heat_environment` (`ARTIFACT_UUID`, `NAME`, `VERSION`, `DESCRIPTION`, `BODY`, `ARTIFACT_CHECKSUM`, `CREATION_TIMESTAMP`) VALUES ('f4a21b58-5654-4cf6-9c50-de42004fe2b4', 'base_vmme.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n Internal1_allow_transit: "True"\n Internal1_dhcp: "False"\n Internal1_forwarding_mode: "l2"\n Internal1_net_cidr: "169.253.0.0"\n Internal1_net_cidr_len: "17"\n Internal1_net_gateway: "169.253.0.3"\n Internal1_rpf: "disable"\n Internal1_shared: "False"\n Internal2_allow_transit: "True"\n Internal2_dhcp: "False"\n Internal2_forwarding_mode: "l2"\n Internal2_net_cidr: "169.255.0.0"\n Internal2_net_cidr_len: "17"\n Internal2_net_gateway: "169.255.0.3"\n Internal2_rpf: "disable"\n Internal2_shared: "False"\n domain_name: "default-domain"\n fsb1_Internal1_mac: "00:80:37:0E:0B:12"\n fsb1_Internal2_mac: "00:80:37:0E:0B:12"\n fsb2_Internal1_mac: "00:80:37:0E:0D:12"\n fsb2_Internal2_mac: "00:80:37:0E:0D:12"\n fsb_flavor_name: "nv.c20r64d1"\n gtp_sec_group_name: "gtp-sec-group"\n int1_sec_group_name: "int1-sec-group"\n int2_sec_group_name: "int2-sec-group"\n ncb1_Internal1_mac: "00:80:37:0E:09:12"\n ncb1_Internal2_mac: "00:80:37:0E:09:12"\n ncb2_Internal1_mac: "00:80:37:0E:0F:12"\n ncb2_Internal2_mac: "00:80:37:0E:0F:12"\n ncb_flavor_name: "nv.c20r64d1"\n oam_sec_group_name: "oam-sec-group"\n pxe_image_name: "MME_PXE-Boot_16ACP04_GA.qcow2"\n sctp-a-IPv6_ethertype: "IPv6"\n sctp-a-display_name: "epc-sctp-a-ipv4v6-sec-group"\n sctp-a-dst_subnet_prefix_v6: "::"\n sctp-a-egress-dst_end_port: 65535\n sctp-a-egress-dst_start_port: 0\n sctp-a-egress-src_end_port: 65535\n sctp-a-egress-src_start_port: 0\n sctp-a-egress_action: "pass"\n sctp-a-egress_dst_subnet_prefix: "0.0.0.0"\n sctp-a-egress_dst_subnet_prefix_len: 0\n sctp-a-egress_ethertype: "IPv4"\n sctp-a-egress_rule_application: "any"\n sctp-a-egress_rule_protocol: "icmp"\n sctp-a-egress_src_addresses: "local"\n sctp-a-ingress-dst_end_port: 65535\n sctp-a-ingress-dst_start_port: 0\n sctp-a-ingress-src_end_port: 65535\n sctp-a-ingress-src_start_port: 0\n sctp-a-ingress-src_subnet_prefix: "0.0.0.0"\n sctp-a-ingress-src_subnet_prefix_len: 0\n sctp-a-ingress_action: "pass"\n sctp-a-ingress_dst_addresses: "local"\n sctp-a-ingress_ethertype: "IPv4"\n sctp-a-ingress_rule_application: "any"\n sctp-a-ingress_rule_protocol: "icmp"\n sctp-a-ipv6-egress-dst_start_port: "0"\n sctp-a-ipv6-egress_action: "pass"\n sctp-a-ipv6-egress_dst_end_port: "65535"\n sctp-a-ipv6-egress_dst_subnet_prefix: "0.0.0.0"\n sctp-a-ipv6-egress_dst_subnet_prefix_len: "0"\n sctp-a-ipv6-egress_ethertype: "IPv4"\n sctp-a-ipv6-egress_rule_application: "any"\n sctp-a-ipv6-egress_rule_protocol: "any"\n sctp-a-ipv6-egress_src_addresses: "local"\n sctp-a-ipv6-egress_src_end_port: "65535"\n sctp-a-ipv6-egress_src_start_port: "0"\n sctp-a-ipv6-ingress-dst_end_port: "65535"\n sctp-a-ipv6-ingress-dst_start_port: "0"\n sctp-a-ipv6-ingress-src_end_port: 65535\n sctp-a-ipv6-ingress-src_start_port: 0\n sctp-a-ipv6-ingress_action: "pass"\n sctp-a-ipv6-ingress_dst_addresses: "local"\n sctp-a-ipv6-ingress_ethertype: "IPv4"\n sctp-a-ipv6-ingress_rule_application: "any"\n sctp-a-ipv6-ingress_rule_protocol: "any"\n sctp-a-ipv6-ingress_src_subnet_prefix: "0.0.0.0"\n sctp-a-ipv6-ingress_src_subnet_prefix_len: "0"\n sctp-a-name: "epc-sctp-a-ipv4v6-sec-group"\n sctp-a-src_subnet_prefix_v6: "::"\n sctp-b-IPv6_ethertype: "IPv6"\n sctp-b-display_name: "epc-sctp-b-ipv4v6-sec-group"\n sctp-b-dst_subnet_prefix_v6: "::"\n sctp-b-egress-dst_end_port: 65535\n sctp-b-egress-dst_start_port: 0\n sctp-b-egress-src_end_port: 65535\n sctp-b-egress-src_start_port: 0\n sctp-b-egress_action: "pass"\n sctp-b-egress_dst_subnet_prefix: "0.0.0.0"\n sctp-b-egress_dst_subnet_prefix_len: 0\n sctp-b-egress_ethertype: "IPv4"\n sctp-b-egress_rule_application: "any"\n sctp-b-egress_rule_protocol: "icmp"\n sctp-b-egress_src_addresses: "local"\n sctp-b-ingress-dst_end_port: 65535\n sctp-b-ingress-dst_start_port: 0\n sctp-b-ingress-src_end_port: 65535\n sctp-b-ingress-src_start_port: 0\n sctp-b-ingress-src_subnet_prefix: "0.0.0.0"\n sctp-b-ingress-src_subnet_prefix_len: 0\n sctp-b-ingress_action: "pass"\n sctp-b-ingress_dst_addresses: "local"\n sctp-b-ingress_ethertype: "IPv4"\n sctp-b-ingress_rule_application: "any"\n sctp-b-ingress_rule_protocol: "icmp"\n sctp-b-ipv6-egress-dst_start_port: "0"\n sctp-b-ipv6-egress_action: "pass"\n sctp-b-ipv6-egress_dst_end_port: "65535"\n sctp-b-ipv6-egress_dst_subnet_prefix: "0.0.0.0"\n sctp-b-ipv6-egress_dst_subnet_prefix_len: "0"\n sctp-b-ipv6-egress_ethertype: "IPv4"\n sctp-b-ipv6-egress_rule_application: "any"\n sctp-b-ipv6-egress_rule_protocol: "any"\n sctp-b-ipv6-egress_src_addresses: "local"\n sctp-b-ipv6-egress_src_end_port: "65535"\n sctp-b-ipv6-egress_src_start_port: "0"\n sctp-b-ipv6-ingress-dst_end_port: "65535"\n sctp-b-ipv6-ingress-dst_start_port: "0"\n sctp-b-ipv6-ingress-src_end_port: 65535\n sctp-b-ipv6-ingress-src_start_port: 0\n sctp-b-ipv6-ingress_action: "pass"\n sctp-b-ipv6-ingress_dst_addresses: "local"\n sctp-b-ipv6-ingress_ethertype: "IPv4"\n sctp-b-ipv6-ingress_rule_application: "any"\n sctp-b-ipv6-ingress_rule_protocol: "any"\n sctp-b-ipv6-ingress_src_subnet_prefix: "0.0.0.0"\n sctp-b-ipv6-ingress_src_subnet_prefix_len: "0"\n sctp-b-name: "epc-sctp-b-ipv4v6-sec-group"\n sctp-b-src_subnet_prefix_v6: "::"\n sctp_rule_protocol: "132"\n vlc_st_availability_zone: "True"\n vlc_st_interface_type_gtp: "other0"\n vlc_st_interface_type_int1: "other1"\n vlc_st_interface_type_int2: "other2"\n vlc_st_interface_type_oam: "management"\n vlc_st_interface_type_sctp_a: "left"\n vlc_st_interface_type_sctp_b: "right"\n vlc_st_service_mode: "in-network-nat"\n vlc_st_service_type: "firewall"\n vlc_st_version: "2"\n vlc_st_virtualization_type: "virtual-machine"\n availability_zone_0: \n availability_zone_1: \n availability_zone_2: \n availability_zone_3: \n fsb_name_0: \n fsb_name_1: \n fsb_oam_ip_0: \n fsb_oam_ip_1: \n fsb_volume_id_0: \n fsb_volume_id_1: \n gtp_net_fqdn: \n gtp_net_name: \n ncb_name_0: \n ncb_name_1: \n oam_net_fqdn: \n oam_net_name: \n sctp_a_net_fqdn: \n sctp_a_net_name: \n sctp_b_net_fqdn: \n sctp_b_net_name: \n vf_module_id: \n vlc_gtp_route_prefixes: \n vlc_oam_route_prefixes: \n vlc_sctp_a_route_prefixes: \n vlc_sctp_b_route_prefixes: \n vnf_id: \n vnf_name: \n', 'MGJjYzM2ZWY1ODBjYzc1MzBiMGQxZmI4N2MyZmFkY2E=', '2018-05-13 12:12:09');
@@ -148,7 +132,8 @@ INSERT INTO `heat_environment` (`ARTIFACT_UUID`, `NAME`, `VERSION`, `DESCRIPTION
- INSERT INTO `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`, `LABEL`, `INITIAL_COUNT`, `MIN_INSTANCES`, `MAX_INSTANCES`, `AVAILABILITY_ZONE_COUNT`, `HEAT_ENVIRONMENT_ARTIFACT_UUID`, `VOL_ENVIRONMENT_ARTIFACT_UUID`, `CREATION_TIMESTAMP`, `VF_MODULE_MODEL_UUID`) VALUES ('9b339a61-69ca-465f-86b8-1c72c582b8e8', 'base_vmme', 1, 1, 1, NULL, 'f4a21b58-5654-4cf6-9c50-de42004fe2b4', '3375f64b-4709-4802-8713-7a164763f9cd', '2018-05-13 12:12:09', '207fe0dc-4c89-4e5d-9a78-345e99ef7fbe');
+INSERT INTO `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`, `LABEL`, `INITIAL_COUNT`, `MIN_INSTANCES`, `MAX_INSTANCES`, `AVAILABILITY_ZONE_COUNT`, `HEAT_ENVIRONMENT_ARTIFACT_UUID`, `VOL_ENVIRONMENT_ARTIFACT_UUID`, `CREATION_TIMESTAMP`, `VF_MODULE_MODEL_UUID`,VNF_RESOURCE_CUSTOMIZATION_ID)
+VALUES ('9b339a61-69ca-465f-86b8-1c72c582b8e8', 'base_vmme', 1, 1, 1, NULL, 'f4a21b58-5654-4cf6-9c50-de42004fe2b4', '3375f64b-4709-4802-8713-7a164763f9cd', '2018-05-13 12:12:09', '207fe0dc-4c89-4e5d-9a78-345e99ef7fbe',2);
INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, 'MSO_USER', '2018-07-17 14:05:08', '2018-07-17 14:05:08');
@@ -157,7 +142,7 @@ INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `PR
INSERT INTO `cloud_sites` (`ID`, `region_id`, `identity_service_id`, `cloud_version`, `clli`, `cloudify_id`, `platform`, `orchestrator`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'mtn13', 'MTN13', '3.0', 'MDT13', 'mtn13', null, 'orchestrator', '2018-07-17 14:06:28', '2018-07-17 14:06:28');
-
+set foreign_key_checks=1;
diff --git a/adapters/mso-openstack-adapters/src/test/resources/schema.sql b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
index ac08f8b645..622e46583b 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/schema.sql
+++ b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
@@ -1,834 +1,1203 @@
-
-create table `allotted_resource` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) default null,
- `subcategory` varchar(200) default null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `allotted_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `providing_service_model_uuid` varchar(200) default null,
- `providing_service_model_invariant_uuid` varchar(200) default null,
- `providing_service_model_name` varchar(200) default null,
- `target_network_role` varchar(200) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `ar_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_customization_uuid`),
- key `fk_allotted_resource_customization__allotted_resource1_idx` (`ar_model_uuid`),
- constraint `fk_allotted_resource_customization__allotted_resource1` foreign key (`ar_model_uuid`) references `allotted_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_environment` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(100) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_files` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `timeout_minutes` int(11) default null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_nested_template` (
- `parent_heat_template_uuid` varchar(200) not null,
- `child_heat_template_uuid` varchar(200) not null,
- `provider_resource_file` varchar(100) default null,
- primary key (`parent_heat_template_uuid`,`child_heat_template_uuid`),
- key `fk_heat_nested_template__heat_template2_idx` (`child_heat_template_uuid`),
- constraint `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` foreign key (`child_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` foreign key (`parent_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template_params` (
- `heat_template_artifact_uuid` varchar(200) not null,
- `param_name` varchar(100) not null,
- `is_required` bit(1) not null,
- `param_type` varchar(20) default null,
- `param_alias` varchar(45) default null,
- primary key (`heat_template_artifact_uuid`,`param_name`),
- constraint `fk_heat_template_params__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_recipe` (
- `id` int(11) not null auto_increment,
- `model_name` varchar(20) not null,
- `action` varchar(50) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `network_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_type` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `version_str` varchar(20) not null,
- primary key (`id`),
- unique key `uk_rl4f296i0p8lyokxveaiwkayi` (`model_name`,`action`,`version_str`)
-) engine=innodb auto_increment=178 default charset=latin1;
-
-
-
-
-create table `temp_network_heat_template_lookup` (
- `network_resource_model_name` varchar(200) not null,
- `heat_template_artifact_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) not null,
- `aic_version_max` varchar(20) default null,
- primary key (`network_resource_model_name`),
- key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_temp_network_heat_template_lookup__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_resource` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) null,
- `neutron_network_type` varchar(20) default null,
- `model_version` varchar(20) default null,
- `tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) null,
- `aic_version_max` varchar(20) default null,
- `orchestration_mode` varchar(20) default 'heat',
- `resource_category` varchar(20) default null,
- `resource_sub_category` varchar(20) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`),
- key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
- key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `network_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `network_technology` varchar(45) default null,
- `network_type` varchar(45) default null,
- `network_role` varchar(200) default null,
- `network_scope` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `network_resource_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- primary key (`model_customization_uuid`),
- key `fk_network_resource_customization__network_resource1_idx` (`network_resource_model_uuid`),
- constraint `fk_network_resource_customization__network_resource1` foreign key (`network_resource_model_uuid`) references `network_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `tosca_csar` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `artifact_checksum` varchar(200) not null,
- `url` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `service` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `tosca_csar_artifact_uuid` varchar(200) default null,
- `service_type` varchar(200) default null,
- `service_role` varchar(200) default null,
- `environment_context` varchar(200) default null,
- `workload_context` varchar(200) default null,
- `resource_order` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_service__tosca_csar1_idx` (`tosca_csar_artifact_uuid`),
- constraint `fk_service__tosca_csar1` foreign key (`tosca_csar_artifact_uuid`) references `tosca_csar` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `service_recipe` (
- `id` int(11) not null auto_increment,
- `action` varchar(50) not null,
- `version_str` varchar(20) default null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `service_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_timeout_interim` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `service_model_uuid` varchar(200) not null,
- primary key (`id`),
- unique key `uk_7fav5dkux2v8g9d2i5ymudlgc` (`service_model_uuid`,`action`),
- key `fk_service_recipe__service1_idx` (`service_model_uuid`),
- constraint `fk_service_recipe__service1` foreign key (`service_model_uuid`) references `service` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb auto_increment=86 default charset=latin1;
-
-
-
-create table `vnf_resource` (
- `orchestration_mode` varchar(20) not null default 'heat',
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `model_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) default null,
- `aic_version_max` varchar(20) default null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) default null,
- `tosca_node_type` varchar(200) default null,
- `resource_category` varchar(200) default null,
- `resource_sub_category` varchar(200) default null,
- `heat_template_artifact_uuid` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_vnf_resource__heat_template1` (`heat_template_artifact_uuid`),
- constraint `fk_vnf_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vf_module` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) default null,
- `is_base` int(11) not null,
- `heat_template_artifact_uuid` varchar(200) default null,
- `vol_heat_template_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- primary key (`model_uuid`,`vnf_resource_model_uuid`),
- key `fk_vf_module__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- key `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`heat_template_artifact_uuid`),
- key `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`vol_heat_template_artifact_uuid`),
- constraint `fk_vf_module__heat_template_art_uuid__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vol_heat_template_art_uuid__heat_template2` foreign key (`vol_heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_customization` (
- `model_customization_uuid` varchar(200) not null,
- `label` varchar(200) default null,
- `initial_count` int(11) default '0',
- `min_instances` int(11) default '0',
- `max_instances` int(11) default null,
- `availability_zone_count` int(11) default null,
- `heat_environment_artifact_uuid` varchar(200) default null,
- `vol_environment_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vf_module_model_uuid` varchar(200) not null,
- primary key (`model_customization_uuid`),
- key `fk_vf_module_customization__vf_module1_idx` (`vf_module_model_uuid`),
- key `fk_vf_module_customization__heat_env__heat_environment1_idx` (`heat_environment_artifact_uuid`),
- key `fk_vf_module_customization__vol_env__heat_environment2_idx` (`vol_environment_artifact_uuid`),
- constraint `fk_vf_module_customization__heat_env__heat_environment1` foreign key (`heat_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vf_module1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vol_env__heat_environment2` foreign key (`vol_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
-
-
-
-
-create table `vf_module_to_heat_files` (
- `vf_module_model_uuid` varchar(200) not null,
- `heat_files_artifact_uuid` varchar(200) not null,
- primary key (`vf_module_model_uuid`,`heat_files_artifact_uuid`),
- key `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`heat_files_artifact_uuid`),
- constraint `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` foreign key (`heat_files_artifact_uuid`) references `heat_files` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_to_heat_files__vf_module__model_uuid1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1 comment='il fait ce qu''il dit';
-
-
-
-
-create table `vnf_components` (
- `vnf_id` int(11) not null,
- `component_type` varchar(20) not null,
- `heat_template_id` int(11) default null,
- `heat_environment_id` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_id`,`component_type`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vnf_components_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `vnf_component_type` varchar(45) not null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_component_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_model_uuid` varchar(200) default null,
- primary key (`id`),
- unique key `uk_4dpdwddaaclhc11wxsb7h59ma` (`vf_module_model_uuid`,`vnf_component_type`,`action`,`version`)
-) engine=innodb auto_increment=26 default charset=latin1;
-
-
-
-
-create table `vnf_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version_str` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_id` varchar(100) default null,
- primary key (`id`),
- unique key `uk_f3tvqau498vrifq3cr8qnigkr` (`vf_module_id`,`action`,`version_str`)
-) engine=innodb auto_increment=10006 default charset=latin1;
-
-
-ALTER TABLE `catalogdb`.`vnf_recipe`
-CHANGE COLUMN `VNF_TYPE` `NF_ROLE` VARCHAR(200) NULL DEFAULT NULL ;
-
-
-
-
-
-create table `vnf_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `availability_zone_max_count` int(11) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- `multi_stage_design` varchar(20) default null,
- `resource_input` varchar(20000) default null,
- `cds_blueprint_name` varchar(200),
- `cds_blueprint_version` varchar(200),
- primary key (`model_customization_uuid`),
- key `fk_vnf_resource_customization__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- constraint `fk_vnf_resource_customization__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vnf_res_custom_to_vf_module_custom` (
- `vnf_resource_cust_model_customization_uuid` varchar(200) not null,
- `vf_module_cust_model_customization_uuid` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_cust_model_customization_uuid`,`vf_module_cust_model_customization_uuid`),
- key `fk_vnf_res_custom_to_vf_module_custom__vf_module_customizat_idx` (`vf_module_cust_model_customization_uuid`),
- constraint `fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1` foreign key (`vf_module_cust_model_customization_uuid`) references `vf_module_customization` (`model_customization_uuid`) on delete cascade on update cascade,
- constraint `fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1` foreign key (`vnf_resource_cust_model_customization_uuid`) references `vnf_resource_customization` (`model_customization_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-create table if not exists external_service_to_internal_model_mapping (
-id int(11) not null,
-service_name varchar(200) not null,
-product_flavor varchar(200) null,
-subscription_service_type varchar(200) not null,
-service_model_uuid varchar(200) not null,
-primary key (id),
-unique index uk_external_service_to_internal_model_mapping
-(service_name asc, product_flavor asc, service_model_uuid asc));
-
-create table if not exists `collection_resource` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) not null,
- description varchar(200),
- creation_timestamp datetime not null default current_timestamp,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_customization` (
- model_customization_uuid varchar(200) not null,
- model_instance_name varchar(200) not null,
- role varchar(200) NULL,
- object_type varchar(200) not null,
- function varchar(200) NULL,
- collection_resource_type varchar(200) NULL,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- primary key (`model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `instance_group` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) NULL,
- role varchar(200) not null,
- object_type varchar(200) not null,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- instance_group_type varchar(200) not null,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_instance_group_customization` (
- `collection_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `subinterface_network_quantity` int(11) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`collection_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_collection_resource_instance_group_customization__instan_idx` (`instance_group_model_uuid` asc),
- constraint `fk_collection_resource_instance_group_customization__collecti1`
- foreign key (`collection_resource_customization_model_uuid`)
- references `collection_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_collection_resource_instance_group_customization__instance1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
-create table if not exists `vnfc_instance_group_customization` (
- `vnf_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_vnfc_instance_group_customization__instance_group1_idx` (`instance_group_model_uuid` asc),
- constraint `fk_vnfc_instance_group_customization__vnf_resource_customizat1`
- foreign key (`vnf_resource_customization_model_uuid`)
- references `vnf_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_vnfc_instance_group_customization__instance_group1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
- create table if not exists `configuration`
- ( `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
- CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `MODEL_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
- `MODEL_VERSION` VARCHAR(20) NOT NULL,
- `MODEL_NAME` VARCHAR(200) NOT NULL,
- `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
- `DESCRIPTION` VARCHAR(1200) NULL,
- `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+set foreign_key_checks=0;
+DROP TABLE IF EXISTS `allotted_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `SUBCATEGORY` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `PROVIDING_SERVICE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TARGET_NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `AR_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
- INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
- UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_service_proxy_resource_customization__service1`
- FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
- REFERENCES `service` (`MODEL_UUID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE)
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-
-create table if not exists `configuration_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`configuration_type` varchar(200) null,
-`configuration_role` varchar(200) null,
-`configuration_function` varchar(200) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`configuration_model_uuid` varchar(200) not null,
-`service_proxy_customization_model_customization_uuid` varchar(200) null,
-`configuration_customization_model_customization_uuid` varchar(200) null,
-primary key (`model_customization_uuid`),
-index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__service_proxy_customization_idx`
-(`service_proxy_customization_model_customization_uuid` asc),
-index `fk_configuration_customization__configuration_customization_idx`
-(`configuration_customization_model_customization_uuid` asc),
-constraint `fk_configuration_resource_customization__configuration_resour1`
-foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_configuration_customization__service_proxy_customization1` foreign
-key (`service_proxy_customization_model_customization_uuid`) references
-`service_proxy_customization` (`model_customization_uuid`)
-on delete cascade on update cascade, constraint
-`fk_configuration_customization__configuration_customization1` foreign
-key (`configuration_customization_model_customization_uuid`) references
-`configuration_customization` (`model_customization_uuid`)
-on delete cascade on update cascade)
-engine = innodb
-auto_increment =20654
-default character set = latin1;
-
-
-create table `service_proxy_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `configuration_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table if not exists `collection_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `network_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `vnf_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `allotted_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-alter table collection_resource_customization
-add foreign key ( cr_model_uuid)
-references collection_resource(model_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-alter table network_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-
-alter table network_resource_customization
-add foreign key ( instance_group_model_uuid)
-references instance_group(model_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table vnf_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references network_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references vnf_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references allotted_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references collection_resource_customization(model_customization_uuid)
-on delete cascade;
-
-create table ar_recipe (
- ID INT(11) not null auto_increment,
- MODEL_NAME VARCHAR(200) NOT NULL,
- `ACTION` VARCHAR(200) NOT NULL,
- VERSION_STR VARCHAR(200) NOT NULL,
- SERVICE_TYPE VARCHAR(200),
- DESCRIPTION VARCHAR(200),
- ORCHESTRATION_URI VARCHAR(200) NOT NULL,
- AR_PARAM_XSD VARCHAR(200),
- RECIPE_TIMEOUT INT(10),
- CREATION_TIMESTAMP DATETIME NOT NULL default current_timestamp,
- primary key (ID),
- unique key `uk_ar_recipe` (`model_name`,`action`,`version_str`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-create table if not exists `collection_network_resource_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`network_technology` varchar(45) null,
-`network_type` varchar(45) null,
-`network_role` varchar(200) null,
-`network_scope` varchar(45) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`network_resource_model_uuid` varchar(200) not null, `instance_group_model_uuid` varchar(200) null,
-`crc_model_customization_uuid` varchar(200) not null, primary key
-(`model_customization_uuid`, `crc_model_customization_uuid`),
-index `fk_collection_net_resource_customization__network_resource1_idx`
-(`network_resource_model_uuid` asc), index
-`fk_collection_net_resource_customization__instance_group1_idx`
-(`instance_group_model_uuid` asc), index
-`fk_col_net_res_customization__collection_res_customization_idx`
-(`crc_model_customization_uuid` asc), constraint
-`fk_collection_net_resource_customization__network_resource10` foreign
-key (`network_resource_model_uuid`) references
-`network_resource` (`model_uuid`) on delete cascade on
-update cascade, constraint
-`fk_collection_net_resource_customization__instance_group10` foreign key
-(`instance_group_model_uuid`) references `instance_group`
-(`model_uuid`) on delete cascade on update cascade, constraint
-`fk_collection_network_resource_customization__collection_reso1` foreign
-key (`crc_model_customization_uuid`) references
-`collection_resource_customization`
-(`model_customization_uuid`) on delete cascade on update cascade) engine
-= innodb default character set = latin1;
-
-CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
-`ACTION` VARCHAR(200) NOT NULL,
-`MACRO_ACTION` VARCHAR(200) NOT NULL,
-`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
-`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 0,
-`MIN_API_VERSION` DOUBLE NOT NULL,
-`MAX_API_VERSION` DOUBLE NULL,
-PRIMARY KEY (`id`),
-UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `orchestration_flow_reference` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`COMPOSITE_ACTION` VARCHAR(200) NOT NULL,
-`SEQ_NO` INT(11) NOT NULL,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`FLOW_VERSION` DOUBLE NOT NULL,
-`NB_REQ_REF_LOOKUP_ID` INT(11) NOT NULL,
-PRIMARY KEY (`id`),
-INDEX `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID` ASC),
-UNIQUE INDEX `UK_orchestration_flow_reference` (`COMPOSITE_ACTION` ASC, `FLOW_NAME` ASC, `SEQ_NO` ASC, `NB_REQ_REF_LOOKUP_ID` ASC),
-CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1`
-FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`)
-ON DELETE CASCADE ON UPDATE CASCADE)
-ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `rainy_day_handler_macro` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`SERVICE_TYPE` VARCHAR(200) NOT NULL,
-`VNF_TYPE` VARCHAR(200) NOT NULL,
-`ERROR_CODE` VARCHAR(200) NOT NULL,
-`WORK_STEP` VARCHAR(200) NOT NULL,
-`POLICY` VARCHAR(200) NOT NULL,
-PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-create table if not exists model_recipe (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_ID` INT(11),
- `ACTION` VARCHAR(40),
- `SCHEMA_VERSION` VARCHAR(40),
- `DESCRIPTION` VARCHAR(40),
- `ORCHESTRATION_URI` VARCHAR(20),
- `MODEL_PARAM_XSD` VARCHAR(20),
- `RECIPE_TIMEOUT` INT(11),
- `CREATION_TIMESTAMP` datetime not null default current_timestamp,
- PRIMARY KEY (`ID`),
- CONSTRAINT uk1_model_recipe UNIQUE (`MODEL_ID`, `ACTION`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-create table if not exists model (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_ID` VARCHAR(40),
- `MODEL_CUSTOMIZATION_NAME` VARCHAR(40),
- `MODEL_INVARIANT_ID` VARCHAR(40),
- `MODEL_NAME` VARCHAR(40),
- `MODEL_TYPE` VARCHAR(20),
- `MODEL_VERSION` VARCHAR(20),
- `MODEL_VERSION_ID` VARCHAR(40),
- `CREATION_TIMESTAMP` datetime not null default current_timestamp,
- `RECIPE` INT(11),
- PRIMARY KEY (`ID`),
- CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
- FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-CREATE TABLE IF NOT EXISTS `identity_services` (
+ KEY `fk_allotted_resource_customization__allotted_resource1_idx` (`AR_MODEL_UUID`),
+ CONSTRAINT `fk_allotted_resource_customization__allotted_resource1` FOREIGN KEY (`AR_MODEL_UUID`) REFERENCES `allotted_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `allotted_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `ar_recipe`
+--
+
+DROP TABLE IF EXISTS `ar_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ar_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `VERSION_STR` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(200) NOT NULL,
+ `AR_PARAM_XSD` varchar(200) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk_ar_recipe` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `building_block_detail`
+--
+
+DROP TABLE IF EXISTS `building_block_detail`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `building_block_detail` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `BUILDING_BLOCK_NAME` varchar(200) NOT NULL,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_building_block_name` (`BUILDING_BLOCK_NAME`)
+) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloud_sites`
+--
+
+DROP TABLE IF EXISTS `cloud_sites`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloud_sites` (
`ID` varchar(50) NOT NULL,
- `IDENTITY_URL` varchar(200) DEFAULT NULL,
- `MSO_ID` varchar(255) DEFAULT NULL,
- `MSO_PASS` varchar(255) DEFAULT NULL,
- `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
- `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
- `ADMIN_TENANT` varchar(50) DEFAULT NULL,
- `MEMBER_ROLE` varchar(50) DEFAULT NULL,
- `TENANT_METADATA` tinyint(1) DEFAULT 0,
- `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
- `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
+ `REGION_ID` varchar(11) DEFAULT NULL,
+ `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
+ `CLOUD_VERSION` varchar(20) DEFAULT NULL,
+ `CLLI` varchar(11) DEFAULT NULL,
+ `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
+ `PLATFORM` varchar(50) DEFAULT NULL,
+ `ORCHESTRATOR` varchar(50) DEFAULT NULL,
`LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`ID`)
-) ;
-
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
+ CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `cloudify_managers`
+--
-CREATE TABLE IF NOT EXISTS `cloudify_managers` (
+DROP TABLE IF EXISTS `cloudify_managers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloudify_managers` (
`ID` varchar(50) NOT NULL,
`CLOUDIFY_URL` varchar(200) DEFAULT NULL,
`USERNAME` varchar(255) DEFAULT NULL,
`PASSWORD` varchar(255) DEFAULT NULL,
`VERSION` varchar(20) DEFAULT NULL,
`LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`)
-) ;
-
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `CRC_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`,`CRC_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_collection_net_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ KEY `fk_collection_net_resource_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_col_net_res_customization__collection_res_customization_idx` (`CRC_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_collection_net_resource_customization__instance_group10` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_net_resource_customization__network_resource10` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_network_resource_customization__collection_reso1` FOREIGN KEY (`CRC_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource`
+--
+
+DROP TABLE IF EXISTS `collection_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `role` varchar(200) DEFAULT NULL,
+ `object_type` varchar(200) NOT NULL,
+ `function` varchar(200) DEFAULT NULL,
+ `collection_resource_type` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`),
+ CONSTRAINT `collection_resource_customization_ibfk_1` FOREIGN KEY (`CR_MODEL_UUID`) REFERENCES `collection_resource` (`MODEL_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_instance_group_customization` (
+ `COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SUBINTERFACE_NETWORK_QUANTITY` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`,`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_collection_resource_instance_group_customization__instan_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_collection_resource_instance_group_customization__collecti1` FOREIGN KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_resource_instance_group_customization__instance1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration`
+--
+
+DROP TABLE IF EXISTS `configuration`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization`
+--
+
+DROP TABLE IF EXISTS `configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ KEY `fk_configuration_customization__service_proxy_customization_idx` (`SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_customization_idx` (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_configuration_customization__configuration_customization1` FOREIGN KEY (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`) REFERENCES `configuration_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_configuration_resource_customization__configuration_resour1` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `configuration_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `controller_selection_reference`
+--
+
+DROP TABLE IF EXISTS `controller_selection_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `controller_selection_reference` (
+ `VNF_TYPE` varchar(50) NOT NULL,
+ `CONTROLLER_NAME` varchar(100) NOT NULL,
+ `ACTION_CATEGORY` varchar(15) NOT NULL,
+ PRIMARY KEY (`VNF_TYPE`,`CONTROLLER_NAME`,`ACTION_CATEGORY`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_configuration_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_configuration_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `POLICY_NAME` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `CVNFC_CUSTOMIZATION_ID` int(11) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `NFC_FUNCTION` varchar(200) DEFAULT NULL,
+ `NFC_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `VF_MODULE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization_to_vf_module_resource_customization` (`VF_MODULE_CUSTOMIZATION_ID`),
+ CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_cvnfc_customization_to_vf_module_resource_customization` FOREIGN KEY (`VF_MODULE_CUSTOMIZATION_ID`) REFERENCES `vf_module_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `external_service_to_internal_model_mapping`
+--
+
+DROP TABLE IF EXISTS `external_service_to_internal_model_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `external_service_to_internal_model_mapping` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `SERVICE_NAME` varchar(200) NOT NULL,
+ `PRODUCT_FLAVOR` varchar(200) DEFAULT NULL,
+ `SUBSCRIPTION_SERVICE_TYPE` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_external_service_to_internal_model_mapping` (`SERVICE_NAME`,`PRODUCT_FLAVOR`,`SERVICE_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `flyway_schema_history`
+--
+
+DROP TABLE IF EXISTS `flyway_schema_history`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `flyway_schema_history` (
+ `installed_rank` int(11) NOT NULL,
+ `version` varchar(50) DEFAULT NULL,
+ `description` varchar(200) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `script` varchar(1000) NOT NULL,
+ `checksum` int(11) DEFAULT NULL,
+ `installed_by` varchar(100) NOT NULL,
+ `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `execution_time` int(11) NOT NULL,
+ `success` tinyint(1) NOT NULL,
+ PRIMARY KEY (`installed_rank`),
+ KEY `flyway_schema_history_s_idx` (`success`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_environment`
+--
+
+DROP TABLE IF EXISTS `heat_environment`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_environment` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(100) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_files`
+--
+
+DROP TABLE IF EXISTS `heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_files` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_nested_template`
+--
+
+DROP TABLE IF EXISTS `heat_nested_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_nested_template` (
+ `PARENT_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `CHILD_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `PROVIDER_RESOURCE_FILE` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`PARENT_HEAT_TEMPLATE_UUID`,`CHILD_HEAT_TEMPLATE_UUID`),
+ KEY `fk_heat_nested_template__heat_template2_idx` (`CHILD_HEAT_TEMPLATE_UUID`),
+ CONSTRAINT `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` FOREIGN KEY (`CHILD_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` FOREIGN KEY (`PARENT_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template`
+--
+
+DROP TABLE IF EXISTS `heat_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `TIMEOUT_MINUTES` int(11) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template_params`
+--
+
+DROP TABLE IF EXISTS `heat_template_params`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template_params` (
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NOT NULL,
+ `PARAM_NAME` varchar(100) NOT NULL,
+ `IS_REQUIRED` bit(1) NOT NULL,
+ `PARAM_TYPE` varchar(20) DEFAULT NULL,
+ `PARAM_ALIAS` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`,`PARAM_NAME`),
+ CONSTRAINT `fk_heat_template_params__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `identity_services`
+--
-CREATE TABLE IF NOT EXISTS `cloud_sites` (
+DROP TABLE IF EXISTS `identity_services`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `identity_services` (
`ID` varchar(50) NOT NULL,
- `REGION_ID` varchar(11) DEFAULT NULL,
- `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
- `CLOUD_VERSION` varchar(20) DEFAULT NULL,
- `CLLI` varchar(11) DEFAULT NULL,
- `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
- `PLATFORM` varchar(50) DEFAULT NULL,
- `ORCHESTRATOR` varchar(50) DEFAULT NULL,
+ `IDENTITY_URL` varchar(200) DEFAULT NULL,
+ `MSO_ID` varchar(255) DEFAULT NULL,
+ `MSO_PASS` varchar(255) DEFAULT NULL,
+ `ADMIN_TENANT` varchar(50) DEFAULT NULL,
+ `MEMBER_ROLE` varchar(50) DEFAULT NULL,
+ `TENANT_METADATA` tinyint(1) DEFAULT '0',
+ `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
+ `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
`LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `instance_group`
+--
+
+DROP TABLE IF EXISTS `instance_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `instance_group` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `ROLE` varchar(200) NOT NULL,
+ `OBJECT_TYPE` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `INSTANCE_GROUP_TYPE` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model`
+--
+
+DROP TABLE IF EXISTS `model`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_ID` varchar(40) DEFAULT NULL,
+ `MODEL_CUSTOMIZATION_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_INVARIANT_ID` varchar(40) DEFAULT NULL,
+ `MODEL_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION_ID` varchar(40) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RECIPE` int(11) DEFAULT NULL,
PRIMARY KEY (`ID`),
- KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
- CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
-) ; \ No newline at end of file
+ UNIQUE KEY `uk1_model` (`MODEL_TYPE`,`MODEL_VERSION_ID`),
+ KEY `RECIPE` (`RECIPE`),
+ CONSTRAINT `model_ibfk_1` FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model_recipe`
+--
+
+DROP TABLE IF EXISTS `model_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_ID` int(11) DEFAULT NULL,
+ `ACTION` varchar(40) DEFAULT NULL,
+ `SCHEMA_VERSION` varchar(40) DEFAULT NULL,
+ `DESCRIPTION` varchar(40) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(20) DEFAULT NULL,
+ `MODEL_PARAM_XSD` varchar(20) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk1_model_recipe` (`MODEL_ID`,`ACTION`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_recipe`
+--
+
+DROP TABLE IF EXISTS `network_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(20) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `NETWORK_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_rl4f296i0p8lyokxveaiwkayi` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource`
+--
+
+DROP TABLE IF EXISTS `network_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `NEUTRON_NETWORK_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `ORCHESTRATION_MODE` varchar(20) DEFAULT 'HEAT',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_network_resource__temp_network_heat_template_lookup1_idx` (`MODEL_NAME`),
+ KEY `fk_network_resource__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_network_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE,
+ CONSTRAINT `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` FOREIGN KEY (`MODEL_NAME`) REFERENCES `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_network_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_network_resource_customization__network_resource1` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `network_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `network_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `network_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `northbound_request_ref_lookup`
+--
+
+DROP TABLE IF EXISTS `northbound_request_ref_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `northbound_request_ref_lookup` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `REQUEST_SCOPE` varchar(200) NOT NULL,
+ `MACRO_ACTION` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `IS_ALACARTE` tinyint(1) NOT NULL DEFAULT '0',
+ `MIN_API_VERSION` double NOT NULL,
+ `MAX_API_VERSION` double DEFAULT NULL,
+ `IS_TOPLEVELFLOW` tinyint(1) DEFAULT NULL,
+ `CLOUD_OWNER` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_northbound_request_ref_lookup` (`MIN_API_VERSION`,`REQUEST_SCOPE`,`ACTION`,`IS_ALACARTE`,`MACRO_ACTION`,`CLOUD_OWNER`)
+) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_flow_reference`
+--
+
+DROP TABLE IF EXISTS `orchestration_flow_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_flow_reference` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `COMPOSITE_ACTION` varchar(200) NOT NULL,
+ `SEQ_NO` int(11) NOT NULL,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `FLOW_VERSION` double NOT NULL,
+ `NB_REQ_REF_LOOKUP_ID` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_flow_reference` (`COMPOSITE_ACTION`,`FLOW_NAME`,`SEQ_NO`,`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__building_block_detail` (`FLOW_NAME`),
+ CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1` FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=398 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_status_state_transition_directive`
+--
+
+DROP TABLE IF EXISTS `orchestration_status_state_transition_directive`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_status_state_transition_directive` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `ORCHESTRATION_STATUS` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ `FLOW_DIRECTIVE` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_status_state_transition_directive` (`RESOURCE_TYPE`,`ORCHESTRATION_STATUS`,`TARGET_ACTION`)
+) ENGINE=InnoDB AUTO_INCREMENT=686 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `rainy_day_handler_macro`
+--
+
+DROP TABLE IF EXISTS `rainy_day_handler_macro`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `rainy_day_handler_macro` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) NOT NULL,
+ `VNF_TYPE` varchar(200) NOT NULL,
+ `ERROR_CODE` varchar(200) NOT NULL,
+ `WORK_STEP` varchar(200) NOT NULL,
+ `POLICY` varchar(200) NOT NULL,
+ `SECONDARY_POLICY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service`
+--
+
+DROP TABLE IF EXISTS `service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `TOSCA_CSAR_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `SERVICE_ROLE` varchar(200) DEFAULT NULL,
+ `ENVIRONMENT_CONTEXT` varchar(200) DEFAULT NULL,
+ `WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
+ `SERVICE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_ORDER` varchar(200) default NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
+ CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SOURCE_SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1` FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_recipe`
+--
+
+DROP TABLE IF EXISTS `service_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ACTION` varchar(50) NOT NULL,
+ `VERSION_STR` varchar(20) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `SERVICE_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TIMEOUT_INTERIM` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_7fav5dkux2v8g9d2i5ymudlgc` (`SERVICE_MODEL_UUID`,`ACTION`),
+ KEY `fk_service_recipe__service1_idx` (`SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_recipe__service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `temp_network_heat_template_lookup`
+--
+
+DROP TABLE IF EXISTS `temp_network_heat_template_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `temp_network_heat_template_lookup` (
+ `NETWORK_RESOURCE_MODEL_NAME` varchar(200) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`NETWORK_RESOURCE_MODEL_NAME`),
+ KEY `fk_temp_network_heat_template_lookup__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_temp_network_heat_template_lookup__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `tosca_csar`
+--
+
+DROP TABLE IF EXISTS `tosca_csar`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tosca_csar` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL,
+ `URL` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module`
+--
+
+DROP TABLE IF EXISTS `vf_module`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `IS_BASE` tinyint(1) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`,`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ KEY `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module__heat_template_art_uuid__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vol_heat_template_art_uuid__heat_template2` FOREIGN KEY (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_customization`
+--
+
+DROP TABLE IF EXISTS `vf_module_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `LABEL` varchar(200) DEFAULT NULL,
+ `INITIAL_COUNT` int(11) DEFAULT '0',
+ `MIN_INSTANCES` int(11) DEFAULT '0',
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_COUNT` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
+ KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization__vol_env__heat_environment2_idx` (`VOL_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization_to_vnf_resource_customization` (`VNF_RESOURCE_CUSTOMIZATION_ID`),
+ KEY `vf_module_customization_model_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vf_module_customization__heat_env__heat_environment1` FOREIGN KEY (`HEAT_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vf_module1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vol_env__heat_environment2` FOREIGN KEY (`VOL_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization_to_vnf_resource_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_to_heat_files`
+--
+
+DROP TABLE IF EXISTS `vf_module_to_heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_to_heat_files` (
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `HEAT_FILES_ARTIFACT_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`VF_MODULE_MODEL_UUID`,`HEAT_FILES_ARTIFACT_UUID`),
+ KEY `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`HEAT_FILES_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` FOREIGN KEY (`HEAT_FILES_ARTIFACT_UUID`) REFERENCES `heat_files` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_to_heat_files__vf_module__model_uuid1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='il fait ce qu''il dit';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components`
+--
+
+DROP TABLE IF EXISTS `vnf_components`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components` (
+ `VNF_ID` int(11) NOT NULL,
+ `COMPONENT_TYPE` varchar(20) NOT NULL,
+ `HEAT_TEMPLATE_ID` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ID` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`VNF_ID`,`COMPONENT_TYPE`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_components_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `VNF_TYPE` varchar(200) DEFAULT NULL,
+ `VNF_COMPONENT_TYPE` varchar(45) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_COMPONENT_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_4dpdwddaaclhc11wxsb7h59ma` (`VF_MODULE_MODEL_UUID`,`VNF_COMPONENT_TYPE`,`ACTION`,`VERSION`)
+) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_ID` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_f3tvqau498vrifq3cr8qnigkr` (`VF_MODULE_ID`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=10015 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource`
+--
+
+DROP TABLE IF EXISTS `vnf_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `AIC_VERSION_MIN` varchar(20) DEFAULT NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_vnf_resource__heat_template1` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vnf_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource_customization`
+--
+
+DROP TABLE IF EXISTS `vnf_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_MAX_COUNT` int(11) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) default null,
+ `CDS_BLUEPRINT_VERSION` varchar(20) default null,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization_to_service` (`SERVICE_MODEL_UUID`),
+ KEY `vnf_resource_customization_mod_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vnf_resource_customization__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnf_resource_customization_to_service` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_instance_group_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ KEY `fk_vnfc_instance_group_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_vnfc_instance_group_customization__instance_group1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnfc_instance_group_customization_vnf_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+set foreign_key_checks=1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `PNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(2000) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 3a29247d6e..9f914c586e 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -79,6 +79,7 @@ import org.onap.so.db.catalog.beans.CollectionResource;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResource;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.HeatEnvironment;
import org.onap.so.db.catalog.beans.HeatFiles;
@@ -101,7 +102,6 @@ import org.onap.so.db.catalog.beans.VfModule;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResource;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository;
@@ -198,9 +198,6 @@ public class ToscaResourceInstaller {
@Autowired
protected VnfResourceRepository vnfRepo;
-
- @Autowired
- protected VnfCustomizationRepository vnfCustomizationRepo;
@Autowired
protected VFModuleRepository vfModuleRepo;
@@ -955,6 +952,19 @@ public class ToscaResourceInstaller {
throw new Exception("Cannot find matching VFModule Customization in Csar for Vf_Modules_Metadata: " + vfMetadata.getVfModuleModelCustomizationUUID());
}
+
+
+ // Check for VNFC Instance Group info and add it if there is
+ List<Group> groupList = toscaResourceStruct.getSdcCsarHelper()
+ .getGroupsOfOriginOfNodeTemplateByToscaGroupType(nodeTemplate,
+ "org.openecomp.groups.VfcInstanceGroup");
+
+ for (Group group : groupList) {
+ VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(nodeTemplate, group, vnfResource, toscaResourceStruct);
+ vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization);
+ }
+
+
service.getVnfCustomizations().add(vnfResource);
} else{
logger.debug("Notification VF ResourceCustomizationUUID: " + vfNotificationResource.getResourceCustomizationUUID() + " doesn't match " +
@@ -1291,6 +1301,7 @@ public class ToscaResourceInstaller {
if(vnfcCustomization==null)
vnfcCustomization = vnfcCustomizationRepo.findOneByModelCustomizationUUID(customizationUUID);
+ //vnfcCustomization = new VnfcCustomization();
return vnfcCustomization;
}
@@ -1638,8 +1649,12 @@ public class ToscaResourceInstaller {
//Populate VNFCInstanceGroupCustomization
VnfcInstanceGroupCustomization vfcInstanceGroupCustom = new VnfcInstanceGroupCustomization();
- vfcInstanceGroupCustom.setModelCustomizationUUID(vnfResourceCustomization.getModelCustomizationUUID());
- vfcInstanceGroupCustom.setModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+ vfcInstanceGroupCustom.setVnfResourceCust(vnfResourceCustomization);
+ vnfResourceCustomization.getVnfcInstanceGroupCustomizations().add(vfcInstanceGroupCustom);
+
+ vfcInstanceGroupCustom.setInstanceGroup(vfcInstanceGroup);
+ vfcInstanceGroup.getVnfcInstanceGroupCustomizations().add(vfcInstanceGroupCustom);
+
vfcInstanceGroupCustom.setDescription(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
String getInputName = null;
@@ -1651,9 +1666,8 @@ public class ToscaResourceInstaller {
}
}
vfcInstanceGroupCustom.setFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vnfcNodeTemplate, getInputName));
-
vfcInstanceGroupCustom.setInstanceGroup(vfcInstanceGroup);
- vfcInstanceGroupCustom.setVnfResourceCust(vnfResourceCustomization);
+
return vfcInstanceGroupCustom;
@@ -1661,18 +1675,20 @@ public class ToscaResourceInstaller {
protected VfModuleCustomization createVFModuleResource(Group group, NodeTemplate vfTemplate,
ToscaResourceStructure toscaResourceStructure, VfResourceStructure vfResourceStructure,
- IVfModuleData vfModuleData, VnfResourceCustomization vnfResource, Service service, Set<CvnfcCustomization> existingCvnfcSet, Set<VnfcCustomization> existingVnfcSet) {
-
+ IVfModuleData vfModuleData, VnfResourceCustomization vnfResource, Service service,
+ Set<CvnfcCustomization> existingCvnfcSet, Set<VnfcCustomization> existingVnfcSet) {
+
VfModuleCustomization vfModuleCustomization = findExistingVfModuleCustomization(vnfResource,
vfModuleData.getVfModuleModelCustomizationUUID());
- if(vfModuleCustomization == null){
+ if (vfModuleCustomization == null) {
VfModule vfModule = findExistingVfModule(vnfResource,
vfTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VFMODULEMODELUUID));
Metadata vfMetadata = group.getMetadata();
- if(vfModule==null)
- vfModule=createVfModule(group, toscaResourceStructure, vfModuleData, vfMetadata);
-
+ if (vfModule == null)
+ vfModule = createVfModule(group, toscaResourceStructure, vfModuleData, vfMetadata);
+
vfModuleCustomization = createVfModuleCustomization(group, toscaResourceStructure, vfModule, vfModuleData);
+ vfModuleCustomization.setVnfCustomization(vnfResource);
setHeatInformationForVfModule(toscaResourceStructure, vfResourceStructure, vfModule, vfModuleCustomization,
vfMetadata);
vfModuleCustomization.setVfModule(vfModule);
@@ -1681,24 +1697,29 @@ public class ToscaResourceInstaller {
} else {
vfResourceStructure.setAlreadyDeployed(true);
}
-
- //******************************************************************************************************************
- //* Extract VFC's and CVFC's then add them to VFModule
- //******************************************************************************************************************
-
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizations = new HashSet<VnfVfmoduleCvnfcConfigurationCustomization>();
+
+ // ******************************************************************************************************************
+ // * Extract VFC's and CVFC's then add them to VFModule
+ // ******************************************************************************************************************
+
+ Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomizations = new HashSet<CvnfcConfigurationCustomization>();
Set<CvnfcCustomization> cvnfcCustomizations = new HashSet<CvnfcCustomization>();
Set<VnfcCustomization> vnfcCustomizations = new HashSet<VnfcCustomization>();
-
- // Only set the CVNFC if this vfModule group is a member of it.
- List<NodeTemplate> groupMembers = toscaResourceStructure.getSdcCsarHelper().getMembersOfVfModule(vfTemplate, group);
+
+ // Only set the CVNFC if this vfModule group is a member of it.
+ List<NodeTemplate> groupMembers = toscaResourceStructure.getSdcCsarHelper().getMembersOfVfModule(vfTemplate,
+ group);
String vfModuleMemberName = null;
-
+
+ for (NodeTemplate node : groupMembers) {
+ vfModuleMemberName = node.getName();
+ }
+
// Extract CVFC lists
- List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfTemplate, SdcTypes.CVFC);
-
- for(NodeTemplate cvfcTemplate : cvfcList) {
-
+ List<NodeTemplate> cvfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfTemplate,
+ SdcTypes.CVFC);
+
+ for (NodeTemplate cvfcTemplate : cvfcList) {
boolean cvnfcVfModuleNameMatch = false;
for(NodeTemplate node : groupMembers){
@@ -1708,127 +1729,142 @@ public class ToscaResourceInstaller {
cvnfcVfModuleNameMatch = true;
break;
}
- }
+ }
if(vfModuleMemberName != null && cvnfcVfModuleNameMatch){
-
- //Extract associated VFC - Should always be just one
- List<NodeTemplate> vfcList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(cvfcTemplate, SdcTypes.VFC);
-
- for(NodeTemplate vfcTemplate : vfcList) {
-
- VnfcCustomization vnfcCustomization = new VnfcCustomization();
- VnfcCustomization existingVnfcCustomization = null;
-
- existingVnfcCustomization = findExistingVfc(existingVnfcSet, vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
-
- if(existingVnfcCustomization == null){
- vnfcCustomization = new VnfcCustomization();
- } else {
- vnfcCustomization = existingVnfcCustomization;
- }
-
- // Only Add Abstract VNFC's to our DB, ignore all others
- if(existingVnfcCustomization == null && vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_SUBCATEGORY).equalsIgnoreCase("Abstract")){
- vnfcCustomization.setModelCustomizationUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- vnfcCustomization.setModelInstanceName(vfcTemplate.getName());
- vnfcCustomization.setModelInvariantUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
- vnfcCustomization.setModelName(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
- vnfcCustomization.setModelUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
-
- vnfcCustomization.setModelVersion(
- testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
- vnfcCustomization.setDescription(
- testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
- vnfcCustomization.setToscaNodeType(testNull(vfcTemplate.getType()));
-
- vnfcCustomizations.add(vnfcCustomization);
- existingVnfcSet.add(vnfcCustomization);
- }
-
- // This check is needed incase the VFC subcategory is something other than Abstract. In that case we want to skip adding that record to our DB.
- if(vnfcCustomization.getModelCustomizationUUID() != null){
-
- CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
-
- cvnfcCustomization = new CvnfcCustomization();
- cvnfcCustomization.setModelCustomizationUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- cvnfcCustomization.setModelInstanceName(cvfcTemplate.getName());
- cvnfcCustomization.setModelInvariantUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
- cvnfcCustomization.setModelName(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
- cvnfcCustomization.setModelUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
-
- cvnfcCustomization.setModelVersion(
- testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
- cvnfcCustomization.setDescription(
- testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
- cvnfcCustomization.setToscaNodeType(testNull(cvfcTemplate.getType()));
-
- if(existingVnfcCustomization != null){
- cvnfcCustomization.setVnfcCustomization(existingVnfcCustomization);
- }else{
- cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
+
+ // Extract associated VFC - Should always be just one
+ List<NodeTemplate> vfcList = toscaResourceStructure.getSdcCsarHelper()
+ .getNodeTemplateBySdcType(cvfcTemplate, SdcTypes.VFC);
+
+ for (NodeTemplate vfcTemplate : vfcList) {
+
+ VnfcCustomization vnfcCustomization = new VnfcCustomization();
+ VnfcCustomization existingVnfcCustomization = null;
+
+ existingVnfcCustomization = findExistingVfc(existingVnfcSet,
+ vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+
+ if (existingVnfcCustomization == null) {
+ vnfcCustomization = new VnfcCustomization();
+ } else {
+ vnfcCustomization = existingVnfcCustomization;
}
-
- cvnfcCustomization.setNfcFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(cvfcTemplate, "nfc_function"));
- cvnfcCustomization.setNfcNamingCode(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(cvfcTemplate, "nfc_naming_code"));
- cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
- cvnfcCustomization.setVnfResourceCustomization(vnfResource);
-
- cvnfcCustomizations.add(cvnfcCustomization);
- existingCvnfcSet.add(cvnfcCustomization);
-
- //*****************************************************************************************************************************************
- //* Extract Fabric Configuration
- //*****************************************************************************************************************************************
-
- List<NodeTemplate> fabricConfigList = toscaResourceStructure.getSdcCsarHelper().getNodeTemplateBySdcType(vfTemplate, SdcTypes.CONFIGURATION);
-
- for(NodeTemplate fabricTemplate : fabricConfigList) {
-
- ConfigurationResource fabricConfig = null;
-
- ConfigurationResource existingConfig = findExistingConfiguration(service, fabricTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
-
- if(existingConfig == null){
-
- fabricConfig = createFabricConfiguration(fabricTemplate, toscaResourceStructure);
-
- }else {
- fabricConfig = existingConfig;
- }
-
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = createVfCnvfConfigCustomization(fabricTemplate, toscaResourceStructure,
- vnfResource, vfModuleCustomization, cvnfcCustomization, fabricConfig, vfTemplate, vfModuleMemberName);
- vnfVfmoduleCvnfcConfigurationCustomizations.add(vnfVfmoduleCvnfcConfigurationCustomization);
- }
- cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizations);
+
+ // Only Add Abstract VNFC's to our DB, ignore all others
+ if (existingVnfcCustomization == null && vfcTemplate.getMetaData()
+ .getValue(SdcPropertyNames.PROPERTY_NAME_SUBCATEGORY).equalsIgnoreCase("Abstract")) {
+ vnfcCustomization.setModelCustomizationUUID(
+ vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+ vnfcCustomization.setModelInstanceName(vfcTemplate.getName());
+ vnfcCustomization.setModelInvariantUUID(
+ vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+ vnfcCustomization
+ .setModelName(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+ vnfcCustomization
+ .setModelUUID(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+
+ vnfcCustomization.setModelVersion(
+ testNull(vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
+ vnfcCustomization.setDescription(testNull(
+ vfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
+ vnfcCustomization.setToscaNodeType(testNull(vfcTemplate.getType()));
+
+ vnfcCustomizations.add(vnfcCustomization);
+ existingVnfcSet.add(vnfcCustomization);
+ }
+
+ // This check is needed incase the VFC subcategory is
+ // something other than Abstract. In that case we want to
+ // skip adding that record to our DB.
+ if (vnfcCustomization.getModelCustomizationUUID() != null) {
+ CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
+ cvnfcCustomization.setModelCustomizationUUID(
+ cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+ cvnfcCustomization.setModelInstanceName(cvfcTemplate.getName());
+ cvnfcCustomization.setModelInvariantUUID(
+ cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+ cvnfcCustomization
+ .setModelName(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+ cvnfcCustomization
+ .setModelUUID(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+
+ cvnfcCustomization.setModelVersion(
+ testNull(cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
+ cvnfcCustomization.setDescription(testNull(
+ cvfcTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
+ cvnfcCustomization.setToscaNodeType(testNull(cvfcTemplate.getType()));
+
+ if (existingVnfcCustomization != null) {
+ cvnfcCustomization.setVnfcCustomization(existingVnfcCustomization);
+ } else {
+ cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
+ }
+
+ cvnfcCustomization.setNfcFunction(toscaResourceStructure.getSdcCsarHelper()
+ .getNodeTemplatePropertyLeafValue(cvfcTemplate, "nfc_function"));
+ cvnfcCustomization.setNfcNamingCode(toscaResourceStructure.getSdcCsarHelper()
+ .getNodeTemplatePropertyLeafValue(cvfcTemplate, "nfc_naming_code"));
+ cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
+
+ cvnfcCustomizations.add(cvnfcCustomization);
+ existingCvnfcSet.add(cvnfcCustomization);
+
+ // *****************************************************************************************************************************************
+ // * Extract Fabric Configuration
+ // *****************************************************************************************************************************************
+
+ List<NodeTemplate> fabricConfigList = toscaResourceStructure.getSdcCsarHelper()
+ .getNodeTemplateBySdcType(vfTemplate, SdcTypes.CONFIGURATION);
+
+ for (NodeTemplate fabricTemplate : fabricConfigList) {
+
+ ConfigurationResource fabricConfig = null;
+
+ ConfigurationResource existingConfig = findExistingConfiguration(service,
+ fabricTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+
+ if (existingConfig == null) {
+
+ fabricConfig = createFabricConfiguration(fabricTemplate, toscaResourceStructure);
+
+ } else {
+ fabricConfig = existingConfig;
+ }
+
+ CvnfcConfigurationCustomization cvnfcConfigurationCustomization = createCvnfcConfigurationCustomization(
+ fabricTemplate, toscaResourceStructure, vnfResource, vfModuleCustomization,
+ cvnfcCustomization, fabricConfig, vfTemplate, vfModuleMemberName);
+ cvnfcConfigurationCustomizations.add(cvnfcConfigurationCustomization);
+
+ fabricConfig.setCvnfcConfigurationCustomization(cvnfcConfigurationCustomizations);
+ }
+ cvnfcCustomization.setCvnfcConfigurationCustomization(cvnfcConfigurationCustomizations);
+ }
+
+ }
+
}
-
- }
-
- }
- }
+ }
vfModuleCustomization.setCvnfcCustomization(cvnfcCustomizations);
- vfModuleCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizations);
-
+
return vfModuleCustomization;
}
- protected VnfVfmoduleCvnfcConfigurationCustomization createVfCnvfConfigCustomization(NodeTemplate fabricTemplate, ToscaResourceStructure toscaResourceStruct,
- VnfResourceCustomization vnfResource, VfModuleCustomization vfModuleCustomization, CvnfcCustomization cvnfcCustomization,
- ConfigurationResource configResource, NodeTemplate vfTemplate, String vfModuleMemberName) {
+ protected CvnfcConfigurationCustomization createCvnfcConfigurationCustomization(NodeTemplate fabricTemplate, ToscaResourceStructure toscaResourceStruct,
+ VnfResourceCustomization vnfResource, VfModuleCustomization vfModuleCustomization, CvnfcCustomization cvnfcCustomization,
+ ConfigurationResource configResource, NodeTemplate vfTemplate, String vfModuleMemberName) {
Metadata fabricMetadata = fabricTemplate.getMetaData();
- VnfVfmoduleCvnfcConfigurationCustomization vfModuleToCvnfc = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization cvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
+
+ cvnfcConfigurationCustomization.setConfigurationResource(configResource);
- vfModuleToCvnfc.setConfigurationResource(configResource);
- vfModuleToCvnfc.setCvnfcCustomization(cvnfcCustomization);
- vfModuleToCvnfc.setModelCustomizationUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- vfModuleToCvnfc.setModelInstanceName(fabricTemplate.getName());
- vfModuleToCvnfc.setVfModuleCustomization(vfModuleCustomization);
- vfModuleToCvnfc.setVnfResourceCustomization(vnfResource);
+ cvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization);
+
+ cvnfcConfigurationCustomization.setModelCustomizationUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+ cvnfcConfigurationCustomization.setModelInstanceName(fabricTemplate.getName());
List<Policy> policyList = toscaResourceStruct.getSdcCsarHelper().getPoliciesOfOriginOfNodeTemplateByToscaPolicyType(vfTemplate, "org.openecomp.policies.External");
@@ -1842,18 +1878,18 @@ public class ToscaResourceInstaller {
Map<String, Object> propMap = policy.getPolicyProperties();
if(propMap.get("type").toString().equalsIgnoreCase("Fabric Policy")){
- vfModuleToCvnfc.setPolicyName(propMap.get("name").toString());
+ cvnfcConfigurationCustomization.setPolicyName(propMap.get("name").toString());
}
}
}
}
}
- vfModuleToCvnfc.setConfigurationFunction(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "function"));
- vfModuleToCvnfc.setConfigurationRole(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "role"));
- vfModuleToCvnfc.setConfigurationType(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "type"));
+ cvnfcConfigurationCustomization.setConfigurationFunction(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "function"));
+ cvnfcConfigurationCustomization.setConfigurationRole(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "role"));
+ cvnfcConfigurationCustomization.setConfigurationType(toscaResourceStruct.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(fabricTemplate, "type"));
- return vfModuleToCvnfc;
+ return cvnfcConfigurationCustomization;
}
protected ConfigurationResource findExistingConfiguration(Service service, String modelUUID) {
@@ -1864,8 +1900,6 @@ public class ToscaResourceInstaller {
configResource = configurationResourceCustom.getConfigurationResource();
}
}
- if(configResource==null)
- configResource = configRepo.findResourceByModelUUID(modelUUID);
return configResource;
}
@@ -1878,10 +1912,6 @@ public class ToscaResourceInstaller {
vfModuleCustomization = vfModuleCustom;
}
}
- if(vfModuleCustomization==null)
- vfModuleCustomization = vfModuleCustomizationRepo
- .findByModelCustomizationUUID(vfModuleModelCustomizationUUID);
-
return vfModuleCustomization;
}
@@ -2064,9 +2094,8 @@ public class ToscaResourceInstaller {
protected VnfResourceCustomization createVnfResource(NodeTemplate vfNodeTemplate,
ToscaResourceStructure toscaResourceStructure, Service service) {
- VnfResourceCustomization vnfResourceCustomization = vnfCustomizationRepo.findOneByModelCustomizationUUID(
- vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
- if(vnfResourceCustomization == null){
+ VnfResourceCustomization vnfResourceCustomization = null;
+ if(vnfResourceCustomization == null){
VnfResource vnfResource = findExistingVnfResource(service,
vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
@@ -2076,19 +2105,9 @@ public class ToscaResourceInstaller {
vnfResourceCustomization = createVnfResourceCustomization(vfNodeTemplate, toscaResourceStructure,
vnfResource);
vnfResourceCustomization.setVnfResources(vnfResource);
+ vnfResourceCustomization.setService(service);
vnfResource.getVnfResourceCustomizations().add(vnfResourceCustomization);
- // Fetch VNFC Instance Group Info
- List<Group> groupList = toscaResourceStructure.getSdcCsarHelper()
- .getGroupsOfOriginOfNodeTemplateByToscaGroupType(vfNodeTemplate,
- "org.openecomp.groups.VfcInstanceGroup");
-
- for (Group group : groupList) {
-
- VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = createVNFCInstanceGroup(vfNodeTemplate, group, vnfResourceCustomization, toscaResourceStructure);
-
- vnfcInstanceGroupCustomizationRepo.saveAndFlush(vnfcInstanceGroupCustomization);
- }
}
return vnfResourceCustomization;
}
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
index 03d0a0ff1e..301ef14637 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
@@ -29,6 +29,7 @@ import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Optional;
import java.util.UUID;
import javax.persistence.EntityNotFoundException;
@@ -387,8 +388,8 @@ public class ASDCControllerITTest extends BaseTest {
* global metadata in the resource-Testservice140-template.yml
*/
String vnfCustomizationKey = "ca1c8455-8ce2-4a76-a037-3f4cf01cffa0";
- VnfResourceCustomization vnfCustomization = vnfCustomizationRepository
- .findById(vnfCustomizationKey).orElseThrow(
+ VnfResourceCustomization vnfCustomization = Optional.ofNullable(vnfCustomizationRepository
+ .findOneByModelCustomizationUUID(vnfCustomizationKey)).orElseThrow(
() -> new EntityNotFoundException(
"VNF resource customization: " + vnfCustomizationKey + " not found"));
assertEquals("model customizationUUID", vnfCustomizationKey, vnfCustomization.getModelCustomizationUUID());
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index 1035817c3c..ec8e25dd13 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -2,842 +2,1174 @@
--------START Catalog DB SCHEMA --------
use catalogdb;
-create table `allotted_resource` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) default null,
- `subcategory` varchar(200) default null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `allotted_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `providing_service_model_uuid` varchar(200) default null,
- `providing_service_model_invariant_uuid` varchar(200) default null,
- `providing_service_model_name` varchar(200) default null,
- `target_network_role` varchar(200) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `ar_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_customization_uuid`),
- key `fk_allotted_resource_customization__allotted_resource1_idx` (`ar_model_uuid`),
- constraint `fk_allotted_resource_customization__allotted_resource1` foreign key (`ar_model_uuid`) references `allotted_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_environment` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(100) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_files` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `timeout_minutes` int(11) default null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_nested_template` (
- `parent_heat_template_uuid` varchar(200) not null,
- `child_heat_template_uuid` varchar(200) not null,
- `provider_resource_file` varchar(100) default null,
- primary key (`parent_heat_template_uuid`,`child_heat_template_uuid`),
- key `fk_heat_nested_template__heat_template2_idx` (`child_heat_template_uuid`),
- constraint `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` foreign key (`child_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` foreign key (`parent_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template_params` (
- `heat_template_artifact_uuid` varchar(200) not null,
- `param_name` varchar(100) not null,
- `is_required` bit(1) not null,
- `param_type` varchar(20) default null,
- `param_alias` varchar(45) default null,
- primary key (`heat_template_artifact_uuid`,`param_name`),
- constraint `fk_heat_template_params__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_recipe` (
- `id` int(11) not null auto_increment,
- `model_name` varchar(20) not null,
- `action` varchar(50) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `network_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_type` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `version_str` varchar(20) not null,
- primary key (`id`),
- unique key `uk_rl4f296i0p8lyokxveaiwkayi` (`model_name`,`action`,`version_str`)
-) engine=innodb auto_increment=178 default charset=latin1;
-
-
-
-
-create table `temp_network_heat_template_lookup` (
- `network_resource_model_name` varchar(200) not null,
- `heat_template_artifact_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) not null,
- `aic_version_max` varchar(20) default null,
- primary key (`network_resource_model_name`),
- key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_temp_network_heat_template_lookup__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_resource` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) null,
- `neutron_network_type` varchar(20) default null,
- `model_version` varchar(20) default null,
- `tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) null,
- `aic_version_max` varchar(20) default null,
- `orchestration_mode` varchar(20) default 'heat',
- `resource_category` varchar(20) default null,
- `resource_sub_category` varchar(20) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`),
- key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
- key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `network_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `network_technology` varchar(45) default null,
- `network_type` varchar(45) default null,
- `network_role` varchar(200) default null,
- `network_scope` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `network_resource_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- primary key (`model_customization_uuid`),
- key `fk_network_resource_customization__network_resource1_idx` (`network_resource_model_uuid`),
- constraint `fk_network_resource_customization__network_resource1` foreign key (`network_resource_model_uuid`) references `network_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `tosca_csar` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `artifact_checksum` varchar(200) not null,
- `url` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `service` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `tosca_csar_artifact_uuid` varchar(200) default null,
- `service_type` varchar(200) default null,
- `service_role` varchar(200) default null,
- `environment_context` varchar(200) default null,
- `workload_context` varchar(200) default null,
- `service_category` varchar(200) default null,
- `resource_order` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_service__tosca_csar1_idx` (`tosca_csar_artifact_uuid`),
- constraint `fk_service__tosca_csar1` foreign key (`tosca_csar_artifact_uuid`) references `tosca_csar` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `service_recipe` (
- `id` int(11) not null auto_increment,
- `action` varchar(50) not null,
- `version_str` varchar(20) default null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `service_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_timeout_interim` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `service_model_uuid` varchar(200) not null,
- primary key (`id`),
- unique key `uk_7fav5dkux2v8g9d2i5ymudlgc` (`service_model_uuid`,`action`),
- key `fk_service_recipe__service1_idx` (`service_model_uuid`),
- constraint `fk_service_recipe__service1` foreign key (`service_model_uuid`) references `service` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb auto_increment=86 default charset=latin1;
-
-
-
-create table `vnf_resource` (
- `orchestration_mode` varchar(20) not null default 'heat',
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `model_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) default null,
- `aic_version_max` varchar(20) default null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) default null,
- `tosca_node_type` varchar(200) default null,
- `resource_category` varchar(200) default null,
- `resource_sub_category` varchar(200) default null,
- `heat_template_artifact_uuid` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_vnf_resource__heat_template1` (`heat_template_artifact_uuid`),
- constraint `fk_vnf_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vf_module` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) default null,
- `is_base` int(11) not null,
- `heat_template_artifact_uuid` varchar(200) default null,
- `vol_heat_template_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- primary key (`model_uuid`,`vnf_resource_model_uuid`),
- key `fk_vf_module__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- key `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`heat_template_artifact_uuid`),
- key `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`vol_heat_template_artifact_uuid`),
- constraint `fk_vf_module__heat_template_art_uuid__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vol_heat_template_art_uuid__heat_template2` foreign key (`vol_heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_customization` (
- `model_customization_uuid` varchar(200) not null,
- `label` varchar(200) default null,
- `initial_count` int(11) default '0',
- `min_instances` int(11) default '0',
- `max_instances` int(11) default null,
- `availability_zone_count` int(11) default null,
- `heat_environment_artifact_uuid` varchar(200) default null,
- `vol_environment_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vf_module_model_uuid` varchar(200) not null,
- primary key (`model_customization_uuid`),
- key `fk_vf_module_customization__vf_module1_idx` (`vf_module_model_uuid`),
- key `fk_vf_module_customization__heat_env__heat_environment1_idx` (`heat_environment_artifact_uuid`),
- key `fk_vf_module_customization__vol_env__heat_environment2_idx` (`vol_environment_artifact_uuid`),
- constraint `fk_vf_module_customization__heat_env__heat_environment1` foreign key (`heat_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vf_module1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vol_env__heat_environment2` foreign key (`vol_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vf_module_to_heat_files`
---
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_to_heat_files` (
- `vf_module_model_uuid` varchar(200) not null,
- `heat_files_artifact_uuid` varchar(200) not null,
- primary key (`vf_module_model_uuid`,`heat_files_artifact_uuid`),
- key `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`heat_files_artifact_uuid`),
- constraint `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` foreign key (`heat_files_artifact_uuid`) references `heat_files` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_to_heat_files__vf_module__model_uuid1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1 comment='il fait ce qu''il dit';
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vnf_components`
---
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vnf_components` (
- `vnf_id` int(11) not null,
- `component_type` varchar(20) not null,
- `heat_template_id` int(11) default null,
- `heat_environment_id` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_id`,`component_type`)
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vnf_components_recipe`
---
-
-
-
-create table `vnf_components_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `vnf_component_type` varchar(45) not null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_component_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_model_uuid` varchar(200) default null,
- primary key (`id`),
- unique key `uk_4dpdwddaaclhc11wxsb7h59ma` (`vf_module_model_uuid`,`vnf_component_type`,`action`,`version`)
-) engine=innodb auto_increment=26 default charset=latin1;
-
-
-
-
-create table `vnf_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version_str` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_id` varchar(100) default null,
- primary key (`id`),
- unique key `uk_f3tvqau498vrifq3cr8qnigkr` (`vf_module_id`,`action`,`version_str`)
-) engine=innodb auto_increment=10006 default charset=latin1;
-
-
-
-
-
-
-
-
-create table `vnf_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `availability_zone_max_count` int(11) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- `multi_stage_design` varchar(20) default null,
- `resource_input` varchar(20000) default null,
- `cds_blueprint_name` varchar(200) default null,
- `cds_blueprint_version` varchar(20) default null,
- primary key (`model_customization_uuid`),
- key `fk_vnf_resource_customization__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- constraint `fk_vnf_resource_customization__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vnf_res_custom_to_vf_module_custom` (
- `vnf_resource_cust_model_customization_uuid` varchar(200) not null,
- `vf_module_cust_model_customization_uuid` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_cust_model_customization_uuid`,`vf_module_cust_model_customization_uuid`),
- key `fk_vnf_res_custom_to_vf_module_custom__vf_module_customizat_idx` (`vf_module_cust_model_customization_uuid`),
- constraint `fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1` foreign key (`vf_module_cust_model_customization_uuid`) references `vf_module_customization` (`model_customization_uuid`) on delete cascade on update cascade,
- constraint `fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1` foreign key (`vnf_resource_cust_model_customization_uuid`) references `vnf_resource_customization` (`model_customization_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-create table if not exists external_service_to_internal_model_mapping (
-id int(11) not null auto_increment,
-service_name varchar(200) not null,
-product_flavor varchar(200) null,
-subscription_service_type varchar(200) not null,
-service_model_uuid varchar(200) not null,
-primary key (id),
-unique index uk_external_service_to_internal_model_mapping
-(service_name asc, product_flavor asc, service_model_uuid asc));
-
-create table if not exists `collection_resource` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) not null,
- description varchar(200),
- creation_timestamp datetime not null default current_timestamp,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_customization` (
- model_customization_uuid varchar(200) not null,
- model_instance_name varchar(200) not null,
- role varchar(200) NULL,
- object_type varchar(200) not null,
- function varchar(200) NULL,
- collection_resource_type varchar(200) NULL,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- primary key (`model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `instance_group` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) NULL,
- role varchar(200) not null,
- object_type varchar(200) not null,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) NULL,
- instance_group_type varchar(200) not null,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_instance_group_customization` (
- `collection_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `subinterface_network_quantity` int(11) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`collection_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_collection_resource_instance_group_customization__instan_idx` (`instance_group_model_uuid` asc),
- constraint `fk_collection_resource_instance_group_customization__collecti1`
- foreign key (`collection_resource_customization_model_uuid`)
- references `collection_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_collection_resource_instance_group_customization__instance1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
-create table if not exists `vnfc_instance_group_customization` (
- `vnf_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_vnfc_instance_group_customization__instance_group1_idx` (`instance_group_model_uuid` asc),
- constraint `fk_vnfc_instance_group_customization__vnf_resource_customizat1`
- foreign key (`vnf_resource_customization_model_uuid`)
- references `vnf_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_vnfc_instance_group_customization__instance_group1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
- create table if not exists `configuration`
- ( `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
-CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `MODEL_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
- `MODEL_VERSION` VARCHAR(20) NOT NULL,
- `MODEL_NAME` VARCHAR(200) NOT NULL,
- `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
- `DESCRIPTION` VARCHAR(1200) NULL,
- `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+set foreign_key_checks=0;
+DROP TABLE IF EXISTS `allotted_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `SUBCATEGORY` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `PROVIDING_SERVICE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TARGET_NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `AR_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_allotted_resource_customization__allotted_resource1_idx` (`AR_MODEL_UUID`),
+ CONSTRAINT `fk_allotted_resource_customization__allotted_resource1` FOREIGN KEY (`AR_MODEL_UUID`) REFERENCES `allotted_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `allotted_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `ar_recipe`
+--
+
+DROP TABLE IF EXISTS `ar_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ar_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `VERSION_STR` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(200) NOT NULL,
+ `AR_PARAM_XSD` varchar(200) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk_ar_recipe` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `building_block_detail`
+--
+
+DROP TABLE IF EXISTS `building_block_detail`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `building_block_detail` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `BUILDING_BLOCK_NAME` varchar(200) NOT NULL,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_building_block_name` (`BUILDING_BLOCK_NAME`)
+) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloud_sites`
+--
+
+DROP TABLE IF EXISTS `cloud_sites`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloud_sites` (
+ `ID` varchar(50) NOT NULL,
+ `REGION_ID` varchar(11) DEFAULT NULL,
+ `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
+ `CLOUD_VERSION` varchar(20) DEFAULT NULL,
+ `CLLI` varchar(11) DEFAULT NULL,
+ `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
+ `PLATFORM` varchar(50) DEFAULT NULL,
+ `ORCHESTRATOR` varchar(50) DEFAULT NULL,
+ `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
+ CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloudify_managers`
+--
+
+DROP TABLE IF EXISTS `cloudify_managers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloudify_managers` (
+ `ID` varchar(50) NOT NULL,
+ `CLOUDIFY_URL` varchar(200) DEFAULT NULL,
+ `USERNAME` varchar(255) DEFAULT NULL,
+ `PASSWORD` varchar(255) DEFAULT NULL,
+ `VERSION` varchar(20) DEFAULT NULL,
+ `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `CRC_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`,`CRC_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_collection_net_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ KEY `fk_collection_net_resource_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_col_net_res_customization__collection_res_customization_idx` (`CRC_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_collection_net_resource_customization__instance_group10` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_net_resource_customization__network_resource10` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_network_resource_customization__collection_reso1` FOREIGN KEY (`CRC_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource`
+--
+
+DROP TABLE IF EXISTS `collection_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `role` varchar(200) DEFAULT NULL,
+ `object_type` varchar(200) NOT NULL,
+ `function` varchar(200) DEFAULT NULL,
+ `collection_resource_type` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`),
+ CONSTRAINT `collection_resource_customization_ibfk_1` FOREIGN KEY (`CR_MODEL_UUID`) REFERENCES `collection_resource` (`MODEL_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_instance_group_customization` (
+ `COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SUBINTERFACE_NETWORK_QUANTITY` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`,`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_collection_resource_instance_group_customization__instan_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_collection_resource_instance_group_customization__collecti1` FOREIGN KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_resource_instance_group_customization__instance1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration`
+--
+
+DROP TABLE IF EXISTS `configuration`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization`
+--
+
+DROP TABLE IF EXISTS `configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ KEY `fk_configuration_customization__service_proxy_customization_idx` (`SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_customization_idx` (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_configuration_customization__configuration_customization1` FOREIGN KEY (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`) REFERENCES `configuration_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_configuration_resource_customization__configuration_resour1` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `configuration_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `controller_selection_reference`
+--
+
+DROP TABLE IF EXISTS `controller_selection_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `controller_selection_reference` (
+ `VNF_TYPE` varchar(50) NOT NULL,
+ `CONTROLLER_NAME` varchar(100) NOT NULL,
+ `ACTION_CATEGORY` varchar(15) NOT NULL,
+ PRIMARY KEY (`VNF_TYPE`,`CONTROLLER_NAME`,`ACTION_CATEGORY`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_configuration_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_configuration_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `POLICY_NAME` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `CVNFC_CUSTOMIZATION_ID` int(11) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `NFC_FUNCTION` varchar(200) DEFAULT NULL,
+ `NFC_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `VF_MODULE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization_to_vf_module_resource_customization` (`VF_MODULE_CUSTOMIZATION_ID`),
+ CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_cvnfc_customization_to_vf_module_resource_customization` FOREIGN KEY (`VF_MODULE_CUSTOMIZATION_ID`) REFERENCES `vf_module_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `external_service_to_internal_model_mapping`
+--
+
+DROP TABLE IF EXISTS `external_service_to_internal_model_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `external_service_to_internal_model_mapping` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `SERVICE_NAME` varchar(200) NOT NULL,
+ `PRODUCT_FLAVOR` varchar(200) DEFAULT NULL,
+ `SUBSCRIPTION_SERVICE_TYPE` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_external_service_to_internal_model_mapping` (`SERVICE_NAME`,`PRODUCT_FLAVOR`,`SERVICE_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `flyway_schema_history`
+--
+
+DROP TABLE IF EXISTS `flyway_schema_history`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `flyway_schema_history` (
+ `installed_rank` int(11) NOT NULL,
+ `version` varchar(50) DEFAULT NULL,
+ `description` varchar(200) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `script` varchar(1000) NOT NULL,
+ `checksum` int(11) DEFAULT NULL,
+ `installed_by` varchar(100) NOT NULL,
+ `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `execution_time` int(11) NOT NULL,
+ `success` tinyint(1) NOT NULL,
+ PRIMARY KEY (`installed_rank`),
+ KEY `flyway_schema_history_s_idx` (`success`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_environment`
+--
+
+DROP TABLE IF EXISTS `heat_environment`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_environment` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(100) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_files`
+--
+
+DROP TABLE IF EXISTS `heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_files` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_nested_template`
+--
+
+DROP TABLE IF EXISTS `heat_nested_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_nested_template` (
+ `PARENT_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `CHILD_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `PROVIDER_RESOURCE_FILE` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`PARENT_HEAT_TEMPLATE_UUID`,`CHILD_HEAT_TEMPLATE_UUID`),
+ KEY `fk_heat_nested_template__heat_template2_idx` (`CHILD_HEAT_TEMPLATE_UUID`),
+ CONSTRAINT `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` FOREIGN KEY (`CHILD_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` FOREIGN KEY (`PARENT_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template`
+--
+
+DROP TABLE IF EXISTS `heat_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `TIMEOUT_MINUTES` int(11) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template_params`
+--
+
+DROP TABLE IF EXISTS `heat_template_params`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template_params` (
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NOT NULL,
+ `PARAM_NAME` varchar(100) NOT NULL,
+ `IS_REQUIRED` bit(1) NOT NULL,
+ `PARAM_TYPE` varchar(20) DEFAULT NULL,
+ `PARAM_ALIAS` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`,`PARAM_NAME`),
+ CONSTRAINT `fk_heat_template_params__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `identity_services`
+--
+
+DROP TABLE IF EXISTS `identity_services`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `identity_services` (
+ `ID` varchar(50) NOT NULL,
+ `IDENTITY_URL` varchar(200) DEFAULT NULL,
+ `MSO_ID` varchar(255) DEFAULT NULL,
+ `MSO_PASS` varchar(255) DEFAULT NULL,
+ `ADMIN_TENANT` varchar(50) DEFAULT NULL,
+ `MEMBER_ROLE` varchar(50) DEFAULT NULL,
+ `TENANT_METADATA` tinyint(1) DEFAULT '0',
+ `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
+ `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
+ `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `instance_group`
+--
+
+DROP TABLE IF EXISTS `instance_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `instance_group` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `ROLE` varchar(200) NOT NULL,
+ `OBJECT_TYPE` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `INSTANCE_GROUP_TYPE` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model`
+--
+
+DROP TABLE IF EXISTS `model`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_ID` varchar(40) DEFAULT NULL,
+ `MODEL_CUSTOMIZATION_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_INVARIANT_ID` varchar(40) DEFAULT NULL,
+ `MODEL_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION_ID` varchar(40) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RECIPE` int(11) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk1_model` (`MODEL_TYPE`,`MODEL_VERSION_ID`),
+ KEY `RECIPE` (`RECIPE`),
+ CONSTRAINT `model_ibfk_1` FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model_recipe`
+--
+
+DROP TABLE IF EXISTS `model_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_ID` int(11) DEFAULT NULL,
+ `ACTION` varchar(40) DEFAULT NULL,
+ `SCHEMA_VERSION` varchar(40) DEFAULT NULL,
+ `DESCRIPTION` varchar(40) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(20) DEFAULT NULL,
+ `MODEL_PARAM_XSD` varchar(20) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk1_model_recipe` (`MODEL_ID`,`ACTION`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_recipe`
+--
+
+DROP TABLE IF EXISTS `network_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(20) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `NETWORK_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_rl4f296i0p8lyokxveaiwkayi` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource`
+--
+
+DROP TABLE IF EXISTS `network_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `NEUTRON_NETWORK_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `ORCHESTRATION_MODE` varchar(20) DEFAULT 'HEAT',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_network_resource__temp_network_heat_template_lookup1_idx` (`MODEL_NAME`),
+ KEY `fk_network_resource__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_network_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE,
+ CONSTRAINT `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` FOREIGN KEY (`MODEL_NAME`) REFERENCES `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
- INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
- UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_service_proxy_resource_customization__service1`
- FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
- REFERENCES `service` (`MODEL_UUID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE)
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-create table if not exists `configuration_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`configuration_type` varchar(200) null,
-`configuration_role` varchar(200) null,
-`configuration_function` varchar(200) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`configuration_model_uuid` varchar(200) not null,
-`service_proxy_customization_model_customization_uuid` varchar(200) null,
-`configuration_customization_model_customization_uuid` varchar(200) null,
-primary key (`model_customization_uuid`),
-index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__configuration_customization_idx`
-(`configuration_customization_model_customization_uuid` asc),
-constraint `fk_configuration_resource_customization__configuration_resour1`
-foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_configuration_customization__configuration_customization1`
-foreign key (`configuration_customization_model_customization_uuid`) references
-`configuration_customization` (`model_customization_uuid`)
-on delete cascade on update cascade)
-engine = innodb
-auto_increment =20654
-default character set = latin1;
-
-
-create table `service_proxy_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `configuration_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table if not exists `collection_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `network_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `vnf_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `allotted_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-
-
-create table ar_recipe (
- ID INT(11) not null auto_increment,
- MODEL_NAME VARCHAR(200) NOT NULL,
- `ACTION` VARCHAR(200) NOT NULL,
- VERSION_STR VARCHAR(200) NOT NULL,
- SERVICE_TYPE VARCHAR(200),
- DESCRIPTION VARCHAR(200),
- ORCHESTRATION_URI VARCHAR(200) NOT NULL,
- AR_PARAM_XSD VARCHAR(200),
- RECIPE_TIMEOUT INT(10),
- CREATION_TIMESTAMP DATETIME NOT NULL default current_timestamp,
- primary key (ID),
- unique key `uk_ar_recipe` (`model_name`,`action`,`version_str`)
+ KEY `fk_network_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_network_resource_customization__network_resource1` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `network_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `network_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `network_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `northbound_request_ref_lookup`
+--
+
+DROP TABLE IF EXISTS `northbound_request_ref_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `northbound_request_ref_lookup` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `REQUEST_SCOPE` varchar(200) NOT NULL,
+ `MACRO_ACTION` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `IS_ALACARTE` tinyint(1) NOT NULL DEFAULT '0',
+ `MIN_API_VERSION` double NOT NULL,
+ `MAX_API_VERSION` double DEFAULT NULL,
+ `IS_TOPLEVELFLOW` tinyint(1) DEFAULT NULL,
+ `CLOUD_OWNER` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_northbound_request_ref_lookup` (`MIN_API_VERSION`,`REQUEST_SCOPE`,`ACTION`,`IS_ALACARTE`,`MACRO_ACTION`,`CLOUD_OWNER`)
+) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_flow_reference`
+--
+
+DROP TABLE IF EXISTS `orchestration_flow_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_flow_reference` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `COMPOSITE_ACTION` varchar(200) NOT NULL,
+ `SEQ_NO` int(11) NOT NULL,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `FLOW_VERSION` double NOT NULL,
+ `NB_REQ_REF_LOOKUP_ID` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_flow_reference` (`COMPOSITE_ACTION`,`FLOW_NAME`,`SEQ_NO`,`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__building_block_detail` (`FLOW_NAME`),
+ CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1` FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=398 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_status_state_transition_directive`
+--
+
+DROP TABLE IF EXISTS `orchestration_status_state_transition_directive`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_status_state_transition_directive` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `ORCHESTRATION_STATUS` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ `FLOW_DIRECTIVE` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_status_state_transition_directive` (`RESOURCE_TYPE`,`ORCHESTRATION_STATUS`,`TARGET_ACTION`)
+) ENGINE=InnoDB AUTO_INCREMENT=686 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `rainy_day_handler_macro`
+--
+
+DROP TABLE IF EXISTS `rainy_day_handler_macro`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `rainy_day_handler_macro` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) NOT NULL,
+ `VNF_TYPE` varchar(200) NOT NULL,
+ `ERROR_CODE` varchar(200) NOT NULL,
+ `WORK_STEP` varchar(200) NOT NULL,
+ `POLICY` varchar(200) NOT NULL,
+ `SECONDARY_POLICY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service`
+--
+
+DROP TABLE IF EXISTS `service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `TOSCA_CSAR_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `SERVICE_ROLE` varchar(200) DEFAULT NULL,
+ `ENVIRONMENT_CONTEXT` varchar(200) DEFAULT NULL,
+ `WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
+ `SERVICE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_ORDER` varchar(200) default NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
+ CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SOURCE_SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1` FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_recipe`
+--
+
+DROP TABLE IF EXISTS `service_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ACTION` varchar(50) NOT NULL,
+ `VERSION_STR` varchar(20) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `SERVICE_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TIMEOUT_INTERIM` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_7fav5dkux2v8g9d2i5ymudlgc` (`SERVICE_MODEL_UUID`,`ACTION`),
+ KEY `fk_service_recipe__service1_idx` (`SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_recipe__service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `temp_network_heat_template_lookup`
+--
+
+DROP TABLE IF EXISTS `temp_network_heat_template_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `temp_network_heat_template_lookup` (
+ `NETWORK_RESOURCE_MODEL_NAME` varchar(200) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`NETWORK_RESOURCE_MODEL_NAME`),
+ KEY `fk_temp_network_heat_template_lookup__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_temp_network_heat_template_lookup__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
-alter table collection_resource_customization
-add foreign key ( cr_model_uuid)
-references collection_resource(model_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-alter table network_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-
-alter table network_resource_customization
-add foreign key ( instance_group_model_uuid)
-references instance_group(model_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table vnf_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references network_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references vnf_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references allotted_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references collection_resource_customization(model_customization_uuid)
-on delete cascade;
-
-
-create table if not exists `collection_network_resource_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`network_technology` varchar(45) null,
-`network_type` varchar(45) null,
-`network_role` varchar(200) null,
-`network_scope` varchar(45) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`network_resource_model_uuid` varchar(200) not null, `instance_group_model_uuid` varchar(200) null,
-`crc_model_customization_uuid` varchar(200) not null, primary key
-(`model_customization_uuid`, `crc_model_customization_uuid`),
-index `fk_collection_net_resource_customization__network_resource1_idx`
-(`network_resource_model_uuid` asc), index
-`fk_collection_net_resource_customization__instance_group1_idx`
-(`instance_group_model_uuid` asc), index
-`fk_col_net_res_customization__collection_res_customization_idx`
-(`crc_model_customization_uuid` asc), constraint
-`fk_collection_net_resource_customization__network_resource10` foreign
-key (`network_resource_model_uuid`) references
-`network_resource` (`model_uuid`) on delete cascade on
-update cascade, constraint
-`fk_collection_net_resource_customization__instance_group10` foreign key
-(`instance_group_model_uuid`) references `instance_group`
-(`model_uuid`) on delete cascade on update cascade, constraint
-`fk_collection_network_resource_customization__collection_reso1` foreign
-key (`crc_model_customization_uuid`) references
-`collection_resource_customization`
-(`model_customization_uuid`) on delete cascade on update cascade) engine
-= innodb default character set = latin1;
-
-CREATE TABLE IF NOT EXISTS `rainy_day_handler_macro` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`SERVICE_TYPE` VARCHAR(200) NOT NULL,
-`VNF_TYPE` VARCHAR(200) NOT NULL,
-`ERROR_CODE` VARCHAR(200) NOT NULL,
-`WORK_STEP` VARCHAR(200) NOT NULL,
-`POLICY` VARCHAR(200) NOT NULL,
-PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
-`ACTION` VARCHAR(200) NOT NULL,
-`MACRO_ACTION` VARCHAR(200) NOT NULL,
-`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
-`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 0,
-`MIN_API_VERSION` DOUBLE NOT NULL,
-`MAX_API_VERSION` DOUBLE NULL,
-PRIMARY KEY (`id`),
-UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `orchestration_flow_reference` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`COMPOSITE_ACTION` VARCHAR(200) NOT NULL,
-`SEQ_NO` INT(11) NOT NULL,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`FLOW_VERSION` DOUBLE NOT NULL,
-`NB_REQ_REF_LOOKUP_ID` INT(11) NOT NULL,
-PRIMARY KEY (`id`),
-INDEX `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID` ASC),
-UNIQUE INDEX `UK_orchestration_flow_reference` (`COMPOSITE_ACTION` ASC, `FLOW_NAME` ASC, `SEQ_NO` ASC, `NB_REQ_REF_LOOKUP_ID` ASC),
-CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1`
-FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`)
-ON DELETE CASCADE ON UPDATE CASCADE)
-ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS vnfc_customization (
-`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
-`MODEL_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
-`MODEL_VERSION` VARCHAR(20) NOT NULL,
-`MODEL_NAME` VARCHAR(200) NOT NULL,
-`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
-`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
-`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
-PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`))
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS cvnfc_customization (
-`ID` INT(11) NOT NULL AUTO_INCREMENT,
-`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
-`MODEL_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
-`MODEL_VERSION` VARCHAR(20) NOT NULL,
-`MODEL_NAME` VARCHAR(200) NOT NULL,
-`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
-`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
-`NFC_FUNCTION` VARCHAR(200) NULL,
-`NFC_NAMING_CODE` VARCHAR(200) NULL,
-`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
-`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
-`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
-`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, PRIMARY KEY (`ID`), INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), UNIQUE INDEX `UK_cvnfc_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC), CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON
-DELETE CASCADE ON
-UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON
-DELETE CASCADE ON
-UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON
-DELETE CASCADE ON
-UPDATE CASCADE) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1;
-
-
-CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `CVNFC_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `CONFIGURATION_TYPE` VARCHAR(200) NULL,
- `CONFIGURATION_ROLE` VARCHAR(200) NULL,
- `CONFIGURATION_FUNCTION` VARCHAR(200) NULL,
- `POLICY_NAME` VARCHAR(200) NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL,
- PRIMARY KEY (`ID`),
- INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC),
- UNIQUE INDEX `UK_vnf_vfmodule_cvnfc_configuration_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC , `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC , `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC , `MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_vnf_vfmodule_cvnfc_config_cust__cvnfc_cust1_idx` (`CVNFC_MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vf_module_cust_idx` (`VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vnf_res_cust_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`)
- REFERENCES `configuration` (`MODEL_UUID`)
- ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_cvnfc_configuration_customization__cvnfc_customization1` FOREIGN KEY (`CVNFC_MODEL_CUSTOMIZATION_UUID`)
- REFERENCES `cvnfc_customization` (`MODEL_CUSTOMIZATION_UUID`)
- ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_vnf_configuration_cvnfc_customization__vf_module_customiza1` FOREIGN KEY (`VF_MODULE_MODEL_CUSTOMIZATION_UUID`)
- REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`)
- ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`)
- REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`)
- ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=INNODB AUTO_INCREMENT=20654 DEFAULT CHARACTER SET=LATIN1;
+--
+-- Table structure for table `tosca_csar`
+--
+DROP TABLE IF EXISTS `tosca_csar`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tosca_csar` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL,
+ `URL` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module`
+--
+
+DROP TABLE IF EXISTS `vf_module`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `IS_BASE` tinyint(1) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`,`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ KEY `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module__heat_template_art_uuid__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vol_heat_template_art_uuid__heat_template2` FOREIGN KEY (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_customization`
+--
+
+DROP TABLE IF EXISTS `vf_module_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `LABEL` varchar(200) DEFAULT NULL,
+ `INITIAL_COUNT` int(11) DEFAULT '0',
+ `MIN_INSTANCES` int(11) DEFAULT '0',
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_COUNT` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
+ KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization__vol_env__heat_environment2_idx` (`VOL_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization_to_vnf_resource_customization` (`VNF_RESOURCE_CUSTOMIZATION_ID`),
+ KEY `vf_module_customization_model_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vf_module_customization__heat_env__heat_environment1` FOREIGN KEY (`HEAT_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vf_module1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vol_env__heat_environment2` FOREIGN KEY (`VOL_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization_to_vnf_resource_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_to_heat_files`
+--
+
+DROP TABLE IF EXISTS `vf_module_to_heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_to_heat_files` (
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `HEAT_FILES_ARTIFACT_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`VF_MODULE_MODEL_UUID`,`HEAT_FILES_ARTIFACT_UUID`),
+ KEY `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`HEAT_FILES_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` FOREIGN KEY (`HEAT_FILES_ARTIFACT_UUID`) REFERENCES `heat_files` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_to_heat_files__vf_module__model_uuid1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='il fait ce qu''il dit';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components`
+--
+
+DROP TABLE IF EXISTS `vnf_components`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components` (
+ `VNF_ID` int(11) NOT NULL,
+ `COMPONENT_TYPE` varchar(20) NOT NULL,
+ `HEAT_TEMPLATE_ID` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ID` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`VNF_ID`,`COMPONENT_TYPE`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_components_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `VNF_TYPE` varchar(200) DEFAULT NULL,
+ `VNF_COMPONENT_TYPE` varchar(45) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_COMPONENT_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_4dpdwddaaclhc11wxsb7h59ma` (`VF_MODULE_MODEL_UUID`,`VNF_COMPONENT_TYPE`,`ACTION`,`VERSION`)
+) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_ID` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_f3tvqau498vrifq3cr8qnigkr` (`VF_MODULE_ID`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=10015 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource`
+--
+
+DROP TABLE IF EXISTS `vnf_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `AIC_VERSION_MIN` varchar(20) DEFAULT NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_vnf_resource__heat_template1` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vnf_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource_customization`
+--
+
+DROP TABLE IF EXISTS `vnf_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_MAX_COUNT` int(11) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) default null,
+ `CDS_BLUEPRINT_VERSION` varchar(20) default null,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization_to_service` (`SERVICE_MODEL_UUID`),
+ KEY `vnf_resource_customization_mod_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vnf_resource_customization__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnf_resource_customization_to_service` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_instance_group_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ KEY `fk_vnfc_instance_group_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_vnfc_instance_group_customization__instance_group1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnfc_instance_group_customization_vnf_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+set foreign_key_checks=1;
CREATE TABLE IF NOT EXISTS `pnf_resource` (
- `ORCHESTRATION_MODE` varchar(20) DEFAULT NULL,
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
`DESCRIPTION` varchar(1200) DEFAULT NULL,
`CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`MODEL_UUID` varchar(200) NOT NULL,
@@ -1143,6 +1475,3 @@ create table if not exists model (
CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-ALTER TABLE `catalogdb`.`vnf_recipe`
-CHANGE COLUMN `VNF_TYPE` `NF_ROLE` VARCHAR(200) NULL DEFAULT NULL ;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index 76b24caf09..f5b77781a4 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -72,13 +72,13 @@ import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResource;
import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
@@ -413,15 +413,15 @@ public class BBInputSetup implements JavaDelegate {
protected void mapCatalogConfiguration(Configuration configuration, ModelInfo modelInfo, Service service, ConfigurationResourceKeys configurationResourceKeys) {
ConfigurationResourceCustomization configurationResourceCustomization = findConfigurationResourceCustomization(modelInfo, service);
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization =
- findVnfVfmoduleCvnfcConfigurationCustomization(configurationResourceKeys.getVfModuleCustomizationUUID(),
+ CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization =
+ findVnfVfmoduleCvnfcConfigurationCustomization(service.getModelUUID(),configurationResourceKeys.getVfModuleCustomizationUUID(),
configurationResourceKeys.getVnfResourceCustomizationUUID(), configurationResourceKeys.getCvnfcCustomizationUUID(), configurationResourceCustomization);
if (configurationResourceCustomization != null && vnfVfmoduleCvnfcConfigurationCustomization != null) {
configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization
, vnfVfmoduleCvnfcConfigurationCustomization));
} else {
logger.debug("for Fabric configuration mapping by VF MODULE CUST UUID: " + configurationResourceKeys.getVfModuleCustomizationUUID());
- vnfVfmoduleCvnfcConfigurationCustomization = findVnfVfmoduleCvnfcConfigurationCustomization(configurationResourceKeys.getVnfResourceCustomizationUUID(),
+ vnfVfmoduleCvnfcConfigurationCustomization = findVnfVfmoduleCvnfcConfigurationCustomization(service.getModelUUID(),configurationResourceKeys.getVnfResourceCustomizationUUID(),
configurationResourceKeys.getVfModuleCustomizationUUID(), configurationResourceKeys.getCvnfcCustomizationUUID());
if (vnfVfmoduleCvnfcConfigurationCustomization != null){
configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(vnfVfmoduleCvnfcConfigurationCustomization));
@@ -429,18 +429,9 @@ public class BBInputSetup implements JavaDelegate {
}
}
- protected VnfVfmoduleCvnfcConfigurationCustomization findVnfVfmoduleCvnfcConfigurationCustomization(String vfModuleCustomizationUUID,
+ protected CvnfcConfigurationCustomization findVnfVfmoduleCvnfcConfigurationCustomization(String serviceModelUUID, String vfModuleCustomizationUUID,
String vnfResourceCustomizationUUID, String cvnfcCustomizationUUID, ConfigurationResourceCustomization configurationResourceCustomization) {
- if(configurationResourceCustomization != null && configurationResourceCustomization.getConfigurationResource() != null)
- for(VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization :
- configurationResourceCustomization.getConfigurationResource().getVnfVfmoduleCvnfcConfigurationCustomization()) {
- if(vnfVfmoduleCvnfcConfigurationCustomization.getVfModuleCustomization().getModelCustomizationUUID().equalsIgnoreCase(vfModuleCustomizationUUID)
- && vnfVfmoduleCvnfcConfigurationCustomization.getVnfResourceCustomization().getModelCustomizationUUID().equalsIgnoreCase(vnfResourceCustomizationUUID)
- && vnfVfmoduleCvnfcConfigurationCustomization.getCvnfcCustomization().getModelCustomizationUUID().equalsIgnoreCase(cvnfcCustomizationUUID)) {
- return vnfVfmoduleCvnfcConfigurationCustomization;
- }
- }
- return null;
+ return bbInputSetupUtils.getCvnfcConfigurationCustomization(serviceModelUUID, vnfResourceCustomizationUUID, vfModuleCustomizationUUID, cvnfcCustomizationUUID);
}
protected ConfigurationResourceCustomization findConfigurationResourceCustomization(ModelInfo modelInfo, Service service) {
@@ -452,11 +443,9 @@ public class BBInputSetup implements JavaDelegate {
return null;
}
- protected VnfVfmoduleCvnfcConfigurationCustomization findVnfVfmoduleCvnfcConfigurationCustomization(String vnfResourceCustomizationUUID,
+ protected CvnfcConfigurationCustomization findVnfVfmoduleCvnfcConfigurationCustomization(String serviceModelUUID, String vnfResourceCustomizationUUID,
String vfModuleCustomizationUUID, String cvnfcCustomizationUUID) {
- return bbInputSetupUtils.getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationIdnAndVfModuleCustomizationIdAndCvnfcCustomizationId(vnfResourceCustomizationUUID,
- vfModuleCustomizationUUID, cvnfcCustomizationUUID);
-
+ return bbInputSetupUtils.getCvnfcConfigurationCustomization(serviceModelUUID, vnfResourceCustomizationUUID, vfModuleCustomizationUUID, cvnfcCustomizationUUID);
}
protected void populateVfModule(ModelInfo modelInfo, Service service, String bbName,
@@ -730,7 +719,7 @@ public class BBInputSetup implements JavaDelegate {
.getVnfcInstanceGroupCustomizations();
for (VnfcInstanceGroupCustomization vnfcInstanceGroupCust : vnfcInstanceGroups) {
InstanceGroup instanceGroup = this.createInstanceGroup();
- org.onap.so.db.catalog.beans.InstanceGroup catalogInstanceGroup = bbInputSetupUtils.getCatalogInstanceGroup(vnfcInstanceGroupCust.getModelUUID());
+ org.onap.so.db.catalog.beans.InstanceGroup catalogInstanceGroup = bbInputSetupUtils.getCatalogInstanceGroup(vnfcInstanceGroupCust.getInstanceGroup().getModelUUID());
instanceGroup.setModelInfoInstanceGroup(this.mapperLayer
.mapCatalogInstanceGroupToInstanceGroup(null, catalogInstanceGroup));
instanceGroup.getModelInfoInstanceGroup().setFunction(vnfcInstanceGroupCust.getFunction());
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 50a9c4e8b1..d8c80ced75 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -74,6 +74,7 @@ import org.onap.so.db.catalog.beans.CollectionResource;
import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.InstanceGroup;
import org.onap.so.db.catalog.beans.InstanceGroupType;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
@@ -81,7 +82,6 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.RequestDetails;
import org.slf4j.Logger;
@@ -489,24 +489,24 @@ public class BBInputSetupMapperLayer {
protected ModelInfoConfiguration mapCatalogConfigurationToConfiguration(
ConfigurationResourceCustomization configurationResourceCustomization,
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization) {
+ CvnfcConfigurationCustomization cvnfcConfigurationCustomization) {
ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
modelInfoConfiguration.setModelVersionId(configurationResourceCustomization.getConfigurationResource().getModelUUID());
modelInfoConfiguration.setModelCustomizationId(configurationResourceCustomization.getModelCustomizationUUID());
modelInfoConfiguration.setModelInvariantId(configurationResourceCustomization.getConfigurationResource().getModelInvariantUUID());
- modelInfoConfiguration.setPolicyName(vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName());
+ modelInfoConfiguration.setPolicyName(cvnfcConfigurationCustomization.getPolicyName());
return modelInfoConfiguration;
}
protected ModelInfoConfiguration mapCatalogConfigurationToConfiguration(
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization) {
+ CvnfcConfigurationCustomization cvnfcConfigurationCustomization) {
ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
- modelInfoConfiguration.setModelVersionId(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationResource().getModelUUID());
- modelInfoConfiguration.setModelCustomizationId(vnfVfmoduleCvnfcConfigurationCustomization.getModelCustomizationUUID());
- modelInfoConfiguration.setModelInvariantId(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationResource().getModelInvariantUUID());
- modelInfoConfiguration.setPolicyName(vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName());
- modelInfoConfiguration.setConfigurationType(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationType());
- modelInfoConfiguration.setConfigurationRole(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationRole());
+ modelInfoConfiguration.setModelVersionId(cvnfcConfigurationCustomization.getConfigurationResource().getModelUUID());
+ modelInfoConfiguration.setModelCustomizationId(cvnfcConfigurationCustomization.getModelCustomizationUUID());
+ modelInfoConfiguration.setModelInvariantId(cvnfcConfigurationCustomization.getConfigurationResource().getModelInvariantUUID());
+ modelInfoConfiguration.setPolicyName(cvnfcConfigurationCustomization.getPolicyName());
+ modelInfoConfiguration.setConfigurationType(cvnfcConfigurationCustomization.getConfigurationType());
+ modelInfoConfiguration.setConfigurationRole(cvnfcConfigurationCustomization.getConfigurationRole());
return modelInfoConfiguration;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 88ed5d37d9..9a08d1872d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -53,10 +53,10 @@ import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.entities.uri.Depth;
import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.request.beans.InfraActiveRequests;
@@ -145,10 +145,9 @@ public class BBInputSetupUtils {
return catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID(modelCustomizationUUID);
}
- public VnfVfmoduleCvnfcConfigurationCustomization getVnfVfmoduleCvnfcConfigurationCustomizationByActionAndIsALaCarteAndRequestScopeAndCloudOwner(String vnfCustomizationUuid,
+ public CvnfcConfigurationCustomization getCvnfcConfigurationCustomization(String serviceModelUUID, String vnfCustomizationUuid,
String vfModuleCustomizationUuid, String cvnfcCustomizationUuid){
- return catalogDbClient.getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationUuidAndVfModuleCustomizationUuidAndCvnfcCustomizationUuid(vnfCustomizationUuid,
- vfModuleCustomizationUuid, cvnfcCustomizationUuid);
+ return catalogDbClient.getCvnfcCustomization(serviceModelUUID, vnfCustomizationUuid,vfModuleCustomizationUuid, cvnfcCustomizationUuid);
}
public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroups(String modelCustomizationUUID) {
@@ -451,9 +450,4 @@ public class BBInputSetupUtils {
return Optional.of(volumeGroup);
}
}
-
- public VnfVfmoduleCvnfcConfigurationCustomization getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationIdnAndVfModuleCustomizationIdAndCvnfcCustomizationId(
- String vnfResourceCustomizationUUID, String vfModuleCustomizationUUID, String cvnfcCustomizationUUID) {
- return catalogDbClient.getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationUuidAndVfModuleCustomizationUuidAndCvnfcCustomizationUuid(vnfResourceCustomizationUUID, vfModuleCustomizationUUID, cvnfcCustomizationUUID);
- }
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
index ff592f5603..9ac148f5bd 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
@@ -69,6 +69,7 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResource;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.InstanceGroup;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
@@ -76,7 +77,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcCustomization;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
import org.onap.so.serviceinstancebeans.RequestDetails;
@@ -648,7 +649,7 @@ public class BBInputSetupMapperLayerTest {
configurationResourceCustomization.setConfigurationResource(new ConfigurationResource());
configurationResourceCustomization.getConfigurationResource().setModelInvariantUUID(modelInvariantUUID);
configurationResourceCustomization.getConfigurationResource().setModelUUID(modelVersionUUID);
- VnfVfmoduleCvnfcConfigurationCustomization policyNameTable = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization policyNameTable = new CvnfcConfigurationCustomization();
policyNameTable.setCvnfcCustomization(new CvnfcCustomization());
policyNameTable.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization());
policyNameTable.setPolicyName(policyName);
@@ -670,7 +671,7 @@ public class BBInputSetupMapperLayerTest {
expected.setModelVersionId(modelVersionUUID);
expected.setPolicyName(policyName);
- VnfVfmoduleCvnfcConfigurationCustomization fabricCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization fabricCustomization = new CvnfcConfigurationCustomization();
fabricCustomization.setCvnfcCustomization(new CvnfcCustomization());
fabricCustomization.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization());
fabricCustomization.setPolicyName(policyName);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
index eb26bf34ee..8d0b2f60e1 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
@@ -103,7 +103,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.serviceinstancebeans.CloudConfiguration;
@@ -1284,7 +1284,7 @@ public class BBInputSetupTest {
Vnfc vnfc = new Vnfc();
vnfc.setVnfcName(vnfcName);
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
ConfigurationResource configurationResource = new ConfigurationResource();
configurationResource.setModelUUID("modelUUID");
configurationResource.setModelInvariantUUID("modelInvariantUUID");
@@ -1370,14 +1370,15 @@ public class BBInputSetupTest {
GenericVnf genericVnf = new GenericVnf();
ModelInfo modelInfo = Mockito.mock(ModelInfo.class);
Service service = Mockito.mock(Service.class);
+ org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = new org.onap.so.db.catalog.beans.InstanceGroup();
+ instanceGroup.setModelUUID("modelUUID");
List<VnfcInstanceGroupCustomization> vnfcInstanceGroups = new ArrayList<>();
VnfcInstanceGroupCustomization vnfcInstanceGroupCust = new VnfcInstanceGroupCustomization();
- vnfcInstanceGroupCust.setModelUUID("modelUUID");
+ vnfcInstanceGroupCust.setInstanceGroup(instanceGroup);
vnfcInstanceGroupCust.setFunction("function");
vnfcInstanceGroupCust.setDescription("description");
vnfcInstanceGroups.add(vnfcInstanceGroupCust);
- org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = new org.onap.so.db.catalog.beans.InstanceGroup();
- instanceGroup.setModelUUID("modelUUID");
+
ModelInfoInstanceGroup modelInfoInstanceGroup = new ModelInfoInstanceGroup();
modelInfoInstanceGroup.setModelUUID("modelUUID");
doReturn(vnfResourceCust).when(SPY_bbInputSetup).getVnfResourceCustomizationFromService(modelInfo, service);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json
index 457b23f841..206403d83a 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VnfcInstanceGroupCustomization.json
@@ -1,6 +1,5 @@
{
- "modelCustomizationUUID" : "modelCustomizationUUID",
- "modelUUID" : "modelUUID",
+ "id":1,
"vnfResourceCust" : {},
"instanceGroup" : {},
"function" : "function",
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index aeffb0ecab..867be2ec95 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -64,7 +64,7 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.macro.NorthBoundRequest;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -792,8 +792,8 @@ public class WorkflowAction {
vfModuleCustomizationUUID = vfModule.getModelInfo().getModelCustomizationUuid();
}
if(!vnfCustomizationUUID.equals("")&&!vfModuleCustomizationUUID.equals("")){
- List<VnfVfmoduleCvnfcConfigurationCustomization> configs = traverseCatalogDbForConfiguration(vnfCustomizationUUID,vfModuleCustomizationUUID);
- for(VnfVfmoduleCvnfcConfigurationCustomization config : configs){
+ List<CvnfcConfigurationCustomization> configs = traverseCatalogDbForConfiguration(validate.getModelInfo().getModelVersionId(),vnfCustomizationUUID,vfModuleCustomizationUUID);
+ for(CvnfcConfigurationCustomization config : configs){
Resource configResource = new Resource(WorkflowType.CONFIGURATION,config.getConfigurationResource().getModelUUID(),false);
resource.setVnfCustomizationId(vnf.getModelInfo().getModelCustomizationId());
resource.setVfModuleCustomizationId(vfModule.getModelInfo().getModelCustomizationId());
@@ -829,18 +829,18 @@ public class WorkflowAction {
return foundRelated;
}
- protected List<VnfVfmoduleCvnfcConfigurationCustomization> traverseCatalogDbForConfiguration(String vnfCustomizationUUID, String vfModuleCustomizationUUID) {
- List<VnfVfmoduleCvnfcConfigurationCustomization> configurations = new ArrayList<>();
+ protected List<CvnfcConfigurationCustomization> traverseCatalogDbForConfiguration(String serviceModelUUID, String vnfCustomizationUUID, String vfModuleCustomizationUUID) {
+ List<CvnfcConfigurationCustomization> configurations = new ArrayList<>();
try{
- List<CvnfcCustomization> cvnfcCustomizations = catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(vnfCustomizationUUID, vfModuleCustomizationUUID);
+ List<CvnfcCustomization> cvnfcCustomizations = catalogDbClient.getCvnfcCustomization(serviceModelUUID,vnfCustomizationUUID, vfModuleCustomizationUUID);
for(CvnfcCustomization cvnfc : cvnfcCustomizations){
- for(VnfVfmoduleCvnfcConfigurationCustomization customization : cvnfc.getVnfVfmoduleCvnfcConfigurationCustomization()){
+ for(CvnfcConfigurationCustomization customization : cvnfc.getCvnfcConfigurationCustomization()){
if(customization.getConfigurationResource().getToscaNodeType().contains(FABRIC_CONFIGURATION)){
configurations.add(customization);
}
}
}
- logger.debug("found {} configuration(s)" , configurations.size() );
+ logger.debug("found {} fabric configuration(s)" , configurations.size() );
return configurations;
} catch (Exception ex){
logger.error("Error in finding configurations", ex);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index 359f8ea164..a327f0670a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -23,7 +23,6 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
-import java.util.Optional;
import java.util.UUID;
import javax.persistence.EntityNotFoundException;
@@ -38,13 +37,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.client.aai.AAIObjectType;
-import org.onap.so.client.aai.entities.AAIResultWrapper;
-import org.onap.so.client.aai.entities.Relationships;
-import org.onap.so.client.aai.entities.uri.AAIResourceUri;
-import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.db.catalog.beans.CvnfcCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
@@ -370,16 +364,21 @@ public class WorkflowActionBBTasks {
protected void postProcessingExecuteBBActivateVfModule(DelegateExecution execution,
ExecuteBuildingBlock ebb, List<ExecuteBuildingBlock> flowsToExecute) {
try {
+ String serviceInstanceId = ebb.getWorkflowResourceIds().getServiceInstanceId();
String vnfId = ebb.getWorkflowResourceIds().getVnfId();
String vfModuleId = ebb.getResourceId();
ebb.getWorkflowResourceIds().setVfModuleId(vfModuleId);
+ String serviceModelUUID = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId).getModelVersionId();
String vnfCustomizationUUID = bbInputSetupUtils.getAAIGenericVnf(vnfId).getModelCustomizationId();
String vfModuleCustomizationUUID = bbInputSetupUtils.getAAIVfModule(vnfId, vfModuleId).getModelCustomizationId();
List<Vnfc> vnfcs = workflowAction.getRelatedResourcesInVfModule(vnfId, vfModuleId, Vnfc.class, AAIObjectType.VNFC);
+ logger.debug("Vnfc Size: {}", vnfcs.size());
for(Vnfc vnfc : vnfcs) {
String modelCustomizationId = vnfc.getModelCustomizationId();
- VnfVfmoduleCvnfcConfigurationCustomization fabricConfig =
- catalogDbClient.getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationUuidAndVfModuleCustomizationUuidAndCvnfcCustomizationUuid(vnfCustomizationUUID, vfModuleCustomizationUUID, modelCustomizationId);
+ logger.debug("Processing Vnfc: {}", modelCustomizationId);
+ CvnfcConfigurationCustomization fabricConfig =
+ catalogDbClient.getCvnfcCustomization(serviceModelUUID,vnfCustomizationUUID,
+ vfModuleCustomizationUUID, modelCustomizationId);
if(fabricConfig != null && fabricConfig.getConfigurationResource() != null
&& fabricConfig.getConfigurationResource().getToscaNodeType() != null
&& fabricConfig.getConfigurationResource().getToscaNodeType().contains(FABRIC_CONFIGURATION)) {
@@ -393,6 +392,7 @@ public class WorkflowActionBBTasks {
ExecuteBuildingBlock activateConfigBB = getExecuteBBForConfig(ACTIVATE_FABRIC_CONFIGURATION_BB, ebb, configurationId, configurationResourceKeys);
flowsToExecute.add(assignConfigBB);
flowsToExecute.add(activateConfigBB);
+ flowsToExecute.stream().forEach(executeBB -> logger.info("Flows to Execute After Post Processing: {}", executeBB.getBuildingBlock().getBpmnFlowName()));
execution.setVariable("flowsToExecute", flowsToExecute);
execution.setVariable("completed", false);
} else {
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index 8c0792e628..0bc20c16f7 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -81,7 +81,7 @@ import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.macro.NorthBoundRequest;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.serviceinstancebeans.RequestDetails;
@@ -898,33 +898,33 @@ public class WorkflowActionTest extends BaseTaskTest {
List<CvnfcCustomization> cvnfcCustomizations = new ArrayList<CvnfcCustomization>();
CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
ConfigurationResource configurationResource = new ConfigurationResource();
configurationResource.setToscaNodeType("FabricConfiguration");
vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(configurationResource);
vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName("modelInstanceName1");
vnfVfmoduleCvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization);
- Set<VnfVfmoduleCvnfcConfigurationCustomization> custSet = new HashSet<VnfVfmoduleCvnfcConfigurationCustomization>();
+ Set<CvnfcConfigurationCustomization> custSet = new HashSet<CvnfcConfigurationCustomization>();
custSet.add(vnfVfmoduleCvnfcConfigurationCustomization);
- cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(custSet);
+ cvnfcCustomization.setCvnfcConfigurationCustomization(custSet);
cvnfcCustomization.setDescription("description");
cvnfcCustomizations.add(cvnfcCustomization);
CvnfcCustomization cvnfcCustomization2 = new CvnfcCustomization();
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization2 = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization2 = new CvnfcConfigurationCustomization();
ConfigurationResource configurationResource2 = new ConfigurationResource();
configurationResource2.setToscaNodeType("FabricConfiguration");
vnfVfmoduleCvnfcConfigurationCustomization2.setConfigurationResource(configurationResource2);
vnfVfmoduleCvnfcConfigurationCustomization2.setModelInstanceName("modelInstanceName2");
vnfVfmoduleCvnfcConfigurationCustomization2.setCvnfcCustomization(cvnfcCustomization2);
- Set<VnfVfmoduleCvnfcConfigurationCustomization> custSet2 = new HashSet<VnfVfmoduleCvnfcConfigurationCustomization>();
+ Set<CvnfcConfigurationCustomization> custSet2 = new HashSet<CvnfcConfigurationCustomization>();
custSet2.add(vnfVfmoduleCvnfcConfigurationCustomization2);
- cvnfcCustomization2.setVnfVfmoduleCvnfcConfigurationCustomization(custSet2);
+ cvnfcCustomization2.setCvnfcConfigurationCustomization(custSet2);
cvnfcCustomization2.setDescription("description2");
cvnfcCustomizations.add(cvnfcCustomization2);
when(catalogDbClient.getNorthBoundRequestByActionAndIsALaCarteAndRequestScopeAndCloudOwner(gAction,resource,true,"my-custom-cloud-owner")).thenReturn(northBoundRequest);
- when(catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID("fc25201d-36d6-43a3-8d39-fdae88e526ae", "9a6d01fd-19a7-490a-9800-460830a12e0b")).thenReturn(cvnfcCustomizations);
+ //when(catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID("fc25201d-36d6-43a3-8d39-fdae88e526ae", "9a6d01fd-19a7-490a-9800-460830a12e0b")).thenReturn(cvnfcCustomizations);
workflowAction.selectExecutionList(execution);
List<ExecuteBuildingBlock> ebbs = (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
assertEqualsBulkFlowName(ebbs,"AssignVfModuleBB","CreateVfModuleBB","ActivateVfModuleBB","AssignFabricConfigurationBB","ActivateFabricConfigurationBB", "AssignFabricConfigurationBB","ActivateFabricConfigurationBB");
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java
index 5c083779be..ada8a237e7 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionUnitTest.java
@@ -54,7 +54,7 @@ import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.orchestration.AAIConfigurationResources;
import org.onap.so.db.catalog.beans.ConfigurationResource;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.serviceinstancebeans.ModelInfo;
@@ -86,19 +86,19 @@ public class WorkflowActionUnitTest {
public void traverseCatalogDbForConfigurationTest() {
CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
- VnfVfmoduleCvnfcConfigurationCustomization vfModuleCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization vfModuleCustomization = new CvnfcConfigurationCustomization();
ConfigurationResource configuration = new ConfigurationResource();
configuration.setToscaNodeType("FabricConfiguration");
configuration.setModelUUID("my-uuid");
vfModuleCustomization.setConfigurationResource(configuration);
- cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(Collections.singleton(vfModuleCustomization));
+ cvnfcCustomization.setCvnfcConfigurationCustomization(Collections.singleton(vfModuleCustomization));
List<CvnfcCustomization> cvnfcCustomizations = Arrays.asList(cvnfcCustomization);
- when(catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(any(String.class), any(String.class)))
- .thenReturn(cvnfcCustomizations);
+ // when(catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(any(String.class), any(String.class)))
+ // .thenReturn(cvnfcCustomizations);
- List<VnfVfmoduleCvnfcConfigurationCustomization> results = workflowAction.traverseCatalogDbForConfiguration("myVnfCustomizationId", "myVfModuleCustomizationId");
+ // List<CvnfcConfigurationCustomization> results = workflowAction.traverseCatalogDbForConfiguration("myVnfCustomizationId", "myVfModuleCustomizationId");
- assertThat(results, is(Arrays.asList(vfModuleCustomization)));
+ //assertThat(results, is(Arrays.asList(vfModuleCustomization)));
}
diff --git a/common/src/main/java/org/onap/so/openpojo/rules/EqualsAndHashCodeTester.java b/common/src/main/java/org/onap/so/openpojo/rules/EqualsAndHashCodeTester.java
index 88a83db7e2..05f69caacd 100644
--- a/common/src/main/java/org/onap/so/openpojo/rules/EqualsAndHashCodeTester.java
+++ b/common/src/main/java/org/onap/so/openpojo/rules/EqualsAndHashCodeTester.java
@@ -122,13 +122,14 @@ public class EqualsAndHashCodeTester implements Tester {
private Set<PojoField> hasIdOrBusinessKey(PojoClass pojoClass) {
final Set<PojoField> fields = new HashSet<>();
-
+
fields.addAll(pojoClass.getPojoFieldsAnnotatedWith(BusinessKey.class));
- fields.addAll(pojoClass.getPojoFieldsAnnotatedWith(Id.class));
- fields.removeAll(pojoClass.getPojoFieldsAnnotatedWith(GeneratedValue.class));
-
+ final Set<PojoField> temp = new HashSet<>();
+ temp.addAll(pojoClass.getPojoFieldsAnnotatedWith(Id.class));
+ temp.removeAll(pojoClass.getPojoFieldsAnnotatedWith(GeneratedValue.class));
+ fields.addAll(temp);
return fields;
-
+
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index c6a45d540c..ad97918a03 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -318,7 +318,12 @@ public class ServiceInstances {
String requestId = requestHandlerUtils.getRequestId(requestContext);
HashMap<String, String> instanceIdMap = new HashMap<>();
instanceIdMap.put("serviceInstanceId", serviceInstanceId);
- return serviceInstances(request, Action.createInstance, instanceIdMap, version, requestId, requestHandlerUtils.getRequestUri(requestContext, uriPrefix));
+ try{
+ return serviceInstances(request, Action.createInstance, instanceIdMap, version, requestId, requestHandlerUtils.getRequestUri(requestContext, uriPrefix));
+ }catch (Exception e){
+ logger.error("Error in vnf", e);
+ throw e;
+ }
}
@POST
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
index 52021c3587..d3899fd318 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
@@ -790,12 +790,12 @@ public class ServiceInstancesTest extends BaseTest{
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=68dc9a92-214c-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_ReplaceVnf_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/1/vnfResources"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResources_ReplaceVnf_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -880,12 +880,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=68dc9a92-214c-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_ReplaceVnf_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/1/vnfResources"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResources_ReplaceVnf_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -913,12 +913,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=68dc9a92-214c-11e7-93ae-92361f002674"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/4/vnfResources"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -948,12 +948,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=68dc9a92-214c-11e7-93ae-92361f002674"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/4/vnfResources"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -983,12 +983,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=68dc9a92-214c-11e7-93ae-92361f002674"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/4/vnfResources"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1064,17 +1064,22 @@ public class ServiceInstancesTest extends BaseTest{
}
@Test
public void createVfModuleInstance() throws IOException {
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching("/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc\\?MODEL_CUSTOMIZATION_UUID=cb82ffd8-252a-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomization_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
-
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule"))
+
+ wireMockServer.stubFor(get(urlMatching("/vfModule/20c4431c-246d-11e7-93ae-92361f002671"))
+ .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .withBody(getWiremockResponseForCatalogdb("vfModule_Response.json"))
+ .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ wireMockServer.stubFor(get(urlMatching("/vfModuleCustomization/1/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModule/20c4431c-246d-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching("/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc\\?MODEL_CUSTOMIZATION_UUID=20c4431c-246d-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1083,7 +1088,7 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" +
+ wireMockServer.stubFor(get(urlMatching("/vnfComponentsRecipe/search/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction" +
"[?]vfModuleModelUUID=20c4431c-246d-11e7-93ae-92361f002671&vnfComponentType=vfModule&action=createInstance"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfComponentRecipe_Response.json"))
@@ -1113,24 +1118,24 @@ public class ServiceInstancesTest extends BaseTest{
.withBody(getWiremockResponseForCatalogdb("vnfResourceForVfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources" +
- "[?]modelInstanceName=test&vnfResourceModelUUID=fe6478e4-ea33-3346-ac12-ab121484a3fe"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources" +
+ "[?]MODEL_INSTANCE_NAME=test&VNF_RESOURCE_MODEL_UUID=fe6478e4-ea33-3346-ac12-ab121484a3fe"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationForVfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/3/vfModuleCustomizations"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationsPCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findByModelCustomizationUUIDAndVfModuleModelUUID[?]" +
- "modelCustomizationUUID=b4ea86b4-253f-11e7-93ae-92361f002672&vfModuleModelUUID=066de97e-253e-11e7-93ae-92361f002672"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDAndVfModuleModelUUIDOrderByCreatedDesc[?]" +
+ "MODEL_CUSTOMIZATION_UUID=b4ea86b4-253f-11e7-93ae-92361f002672&MODEL_UUID=066de97e-253e-11e7-93ae-92361f002672"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationPCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/2/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModulePCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1176,17 +1181,17 @@ public class ServiceInstancesTest extends BaseTest{
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationForVfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/3/vfModuleCustomizations"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationsPCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc[?]MODEL_CUSTOMIZATION_UUID=b4ea86b4-253f-11e7-93ae-92361f002672"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationPCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/2/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModulePCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1225,13 +1230,13 @@ public class ServiceInstancesTest extends BaseTest{
.withBody(getWiremockResponseForCatalogdb("vnfResourceForVfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources" +
- "[?]modelInstanceName=test&vnfResourceModelUUID=fe6478e4-ea33-3346-ac12-ab121484a3fe"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelInstanceNameAndVnfResources" +
+ "[?]MODEL_INSTANCE_NAME=test&VNF_RESOURCE_MODEL_UUID=fe6478e4-ea33-3346-ac12-ab121484a3fe"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomizationForVfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/3/vfModuleCustomizations"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationsPCM_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1285,12 +1290,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc[?]MODEL_CUSTOMIZATION_UUID=cb82ffd8-252a-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomization_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/1/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1463,12 +1468,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc[?]MODEL_CUSTOMIZATION_UUID=b4ea86b4-253f-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationVolGrp_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/1/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleVolGroup_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1499,12 +1504,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc[?]MODEL_CUSTOMIZATION_UUID=b4ea86b4-253f-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationVolGrp_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/1/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleVolGroup_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -1538,12 +1543,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc[?]MODEL_CUSTOMIZATION_UUID=b4ea86b4-253f-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomizationVolGrp_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/1/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleVolGroup_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -2129,12 +2134,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/search/findFirstByModelCustomizationUUIDOrderByCreatedDesc[?]MODEL_CUSTOMIZATION_UUID=cb82ffd8-252a-11e7-93ae-92361f002671"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModuleCustomization_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule"))
+ wireMockServer.stubFor(get(urlMatching(".*/vfModuleCustomization/1/vfModule"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vfModule_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
@@ -2327,12 +2332,12 @@ public class ServiceInstancesTest extends BaseTest{
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/2ccae1b4-7d9e-46fa-a452-9180ce008d17"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/search/findByModelCustomizationUUID[?]MODEL_CUSTOMIZATION_UUID=2ccae1b4-7d9e-46fa-a452-9180ce008d17"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
- wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources"))
+ wireMockServer.stubFor(get(urlMatching(".*/vnfResourceCustomization/4/vnfResources"))
.willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
.withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json"))
.withStatus(org.apache.http.HttpStatus.SC_OK)));
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json
index 895c905ec9..4e760b71f1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationPCM_Response.json
@@ -1,4 +1,5 @@
{
+ "id" : 2,
"modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672",
"label": "PCM",
"minInstances": 0,
@@ -8,19 +9,19 @@
"created": "2017-05-26 09:38:23.000",
"_links": {
"self": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672"
+ "href": "http://localhost:8090/vfModuleCustomization/2"
},
"vfModuleCustomization": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672"
+ "href": "http://localhost:8090/vfModuleCustomization/2"
},
"volumeHeatEnv": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv"
+ "href": "http://localhost:8090/vfModuleCustomization/2/volumeHeatEnv"
},
"heatEnvironment": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment"
+ "href": "http://localhost:8090/vfModuleCustomization/2/heatEnvironment"
},
"vfModule": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule"
+ "href": "http://localhost:8090/vfModuleCustomization/2/vfModule"
}
}
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json
index dd7fbe1a84..9ffd759416 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationVolGrp_Response.json
@@ -1,4 +1,5 @@
{
+ "id": 1,
"modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002671",
"label": "PCM",
"minInstances": 0,
@@ -8,19 +9,19 @@
"created": "2017-05-26 09:38:23.000",
"_links": {
"self": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671"
+ "href": "http://localhost:8090/vfModuleCustomization/1"
},
"vfModuleCustomization": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671"
+ "href": "http://localhost:8090/vfModuleCustomization/1"
},
"volumeHeatEnv": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/volumeHeatEnv"
+ "href": "http://localhost:8090/vfModuleCustomization/1/volumeHeatEnv"
},
"vfModule": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/vfModule"
+ "href": "http://localhost:8090/vfModuleCustomization/1/vfModule"
},
"heatEnvironment": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002671/heatEnvironment"
+ "href": "http://localhost:8090/vfModuleCustomization/1/heatEnvironment"
}
}
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json
index a3ace2b24c..c23471fd31 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomization_Response.json
@@ -1,4 +1,5 @@
{
+ "id" : 1,
"modelCustomizationUUID": "cb82ffd8-252a-11e7-93ae-92361f002671",
"label": "base",
"minInstances": 0,
@@ -8,19 +9,19 @@
"created": "2017-05-26 09:38:23.000",
"_links": {
"self": {
- "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671"
+ "href": "http://localhost:8090/vfModuleCustomization/1"
},
"vfModuleCustomization": {
- "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671"
+ "href": "http://localhost:8090/vfModuleCustomization/1"
},
"volumeHeatEnv": {
- "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/volumeHeatEnv"
+ "href": "http://localhost:8090/vfModuleCustomization/1/volumeHeatEnv"
},
"vfModule": {
- "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/vfModule"
+ "href": "http://localhost:8090/vfModuleCustomization/1/vfModule"
},
"heatEnvironment": {
- "href": "http://localhost:8090/vfModuleCustomization/cb82ffd8-252a-11e7-93ae-92361f002671/heatEnvironment"
+ "href": "http://localhost:8090/vfModuleCustomization/1/heatEnvironment"
}
}
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json
index 4743bd39b2..5f7399ee26 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModuleCustomizationsPCM_Response.json
@@ -2,6 +2,7 @@
"_embedded": {
"vfModuleCustomization": [
{
+ "id" : "1",
"modelCustomizationUUID": "b4ea86b4-253f-11e7-93ae-92361f002672",
"label": "PCM",
"minInstances": 0,
@@ -11,19 +12,19 @@
"created": "2017-05-26 09:38:23.000",
"_links": {
"self": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672"
+ "href": "http://localhost:8090/vfModuleCustomization/1"
},
"vfModuleCustomization": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672"
+ "href": "http://localhost:8090/vfModuleCustomization/1"
},
"volumeHeatEnv": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/volumeHeatEnv"
+ "href": "http://localhost:8090/vfModuleCustomization/1/volumeHeatEnv"
},
"heatEnvironment": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/heatEnvironment"
+ "href": "http://localhost:8090/vfModuleCustomization/1/heatEnvironment"
},
"vfModule": {
- "href": "http://localhost:8090/vfModuleCustomization/b4ea86b4-253f-11e7-93ae-92361f002672/vfModule"
+ "href": "http://localhost:8090/vfModuleCustomization/1/vfModule"
}
}
}
@@ -31,7 +32,7 @@
},
"_links": {
"self": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations"
+ "href": "http://localhost:8090/vnfResourceCustomization/1/vfModuleCustomizations"
}
}
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json
index d4693bd075..8f717da9c6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vfModulePCM_Response.json
@@ -1,4 +1,5 @@
{
+ "id" : 2,
"modelUUID": "066de97e-253e-11e7-93ae-92361f002672",
"modelInvariantUUID": "64efd51a-2544-11e7-93ae-92361f002671",
"modelName": "test::PCM::module-1",
@@ -9,22 +10,22 @@
"heatFiles": [],
"_links": {
"self": {
- "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672"
+ "href": "http://localhost:8090/vfModule/2"
},
"vfModule": {
- "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672"
+ "href": "http://localhost:8090/vfModule/2"
},
"vfModuleCustomization": {
- "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/vfModuleCustomization"
+ "href": "http://localhost:8090/vfModule/2/vfModuleCustomization"
},
"volumeHeatTemplate": {
- "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/volumeHeatTemplate"
+ "href": "http://localhost:8090/vfModule/2/volumeHeatTemplate"
},
"vnfResources": {
- "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/vnfResources"
+ "href": "http://localhost:8090/vfModule/2/vnfResources"
},
"moduleHeatTemplate": {
- "href": "http://localhost:8090/vfModule/066de97e-253e-11e7-93ae-92361f002672/moduleHeatTemplate"
+ "href": "http://localhost:8090/vfModule/2/moduleHeatTemplate"
}
}
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json
index 85a02e76ba..ae46c418af 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomizationForVfModule_Response.json
@@ -1,4 +1,5 @@
{
+ "id" : 3,
"modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002673",
"modelInstanceName": "test",
"created": "2017-05-26 09:38:24.000",
@@ -13,20 +14,20 @@
"creationTimestamp": "2017-05-26T09:38:24.000+0000",
"_links": {
"self": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673"
+ "href": "http://localhost:8090/vnfResourceCustomization/3"
},
"vnfResourceCustomization": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673{?projection}",
+ "href": "http://localhost:8090/vnfResourceCustomization/3{?projection}",
"templated": true
},
"vnfResources": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vnfResources"
+ "href": "http://localhost:8090/vnfResourceCustomization/3/vnfResources"
},
"vfModuleCustomizations": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vfModuleCustomizations"
+ "href": "http://localhost:8090/vnfResourceCustomization/3/vfModuleCustomizations"
},
"vnfcInstanceGroupCustomizations": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002673/vnfcInstanceGroupCustomizations"
+ "href": "http://localhost:8090/vnfResourceCustomization/3/vnfcInstanceGroupCustomizations"
}
}
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json
index 97e2be4a6a..0b7752d2dc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_ReplaceVnf_Response.json
@@ -1,4 +1,7 @@
{
+ "_embedded": {
+ "vnfResourceCustomization": [{
+ "id" : 1,
"modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002671",
"modelInstanceName": "v10 1",
"created": "2017-05-26 09:38:24.000",
@@ -13,20 +16,22 @@
"creationTimestamp": "2017-05-26T09:38:24.000+0000",
"_links": {
"self": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671"
+ "href": "http://localhost:8090/vnfResourceCustomization/1"
},
"vnfResourceCustomization": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671{?projection}",
+ "href": "http://localhost:8090/vnfResourceCustomization/1{?projection}",
"templated": true
},
"vnfResources": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfResources"
+ "href": "http://localhost:8090/vnfResourceCustomization/1/vnfResources"
},
"vfModuleCustomizations": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vfModuleCustomizations"
+ "href": "http://localhost:8090/vnfResourceCustomization/1/vfModuleCustomizations"
},
"vnfcInstanceGroupCustomizations": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002671/vnfcInstanceGroupCustomizations"
+ "href": "http://localhost:8090/vnfResourceCustomization/1/vnfcInstanceGroupCustomizations"
}
}
-} \ No newline at end of file
+}]
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json
index e83ad10245..b5e9999d03 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/catalogdb/vnfResourceCustomization_Response.json
@@ -1,32 +1,39 @@
{
- "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002674",
- "modelInstanceName": "test",
- "created": "2017-05-26 09:38:24.000",
- "minInstances": 0,
- "maxInstances": 0,
- "availabilityZoneMaxCount": 0,
- "nfFunction": "",
- "nfType": "",
- "nfRole": "TEST",
- "nfNamingCode": "",
- "multiStageDesign": null,
- "creationTimestamp": "2017-05-26T09:38:24.000+0000",
- "_links": {
- "self": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674"
- },
- "vnfResourceCustomization": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674{?projection}",
- "templated": true
- },
- "vnfcInstanceGroupCustomizations": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfcInstanceGroupCustomizations"
- },
- "vnfResources": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources"
- },
- "vfModuleCustomizations": {
- "href": "http://localhost:8090/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vfModuleCustomizations"
- }
+ "_embedded": {
+ "vnfResourceCustomization": [
+ {
+ "_links": {
+ "self": {
+ "href": "http://localhost:8090/vnfResourceCustomization/4"
+ },
+ "vfModuleCustomizations": {
+ "href": "http://localhost:8090/vnfResourceCustomization/4/vfModuleCustomizations"
+ },
+ "vnfResourceCustomization": {
+ "href": "http://localhost:8090/vnfResourceCustomization/4{?projection}",
+ "templated": true
+ },
+ "vnfResources": {
+ "href": "http://localhost:8090/vnfResourceCustomization/4/vnfResources"
+ },
+ "vnfcInstanceGroupCustomizations": {
+ "href": "http://localhost:8090/vnfResourceCustomization/4/vnfcInstanceGroupCustomizations"
+ }
+ },
+ "availabilityZoneMaxCount": 0,
+ "created": "2017-05-26 09:38:24.000",
+ "creationTimestamp": "2017-05-26T09:38:24.000+0000",
+ "id": 4,
+ "maxInstances": 0,
+ "minInstances": 0,
+ "modelCustomizationUUID": "68dc9a92-214c-11e7-93ae-92361f002674",
+ "modelInstanceName": "test",
+ "multiStageDesign": null,
+ "nfFunction": "",
+ "nfNamingCode": "",
+ "nfRole": "TEST",
+ "nfType": ""
+ }
+ ]
}
-} \ No newline at end of file
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
index 765b8cf75e..22f68e0579 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
@@ -90,109 +90,9 @@ INSERT INTO service_recipe(ID, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_U
('37', 'unassignInstance', '1.0', 'Unassign ServiceInstance', '/mso/async/services/UnassignServiceInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'ff3514e3-5a33-55df-13ab-12abad84e7ff'),
('41', 'createInstance', '1', 'Create ServiceRequest', '/mso/async/services/CreateMacroServiceNetworkVnf', null, '180', '0', '2017-04-14 19:18:20', '109a153e-325f-4df5-8161-edd91314daee');
-INSERT INTO heat_template(ARTIFACT_UUID, NAME, VERSION, DESCRIPTION, BODY, TIMEOUT_MINUTES, ARTIFACT_CHECKSUM, CREATION_TIMESTAMP) VALUES
-('ff874603-4222-11e7-9252-005056850d2e', 'module_mns_zrdm3frwl01exn_01_rgvm_1.yml', '1', 'created from csar', 'heat_template_version: 2013-05-23 description: heat template that creates TEST VNF parameters: TEST_server_name: type: string label: TEST server name description: TEST server name TEST_image_name: type: string label: image name description: TEST image name TEST_flavor_name: type: string label: TEST flavor name description: flavor name of TEST instance TEST_Role_net_name: type: string label: TEST network name description: TEST network name TEST_vnf_id: type: string label: TEST VNF Id description: TEST VNF Id resources:TEST: type: OS::Nova::Server properties: name: { get_param: TEST_server_name } image: { get_param: TEST_image_name } flavor: { get_param: TEST_flavor_name } networks: - port: { get_resource: TEST_port_0} metadata: vnf_id: {get_param: TEST_vnf_id} TEST_port_0: type: OS::Neutron::Port properties: network: { get_param: TEST_Role_net_name }', '60', 'MANUAL RECORD', '2017-01-21 23:26:56'),
-('ff87482f-4222-11e7-9252-005056850d2e', 'module_mns_zrdm3frwl01exn_01_rgvm_1.yml', '1', 'created from csar', 'heat_template_version: 2013-05-23 description: heat template that creates TEST VNF parameters: TEST_server_name: type: string label: TEST server name description: TEST server name TEST_image_name: type: string label: image name description: TEST image name TEST_flavor_name: type: string label: TEST flavor name description: flavor name of TEST instance TEST_Role_net_name: type: string label: TEST network name description: TEST network name TEST_vnf_id: type: string label: TEST VNF Id description: TEST VNF Id resources:TEST: type: OS::Nova::Server properties: name: { get_param: TEST_server_name } image: { get_param: TEST_image_name } flavor: { get_param: TEST_flavor_name } networks: - port: { get_resource: TEST_port_0} metadata: vnf_id: {get_param: TEST_vnf_id} TEST_port_0: type: OS::Neutron::Port properties: network: { get_param: TEST_Role_net_name }', '60', 'MANUAL RECORD', '2017-01-21 23:26:56'),
-('aa874603-4222-11e7-9252-005056850d2e', 'module_mns_zrdm3frwl01exn_01_rgvm_1.yml', '1', 'created from csar', 'heat_template_version: 2013-05-23 description: heat template that creates TEST VNF parameters: TEST_server_name: type: string label: TEST server name description: TEST server name TEST_image_name: type: string label: image name description: TEST image name TEST_flavor_name: type: string label: TEST flavor name description: flavor name of TEST instance TEST_Role_net_name: type: string label: TEST network name description: TEST network name TEST_vnf_id: type: string label: TEST VNF Id description: TEST VNF Id resources:TEST: type: OS::Nova::Server properties: name: { get_param: TEST_server_name } image: { get_param: TEST_image_name } flavor: { get_param: TEST_flavor_name } networks: - port: { get_resource: TEST_port_0} metadata: vnf_id: {get_param: TEST_vnf_id} TEST_port_0: type: OS::Neutron::Port properties: network: { get_param: TEST_Role_net_name }', '60', 'MANUAL RECORD', '2017-01-21 23:26:56');
-
-
-INSERT INTO heat_template_params(HEAT_TEMPLATE_ARTIFACT_UUID, PARAM_NAME, IS_REQUIRED, PARAM_TYPE, PARAM_ALIAS) VALUES
-('ff874603-4222-11e7-9252-005056850d2e', 'availability_zone_0', 1, 'string', ''),
-('ff874603-4222-11e7-9252-005056850d2e', 'exn_direct_net_fqdn', 1, 'string', ''),
-('ff874603-4222-11e7-9252-005056850d2e', 'exn_hsl_net_fqdn', 1, 'string', '');
-
-
-INSERT INTO heat_environment(ARTIFACT_UUID, NAME, VERSION, DESCRIPTION, BODY, ARTIFACT_CHECKSUM, CREATION_TIMESTAMP) VALUES
-('fefb1601-4222-11e7-9252-005056850d2e', 'module_nso.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n availability_zone_0: \"alln-zone-1\"\n nso_flavor_name: \"citeis.1vCPUx2GB\"\n nso_image_name: \"RHEL-6.8-BASE-20160912\"\n nso_name_0: \"zrdm3vamp01nso001\"\n nso_oam_ip_0: \"172.18.25.175\"\n nso_oam_net_gw: \"172.18.25.1\"\n nso_oam_net_mask: \"255.255.255.0\"\n nso_sec_grp_id: \"36f48d82-f099-4437-bfbc-70d9e5d420d1\"\n nso_srv_grp_id: \"e431c477-5bd1-476a-bfa9-e4ce16b8356b\"\n oam_net_id: \"nso_oam\"\n vf_module_id: \"145cd730797234b4a40aa99335abc143\"\n vnf_id: \"730797234b4a40aa99335157b02871cd\"\n vnf_name: \"Mobisupport\"\n', 'MWI2ODY0Yjc1NDJjNWU1NjdkMTAyMjVkNzFmZDU0MzA=', '2017-11-27 08:42:58'),
-('fefb1751-4333-11e7-9252-005056850d2e', 'module_nso.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n availability_zone_0: \"alln-zone-1\"\n nso_flavor_name: \"citeis.1vCPUx2GB\"\n nso_image_name: \"RHEL-6.8-BASE-20160912\"\n nso_name_0: \"zrdm3vamp01nso001\"\n nso_oam_ip_0: \"172.18.25.175\"\n nso_oam_net_gw: \"172.18.25.1\"\n nso_oam_net_mask: \"255.255.255.0\"\n nso_sec_grp_id: \"36f48d82-f099-4437-bfbc-70d9e5d420d1\"\n nso_srv_grp_id: \"e431c477-5bd1-476a-bfa9-e4ce16b8356b\"\n oam_net_id: \"nso_oam\"\n vf_module_id: \"145cd730797234b4a40aa99335abc143\"\n vnf_id: \"730797234b4a40aa99335157b02871cd\"\n vnf_name: \"Mobisupport\"\n', 'MWI2ODY0Yjc1NDJjNWU1NjdkMTAyMjVkNzFmZDU0MzA=', '2017-11-27 08:42:58');
-
-INSERT INTO vnf_resource(ORCHESTRATION_MODE, DESCRIPTION, CREATION_TIMESTAMP, MODEL_UUID, AIC_VERSION_MIN, AIC_VERSION_MAX, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, TOSCA_NODE_TYPE, HEAT_TEMPLATE_ARTIFACT_UUID) VALUES
-('HEAT', '1607 v10 - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'v10', 'VF', null),
-('HEAT', '1607 v10 - inherent network', '2017-04-14 21:46:28', 'fe6478e4-ea33-3346-ac12-ab121484a3fe', '', '', 'ff5256d1-5a33-55df-13ab-12abad84e7ff', '2.0', 'v12', 'VF', null),
-('HEAT', '1607 v10 - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'v10', 'VF', null),
-('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'fe6478e4-ea33-3346-ac12-ab121484a3fw', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', null);
-
-INSERT INTO vnf_resource_customization(MODEL_CUSTOMIZATION_UUID, MODEL_INSTANCE_NAME, MIN_INSTANCES, MAX_INSTANCES, AVAILABILITY_ZONE_MAX_COUNT, NF_TYPE, NF_ROLE, NF_FUNCTION, NF_NAMING_CODE, CREATION_TIMESTAMP, VNF_RESOURCE_MODEL_UUID, MULTI_STAGE_DESIGN) VALUES
-('68dc9a92-214c-11e7-93ae-92361f002671', 'v10 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null),
-('f78914d9-423b-11e7-93f8-0050569a7967', 'test', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'f78914d9-423b-11e7-93f8-0050569a7967', null),
-('68dc9a92-214c-11e7-93ae-92361f002672', 'test', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null),
-('68dc9a92-214c-11e7-93ae-92361f002673', 'test', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'fe6478e4-ea33-3346-ac12-ab121484a3fe', null),
-('68dc9a92-214c-11e7-93ae-92361f002674', 'test', '0', '0', '0', '', 'TEST', '', '', '2017-05-26 15:08:24', 'fe6478e4-ea33-3346-ac12-ab121484a3fw', null);
-
-
-
-INSERT INTO vf_module(MODEL_UUID, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, DESCRIPTION, IS_BASE, HEAT_TEMPLATE_ARTIFACT_UUID, VOL_HEAT_TEMPLATE_ARTIFACT_UUID, CREATION_TIMESTAMP, VNF_RESOURCE_MODEL_UUID) VALUES
-
-('20c4431c-246d-11e7-93ae-92361f002671', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'test::base::module-0', 'v10 DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
-('066de97e-253e-11e7-93ae-92361f002671', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'test::PCM::module-1', 'v10 DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
-
-
-INSERT INTO vf_module_customization(MODEL_CUSTOMIZATION_UUID, LABEL, INITIAL_COUNT, MIN_INSTANCES, MAX_INSTANCES, AVAILABILITY_ZONE_COUNT, HEAT_ENVIRONMENT_ARTIFACT_UUID, VOL_ENVIRONMENT_ARTIFACT_UUID, CREATION_TIMESTAMP, VF_MODULE_MODEL_UUID) VALUES
-('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671'),
-('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671');
-
-
-INSERT INTO vnf_res_custom_to_vf_module_custom(VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID, VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID, CREATION_TIMESTAMP) VALUES
-('68dc9a92-214c-11e7-93ae-92361f002671', 'cb82ffd8-252a-11e7-93ae-92361f002671', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002671', 'b4ea86b4-253f-11e7-93ae-92361f002671', '2017-05-26 15:08:24');
-
-INSERT INTO allotted_resource(MODEL_UUID, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, TOSCA_NODE_TYPE, SUBCATEGORY, DESCRIPTION, CREATION_TIMESTAMP) VALUES
-('f6b7d4c6-e8a4-46e2-81bc-31cad5072842', 'b7a1b78e-6b6b-4b36-9698-8c9530da14af', '1.0', 'Tunnel_Xconn', '', '', '', '2017-05-26 15:08:24');
-
-INSERT INTO allotted_resource_customization(MODEL_CUSTOMIZATION_UUID, MODEL_INSTANCE_NAME, PROVIDING_SERVICE_MODEL_INVARIANT_UUID, TARGET_NETWORK_ROLE, NF_TYPE, NF_ROLE, NF_FUNCTION, NF_NAMING_CODE, MIN_INSTANCES, MAX_INSTANCES, AR_MODEL_UUID, CREATION_TIMESTAMP) VALUES
-('367a8ba9-057a-4506-b106-fbae818597c6', 'Sec_Tunnel_Xconn 11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'f6b7d4c6-e8a4-46e2-81bc-31cad5072842', TIMESTAMP '2017-01-20 16:14:20.0');
-
-
-INSERT INTO network_resource(MODEL_UUID, MODEL_NAME, MODEL_INVARIANT_UUID, DESCRIPTION, HEAT_TEMPLATE_ARTIFACT_UUID, NEUTRON_NETWORK_TYPE, MODEL_VERSION, TOSCA_NODE_TYPE, AIC_VERSION_MIN, AIC_VERSION_MAX, ORCHESTRATION_MODE, CREATION_TIMESTAMP) VALUES
-('10b36f65-f4e6-4be6-ae49-9596dc1c47fc', 'CONTRAIL30_GNDIRECT', 'ce4ff476-9641-4e60-b4d5-b4abbec1271d', 'Contrail 30 GNDIRECT NW', 'aa874603-4222-11e7-9252-005056850d2e', 'BASIC', '1.0', '', '3.0', '', 'HEAT', '2017-01-17 20:35:05');
-
-INSERT INTO network_resource_customization(MODEL_CUSTOMIZATION_UUID, MODEL_INSTANCE_NAME, NETWORK_TECHNOLOGY, NETWORK_TYPE, NETWORK_ROLE, NETWORK_SCOPE, CREATION_TIMESTAMP, NETWORK_RESOURCE_MODEL_UUID) VALUES
-('3bdbb104-476c-483e-9f8b-c095b3d308ac', 'CONTRAIL30_GNDIRECT 9', '', '', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c47fc');
--second service insert
-
-
-
-
-INSERT INTO vf_module(MODEL_UUID, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, DESCRIPTION, IS_BASE, HEAT_TEMPLATE_ARTIFACT_UUID, VOL_HEAT_TEMPLATE_ARTIFACT_UUID, CREATION_TIMESTAMP, VNF_RESOURCE_MODEL_UUID) VALUES
-
-('20c4431c-246d-11e7-93ae-92361f002672', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'test::base::module-0', 'v10 DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
-('066de97e-253e-11e7-93ae-92361f002672', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'test::PCM::module-1', 'v10 DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
-('test', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'test::PCM::module-1', 'v10 DEV PCM', '1', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002672'),
-('test1', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2', 'test::PCM::module-1', 'v10 DEV PCM', '1', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002672');
-
-INSERT INTO vf_module_customization(MODEL_CUSTOMIZATION_UUID, LABEL, INITIAL_COUNT, MIN_INSTANCES, MAX_INSTANCES, AVAILABILITY_ZONE_COUNT, HEAT_ENVIRONMENT_ARTIFACT_UUID, VOL_ENVIRONMENT_ARTIFACT_UUID, CREATION_TIMESTAMP, VF_MODULE_MODEL_UUID) VALUES
-('cb82ffd8-252a-11e7-93ae-92361f002672', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002672'),
-('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672');
-
-
-INSERT INTO vnf_res_custom_to_vf_module_custom(VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID, VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID, CREATION_TIMESTAMP) VALUES
-('68dc9a92-214c-11e7-93ae-92361f002672', 'cb82ffd8-252a-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002672', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002673', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24');
-
-
-INSERT INTO vf_module_to_heat_files(VF_MODULE_MODEL_UUID, HEAT_FILES_ARTIFACT_UUID) VALUES
-('20c4431c-246d-11e7-93ae-92361f002671', '00535bdd-0878-4478-b95a-c575c742bfb0'),
-('066de97e-253e-11e7-93ae-92361f002671', '00535bdd-0878-4478-b95a-c575c742bfb0');
-
-
-insert into network_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '3bdbb104-476c-483e-9f8b-c095b3d308ac'),
-('5df8b6de-2083-11e7-93ae-92361f002672', '3bdbb104-476c-483e-9f8b-c095b3d308ac');
-
-
-insert into vnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '68dc9a92-214c-11e7-93ae-92361f002671'),
-('f78914d9-423b-11e7-93f8-0050569a7965', 'f78914d9-423b-11e7-93f8-0050569a7967'),
-('5df8b6de-2083-11e7-93ae-92361f002672', '68dc9a92-214c-11e7-93ae-92361f002672');
-
-insert into allotted_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '367a8ba9-057a-4506-b106-fbae818597c6'),
-('5df8b6de-2083-11e7-93ae-92361f002672', '367a8ba9-057a-4506-b106-fbae818597c6');
-
-
INSERT INTO vnf_recipe(ID, nf_role, ACTION, SERVICE_TYPE, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, VNF_PARAM_XSD, RECIPE_TIMEOUT, CREATION_TIMESTAMP, VF_MODULE_ID) VALUES
('77', 'VID_DEFAULT', 'createInstance', '', '1', 'VID_DEFAULT recipe to create VNF if no custom BPMN flow is found', '/mso/async/services/CreateVnfInfra', '', '180', '2016-09-14 19:18:20', ''),
('78', 'VID_DEFAULT', 'deleteInstance', '', '1', 'VID_DEFAULT recipe to delete VNF if no custom BPMN flow is found', '/mso/async/services/DeleteVnfInfra', '', '180', '2016-09-14 19:18:20', ''),
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
index e46996181e..5e8713681b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
@@ -1,842 +1,1209 @@
--------START Catalog DB SCHEMA --------
use catalogdb;
-create table `allotted_resource` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) default null,
- `subcategory` varchar(200) default null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `allotted_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `providing_service_model_uuid` varchar(200) default null,
- `providing_service_model_invariant_uuid` varchar(200) default null,
- `providing_service_model_name` varchar(200) default null,
- `target_network_role` varchar(200) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `ar_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_customization_uuid`),
- key `fk_allotted_resource_customization__allotted_resource1_idx` (`ar_model_uuid`),
- constraint `fk_allotted_resource_customization__allotted_resource1` foreign key (`ar_model_uuid`) references `allotted_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_environment` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(100) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_files` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `timeout_minutes` int(11) default null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_nested_template` (
- `parent_heat_template_uuid` varchar(200) not null,
- `child_heat_template_uuid` varchar(200) not null,
- `provider_resource_file` varchar(100) default null,
- primary key (`parent_heat_template_uuid`,`child_heat_template_uuid`),
- key `fk_heat_nested_template__heat_template2_idx` (`child_heat_template_uuid`),
- constraint `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` foreign key (`child_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` foreign key (`parent_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template_params` (
- `heat_template_artifact_uuid` varchar(200) not null,
- `param_name` varchar(100) not null,
- `is_required` bit(1) not null,
- `param_type` varchar(20) default null,
- `param_alias` varchar(45) default null,
- primary key (`heat_template_artifact_uuid`,`param_name`),
- constraint `fk_heat_template_params__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_recipe` (
- `id` int(11) not null auto_increment,
- `model_name` varchar(20) not null,
- `action` varchar(50) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `network_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_type` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `version_str` varchar(20) not null,
- primary key (`id`),
- unique key `uk_rl4f296i0p8lyokxveaiwkayi` (`model_name`,`action`,`version_str`)
-) engine=innodb auto_increment=178 default charset=latin1;
-
-
-
-
-create table `temp_network_heat_template_lookup` (
- `network_resource_model_name` varchar(200) not null,
- `heat_template_artifact_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) not null,
- `aic_version_max` varchar(20) default null,
- primary key (`network_resource_model_name`),
- key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_temp_network_heat_template_lookup__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_resource` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) null,
- `neutron_network_type` varchar(20) default null,
- `model_version` varchar(20) default null,
- `tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) null,
- `aic_version_max` varchar(20) default null,
- `orchestration_mode` varchar(20) default 'heat',
- `resource_category` varchar(20) default null,
- `resource_sub_category` varchar(20) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`),
- key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
- key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `network_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `network_technology` varchar(45) default null,
- `network_type` varchar(45) default null,
- `network_role` varchar(200) default null,
- `network_scope` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `network_resource_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- primary key (`model_customization_uuid`),
- key `fk_network_resource_customization__network_resource1_idx` (`network_resource_model_uuid`),
- constraint `fk_network_resource_customization__network_resource1` foreign key (`network_resource_model_uuid`) references `network_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `tosca_csar` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `artifact_checksum` varchar(200) not null,
- `url` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `service` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `tosca_csar_artifact_uuid` varchar(200) default null,
- `service_type` varchar(200) default null,
- `service_role` varchar(200) default null,
- `environment_context` varchar(200) default null,
- `workload_context` varchar(200) default null,
- `service_category` varchar(200) default null,
- `resource_order` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_service__tosca_csar1_idx` (`tosca_csar_artifact_uuid`),
- constraint `fk_service__tosca_csar1` foreign key (`tosca_csar_artifact_uuid`) references `tosca_csar` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `service_recipe` (
- `id` int(11) not null auto_increment,
- `action` varchar(50) not null,
- `version_str` varchar(20) default null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `service_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_timeout_interim` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `service_model_uuid` varchar(200) not null,
- primary key (`id`),
- unique key `uk_7fav5dkux2v8g9d2i5ymudlgc` (`service_model_uuid`,`action`),
- key `fk_service_recipe__service1_idx` (`service_model_uuid`),
- constraint `fk_service_recipe__service1` foreign key (`service_model_uuid`) references `service` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb auto_increment=86 default charset=latin1;
-
-
-
-create table `vnf_resource` (
- `orchestration_mode` varchar(20) not null default 'heat',
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `model_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) default null,
- `aic_version_max` varchar(20) default null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) default null,
- `tosca_node_type` varchar(200) default null,
- `resource_category` varchar(200) default null,
- `resource_sub_category` varchar(200) default null,
- `heat_template_artifact_uuid` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_vnf_resource__heat_template1` (`heat_template_artifact_uuid`),
- constraint `fk_vnf_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vf_module` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) default null,
- `is_base` int(11) not null,
- `heat_template_artifact_uuid` varchar(200) default null,
- `vol_heat_template_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- primary key (`model_uuid`,`vnf_resource_model_uuid`),
- key `fk_vf_module__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- key `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`heat_template_artifact_uuid`),
- key `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`vol_heat_template_artifact_uuid`),
- constraint `fk_vf_module__heat_template_art_uuid__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vol_heat_template_art_uuid__heat_template2` foreign key (`vol_heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_customization` (
- `model_customization_uuid` varchar(200) not null,
- `label` varchar(200) default null,
- `initial_count` int(11) default '0',
- `min_instances` int(11) default '0',
- `max_instances` int(11) default null,
- `availability_zone_count` int(11) default null,
- `heat_environment_artifact_uuid` varchar(200) default null,
- `vol_environment_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vf_module_model_uuid` varchar(200) not null,
- primary key (`model_customization_uuid`),
- key `fk_vf_module_customization__vf_module1_idx` (`vf_module_model_uuid`),
- key `fk_vf_module_customization__heat_env__heat_environment1_idx` (`heat_environment_artifact_uuid`),
- key `fk_vf_module_customization__vol_env__heat_environment2_idx` (`vol_environment_artifact_uuid`),
- constraint `fk_vf_module_customization__heat_env__heat_environment1` foreign key (`heat_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vf_module1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vol_env__heat_environment2` foreign key (`vol_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vf_module_to_heat_files`
---
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_to_heat_files` (
- `vf_module_model_uuid` varchar(200) not null,
- `heat_files_artifact_uuid` varchar(200) not null,
- primary key (`vf_module_model_uuid`,`heat_files_artifact_uuid`),
- key `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`heat_files_artifact_uuid`),
- constraint `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` foreign key (`heat_files_artifact_uuid`) references `heat_files` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_to_heat_files__vf_module__model_uuid1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1 comment='il fait ce qu''il dit';
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vnf_components`
---
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vnf_components` (
- `vnf_id` int(11) not null,
- `component_type` varchar(20) not null,
- `heat_template_id` int(11) default null,
- `heat_environment_id` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_id`,`component_type`)
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vnf_components_recipe`
---
-
-
-
-create table `vnf_components_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `vnf_component_type` varchar(45) not null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_component_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_model_uuid` varchar(200) default null,
- primary key (`id`),
- unique key `uk_4dpdwddaaclhc11wxsb7h59ma` (`vf_module_model_uuid`,`vnf_component_type`,`action`,`version`)
-) engine=innodb auto_increment=26 default charset=latin1;
-
-
-
-
-create table `vnf_recipe` (
- `id` int(11) not null auto_increment,
- `nf_role` varchar(200) default null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version_str` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_id` varchar(100) default null,
- primary key (`id`),
- unique key `uk_f3tvqau498vrifq3cr8qnigkr` (`vf_module_id`,`action`,`version_str`)
-) engine=innodb auto_increment=10006 default charset=latin1;
-
-
-
-
-
-
-
-
-create table `vnf_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `availability_zone_max_count` int(11) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- `multi_stage_design` varchar(20) default null,
- `resource_input` varchar(20000) default null,
- primary key (`model_customization_uuid`),
- key `fk_vnf_resource_customization__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- constraint `fk_vnf_resource_customization__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vnf_res_custom_to_vf_module_custom` (
- `vnf_resource_cust_model_customization_uuid` varchar(200) not null,
- `vf_module_cust_model_customization_uuid` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_cust_model_customization_uuid`,`vf_module_cust_model_customization_uuid`),
- key `fk_vnf_res_custom_to_vf_module_custom__vf_module_customizat_idx` (`vf_module_cust_model_customization_uuid`),
- constraint `fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1` foreign key (`vf_module_cust_model_customization_uuid`) references `vf_module_customization` (`model_customization_uuid`) on delete cascade on update cascade,
- constraint `fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1` foreign key (`vnf_resource_cust_model_customization_uuid`) references `vnf_resource_customization` (`model_customization_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-create table if not exists `external_service_to_internal_model_mapping` (
-id int(11) not null,
-service_name varchar(200) not null,
-product_flavor varchar(200) null,
-subscription_service_type varchar(200) not null,
-service_model_uuid varchar(200) not null,
-primary key (id),
-unique index uk_external_service_to_internal_model_mapping
-(service_name asc, product_flavor asc, service_model_uuid asc));
-
-create table if not exists `collection_resource` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) not null,
- description varchar(200),
- creation_timestamp datetime not null default current_timestamp,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_customization` (
- model_customization_uuid varchar(200) not null,
- model_instance_name varchar(200) not null,
- role varchar(200) NULL,
- object_type varchar(200) not null,
- function varchar(200) NULL,
- collection_resource_type varchar(200) NULL,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- primary key (`model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `instance_group` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) NULL,
- role varchar(200) not null,
- object_type varchar(200) not null,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- instance_group_type varchar(200) not null,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table if not exists `collection_resource_instance_group_customization` (
- `collection_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `subinterface_network_quantity` int(11) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`collection_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_collection_resource_instance_group_customization__instan_idx` (`instance_group_model_uuid` asc),
- constraint `fk_collection_resource_instance_group_customization__collecti1`
- foreign key (`collection_resource_customization_model_uuid`)
- references `collection_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_collection_resource_instance_group_customization__instance1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
-create table if not exists `vnfc_instance_group_customization` (
- `vnf_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_vnfc_instance_group_customization__instance_group1_idx` (`instance_group_model_uuid` asc),
- constraint `fk_vnfc_instance_group_customization__vnf_resource_customizat1`
- foreign key (`vnf_resource_customization_model_uuid`)
- references `vnf_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_vnfc_instance_group_customization__instance_group1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
- create table if not exists `configuration`
- ( `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
- CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `MODEL_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
- `MODEL_VERSION` VARCHAR(20) NOT NULL,
- `MODEL_NAME` VARCHAR(200) NOT NULL,
- `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
- `DESCRIPTION` VARCHAR(1200) NULL,
- `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+set foreign_key_checks=0;
+DROP TABLE IF EXISTS `allotted_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `SUBCATEGORY` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `PROVIDING_SERVICE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TARGET_NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `AR_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
- INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
- UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_service_proxy_resource_customization__service1`
- FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
- REFERENCES `service` (`MODEL_UUID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE)
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-create table if not exists `configuration_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`configuration_type` varchar(200) null,
-`configuration_role` varchar(200) null,
-`configuration_function` varchar(200) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`configuration_model_uuid` varchar(200) not null,
-`service_proxy_customization_model_customization_uuid` varchar(200) null,
-`configuration_customization_model_customization_uuid` varchar(200) null,
-primary key (`model_customization_uuid`),
-index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__configuration_customization_idx`
-(`configuration_customization_model_customization_uuid` asc),
-constraint `fk_configuration_resource_customization__configuration_resour1`
-foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_configuration_customization__configuration_customization1`
-foreign key (`configuration_customization_model_customization_uuid`) references
-`configuration_customization` (`model_customization_uuid`)
-on delete cascade on update cascade)
-engine = innodb
-auto_increment =20654
-default character set = latin1;
-
-
-create table `service_proxy_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `configuration_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table if not exists `collection_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `network_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `vnf_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `allotted_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-
-create table ar_recipe (
- ID INT(11) not null auto_increment,
- MODEL_NAME VARCHAR(200) NOT NULL,
- `ACTION` VARCHAR(200) NOT NULL,
- VERSION_STR VARCHAR(200) NOT NULL,
- SERVICE_TYPE VARCHAR(200),
- DESCRIPTION VARCHAR(200),
- ORCHESTRATION_URI VARCHAR(200) NOT NULL,
- AR_PARAM_XSD VARCHAR(200),
- RECIPE_TIMEOUT INT(10),
- CREATION_TIMESTAMP DATETIME NOT NULL default current_timestamp,
- primary key (ID),
- unique key `uk_ar_recipe` (`model_name`,`action`,`version_str`)
+ KEY `fk_allotted_resource_customization__allotted_resource1_idx` (`AR_MODEL_UUID`),
+ CONSTRAINT `fk_allotted_resource_customization__allotted_resource1` FOREIGN KEY (`AR_MODEL_UUID`) REFERENCES `allotted_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `allotted_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `ar_recipe`
+--
+
+DROP TABLE IF EXISTS `ar_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ar_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `VERSION_STR` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(200) NOT NULL,
+ `AR_PARAM_XSD` varchar(200) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk_ar_recipe` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `building_block_detail`
+--
+
+DROP TABLE IF EXISTS `building_block_detail`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `building_block_detail` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `BUILDING_BLOCK_NAME` varchar(200) NOT NULL,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_building_block_name` (`BUILDING_BLOCK_NAME`)
+) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloud_sites`
+--
+
+DROP TABLE IF EXISTS `cloud_sites`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloud_sites` (
+ `ID` varchar(50) NOT NULL,
+ `REGION_ID` varchar(11) DEFAULT NULL,
+ `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
+ `CLOUD_VERSION` varchar(20) DEFAULT NULL,
+ `CLLI` varchar(11) DEFAULT NULL,
+ `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
+ `PLATFORM` varchar(50) DEFAULT NULL,
+ `ORCHESTRATOR` varchar(50) DEFAULT NULL,
+ `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
+ CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloudify_managers`
+--
+
+DROP TABLE IF EXISTS `cloudify_managers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloudify_managers` (
+ `ID` varchar(50) NOT NULL,
+ `CLOUDIFY_URL` varchar(200) DEFAULT NULL,
+ `USERNAME` varchar(255) DEFAULT NULL,
+ `PASSWORD` varchar(255) DEFAULT NULL,
+ `VERSION` varchar(20) DEFAULT NULL,
+ `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `CRC_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`,`CRC_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_collection_net_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ KEY `fk_collection_net_resource_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_col_net_res_customization__collection_res_customization_idx` (`CRC_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_collection_net_resource_customization__instance_group10` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_net_resource_customization__network_resource10` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_network_resource_customization__collection_reso1` FOREIGN KEY (`CRC_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource`
+--
+
+DROP TABLE IF EXISTS `collection_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `role` varchar(200) DEFAULT NULL,
+ `object_type` varchar(200) NOT NULL,
+ `function` varchar(200) DEFAULT NULL,
+ `collection_resource_type` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`),
+ CONSTRAINT `collection_resource_customization_ibfk_1` FOREIGN KEY (`CR_MODEL_UUID`) REFERENCES `collection_resource` (`MODEL_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_instance_group_customization` (
+ `COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SUBINTERFACE_NETWORK_QUANTITY` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`,`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_collection_resource_instance_group_customization__instan_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_collection_resource_instance_group_customization__collecti1` FOREIGN KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_resource_instance_group_customization__instance1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration`
+--
+
+DROP TABLE IF EXISTS `configuration`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization`
+--
+
+DROP TABLE IF EXISTS `configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ KEY `fk_configuration_customization__service_proxy_customization_idx` (`SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_customization_idx` (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_configuration_customization__configuration_customization1` FOREIGN KEY (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`) REFERENCES `configuration_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_configuration_resource_customization__configuration_resour1` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `configuration_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `controller_selection_reference`
+--
+
+DROP TABLE IF EXISTS `controller_selection_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `controller_selection_reference` (
+ `VNF_TYPE` varchar(50) NOT NULL,
+ `CONTROLLER_NAME` varchar(100) NOT NULL,
+ `ACTION_CATEGORY` varchar(15) NOT NULL,
+ PRIMARY KEY (`VNF_TYPE`,`CONTROLLER_NAME`,`ACTION_CATEGORY`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_configuration_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_configuration_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `POLICY_NAME` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `CVNFC_CUSTOMIZATION_ID` int(11) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `NFC_FUNCTION` varchar(200) DEFAULT NULL,
+ `NFC_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `VF_MODULE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization_to_vf_module_resource_customization` (`VF_MODULE_CUSTOMIZATION_ID`),
+ CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_cvnfc_customization_to_vf_module_resource_customization` FOREIGN KEY (`VF_MODULE_CUSTOMIZATION_ID`) REFERENCES `vf_module_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `external_service_to_internal_model_mapping`
+--
+
+DROP TABLE IF EXISTS `external_service_to_internal_model_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `external_service_to_internal_model_mapping` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `SERVICE_NAME` varchar(200) NOT NULL,
+ `PRODUCT_FLAVOR` varchar(200) DEFAULT NULL,
+ `SUBSCRIPTION_SERVICE_TYPE` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_external_service_to_internal_model_mapping` (`SERVICE_NAME`,`PRODUCT_FLAVOR`,`SERVICE_MODEL_UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
-alter table collection_resource_customization
-add foreign key ( cr_model_uuid)
-references collection_resource(model_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-alter table network_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-
-alter table network_resource_customization
-add foreign key ( instance_group_model_uuid)
-references instance_group(model_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table vnf_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references network_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references vnf_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references allotted_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references collection_resource_customization(model_customization_uuid)
-on delete cascade;
-
-
-create table if not exists `collection_network_resource_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`network_technology` varchar(45) null,
-`network_type` varchar(45) null,
-`network_role` varchar(200) null,
-`network_scope` varchar(45) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`network_resource_model_uuid` varchar(200) not null, `instance_group_model_uuid` varchar(200) null,
-`crc_model_customization_uuid` varchar(200) not null, primary key
-(`model_customization_uuid`, `crc_model_customization_uuid`),
-index `fk_collection_net_resource_customization__network_resource1_idx`
-(`network_resource_model_uuid` asc), index
-`fk_collection_net_resource_customization__instance_group1_idx`
-(`instance_group_model_uuid` asc), index
-`fk_col_net_res_customization__collection_res_customization_idx`
-(`crc_model_customization_uuid` asc), constraint
-`fk_collection_net_resource_customization__network_resource10` foreign
-key (`network_resource_model_uuid`) references
-`network_resource` (`model_uuid`) on delete cascade on
-update cascade, constraint
-`fk_collection_net_resource_customization__instance_group10` foreign key
-(`instance_group_model_uuid`) references `instance_group`
-(`model_uuid`) on delete cascade on update cascade, constraint
-`fk_collection_network_resource_customization__collection_reso1` foreign
-key (`crc_model_customization_uuid`) references
-`collection_resource_customization`
-(`model_customization_uuid`) on delete cascade on update cascade) engine
-= innodb default character set = latin1;
-
-CREATE TABLE IF NOT EXISTS `rainy_day_handler_macro` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`SERVICE_TYPE` VARCHAR(200) NOT NULL,
-`VNF_TYPE` VARCHAR(200) NOT NULL,
-`ERROR_CODE` VARCHAR(200) NOT NULL,
-`WORK_STEP` VARCHAR(200) NOT NULL,
-`POLICY` VARCHAR(200) NOT NULL,
-PRIMARY KEY (`id`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
-`ACTION` VARCHAR(200) NOT NULL,
-`MACRO_ACTION` VARCHAR(200) NOT NULL,
-`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
-`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 0,
-`MIN_API_VERSION` DOUBLE NOT NULL,
-`MAX_API_VERSION` DOUBLE NULL,
-PRIMARY KEY (`id`),
-UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `orchestration_flow_reference` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`COMPOSITE_ACTION` VARCHAR(200) NOT NULL,
-`SEQ_NO` INT(11) NOT NULL,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`FLOW_VERSION` DOUBLE NOT NULL,
-`NB_REQ_REF_LOOKUP_ID` INT(11) NOT NULL,
-PRIMARY KEY (`id`),
-INDEX `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID` ASC),
-UNIQUE INDEX `UK_orchestration_flow_reference` (`COMPOSITE_ACTION` ASC, `FLOW_NAME` ASC, `SEQ_NO` ASC, `NB_REQ_REF_LOOKUP_ID` ASC),
-CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1`
-FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`)
-ON DELETE CASCADE ON UPDATE CASCADE)
-ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS vnfc_customization (
-`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
-`MODEL_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
-`MODEL_VERSION` VARCHAR(20) NOT NULL,
-`MODEL_NAME` VARCHAR(200) NOT NULL,
-`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
-`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
-`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
-PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`))
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS cvnfc_customization (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `MODEL_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
- `MODEL_VERSION` VARCHAR(20) NOT NULL,
- `MODEL_NAME` VARCHAR(200) NOT NULL,
- `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
- `DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
- `NFC_FUNCTION` VARCHAR(200) NULL,
- `NFC_NAMING_CODE` VARCHAR(200) NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- PRIMARY KEY (`ID`),
- INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC
- ),
- INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (
- `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC
- ),
- INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC
- ),
- UNIQUE INDEX `UK_cvnfc_customization` (
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC,
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC,
- `MODEL_CUSTOMIZATION_UUID` ASC
- ),
- INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`
- ) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (
- `VNFC_CUST_MODEL_CUSTOMIZATION_UUID`
- ) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`
- ) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `CONFIGURATION_TYPE` VARCHAR(200) NULL,
- `CONFIGURATION_ROLE` VARCHAR(200) NULL,
- `CONFIGURATION_FUNCTION` VARCHAR(200) NULL,
- `POLICY_NAME` VARCHAR(200) NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL,
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL,
- `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL,
- `CVNFC_CUSTOMIZATION_ID` INT(11) DEFAULT NULL,
- PRIMARY KEY (`ID`),
- INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC),
-
- CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`)
- REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE = INNODB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = LATIN1;
+--
+-- Table structure for table `flyway_schema_history`
+--
+
+DROP TABLE IF EXISTS `flyway_schema_history`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `flyway_schema_history` (
+ `installed_rank` int(11) NOT NULL,
+ `version` varchar(50) DEFAULT NULL,
+ `description` varchar(200) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `script` varchar(1000) NOT NULL,
+ `checksum` int(11) DEFAULT NULL,
+ `installed_by` varchar(100) NOT NULL,
+ `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `execution_time` int(11) NOT NULL,
+ `success` tinyint(1) NOT NULL,
+ PRIMARY KEY (`installed_rank`),
+ KEY `flyway_schema_history_s_idx` (`success`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_environment`
+--
+
+DROP TABLE IF EXISTS `heat_environment`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_environment` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(100) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_files`
+--
+
+DROP TABLE IF EXISTS `heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_files` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_nested_template`
+--
+
+DROP TABLE IF EXISTS `heat_nested_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_nested_template` (
+ `PARENT_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `CHILD_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `PROVIDER_RESOURCE_FILE` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`PARENT_HEAT_TEMPLATE_UUID`,`CHILD_HEAT_TEMPLATE_UUID`),
+ KEY `fk_heat_nested_template__heat_template2_idx` (`CHILD_HEAT_TEMPLATE_UUID`),
+ CONSTRAINT `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` FOREIGN KEY (`CHILD_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` FOREIGN KEY (`PARENT_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template`
+--
+
+DROP TABLE IF EXISTS `heat_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `TIMEOUT_MINUTES` int(11) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template_params`
+--
+
+DROP TABLE IF EXISTS `heat_template_params`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template_params` (
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NOT NULL,
+ `PARAM_NAME` varchar(100) NOT NULL,
+ `IS_REQUIRED` bit(1) NOT NULL,
+ `PARAM_TYPE` varchar(20) DEFAULT NULL,
+ `PARAM_ALIAS` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`,`PARAM_NAME`),
+ CONSTRAINT `fk_heat_template_params__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `identity_services`
+--
+
+DROP TABLE IF EXISTS `identity_services`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `identity_services` (
+ `ID` varchar(50) NOT NULL,
+ `IDENTITY_URL` varchar(200) DEFAULT NULL,
+ `MSO_ID` varchar(255) DEFAULT NULL,
+ `MSO_PASS` varchar(255) DEFAULT NULL,
+ `ADMIN_TENANT` varchar(50) DEFAULT NULL,
+ `MEMBER_ROLE` varchar(50) DEFAULT NULL,
+ `TENANT_METADATA` tinyint(1) DEFAULT '0',
+ `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
+ `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
+ `LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `instance_group`
+--
+
+DROP TABLE IF EXISTS `instance_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `instance_group` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `ROLE` varchar(200) NOT NULL,
+ `OBJECT_TYPE` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `INSTANCE_GROUP_TYPE` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model`
+--
+
+DROP TABLE IF EXISTS `model`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_ID` varchar(40) DEFAULT NULL,
+ `MODEL_CUSTOMIZATION_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_INVARIANT_ID` varchar(40) DEFAULT NULL,
+ `MODEL_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION_ID` varchar(40) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RECIPE` int(11) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk1_model` (`MODEL_TYPE`,`MODEL_VERSION_ID`),
+ KEY `RECIPE` (`RECIPE`),
+ CONSTRAINT `model_ibfk_1` FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model_recipe`
+--
+
+DROP TABLE IF EXISTS `model_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_ID` int(11) DEFAULT NULL,
+ `ACTION` varchar(40) DEFAULT NULL,
+ `SCHEMA_VERSION` varchar(40) DEFAULT NULL,
+ `DESCRIPTION` varchar(40) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(20) DEFAULT NULL,
+ `MODEL_PARAM_XSD` varchar(20) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk1_model_recipe` (`MODEL_ID`,`ACTION`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_recipe`
+--
+
+DROP TABLE IF EXISTS `network_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(20) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `NETWORK_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_rl4f296i0p8lyokxveaiwkayi` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource`
+--
+
+DROP TABLE IF EXISTS `network_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `NEUTRON_NETWORK_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `ORCHESTRATION_MODE` varchar(20) DEFAULT 'HEAT',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_network_resource__temp_network_heat_template_lookup1_idx` (`MODEL_NAME`),
+ KEY `fk_network_resource__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_network_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE,
+ CONSTRAINT `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` FOREIGN KEY (`MODEL_NAME`) REFERENCES `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_network_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_network_resource_customization__network_resource1` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `network_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `network_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `network_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `northbound_request_ref_lookup`
+--
+
+DROP TABLE IF EXISTS `northbound_request_ref_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `northbound_request_ref_lookup` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `REQUEST_SCOPE` varchar(200) NOT NULL,
+ `MACRO_ACTION` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `IS_ALACARTE` tinyint(1) NOT NULL DEFAULT '0',
+ `MIN_API_VERSION` double NOT NULL,
+ `MAX_API_VERSION` double DEFAULT NULL,
+ `IS_TOPLEVELFLOW` tinyint(1) DEFAULT NULL,
+ `CLOUD_OWNER` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_northbound_request_ref_lookup` (`MIN_API_VERSION`,`REQUEST_SCOPE`,`ACTION`,`IS_ALACARTE`,`MACRO_ACTION`,`CLOUD_OWNER`)
+) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_flow_reference`
+--
+
+DROP TABLE IF EXISTS `orchestration_flow_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_flow_reference` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `COMPOSITE_ACTION` varchar(200) NOT NULL,
+ `SEQ_NO` int(11) NOT NULL,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `FLOW_VERSION` double NOT NULL,
+ `NB_REQ_REF_LOOKUP_ID` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_flow_reference` (`COMPOSITE_ACTION`,`FLOW_NAME`,`SEQ_NO`,`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__building_block_detail` (`FLOW_NAME`),
+ CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1` FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=398 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_status_state_transition_directive`
+--
+
+DROP TABLE IF EXISTS `orchestration_status_state_transition_directive`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_status_state_transition_directive` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `ORCHESTRATION_STATUS` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ `FLOW_DIRECTIVE` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_status_state_transition_directive` (`RESOURCE_TYPE`,`ORCHESTRATION_STATUS`,`TARGET_ACTION`)
+) ENGINE=InnoDB AUTO_INCREMENT=686 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `rainy_day_handler_macro`
+--
+
+DROP TABLE IF EXISTS `rainy_day_handler_macro`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `rainy_day_handler_macro` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) NOT NULL,
+ `VNF_TYPE` varchar(200) NOT NULL,
+ `ERROR_CODE` varchar(200) NOT NULL,
+ `WORK_STEP` varchar(200) NOT NULL,
+ `POLICY` varchar(200) NOT NULL,
+ `SECONDARY_POLICY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service`
+--
+
+DROP TABLE IF EXISTS `service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `TOSCA_CSAR_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `SERVICE_ROLE` varchar(200) DEFAULT NULL,
+ `ENVIRONMENT_CONTEXT` varchar(200) DEFAULT NULL,
+ `WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
+ `SERVICE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_ORDER` varchar(200) default NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
+ CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SOURCE_SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1` FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_recipe`
+--
+
+DROP TABLE IF EXISTS `service_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ACTION` varchar(50) NOT NULL,
+ `VERSION_STR` varchar(20) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `SERVICE_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TIMEOUT_INTERIM` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_7fav5dkux2v8g9d2i5ymudlgc` (`SERVICE_MODEL_UUID`,`ACTION`),
+ KEY `fk_service_recipe__service1_idx` (`SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_recipe__service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `temp_network_heat_template_lookup`
+--
+
+DROP TABLE IF EXISTS `temp_network_heat_template_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `temp_network_heat_template_lookup` (
+ `NETWORK_RESOURCE_MODEL_NAME` varchar(200) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`NETWORK_RESOURCE_MODEL_NAME`),
+ KEY `fk_temp_network_heat_template_lookup__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_temp_network_heat_template_lookup__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `tosca_csar`
+--
+
+DROP TABLE IF EXISTS `tosca_csar`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tosca_csar` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL,
+ `URL` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module`
+--
+
+DROP TABLE IF EXISTS `vf_module`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `IS_BASE` tinyint(1) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`,`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ KEY `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module__heat_template_art_uuid__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vol_heat_template_art_uuid__heat_template2` FOREIGN KEY (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_customization`
+--
+
+DROP TABLE IF EXISTS `vf_module_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `LABEL` varchar(200) DEFAULT NULL,
+ `INITIAL_COUNT` int(11) DEFAULT '0',
+ `MIN_INSTANCES` int(11) DEFAULT '0',
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_COUNT` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
+ KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization__vol_env__heat_environment2_idx` (`VOL_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization_to_vnf_resource_customization` (`VNF_RESOURCE_CUSTOMIZATION_ID`),
+ KEY `vf_module_customization_model_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vf_module_customization__heat_env__heat_environment1` FOREIGN KEY (`HEAT_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vf_module1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vol_env__heat_environment2` FOREIGN KEY (`VOL_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization_to_vnf_resource_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_to_heat_files`
+--
+
+DROP TABLE IF EXISTS `vf_module_to_heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_to_heat_files` (
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `HEAT_FILES_ARTIFACT_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`VF_MODULE_MODEL_UUID`,`HEAT_FILES_ARTIFACT_UUID`),
+ KEY `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`HEAT_FILES_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` FOREIGN KEY (`HEAT_FILES_ARTIFACT_UUID`) REFERENCES `heat_files` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_to_heat_files__vf_module__model_uuid1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='il fait ce qu''il dit';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components`
+--
+
+DROP TABLE IF EXISTS `vnf_components`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components` (
+ `VNF_ID` int(11) NOT NULL,
+ `COMPONENT_TYPE` varchar(20) NOT NULL,
+ `HEAT_TEMPLATE_ID` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ID` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`VNF_ID`,`COMPONENT_TYPE`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_components_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `VNF_TYPE` varchar(200) DEFAULT NULL,
+ `VNF_COMPONENT_TYPE` varchar(45) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_COMPONENT_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_4dpdwddaaclhc11wxsb7h59ma` (`VF_MODULE_MODEL_UUID`,`VNF_COMPONENT_TYPE`,`ACTION`,`VERSION`)
+) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_ID` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_f3tvqau498vrifq3cr8qnigkr` (`VF_MODULE_ID`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=10015 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource`
+--
+
+DROP TABLE IF EXISTS `vnf_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `AIC_VERSION_MIN` varchar(20) DEFAULT NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_vnf_resource__heat_template1` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vnf_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource_customization`
+--
+
+DROP TABLE IF EXISTS `vnf_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_MAX_COUNT` int(11) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) default null,
+ `CDS_BLUEPRINT_VERSION` varchar(20) default null,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization_to_service` (`SERVICE_MODEL_UUID`),
+ KEY `vnf_resource_customization_mod_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vnf_resource_customization__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnf_resource_customization_to_service` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_instance_group_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ KEY `fk_vnfc_instance_group_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_vnfc_instance_group_customization__instance_group1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnfc_instance_group_customization_vnf_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+set foreign_key_checks=1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `PNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(2000) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL,
+ `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `pnf_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `pnf_resource` (
`ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java
index 7c6fb04079..ccfa71306b 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResource.java
@@ -81,7 +81,7 @@ public class ConfigurationResource implements Serializable {
private Set<ConfigurationResourceCustomization> configurationResourceCustomization;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "configurationResource")
- private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization;
+ private Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization;
@PrePersist
protected void onCreate() {
@@ -151,15 +151,14 @@ public class ConfigurationResource implements Serializable {
}
@LinkedResource
- public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() {
- return vnfVfmoduleCvnfcConfigurationCustomization;
+ public Set<CvnfcConfigurationCustomization> getCvnfcConfigurationCustomization() {
+ return cvnfcConfigurationCustomization;
}
-
- public void setVnfVfmoduleCvnfcConfigurationCustomization(
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) {
- this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization;
+
+ public void setCvnfcConfigurationCustomization(Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization) {
+ this.cvnfcConfigurationCustomization = cvnfcConfigurationCustomization;
}
-
+
@Override
public String toString() {
return new ToStringBuilder(this).append("modelUUID", modelUUID).append("modelInvariantUUID", modelInvariantUUID)
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java
index e425ebbc64..1e09c6e671 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java
@@ -48,17 +48,17 @@ import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@Table(name = "vnf_vfmodule_cvnfc_configuration_customization")
-public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable {
+@Table(name = "cvnfc_configuration_customization")
+public class CvnfcConfigurationCustomization implements Serializable {
private static final long serialVersionUID = -3153216266280581103L;
@Id
- @Column(name = "ID")
+ @BusinessKey
+ @Column(name = "ID")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
- @BusinessKey
@Column(name = "MODEL_CUSTOMIZATION_UUID")
private String modelCustomizationUUID;
@@ -76,7 +76,6 @@ public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable
@Column(name = "POLICY_NAME")
private String policyName;
-
@Column(name = "CREATION_TIMESTAMP", updatable = false)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
@@ -87,39 +86,25 @@ public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable
@JoinColumn(name = "CONFIGURATION_MODEL_UUID")
private ConfigurationResource configurationResource;
- @BusinessKey
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "CVNFC_CUSTOMIZATION_ID")
private CvnfcCustomization cvnfcCustomization;
-
- @BusinessKey
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "VF_MODULE_MODEL_CUSTOMIZATION_UUID")
- private VfModuleCustomization vfModuleCustomization;
- @BusinessKey
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID")
- private VnfResourceCustomization vnfResourceCustomization;
@Override
public boolean equals(final Object other) {
- if (!(other instanceof VnfVfmoduleCvnfcConfigurationCustomization)) {
+ if (!(other instanceof CvnfcConfigurationCustomization)) {
return false;
}
- VnfVfmoduleCvnfcConfigurationCustomization castOther = (VnfVfmoduleCvnfcConfigurationCustomization) other;
- return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID)
- .append(cvnfcCustomization, castOther.cvnfcCustomization)
- .append(vfModuleCustomization, castOther.vfModuleCustomization)
- .append(vnfResourceCustomization, castOther.vnfResourceCustomization).isEquals();
+ CvnfcConfigurationCustomization castOther = (CvnfcConfigurationCustomization) other;
+ return new EqualsBuilder().append(id, castOther.id).isEquals();
}
@Override
public int hashCode() {
- return new HashCodeBuilder().append(modelCustomizationUUID).append(cvnfcCustomization)
- .append(vfModuleCustomization).append(vnfResourceCustomization).toHashCode();
+ return new HashCodeBuilder().append(id).toHashCode();
}
@@ -130,9 +115,7 @@ public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable
.append("modelInstanceName", modelInstanceName).append("configurationType", configurationType)
.append("configurationRole", configurationRole).append("configurationFunction", configurationFunction)
.append("policyName", policyName).append("created", created)
- .append("configurationResource", configurationResource).append("cvnfcCustomization", cvnfcCustomization)
- .append("vfModuleCustomization", vfModuleCustomization)
- .append("vnfResourceCustomization", vnfResourceCustomization).toString();
+ .append("configurationResource", configurationResource).append("cvnfcCustomization", cvnfcCustomization).toString();
}
@@ -224,21 +207,4 @@ public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable
this.cvnfcCustomization = cvnfcCustomization;
}
- @LinkedResource
- public VfModuleCustomization getVfModuleCustomization() {
- return vfModuleCustomization;
- }
-
- public void setVfModuleCustomization(VfModuleCustomization vfModuleCustomization) {
- this.vfModuleCustomization = vfModuleCustomization;
- }
-
- @LinkedResource
- public VnfResourceCustomization getVnfResourceCustomization() {
- return vnfResourceCustomization;
- }
-
- public void setVnfResourceCustomization(VnfResourceCustomization vnfResourceCustomization) {
- this.vnfResourceCustomization = vnfResourceCustomization;
- }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
index 9f081ccd34..a7bbb9fb01 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
@@ -56,10 +56,10 @@ public class CvnfcCustomization implements Serializable {
@Id
@Column(name = "ID")
+ @BusinessKey
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
- @BusinessKey
@Column(name = "MODEL_CUSTOMIZATION_UUID")
private String modelCustomizationUUID;
@@ -96,19 +96,15 @@ public class CvnfcCustomization implements Serializable {
private Date created;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID")
- private VfModuleCustomization vfModuleCustomization;
+ @JoinColumn(name = "VF_MODULE_CUSTOMIZATION_ID")
+ private VfModuleCustomization vfModuleCustomization;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "VNFC_CUST_MODEL_CUSTOMIZATION_UUID")
private VnfcCustomization vnfcCustomization;
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID")
- private VnfResourceCustomization vnfResourceCustomization;
-
@OneToMany(cascade = CascadeType.ALL, mappedBy = "cvnfcCustomization")
- private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization;
+ private Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization;
@Override
public boolean equals(final Object other) {
@@ -116,12 +112,12 @@ public class CvnfcCustomization implements Serializable {
return false;
}
CvnfcCustomization castOther = (CvnfcCustomization) other;
- return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals();
+ return new EqualsBuilder().append(id, castOther.id).isEquals();
}
@Override
public int hashCode() {
- return new HashCodeBuilder().append(modelCustomizationUUID).append(vfModuleCustomization).append(vnfcCustomization).append(vnfResourceCustomization).toHashCode();
+ return new HashCodeBuilder().append(id).toHashCode();
}
@Override
@@ -132,27 +128,33 @@ public class CvnfcCustomization implements Serializable {
.append("modelName", modelName).append("toscaNodeType", toscaNodeType)
.append("description", description).append("nfcFunction", nfcFunction)
.append("nfcNamingCode", nfcNamingCode).append("created", created)
- .append("vfModuleCustomization", vfModuleCustomization).append("vnfcCustomization", vnfcCustomization)
- .append("vnfResourceCustomization", vnfResourceCustomization)
- .append("vnfVfmoduleCvnfcConfigurationCustomization", vnfVfmoduleCvnfcConfigurationCustomization)
+ .append("vnfVfmoduleCvnfcConfigurationCustomization", cvnfcConfigurationCustomization)
.toString();
}
+ @LinkedResource
+ public VnfcCustomization getVnfcCustomization() {
+ return vnfcCustomization;
+ }
+
+ public void setVnfcCustomization(VnfcCustomization vnfcCustomization) {
+ this.vnfcCustomization = vnfcCustomization;
+ }
+
@PrePersist
protected void onCreate() {
this.created = new Date();
}
@LinkedResource
- public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() {
- return vnfVfmoduleCvnfcConfigurationCustomization;
+ public Set<CvnfcConfigurationCustomization> getCvnfcConfigurationCustomization() {
+ return cvnfcConfigurationCustomization;
}
- public void setVnfVfmoduleCvnfcConfigurationCustomization(
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) {
- this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization;
+ public void setCvnfcConfigurationCustomization(Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization) {
+ this.cvnfcConfigurationCustomization = cvnfcConfigurationCustomization;
}
-
+
public Integer getId() {
return id;
}
@@ -258,21 +260,4 @@ public class CvnfcCustomization implements Serializable {
this.vfModuleCustomization = vfModuleCustomization;
}
- @LinkedResource
- public VnfcCustomization getVnfcCustomization() {
- return vnfcCustomization;
- }
-
- public void setVnfcCustomization(VnfcCustomization vnfcCustomization) {
- this.vnfcCustomization = vnfcCustomization;
- }
-
- @LinkedResource
- public VnfResourceCustomization getVnfResourceCustomization() {
- return vnfResourceCustomization;
- }
-
- public void setVnfResourceCustomization(VnfResourceCustomization vnfResourceCustomization) {
- this.vnfResourceCustomization = vnfResourceCustomization;
- }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/InstanceGroup.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/InstanceGroup.java
index fdd250089a..43d4acffcc 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/InstanceGroup.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/InstanceGroup.java
@@ -21,6 +21,7 @@
package org.onap.so.db.catalog.beans;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -97,7 +98,7 @@ public class InstanceGroup implements Serializable {
private List<CollectionResourceInstanceGroupCustomization> collectionInstanceGroupCustomizations;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "instanceGroup")
- private List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations;
+ private List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations = new ArrayList<>();
@OneToMany(cascade = CascadeType.ALL, mappedBy = "instanceGroup")
private List<CollectionNetworkResourceCustomization> collectionNetworkResourceCustomizations;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
index 428736eddc..2a8e86c5b0 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
@@ -7,9 +7,9 @@
* 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.
@@ -25,10 +25,12 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
@@ -99,8 +101,7 @@ public class Service implements Serializable {
@JoinTable(name = "network_resource_customization_to_service", joinColumns = @JoinColumn(name = "SERVICE_MODEL_UUID"), inverseJoinColumns = @JoinColumn(name = "RESOURCE_MODEL_CUSTOMIZATION_UUID"))
private List<NetworkResourceCustomization> networkCustomizations;
- @OneToMany(cascade = CascadeType.ALL)
- @JoinTable(name = "vnf_resource_customization_to_service", joinColumns = @JoinColumn(name = "SERVICE_MODEL_UUID"), inverseJoinColumns = @JoinColumn(name = "RESOURCE_MODEL_CUSTOMIZATION_UUID"))
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "service")
private List<VnfResourceCustomization> vnfCustomizations;
@OneToMany(cascade = CascadeType.ALL)
@@ -114,11 +115,11 @@ public class Service implements Serializable {
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = "service_proxy_customization_to_service", joinColumns = @JoinColumn(name = "SERVICE_MODEL_UUID"), inverseJoinColumns = @JoinColumn(name = "RESOURCE_MODEL_CUSTOMIZATION_UUID"))
private List<ServiceProxyResourceCustomization> serviceProxyCustomizations;
-
+
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = "configuration_customization_to_service", joinColumns = @JoinColumn(name = "SERVICE_MODEL_UUID"), inverseJoinColumns = @JoinColumn(name = "RESOURCE_MODEL_CUSTOMIZATION_UUID"))
private List<ConfigurationResourceCustomization> configurationCustomizations;
-
+
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = "pnf_resource_customization_to_service", joinColumns = @JoinColumn(name = "SERVICE_MODEL_UUID"), inverseJoinColumns = @JoinColumn(name = "RESOURCE_MODEL_CUSTOMIZATION_UUID"))
private List<PnfResourceCustomization> pnfCustomizations;
@@ -126,7 +127,7 @@ public class Service implements Serializable {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "service")
@MapKey(name = "action")
private Map<String, ServiceRecipe> recipes;
-
+
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "TOSCA_CSAR_ARTIFACT_UUID")
private ToscaCsar csar;
@@ -134,18 +135,18 @@ public class Service implements Serializable {
@Override
public String toString() {
return new ToStringBuilder(this).append("modelName", modelName).append("description", description)
- .append("modelUUID", modelUUID).append("modelInvariantUUID", modelInvariantUUID)
- .append("created", created).append("modelVersion", modelVersion).append("serviceType", serviceType)
- .append("serviceRole", serviceRole).append("environmentContext", environmentContext)
- .append("workloadContext", workloadContext).append("category", category)
- .append("networkCustomizations", networkCustomizations).append("vnfCustomizations", vnfCustomizations)
- .append("allottedCustomizations", allottedCustomizations)
- .append("collectionResourceCustomizations", collectionResourceCustomizations)
- .append("serviceProxyCustomizations", serviceProxyCustomizations)
+ .append("modelUUID", modelUUID).append("modelInvariantUUID", modelInvariantUUID)
+ .append("created", created).append("modelVersion", modelVersion).append("serviceType", serviceType)
+ .append("serviceRole", serviceRole).append("environmentContext", environmentContext)
+ .append("workloadContext", workloadContext).append("category", category)
+ .append("networkCustomizations", networkCustomizations).append("vnfCustomizations", vnfCustomizations)
+ .append("allottedCustomizations", allottedCustomizations)
+ .append("collectionResourceCustomizations", collectionResourceCustomizations)
+ .append("serviceProxyCustomizations", serviceProxyCustomizations)
.append("configurationCustomizations", configurationCustomizations)
.append("pnfCustomizations", pnfCustomizations)
.append("recipes", recipes)
- .append("csar", csar).toString();
+ .append("csar", csar).toString();
}
@PrePersist
@@ -221,7 +222,7 @@ public class Service implements Serializable {
}
public void setCollectionResourceCustomizations(
- List<CollectionResourceCustomization> collectionResourceCustomizations) {
+ List<CollectionResourceCustomization> collectionResourceCustomizations) {
this.collectionResourceCustomizations = collectionResourceCustomizations;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
index 5a7d0d5425..4ec2a92a73 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
@@ -29,6 +29,8 @@ import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@@ -54,8 +56,12 @@ public class VfModuleCustomization implements Serializable {
public static final long serialVersionUID = -1322322139926390329L;
- @BusinessKey
@Id
+ @BusinessKey
+ @Column(name = "ID")
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
@Column(name = "MODEL_CUSTOMIZATION_UUID")
private String modelCustomizationUUID;
@@ -91,15 +97,27 @@ public class VfModuleCustomization implements Serializable {
@JoinColumn(name = "VF_MODULE_MODEL_UUID")
private VfModule vfModule;
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID")
- private Set<VnfcCustomization> vnfcCustomization;
+ @ManyToOne(cascade = CascadeType.ALL)
+ @JoinColumn(name = "VNF_RESOURCE_CUSTOMIZATION_ID")
+ private VnfResourceCustomization vnfCustomization;
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID")
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "vfModuleCustomization")
private Set<CvnfcCustomization> cvnfcCustomization;
-
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID")
- private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization;
+ @Override
+ public boolean equals(final Object other) {
+ if (!(other instanceof VfModuleCustomization)) {
+ return false;
+ }
+ VfModuleCustomization castOther = (VfModuleCustomization) other;
+ return new EqualsBuilder().append(id, castOther.id).isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(id).toHashCode();
+ }
+
@PrePersist
protected void onCreate() {
this.created = new Date();
@@ -113,19 +131,23 @@ public class VfModuleCustomization implements Serializable {
.append("created", created).append("volumeHeatEnv", volumeHeatEnv)
.append("heatEnvironment", heatEnvironment).append("vfModule", vfModule).toString();
}
+
+
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof VfModuleCustomization)) {
- return false;
- }
- VfModuleCustomization castOther = (VfModuleCustomization) other;
- return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals();
+ public Integer getId() {
+ return id;
}
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(modelCustomizationUUID).toHashCode();
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public VnfResourceCustomization getVnfCustomization() {
+ return vnfCustomization;
+ }
+
+ public void setVnfCustomization(VnfResourceCustomization vnfCustomization) {
+ this.vnfCustomization = vnfCustomization;
}
public VfModuleCustomization() {
@@ -212,28 +234,6 @@ public class VfModuleCustomization implements Serializable {
}
@LinkedResource
- public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() {
- if (vnfVfmoduleCvnfcConfigurationCustomization == null)
- vnfVfmoduleCvnfcConfigurationCustomization = new HashSet<>();
- return vnfVfmoduleCvnfcConfigurationCustomization;
- }
-
- public void setVnfVfmoduleCvnfcConfigurationCustomization(
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) {
- this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization;
- }
-
- @LinkedResource
- public Set<VnfcCustomization> getVnfcCustomization() {
- return vnfcCustomization;
- }
-
- public void setVnfcCustomization(
- Set<VnfcCustomization> vnfcCustomization) {
- this.vnfcCustomization = vnfcCustomization;
- }
-
- @LinkedResource
public Set<CvnfcCustomization> getCvnfcCustomization() {
if (cvnfcCustomization == null)
cvnfcCustomization = new HashSet<>();
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java
index c75199ed41..e569c3b994 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java
@@ -7,9 +7,9 @@
* 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.
@@ -31,6 +31,8 @@ import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
@@ -55,9 +57,13 @@ import uk.co.blackpepper.bowman.annotation.LinkedResource;
public class VnfResourceCustomization implements Serializable {
private static final long serialVersionUID = 768026109321305392L;
-
- @BusinessKey
+
@Id
+ @BusinessKey
+ @Column(name = "ID")
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
@Column(name = "MODEL_CUSTOMIZATION_UUID")
private String modelCustomizationUUID;
@@ -69,10 +75,6 @@ public class VnfResourceCustomization implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- public void setCreated(Date created) {
- this.created = created;
- }
-
@Column(name = "MIN_INSTANCES")
private Integer minInstances;
@@ -103,20 +105,17 @@ public class VnfResourceCustomization implements Serializable {
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "VNF_RESOURCE_MODEL_UUID")
private VnfResource vnfResources;
+
+ @ManyToOne(cascade = CascadeType.ALL)
+ @JoinColumn(name = "SERVICE_MODEL_UUID")
+ private Service service;
- @OneToMany(cascade = CascadeType.ALL)
- @JoinTable(name = "vnf_res_custom_to_vf_module_custom", joinColumns = @JoinColumn(name = "VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID", referencedColumnName = "MODEL_CUSTOMIZATION_UUID"), inverseJoinColumns = @JoinColumn(name = "VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID", referencedColumnName = "MODEL_CUSTOMIZATION_UUID"))
+ @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER, mappedBy = "vnfCustomization")
private List<VfModuleCustomization> vfModuleCustomizations;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "vnfResourceCust")
- private List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations;
-
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID")
- private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization;
-
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID")
- private List<CvnfcCustomization> cvnfcCustomization;
-
+ private List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations = new ArrayList<>();
+
@Column(name = "CDS_BLUEPRINT_NAME")
private String blueprintName;
@@ -124,29 +123,33 @@ public class VnfResourceCustomization implements Serializable {
private String blueprintVersion;
@Override
- public String toString() {
- return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
- .append("modelInstanceName", modelInstanceName).append("created", created)
- .append("minInstances", minInstances).append("maxInstances", maxInstances)
- .append("availabilityZoneMaxCount", availabilityZoneMaxCount).append("nfFunction", nfFunction)
- .append("nfType", nfType).append("nfRole", nfRole).append("nfNamingCode", nfNamingCode)
- .append("multiStageDesign", multiStageDesign).append("vnfResources", vnfResources)
- .append("vfModuleCustomizations", vfModuleCustomizations)
- .append("vnfcInstanceGroupCustomizations", vnfcInstanceGroupCustomizations).toString();
- }
-
- @Override
public boolean equals(final Object other) {
if (!(other instanceof VnfResourceCustomization)) {
return false;
}
VnfResourceCustomization castOther = (VnfResourceCustomization) other;
- return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals();
+ return new EqualsBuilder().append(id, castOther.id).isEquals();
}
@Override
public int hashCode() {
- return new HashCodeBuilder().append(modelCustomizationUUID).toHashCode();
+ return new HashCodeBuilder().append(id).toHashCode();
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
+ .append("modelInstanceName", modelInstanceName).append("created", created)
+ .append("minInstances", minInstances).append("maxInstances", maxInstances)
+ .append("availabilityZoneMaxCount", availabilityZoneMaxCount).append("nfFunction", nfFunction)
+ .append("nfType", nfType).append("nfRole", nfRole).append("nfNamingCode", nfNamingCode)
+ .append("multiStageDesign", multiStageDesign).append("vnfResources", vnfResources)
+ .append("vfModuleCustomizations", vfModuleCustomizations)
+ .append("vnfcInstanceGroupCustomizations", vnfcInstanceGroupCustomizations).toString();
}
@PrePersist
@@ -162,6 +165,23 @@ public class VnfResourceCustomization implements Serializable {
this.modelCustomizationUUID = modelCustomizationUUID;
}
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ @LinkedResource
+ public Service getService() {
+ return service;
+ }
+
+ public void setService(Service service) {
+ this.service = service;
+ }
+
public String getModelInstanceName() {
return this.modelInstanceName;
}
@@ -269,32 +289,10 @@ public class VnfResourceCustomization implements Serializable {
}
public void setVnfcInstanceGroupCustomizations(
- List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations) {
+ List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizations) {
this.vnfcInstanceGroupCustomizations = vnfcInstanceGroupCustomizations;
}
-
- @LinkedResource
- public Set<VnfVfmoduleCvnfcConfigurationCustomization> getVnfVfmoduleCvnfcConfigurationCustomization() {
- if (vnfVfmoduleCvnfcConfigurationCustomization == null) {
- vnfVfmoduleCvnfcConfigurationCustomization = new HashSet<>();
- }
- return vnfVfmoduleCvnfcConfigurationCustomization;
- }
-
- public void setVnfVfmoduleCvnfcConfigurationCustomization(
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization) {
- this.vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomization;
- }
-
- @LinkedResource
- public List<CvnfcCustomization> getCvnfcCustomization() {
- return cvnfcCustomization;
- }
-
- public void setCvnfcCustomization(List<CvnfcCustomization> cvnfcCustomization) {
- this.cvnfcCustomization = cvnfcCustomization;
- }
-
+
public String getResourceInput() {
return resourceInput;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomization.java
index 1d4cef158f..db1c929f9d 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomization.java
@@ -27,6 +27,8 @@ import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
@@ -45,7 +47,7 @@ import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@IdClass(VnfcInstanceGroupCustomizationId.class)
+
@Table(name = "vnfc_instance_group_customization")
public class VnfcInstanceGroupCustomization implements Serializable {
@@ -54,22 +56,18 @@ public class VnfcInstanceGroupCustomization implements Serializable {
*/
private static final long serialVersionUID = -8288218040186901676L;
- @BusinessKey
@Id
- @Column(name = "VNF_RESOURCE_CUSTOMIZATION_MODEL_UUID")
- private String modelCustomizationUUID;
-
@BusinessKey
- @Id
- @Column(name = "INSTANCE_GROUP_MODEL_UUID")
- private String modelUUID;
-
+ @Column(name = "ID")
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "VNF_RESOURCE_CUSTOMIZATION_MODEL_UUID", updatable = false, insertable = false)
+ @JoinColumn(name = "VNF_RESOURCE_CUSTOMIZATION_ID")
private VnfResourceCustomization vnfResourceCust;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "INSTANCE_GROUP_MODEL_UUID", updatable = false, insertable = false)
+ @JoinColumn(name = "INSTANCE_GROUP_MODEL_UUID")
private InstanceGroup instanceGroup;
@Column(name = "FUNCTION")
@@ -88,47 +86,38 @@ public class VnfcInstanceGroupCustomization implements Serializable {
return false;
}
VnfcInstanceGroupCustomization castOther = (VnfcInstanceGroupCustomization) other;
- return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID)
- .append(modelUUID, castOther.modelUUID).isEquals();
+ return new EqualsBuilder().append(id, castOther.id).isEquals();
}
@Override
public int hashCode() {
- return new HashCodeBuilder().append(modelCustomizationUUID).append(modelUUID).toHashCode();
+ return new HashCodeBuilder().append(id).toHashCode();
}
@Override
public String toString() {
- return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
- .append("modelUUID", modelUUID).append("function", function).append("description", description)
+ return new ToStringBuilder(this)
+ .append("function", function).append("description", description)
.append("created", created).toString();
}
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
@PrePersist
protected void onCreate() {
this.created = new Date();
}
- public Date getCreated() {
+ public Date getCreated(){
return created;
}
- public String getModelCustomizationUUID() {
- return modelCustomizationUUID;
- }
-
- public void setModelCustomizationUUID(String modelCustomizationUUID) {
- this.modelCustomizationUUID = modelCustomizationUUID;
- }
-
- public String getModelUUID() {
- return modelUUID;
- }
-
- public void setModelUUID(String modelUUID) {
- this.modelUUID = modelUUID;
- }
-
public String getFunction() {
return function;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomizationId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomizationId.java
deleted file mode 100644
index f22d4fe213..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfcInstanceGroupCustomizationId.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 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=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-import com.openpojo.business.annotation.BusinessKey;
-
-public class VnfcInstanceGroupCustomizationId implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 1628277798979456195L;
-
- @BusinessKey
- private String modelCustomizationUUID;
- @BusinessKey
- private String modelUUID;
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
- .append("modelUUID", modelUUID).toString();
- }
-
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof VnfcInstanceGroupCustomizationId)) {
- return false;
- }
- VnfcInstanceGroupCustomizationId castOther = (VnfcInstanceGroupCustomizationId) other;
- return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID)
- .append(modelUUID, castOther.modelUUID).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(modelCustomizationUUID).append(modelUUID).toHashCode();
- }
-
- public String getModelCustomizationUUID() {
- return this.modelCustomizationUUID;
- }
-
- public void setModelCustomizationUUID(String modelCustomizationUUID) {
- this.modelCustomizationUUID = modelCustomizationUUID;
- }
-
- public String getModelUUID() {
- return this.modelUUID;
- }
-
- public void setModelUUID(String modelUUID) {
- this.modelUUID = modelUUID;
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index 3e35e78e7a..28b77cde79 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -7,9 +7,9 @@
* 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.
@@ -24,14 +24,19 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.stream.Collectors;
+
import javax.annotation.PostConstruct;
+import javax.persistence.EntityNotFoundException;
import javax.ws.rs.core.UriBuilder;
+
import org.onap.so.db.catalog.beans.BuildingBlockDetail;
import org.onap.so.db.catalog.beans.CloudSite;
import org.onap.so.db.catalog.beans.CloudifyManager;
import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.ExternalServiceToInternalService;
import org.onap.so.db.catalog.beans.HomingInstance;
@@ -53,25 +58,31 @@ import org.onap.so.db.catalog.beans.VnfComponentsRecipe;
import org.onap.so.db.catalog.beans.VnfRecipe;
import org.onap.so.db.catalog.beans.VnfResource;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.catalog.beans.macro.NorthBoundRequest;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus;
import org.onap.so.logger.LogConstants;
import org.onap.so.logging.jaxrs.filter.SpringClientFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.client.BufferingClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
import uk.co.blackpepper.bowman.Client;
import uk.co.blackpepper.bowman.ClientFactory;
import uk.co.blackpepper.bowman.Configuration;
@Component("CatalogDbClient")
public class CatalogDbClient {
+
+ private static final Logger logger = LoggerFactory.getLogger(CatalogDbClient.class);
private static final String CLOUD_SITE = "/cloudSite";
private static final String CLOUDIFY_MANAGER = "/cloudifyManager";
@@ -132,7 +143,7 @@ public class CatalogDbClient {
private static final String CLLI = "clli";
private static final String CLOUD_VERSION = "cloudVersion";
private static final String HOMING_INSTANCE = "/homingInstance";
-
+
private static final String TARGET_ENTITY = "SO:CatalogDB";
private static final String ASTERISK = "*";
@@ -148,7 +159,7 @@ public class CatalogDbClient {
private String findFirstResourceByModelInvariantUUIDAndModelVersion = "/findFirstResourceByModelInvariantUUIDAndModelVersion";
private String findByModelInstanceNameAndVnfResources = "/findByModelInstanceNameAndVnfResources";
private String findFirstVnfRecipeByNfRoleAndAction = "/findFirstVnfRecipeByNfRoleAndAction";
- private String findByModelCustomizationUUIDAndVfModuleModelUUID = "/findByModelCustomizationUUIDAndVfModuleModelUUID";
+ private String findByModelCustomizationUUIDAndVfModuleModelUUID = "/findFirstByModelCustomizationUUIDAndVfModuleModelUUIDOrderByCreatedDesc";
private String findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction = "/findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction";
private String findFirstVnfComponentsRecipeByVnfComponentTypeAndAction = "/findFirstVnfComponentsRecipeByVnfComponentTypeAndAction";
private String findVfModuleByModelInvariantUUIDOrderByModelVersionDesc = "/findByModelInvariantUUIDOrderByModelVersionDesc";
@@ -229,7 +240,7 @@ public class CatalogDbClient {
private final Client<HomingInstance> homingInstanceClient;
private final Client<CloudifyManager> cloudifyManagerClient;
-
+
private final Client<CvnfcCustomization> cvnfcCustomizationClient;
private final Client<ControllerSelectionReference> controllerSelectionReferenceClient;
@@ -244,71 +255,48 @@ public class CatalogDbClient {
@Value("${mso.db.auth:#{null}}")
private String msoAdaptersAuth;
+ @Autowired
+ RestTemplate restTemplate;
@PostConstruct
- public void init() {
- findExternalToInternalServiceByServiceName =
- endpoint + EXTERNAL_SERVICE_TO_INTERNAL_MODEL_MAPPING + SEARCH + findExternalToInternalServiceByServiceName;
- findServiceByModelName = endpoint + SERVICE + SEARCH + findServiceByModelName;
- findServiceRecipeByActionAndServiceModelUUID =
- endpoint + SERVICE_RECIPE + SEARCH + findServiceRecipeByActionAndServiceModelUUID;
- findServiceByModelUUID = endpoint + SERVICE + SEARCH + findServiceByModelUUID;
+ public void init(){
+ findExternalToInternalServiceByServiceName = endpoint + EXTERNAL_SERVICE_TO_INTERNAL_MODEL_MAPPING + SEARCH + findExternalToInternalServiceByServiceName;
+ findServiceByModelName = endpoint + SERVICE + SEARCH + findServiceByModelName;
+ findServiceRecipeByActionAndServiceModelUUID = endpoint + SERVICE_RECIPE + SEARCH + findServiceRecipeByActionAndServiceModelUUID;
+ findServiceByModelUUID = endpoint + SERVICE + SEARCH + findServiceByModelUUID;
findFirstByModelNameURI = endpoint + SERVICE + SEARCH + findFirstByModelNameURI;
- findFirstByModelVersionAndModelInvariantUUIDURI =
- endpoint + SERVICE + SEARCH + findFirstByModelVersionAndModelInvariantUUIDURI;
+ findFirstByModelVersionAndModelInvariantUUIDURI = endpoint + SERVICE + SEARCH + findFirstByModelVersionAndModelInvariantUUIDURI;
findByModelInvariantUUIDURI = endpoint + SERVICE + SEARCH + findByModelInvariantUUIDURI;
- findFirstByServiceModelUUIDAndActionURI =
- endpoint + SERVICE_RECIPE + SEARCH + findFirstByServiceModelUUIDAndActionURI;
+ findFirstByServiceModelUUIDAndActionURI = endpoint + SERVICE_RECIPE + SEARCH + findFirstByServiceModelUUIDAndActionURI;
findFirstByModelNameAndAction = endpoint + NETWORK_RECIPE + SEARCH + findFirstByModelNameAndAction;
- findFirstResourceByModelInvariantUUIDAndModelVersion =
- endpoint + VNF_RESOURCE + SEARCH + findFirstResourceByModelInvariantUUIDAndModelVersion;
- findByModelInstanceNameAndVnfResources =
- endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + findByModelInstanceNameAndVnfResources;
+ findFirstResourceByModelInvariantUUIDAndModelVersion = endpoint + VNF_RESOURCE + SEARCH + findFirstResourceByModelInvariantUUIDAndModelVersion;
+ findByModelInstanceNameAndVnfResources = endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + findByModelInstanceNameAndVnfResources;
findFirstVnfRecipeByNfRoleAndAction = endpoint + VNF_RECIPE + SEARCH + findFirstVnfRecipeByNfRoleAndAction;
- findByModelCustomizationUUIDAndVfModuleModelUUID =
- endpoint + VFMODULE_CUSTOMIZATION + SEARCH + findByModelCustomizationUUIDAndVfModuleModelUUID;
- findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction =
- endpoint + VNF_COMPONENTS_RECIPE + SEARCH
- + findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction;
- findFirstVnfComponentsRecipeByVnfComponentTypeAndAction =
- endpoint + VNF_COMPONENTS_RECIPE + SEARCH + findFirstVnfComponentsRecipeByVnfComponentTypeAndAction;
- findVfModuleByModelInvariantUUIDOrderByModelVersionDesc =
- endpoint + VFMODULE + SEARCH + findVfModuleByModelInvariantUUIDOrderByModelVersionDesc;
- findFirstVfModuleByModelInvariantUUIDAndModelVersion =
- endpoint + VFMODULE + SEARCH + findFirstVfModuleByModelInvariantUUIDAndModelVersion;
+ findByModelCustomizationUUIDAndVfModuleModelUUID = endpoint + VFMODULE_CUSTOMIZATION + SEARCH + findByModelCustomizationUUIDAndVfModuleModelUUID;
+ findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction = endpoint + VNF_COMPONENTS_RECIPE + SEARCH + findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction;
+ findFirstVnfComponentsRecipeByVnfComponentTypeAndAction = endpoint + VNF_COMPONENTS_RECIPE + SEARCH + findFirstVnfComponentsRecipeByVnfComponentTypeAndAction;
+ findVfModuleByModelInvariantUUIDOrderByModelVersionDesc = endpoint + VFMODULE + SEARCH +findVfModuleByModelInvariantUUIDOrderByModelVersionDesc;
+ findFirstVfModuleByModelInvariantUUIDAndModelVersion = endpoint + VFMODULE + SEARCH + findFirstVfModuleByModelInvariantUUIDAndModelVersion;
findOneByBuildingBlockName = endpoint + BUILDING_BLOCK_DETAIL + SEARCH + findOneByBuildingBlockName;
- findOneByResourceTypeAndOrchestrationStatusAndTargetAction =
- endpoint + ORCHESTRATION_STATUS_STATE_TRANSITION_DIRECTIVE + SEARCH
- + findOneByResourceTypeAndOrchestrationStatusAndTargetAction;
+ findOneByResourceTypeAndOrchestrationStatusAndTargetAction = endpoint + ORCHESTRATION_STATUS_STATE_TRANSITION_DIRECTIVE + SEARCH + findOneByResourceTypeAndOrchestrationStatusAndTargetAction;
findByAction = endpoint + ORCHESTRATION_FLOW + SEARCH + findByAction;
- findVnfcInstanceGroupCustomizationByModelCustomizationUUID =
- endpoint + VNFC_INSTANCE_GROUP_CUSTOMIZATION + SEARCH
- + findVnfcInstanceGroupCustomizationByModelCustomizationUUID;
- findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID =
- endpoint + COLLECTION_RESOURCE_INSTANCE_GROUP_CUSTOMIZATION + SEARCH
- + findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID;
- findOneByActionAndRequestScopeAndIsAlacarte =
- endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH + findOneByActionAndRequestScopeAndIsAlacarte;
- findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwner = endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH
- + findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwner;
- findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType =
- endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH
- + findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType;
- findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep = endpoint + RAINY_DAY_HANDLER_MACRO + SEARCH
- + findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep;
+ findVnfcInstanceGroupCustomizationByModelCustomizationUUID = endpoint + VNFC_INSTANCE_GROUP_CUSTOMIZATION + SEARCH + findVnfcInstanceGroupCustomizationByModelCustomizationUUID;
+ findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID = endpoint + COLLECTION_RESOURCE_INSTANCE_GROUP_CUSTOMIZATION + SEARCH + findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID;
+ findOneByActionAndRequestScopeAndIsAlacarte = endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH + findOneByActionAndRequestScopeAndIsAlacarte;
+ findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwner = endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH + findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwner;
+ findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType = endpoint + NORTHBOUND_REQUEST_REF_LOOKUP + SEARCH + findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType;
+ findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep = endpoint + RAINY_DAY_HANDLER_MACRO + SEARCH + findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep;
findByClliAndCloudVersion = endpoint + CLOUD_SITE + SEARCH + findByClliAndCloudVersion;
serviceURI = endpoint + SERVICE + URI_SEPARATOR;
vfModuleURI = endpoint + VFMODULE + URI_SEPARATOR;
vnfResourceURI = endpoint + VNF_RESOURCE + URI_SEPARATOR;
vfModuleCustomizationURI = endpoint + VFMODULE_CUSTOMIZATION + URI_SEPARATOR;
- networkCollectionResourceCustomizationURI =
- endpoint + NETWORK_COLLECTION_RESOURCE_CUSTOMIZATION + URI_SEPARATOR;
+ networkCollectionResourceCustomizationURI = endpoint + NETWORK_COLLECTION_RESOURCE_CUSTOMIZATION + URI_SEPARATOR;
networkResourceCustomizationURI = endpoint + NETWORK_RESOURCE_CUSTOMIZATION + URI_SEPARATOR;
cvnfcResourceCustomizationURI = endpoint + CVNFC_CUSTOMZIATION + URI_SEPARATOR;
vnfResourceCustomizationURI = endpoint + VNF_RESOURCE_CUSTOMIZATION + URI_SEPARATOR;
- collectionNetworkResourceCustomizationURI =
- endpoint + COLLECTION_NETWORK_RESOURCE_CUSTOMIZATION + URI_SEPARATOR;
+ collectionNetworkResourceCustomizationURI = endpoint + COLLECTION_NETWORK_RESOURCE_CUSTOMIZATION + URI_SEPARATOR;
instanceGroupURI = endpoint + INSTANCE_GROUP + URI_SEPARATOR;
cloudifyManagerURI = endpoint + CLOUDIFY_MANAGER + URI_SEPARATOR;
cloudSiteURI = endpoint + CLOUD_SITE + URI_SEPARATOR;
@@ -319,20 +307,18 @@ public class CatalogDbClient {
}
public CatalogDbClient() {
- ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(
- new HttpComponentsClientHttpRequestFactory());
+ ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory());
- ClientFactory clientFactory = Configuration.builder().setClientHttpRequestFactory(factory)
- .setRestTemplateConfigurer(restTemplate -> {
- restTemplate.getInterceptors().add((new SpringClientFilter()));
+ ClientFactory clientFactory = Configuration.builder().setClientHttpRequestFactory(factory).setRestTemplateConfigurer(restTemplate -> {
+ restTemplate.getInterceptors().add((new SpringClientFilter()));
- restTemplate.getInterceptors().add((request, body, execution) -> {
+ restTemplate.getInterceptors().add((request, body, execution) -> {
- request.getHeaders().add(HttpHeaders.AUTHORIZATION, msoAdaptersAuth);
- request.getHeaders().add(LogConstants.TARGET_ENTITY_HEADER, TARGET_ENTITY);
- return execution.execute(request, body);
- });
- }).build().buildClientFactory();
+ request.getHeaders().add(HttpHeaders.AUTHORIZATION, msoAdaptersAuth);
+ request.getHeaders().add(LogConstants.TARGET_ENTITY_HEADER,TARGET_ENTITY);
+ return execution.execute(request, body);
+ });
+ }).build().buildClientFactory();
serviceClient = clientFactory.create(Service.class);
networkRecipeClient = clientFactory.create(NetworkRecipe.class);
networkResourceCustomizationClient = clientFactory.create(NetworkResourceCustomization.class);
@@ -347,15 +333,13 @@ public class CatalogDbClient {
rainyDayHandlerStatusClient = clientFactory.create(RainyDayHandlerStatus.class);
buildingBlockDetailClient = clientFactory.create(BuildingBlockDetail.class);
orchestrationStatusStateTransitionDirectiveClient = clientFactory
- .create(OrchestrationStatusStateTransitionDirective.class);
+ .create(OrchestrationStatusStateTransitionDirective.class);
vnfcInstanceGroupCustomizationClient = clientFactory.create(VnfcInstanceGroupCustomization.class);
collectionResourceInstanceGroupCustomizationClient = clientFactory
- .create(CollectionResourceInstanceGroupCustomization.class);
+ .create(CollectionResourceInstanceGroupCustomization.class);
instanceGroupClient = clientFactory.create(InstanceGroup.class);
- networkCollectionResourceCustomizationClient = clientFactory
- .create(NetworkCollectionResourceCustomization.class);
- collectionNetworkResourceCustomizationClient = clientFactory
- .create(CollectionNetworkResourceCustomization.class);
+ networkCollectionResourceCustomizationClient = clientFactory.create(NetworkCollectionResourceCustomization.class);
+ collectionNetworkResourceCustomizationClient = clientFactory.create(CollectionNetworkResourceCustomization.class);
cloudSiteClient = clientFactory.create(CloudSite.class);
homingInstanceClient = clientFactory.create(HomingInstance.class);
cloudifyManagerClient = clientFactory.create(CloudifyManager.class);
@@ -368,20 +352,18 @@ public class CatalogDbClient {
}
public CatalogDbClient(String baseUri, String auth) {
- ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(
- new HttpComponentsClientHttpRequestFactory());
+ ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory());
- ClientFactory clientFactory = Configuration.builder().setBaseUri(baseUri).setClientHttpRequestFactory(factory)
- .setRestTemplateConfigurer(restTemplate -> {
- restTemplate.getInterceptors().add((new SpringClientFilter()));
+ ClientFactory clientFactory = Configuration.builder().setBaseUri(baseUri).setClientHttpRequestFactory(factory).setRestTemplateConfigurer(restTemplate -> {
+ restTemplate.getInterceptors().add((new SpringClientFilter()));
- restTemplate.getInterceptors().add((request, body, execution) -> {
+ restTemplate.getInterceptors().add((request, body, execution) -> {
- request.getHeaders().add(HttpHeaders.AUTHORIZATION, auth);
- request.getHeaders().add(LogConstants.TARGET_ENTITY_HEADER, TARGET_ENTITY);
- return execution.execute(request, body);
- });
- }).build().buildClientFactory();
+ request.getHeaders().add(HttpHeaders.AUTHORIZATION, auth);
+ request.getHeaders().add(LogConstants.TARGET_ENTITY_HEADER,TARGET_ENTITY);
+ return execution.execute(request, body);
+ });
+ }).build().buildClientFactory();
serviceClient = clientFactory.create(Service.class);
networkRecipeClient = clientFactory.create(NetworkRecipe.class);
networkResourceCustomizationClient = clientFactory.create(NetworkResourceCustomization.class);
@@ -396,15 +378,13 @@ public class CatalogDbClient {
rainyDayHandlerStatusClient = clientFactory.create(RainyDayHandlerStatus.class);
buildingBlockDetailClient = clientFactory.create(BuildingBlockDetail.class);
orchestrationStatusStateTransitionDirectiveClient = clientFactory
- .create(OrchestrationStatusStateTransitionDirective.class);
+ .create(OrchestrationStatusStateTransitionDirective.class);
vnfcInstanceGroupCustomizationClient = clientFactory.create(VnfcInstanceGroupCustomization.class);
collectionResourceInstanceGroupCustomizationClient = clientFactory
- .create(CollectionResourceInstanceGroupCustomization.class);
+ .create(CollectionResourceInstanceGroupCustomization.class);
instanceGroupClient = clientFactory.create(InstanceGroup.class);
- networkCollectionResourceCustomizationClient = clientFactory
- .create(NetworkCollectionResourceCustomization.class);
- collectionNetworkResourceCustomizationClient = clientFactory
- .create(CollectionNetworkResourceCustomization.class);
+ networkCollectionResourceCustomizationClient = clientFactory.create(NetworkCollectionResourceCustomization.class);
+ collectionNetworkResourceCustomizationClient = clientFactory.create(CollectionNetworkResourceCustomization.class);
cloudSiteClient = clientFactory.create(CloudSite.class);
homingInstanceClient = clientFactory.create(HomingInstance.class);
cloudifyManagerClient = clientFactory.create(CloudifyManager.class);
@@ -416,11 +396,9 @@ public class CatalogDbClient {
pnfResourceCustomizationClient = clientFactory.create(PnfResourceCustomization.class);
}
- public NetworkCollectionResourceCustomization getNetworkCollectionResourceCustomizationByID(
- String modelCustomizationUUID) {
+ public NetworkCollectionResourceCustomization getNetworkCollectionResourceCustomizationByID(String modelCustomizationUUID) {
NetworkCollectionResourceCustomization networkCollectionResourceCustomization =
- this.getSingleResource(networkCollectionResourceCustomizationClient,
- getUri(networkCollectionResourceCustomizationURI + modelCustomizationUUID));
+ this.getSingleResource(networkCollectionResourceCustomizationClient, getUri(networkCollectionResourceCustomizationURI + modelCustomizationUUID));
if (networkCollectionResourceCustomization != null) {
networkCollectionResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID);
}
@@ -428,7 +406,7 @@ public class CatalogDbClient {
}
public Service getServiceByID(String modelUUID) {
- Service service = getSingleResource(serviceClient, getUri(serviceURI + modelUUID));
+ Service service = getSingleResource(serviceClient,getUri(serviceURI + modelUUID));
if (service != null) {
service.setModelUUID(modelUUID);
}
@@ -436,14 +414,14 @@ public class CatalogDbClient {
}
public VfModule getVfModuleByModelUUID(String modelUUID) {
- VfModule vfModule = getSingleResource(vfModuleClient, getUri(vfModuleURI + modelUUID));
+ VfModule vfModule = getSingleResource(vfModuleClient,getUri(vfModuleURI + modelUUID));
if (vfModule != null) {
vfModule.setModelUUID(modelUUID);
}
return vfModule;
}
- public VnfResource getVnfResourceByModelUUID(String modelUUID) {
+ public VnfResource getVnfResourceByModelUUID(String modelUUID){
VnfResource vnfResource = this.getSingleResource(vnfResourceClient, getUri(vnfResourceURI + modelUUID));
if (vnfResource != null) {
@@ -452,15 +430,17 @@ public class CatalogDbClient {
return vnfResource;
}
- public VnfResourceCustomization getVnfResourceCustomizationByModelCustomizationUUID(String modelCustomizationUUID) {
- VnfResourceCustomization vnfResourceCustomization = getSingleResource(vnfResourceCustomizationClient,
- getUri(vnfResourceCustomizationURI + modelCustomizationUUID));
- if (vnfResourceCustomization != null) {
- vnfResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID);
+ //A VNFResource customization UUID is the same object across services, so we can return anyone from the list
+ // In the future the client should query starting at a service model uuid
+ public VnfResourceCustomization getVnfResourceCustomizationByModelCustomizationUUID(String modelCustomizationUUID){
+ List<VnfResourceCustomization> vnfResourceCustomization = this.getMultipleResources(vnfResourceCustomizationClient,getUri(endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + "/findByModelCustomizationUUID" + "?MODEL_CUSTOMIZATION_UUID="+ modelCustomizationUUID));
+ if(vnfResourceCustomization != null && !vnfResourceCustomization.isEmpty()){
+ return vnfResourceCustomization.get(0);
+ }
+ else{
+ return null;
}
- return vnfResourceCustomization;
}
-
public PnfResource getPnfResourceByModelUUID(String modelUUID) {
PnfResource PnfResource = this.getSingleResource(pnfResourceClient, getUri(pnfResourceURI + modelUUID));
if (PnfResource != null) {
@@ -478,11 +458,10 @@ public class CatalogDbClient {
return pnfResourceCustomization;
}
- public CollectionNetworkResourceCustomization getCollectionNetworkResourceCustomizationByID(
- String modelCustomizationUUID) {
+ public CollectionNetworkResourceCustomization getCollectionNetworkResourceCustomizationByID(String modelCustomizationUUID) {
CollectionNetworkResourceCustomization collectionNetworkResourceCustomization =
- this.getSingleResource(collectionNetworkResourceCustomizationClient, getUri(UriBuilder
- .fromUri(collectionNetworkResourceCustomizationURI + modelCustomizationUUID).build().toString()));
+ this.getSingleResource(collectionNetworkResourceCustomizationClient,getUri(UriBuilder
+ .fromUri(collectionNetworkResourceCustomizationURI + modelCustomizationUUID).build().toString()));
if (collectionNetworkResourceCustomization != null) {
collectionNetworkResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID);
}
@@ -498,38 +477,22 @@ public class CatalogDbClient {
}
public VfModuleCustomization getVfModuleCustomizationByModelCuztomizationUUID(String modelCustomizationUUID) {
- VfModuleCustomization vfModuleCust = this
- .getSingleResource(vfModuleCustomizationClient, getUri(vfModuleCustomizationURI + modelCustomizationUUID));
- if (vfModuleCust != null) {
- vfModuleCust.setModelCustomizationUUID(modelCustomizationUUID);
- }
- return vfModuleCust;
+ return this.getSingleResource(vfModuleCustomizationClient, getUri(endpoint + VFMODULE_CUSTOMIZATION + SEARCH + "/findFirstByModelCustomizationUUIDOrderByCreatedDesc" + "?MODEL_CUSTOMIZATION_UUID="+ modelCustomizationUUID));
}
- public NetworkResourceCustomization getNetworkResourceCustomizationByModelCustomizationUUID(
- String modelCustomizationUUID) {
+ public NetworkResourceCustomization getNetworkResourceCustomizationByModelCustomizationUUID(String modelCustomizationUUID){
NetworkResourceCustomization networkResourceCustomization =
- this.getSingleResource(networkResourceCustomizationClient,
- getUri(networkResourceCustomizationURI + modelCustomizationUUID));
+ this.getSingleResource(networkResourceCustomizationClient, getUri(networkResourceCustomizationURI + modelCustomizationUUID));
if (networkResourceCustomization != null) {
networkResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID);
}
return networkResourceCustomization;
}
- public CvnfcCustomization getCvnfcCustomizationByModelCustomizationUUID(String modelCustomizationUUID){
- CvnfcCustomization cvnfcResourceCustomization =
- this.getSingleResource(cvnfcCustomizationClient, getUri(cvnfcResourceCustomizationURI + modelCustomizationUUID));
- if (cvnfcResourceCustomization != null) {
- cvnfcResourceCustomization.setModelCustomizationUUID(modelCustomizationUUID);
- }
- return cvnfcResourceCustomization;
- }
public BuildingBlockDetail getBuildingBlockDetail(String buildingBlockName) {
BuildingBlockDetail buildingBlockDetail = getSingleResource(buildingBlockDetailClient, getUri(UriBuilder
- .fromUri(findOneByBuildingBlockName).queryParam(BUILDING_BLOCK_NAME, buildingBlockName).build()
- .toString()));
+ .fromUri(findOneByBuildingBlockName).queryParam(BUILDING_BLOCK_NAME, buildingBlockName).build().toString()));
if (buildingBlockDetail != null) {
buildingBlockDetail.setBuildingBlockName(buildingBlockName);
}
@@ -538,238 +501,229 @@ public class CatalogDbClient {
public OrchestrationStatusStateTransitionDirective getOrchestrationStatusStateTransitionDirective(
- ResourceType resourceType, OrchestrationStatus orchestrationStatus, OrchestrationAction targetAction) {
+ ResourceType resourceType, OrchestrationStatus orchestrationStatus, OrchestrationAction targetAction) {
return getSingleResource(orchestrationStatusStateTransitionDirectiveClient, UriBuilder
- .fromUri(findOneByResourceTypeAndOrchestrationStatusAndTargetAction)
- .queryParam(RESOURCE_TYPE, resourceType.name())
- .queryParam(ORCHESTRATION_STATUS, orchestrationStatus.name())
- .queryParam(TARGET_ACTION, targetAction.name()).build());
+ .fromUri(findOneByResourceTypeAndOrchestrationStatusAndTargetAction)
+ .queryParam(RESOURCE_TYPE, resourceType.name())
+ .queryParam(ORCHESTRATION_STATUS, orchestrationStatus.name())
+ .queryParam(TARGET_ACTION, targetAction.name()).build());
}
public List<OrchestrationFlow> getOrchestrationFlowByAction(String action) {
return this.getMultipleResources(orchestrationClient, UriBuilder
- .fromUri(findByAction).queryParam(ACTION, action).build());
+ .fromUri(findByAction).queryParam(ACTION, action).build());
}
public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroupsByVnfResourceCust(String modelCustomizationUUID) {
return this.getMultipleResources(vnfcInstanceGroupCustomizationClient, UriBuilder
- .fromUri(findVnfcInstanceGroupCustomizationByModelCustomizationUUID)
- .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID).build());
+ .fromUri(findVnfcInstanceGroupCustomizationByModelCustomizationUUID)
+ .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID).build());
}
public List<CollectionResourceInstanceGroupCustomization> getCollectionResourceInstanceGroupCustomizationByModelCustUUID(
- String modelCustomizationUUID) {
+ String modelCustomizationUUID) {
return this.getMultipleResources(collectionResourceInstanceGroupCustomizationClient, UriBuilder
- .fromUri(findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID)
- .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID).build());
+ .fromUri(findCollectionResourceInstanceGroupCustomizationByModelCustomizationUUID)
+ .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID).build());
}
- public VfModuleCustomization getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID(
- String modelCustomizationUUID, String vfModuleModelUUID) {
+ public VfModuleCustomization getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID(String modelCustomizationUUID, String vfModuleModelUUID) {
return this.getSingleResource(vfModuleCustomizationClient, getUri(UriBuilder
- .fromUri(findByModelCustomizationUUIDAndVfModuleModelUUID)
- .queryParam(MODEL_CUSTOMIZATION_UUID, modelCustomizationUUID)
- .queryParam(VF_MODULE_MODEL_UUID, vfModuleModelUUID).build().toString()));
+ .fromUri(findByModelCustomizationUUIDAndVfModuleModelUUID)
+ .queryParam("MODEL_CUSTOMIZATION_UUID",modelCustomizationUUID)
+ .queryParam("MODEL_UUID",vfModuleModelUUID).build().toString()));
}
public NorthBoundRequest getNorthBoundRequestByActionAndIsALaCarteAndRequestScope(String requestAction,
- String resourceName, boolean aLaCarte) {
+ String resourceName, boolean aLaCarte) {
return this.getSingleResource(northBoundRequestClient, UriBuilder
- .fromUri(findOneByActionAndRequestScopeAndIsAlacarte)
- .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName)
- .queryParam(IS_ALACARTE, aLaCarte).build());
+ .fromUri(findOneByActionAndRequestScopeAndIsAlacarte)
+ .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName)
+ .queryParam(IS_ALACARTE, aLaCarte).build());
}
-
+
public NorthBoundRequest getNorthBoundRequestByActionAndIsALaCarteAndRequestScopeAndCloudOwner(String requestAction,
- String resourceName, boolean aLaCarte, String cloudOwner) {
+ String resourceName, boolean aLaCarte, String cloudOwner) {
return this.getSingleResource(northBoundRequestClient, getUri(UriBuilder
- .fromUri(findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType)
- .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName)
- .queryParam(IS_ALACARTE, aLaCarte)
- .queryParam(CLOUD_OWNER, cloudOwner)
- .queryParam(SERVICE_TYPE, ASTERISK).build().toString()));
- }
-
- public NorthBoundRequest getNorthBoundRequestByActionAndIsALaCarteAndRequestScopeAndCloudOwnerAndServiceType(
- String requestAction,
- String resourceName, boolean aLaCarte, String cloudOwner, String serviceType) {
+ .fromUri(findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType)
+ .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName)
+ .queryParam(IS_ALACARTE, aLaCarte)
+ .queryParam(CLOUD_OWNER, cloudOwner)
+ .queryParam(SERVICE_TYPE, ASTERISK).build().toString()));
+ }
+
+ public NorthBoundRequest getNorthBoundRequestByActionAndIsALaCarteAndRequestScopeAndCloudOwnerAndServiceType(String requestAction,
+ String resourceName, boolean aLaCarte, String cloudOwner, String serviceType) {
return this.getSingleResource(northBoundRequestClient, getUri(UriBuilder
- .fromUri(findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType)
- .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName)
- .queryParam(IS_ALACARTE, aLaCarte)
- .queryParam(CLOUD_OWNER, cloudOwner)
- .queryParam(SERVICE_TYPE, serviceType).build().toString()));
+ .fromUri(findOneByActionAndRequestScopeAndIsAlacarteAndCloudOwnerAndServiceType)
+ .queryParam(ACTION, requestAction).queryParam(REQUEST_SCOPE, resourceName)
+ .queryParam(IS_ALACARTE, aLaCarte)
+ .queryParam(CLOUD_OWNER, cloudOwner)
+ .queryParam(SERVICE_TYPE, serviceType).build().toString()));
}
public RainyDayHandlerStatus getRainyDayHandlerStatusByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep(
- String flowName, String serviceType, String vnfType, String errorCode, String workStep) {
+ String flowName, String serviceType, String vnfType, String errorCode, String workStep) {
return this.getSingleResource(rainyDayHandlerStatusClient, getUri(UriBuilder
- .fromUri(findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep)
- .queryParam(FLOW_NAME, flowName).queryParam(SERVICE_TYPE, serviceType)
- .queryParam(VNF_TYPE, vnfType).queryParam(ERROR_CODE, errorCode).queryParam(WORK_STEP, workStep)
- .build().toString()));
+ .fromUri(findOneByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep)
+ .queryParam(FLOW_NAME, flowName).queryParam(SERVICE_TYPE, serviceType)
+ .queryParam(VNF_TYPE, vnfType).queryParam(ERROR_CODE, errorCode).queryParam(WORK_STEP, workStep)
+ .build().toString()));
}
- public ServiceRecipe getFirstByServiceModelUUIDAndAction(String modelUUID, String action) {
+ public ServiceRecipe getFirstByServiceModelUUIDAndAction(String modelUUID, String action){
return this.getSingleResource(serviceRecipeClient, getUri(UriBuilder
- .fromUri(findFirstByServiceModelUUIDAndActionURI)
- .queryParam(SERVICE_MODEL_UUID, modelUUID)
- .queryParam(ACTION, action).build().toString()));
+ .fromUri(findFirstByServiceModelUUIDAndActionURI)
+ .queryParam(SERVICE_MODEL_UUID,modelUUID)
+ .queryParam(ACTION,action).build().toString()));
}
- public NetworkRecipe getFirstNetworkRecipeByModelNameAndAction(String modelName, String action) {
+ public NetworkRecipe getFirstNetworkRecipeByModelNameAndAction(String modelName, String action){
return this.getSingleResource(networkRecipeClient, UriBuilder
- .fromUri(findFirstByModelNameAndAction)
- .queryParam(MODEL_NAME, modelName)
- .queryParam(ACTION, action).build());
+ .fromUri(findFirstByModelNameAndAction)
+ .queryParam(MODEL_NAME,modelName)
+ .queryParam(ACTION,action).build());
}
-
- public ControllerSelectionReference getControllerSelectionReferenceByVnfTypeAndActionCategory(String vnfType,
- String actionCategory) {
+
+ public ControllerSelectionReference getControllerSelectionReferenceByVnfTypeAndActionCategory(String vnfType, String actionCategory) {
return this.getSingleResource(controllerSelectionReferenceClient, UriBuilder
- .fromUri(endpoint
- + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfTypeAndActionCategory")
- .queryParam("VNF_TYPE", vnfType).queryParam("ACTION_CATEGORY", actionCategory).build());
+ .fromUri(endpoint + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfTypeAndActionCategory")
+ .queryParam("VNF_TYPE", vnfType).queryParam("ACTION_CATEGORY", actionCategory).build());
}
- public Service getFirstByModelNameOrderByModelVersionDesc(String modelName) {
- return this.getSingleResource(serviceClient, UriBuilder
- .fromUri(findFirstByModelNameURI)
- .queryParam(MODEL_NAME, modelName).build());
+ public Service getFirstByModelNameOrderByModelVersionDesc(String modelName){
+ return this.getSingleResource(serviceClient,UriBuilder
+ .fromUri(findFirstByModelNameURI)
+ .queryParam(MODEL_NAME,modelName).build());
}
- public ExternalServiceToInternalService findExternalToInternalServiceByServiceName(String serviceName) {
+ public ExternalServiceToInternalService findExternalToInternalServiceByServiceName(String serviceName){
return this.getSingleResource(externalServiceToInternalServiceClient, getUri(UriBuilder
- .fromUri(findExternalToInternalServiceByServiceName)
- .queryParam(SERVICE_NAME, serviceName).build().toString()));
+ .fromUri(findExternalToInternalServiceByServiceName)
+ .queryParam(SERVICE_NAME,serviceName).build().toString()));
}
- public ServiceRecipe findServiceRecipeByActionAndServiceModelUUID(String action, String modelUUID) {
+ public ServiceRecipe findServiceRecipeByActionAndServiceModelUUID(String action,String modelUUID){
return this.getSingleResource(serviceRecipeClient, getUri(UriBuilder
- .fromUri(findServiceRecipeByActionAndServiceModelUUID)
- .queryParam(ACTION, action)
- .queryParam(SERVICE_MODEL_UUID, modelUUID).build().toString()));
+ .fromUri(findServiceRecipeByActionAndServiceModelUUID)
+ .queryParam(ACTION,action)
+ .queryParam(SERVICE_MODEL_UUID,modelUUID).build().toString()));
}
- public Service getServiceByModelName(String modelName) {
- return this.getSingleResource(serviceClient, getUri(UriBuilder
- .fromUri(findServiceByModelName)
- .queryParam(MODEL_NAME, modelName).build().toString()));
+ public Service getServiceByModelName(String modelName){
+ return this.getSingleResource(serviceClient,getUri(UriBuilder
+ .fromUri(findServiceByModelName)
+ .queryParam(MODEL_NAME,modelName).build().toString()));
}
- public Service getServiceByModelUUID(String modelModelUUID) {
- return this.getSingleResource(serviceClient, getUri(UriBuilder
- .fromUri(findServiceByModelUUID)
- .queryParam(MODEL_UUID, modelModelUUID).build().toString()));
+ public Service getServiceByModelUUID(String modelModelUUID){
+ return this.getSingleResource(serviceClient,getUri(UriBuilder
+ .fromUri(findServiceByModelUUID)
+ .queryParam(MODEL_UUID,modelModelUUID).build().toString()));
}
- public VnfResource getFirstVnfResourceByModelInvariantUUIDAndModelVersion(String modelInvariantUUID,
- String modelVersion) {
+ public VnfResource getFirstVnfResourceByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion){
return this.getSingleResource(vnfResourceClient, getUri(UriBuilder
- .fromUri(findFirstResourceByModelInvariantUUIDAndModelVersion)
- .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID)
- .queryParam(MODEL_VERSION, modelVersion).build().toString()));
+ .fromUri(findFirstResourceByModelInvariantUUIDAndModelVersion)
+ .queryParam(MODEL_INVARIANT_UUID,modelInvariantUUID)
+ .queryParam(MODEL_VERSION,modelVersion).build().toString()));
}
- public VnfResourceCustomization getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources(
- String modelInstanceName, VnfResource vnfResource) {
+ public VnfResourceCustomization getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources(String modelInstanceName, VnfResource vnfResource){
return this.getSingleResource(vnfResourceCustomizationClient, getUri(UriBuilder
- .fromUri(findByModelInstanceNameAndVnfResources)
- .queryParam(MODEL_INSTANCE_NAME, modelInstanceName)
- .queryParam(VNF_RESOURCE_MODEL_UUID, vnfResource.getModelUUID()).build().toString()));
+ .fromUri(findByModelInstanceNameAndVnfResources)
+ .queryParam("MODEL_INSTANCE_NAME",modelInstanceName)
+ .queryParam("VNF_RESOURCE_MODEL_UUID",vnfResource.getModelUUID()).build().toString()));
}
- public VnfRecipe getFirstVnfRecipeByNfRoleAndAction(String nfRole, String action) {
- return this.getSingleResource(vnfRecipeClient, getUri(UriBuilder
- .fromUri(findFirstVnfRecipeByNfRoleAndAction)
- .queryParam(NF_ROLE, nfRole)
- .queryParam(ACTION, action).build().toString()));
+ public VnfRecipe getFirstVnfRecipeByNfRoleAndAction(String nfRole, String action){
+ return this.getSingleResource(vnfRecipeClient,getUri(UriBuilder
+ .fromUri(findFirstVnfRecipeByNfRoleAndAction)
+ .queryParam(NF_ROLE,nfRole)
+ .queryParam(ACTION,action).build().toString()));
}
- public VnfComponentsRecipe getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
- String vfModuleModelUUID, String vnfComponentType, String action) {
- return this.getSingleResource(vnfComponentsRecipeClient, getUri(UriBuilder
- .fromUri(findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction)
- .queryParam(VF_MODULE_MODEL_UUID, vfModuleModelUUID)
- .queryParam(VNF_COMPONENT_TYPE, vnfComponentType)
- .queryParam(ACTION, action).build().toString()));
+ public VnfComponentsRecipe getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(String vfModuleModelUUID, String vnfComponentType, String action){
+ return this.getSingleResource(vnfComponentsRecipeClient,getUri(UriBuilder
+ .fromUri(findFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction)
+ .queryParam(VF_MODULE_MODEL_UUID,vfModuleModelUUID)
+ .queryParam(VNF_COMPONENT_TYPE,vnfComponentType)
+ .queryParam(ACTION,action).build().toString()));
}
- public VnfComponentsRecipe getFirstVnfComponentsRecipeByVnfComponentTypeAndAction(String vnfComponentType,
- String action) {
- return this.getSingleResource(vnfComponentsRecipeClient, getUri(UriBuilder
- .fromUri(findFirstVnfComponentsRecipeByVnfComponentTypeAndAction)
- .queryParam(VNF_COMPONENT_TYPE, vnfComponentType)
- .queryParam(ACTION, action).build().toString()));
+ public VnfComponentsRecipe getFirstVnfComponentsRecipeByVnfComponentTypeAndAction(String vnfComponentType, String action) {
+ return this.getSingleResource(vnfComponentsRecipeClient,getUri(UriBuilder
+ .fromUri(findFirstVnfComponentsRecipeByVnfComponentTypeAndAction)
+ .queryParam(VNF_COMPONENT_TYPE,vnfComponentType)
+ .queryParam(ACTION,action).build().toString()));
}
-
- protected URI getUri(String template) {
+ protected URI getUri(String template){
return URI.create(template);
}
public CloudifyManager getCloudifyManager(String id) {
- return this.getSingleResource(cloudifyManagerClient, getUri(cloudifyManagerURI + id));
+ return this.getSingleResource(cloudifyManagerClient,getUri(cloudifyManagerURI + id));
}
- public CloudSite getCloudSite(String id) {
+ public CloudSite getCloudSite(String id){
return this.getSingleResource(cloudSiteClient,
- getUri(cloudSiteURI + id));
+ getUri(cloudSiteURI + id));
}
- public CloudSite getCloudSite(String id, String uri) {
+ public CloudSite getCloudSite(String id, String uri){
return this.getSingleResource(cloudSiteClient,
- getUri(uri + id));
+ getUri(uri + id));
}
- public void postCloudSite(CloudSite cloudSite) {
+ public void postCloudSite(CloudSite cloudSite){
this.postSingleResource(cloudSiteClient, cloudSite);
}
- public CloudSite getCloudSiteByClliAndAicVersion(String clli, String cloudVersion) {
+ public CloudSite getCloudSiteByClliAndAicVersion (String clli, String cloudVersion){
return this.getSingleResource(cloudSiteClient, getUri(UriBuilder
- .fromUri(findByClliAndCloudVersion)
- .queryParam(CLLI, clli).queryParam(CLOUD_VERSION, cloudVersion).build().toString()));
+ .fromUri(findByClliAndCloudVersion)
+ .queryParam(CLLI,clli).queryParam(CLOUD_VERSION,cloudVersion).build().toString()));
}
- public HomingInstance getHomingInstance(String serviceInstanceId) {
+ public HomingInstance getHomingInstance (String serviceInstanceId){
return this.getSingleResource(homingInstanceClient,
- getUri(homingInstanceURI + serviceInstanceId));
+ getUri(homingInstanceURI + serviceInstanceId));
}
- public HomingInstance getHomingInstance(String serviceInstanceId, String uri) {
+ public HomingInstance getHomingInstance (String serviceInstanceId, String uri){
return this.getSingleResource(homingInstanceClient,
- getUri(uri + serviceInstanceId));
+ getUri(uri + serviceInstanceId));
}
- public void postHomingInstance(HomingInstance homingInstance) {
+ public void postHomingInstance(HomingInstance homingInstance){
this.postSingleResource(homingInstanceClient, homingInstance);
}
public Service getServiceByModelVersionAndModelInvariantUUID(String modelVersion, String modelInvariantUUID) {
return this.getSingleResource(serviceClient, getUri(UriBuilder
- .fromUri(findFirstByModelVersionAndModelInvariantUUIDURI)
- .queryParam(MODEL_VERSION, modelVersion)
- .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString()));
+ .fromUri(findFirstByModelVersionAndModelInvariantUUIDURI)
+ .queryParam(MODEL_VERSION, modelVersion)
+ .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString()));
}
- public VfModule getVfModuleByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion) {
- return this.getSingleResource(vfModuleClient, getUri(UriBuilder
- .fromUri(findFirstVfModuleByModelInvariantUUIDAndModelVersion)
- .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID)
- .queryParam(MODEL_VERSION, modelVersion).build().toString()));
+ public VfModule getVfModuleByModelInvariantUUIDAndModelVersion(String modelInvariantUUID, String modelVersion){
+ return this.getSingleResource(vfModuleClient,getUri(UriBuilder
+ .fromUri(findFirstVfModuleByModelInvariantUUIDAndModelVersion)
+ .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID)
+ .queryParam(MODEL_VERSION, modelVersion).build().toString()));
}
public List<Service> getServiceByModelInvariantUUIDOrderByModelVersionDesc(String modelInvariantUUID) {
return this.getMultipleResources(serviceClient, getUri(UriBuilder
- .fromUri(findByModelInvariantUUIDURI)
- .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString()));
+ .fromUri(findByModelInvariantUUIDURI)
+ .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString()));
}
public List<VfModule> getVfModuleByModelInvariantUUIDOrderByModelVersionDesc(String modelInvariantUUID) {
return this.getMultipleResources(vfModuleClient, getUri(UriBuilder
- .fromUri(findVfModuleByModelInvariantUUIDOrderByModelVersionDesc)
- .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString()));
+ .fromUri(findVfModuleByModelInvariantUUIDOrderByModelVersionDesc)
+ .queryParam(MODEL_INVARIANT_UUID, modelInvariantUUID).build().toString()));
}
private <T> T getSingleResource(Client<T> client, URI uri) {
@@ -784,39 +738,59 @@ public class CatalogDbClient {
return list;
}
- private <T> URI postSingleResource(Client<T> client, T type) {
+ private <T> URI postSingleResource(Client<T> client, T type){
return client.post(type);
}
-
- public List<CvnfcCustomization> getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(
- String vnfCustomizationUUID, String vfModuleCustomizationUUID) {
-
- return this.getMultipleResources(cvnfcCustomizationClient, getUri(UriBuilder
- .fromUri(endpoint + "/cvnfcCustomization/search/findByVnfResourceCustomizationAndVfModuleCustomization")
- .queryParam("VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID", vnfCustomizationUUID)
- .queryParam("VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID", vfModuleCustomizationUUID).build().toString()));
- }
-
- public CvnfcCustomization getCvnfcCustomizationByCustomizationUUID(String cvnfcCustomizationUuid){
- return this.getSingleResource(cvnfcCustomizationClient,getUri(UriBuilder
- .fromUri(endpoint + "/cvnfcCustomization/search/findOneByModelCustomizationUUID").queryParam("modelCustomizationUuid", cvnfcCustomizationUuid)
- .build().toString()));
+
+ public List<CvnfcCustomization> getCvnfcCustomization(String serviceModelUUID, String vnfCustomizationUUID,
+ String vfModuleCustomizationUUID) {
+ Service service = this.getServiceByID(serviceModelUUID);
+ VnfResourceCustomization vnfResourceCust = findVnfResourceCustomizationInList(vnfCustomizationUUID, service.getVnfCustomizations());
+ VfModuleCustomization vfModuleCust = findVfModuleCustomizationInList(vfModuleCustomizationUUID , vnfResourceCust.getVfModuleCustomizations());
+ return vfModuleCust.getCvnfcCustomization().stream().collect(Collectors.toList());
+ }
+
+ private VnfResourceCustomization findVnfResourceCustomizationInList(String vnfCustomizationUUID , List<VnfResourceCustomization> vnfResourceCusts){
+ List<VnfResourceCustomization> filtered = vnfResourceCusts.stream()
+ .filter(vnfCustRes -> vnfCustomizationUUID.equals(vnfCustRes.getModelCustomizationUUID()))
+ .collect(Collectors.toList());
+ if(filtered != null && !filtered.isEmpty() && filtered.size() == 1){
+ return filtered.get(0);
+ }else
+ throw new EntityNotFoundException("Unable to find VnfResourceCustomization ModelCustomizationUUID:" + vnfCustomizationUUID);
+ }
+
+ private VfModuleCustomization findVfModuleCustomizationInList(String vfModuleCustomizationUUID , List<VfModuleCustomization> vfModuleList){
+ List<VfModuleCustomization> filtered = vfModuleList.stream()
+ .filter(vfModuleCust -> vfModuleCustomizationUUID.equals(vfModuleCust.getModelCustomizationUUID()))
+ .collect(Collectors.toList());
+ if(filtered != null && !filtered.isEmpty() && filtered.size() == 1){
+ return filtered.get(0);
+ }else
+ throw new EntityNotFoundException("Unable to find VfModuleCustomization ModelCustomizationUUID:" + vfModuleCustomizationUUID);
+ }
+
+ private CvnfcCustomization findCvnfcCustomizationInAList(String cvnfcCustomizationUuid , List<CvnfcCustomization> cvnfcCustomList){
+ List<CvnfcCustomization> filtered = cvnfcCustomList.stream()
+ .filter(cvnfc -> cvnfcCustomizationUuid.equals(cvnfc.getModelCustomizationUUID()))
+ .collect(Collectors.toList());
+ if(filtered != null && !filtered.isEmpty() && filtered.size() == 1){
+ logger.debug("Found CvnfcCustomization: {}", filtered.get(0));
+ return filtered.get(0);
+ }else
+ throw new EntityNotFoundException("Unable to find VfModuleCustomization ModelCustomizationUUID:" + cvnfcCustomizationUuid);
+ }
+
+ public CvnfcConfigurationCustomization getCvnfcCustomization(String serviceModelUUID, String vnfCustomizationUuid,
+ String vfModuleCustomizationUuid, String cvnfcCustomizationUuid) {
+ List<CvnfcCustomization> cvnfcCustomization = getCvnfcCustomization(serviceModelUUID,vnfCustomizationUuid,vfModuleCustomizationUuid);
+ CvnfcCustomization cvnfc = findCvnfcCustomizationInAList(cvnfcCustomizationUuid,cvnfcCustomization );
+ List<CvnfcConfigurationCustomization> fabricConfigs = cvnfc.getCvnfcConfigurationCustomization().stream().filter(cvnfcCustom -> cvnfcCustom.getConfigurationResource().getToscaNodeType().contains("FabricConfiguration")).collect(Collectors.toList());
+ if(fabricConfigs != null && !fabricConfigs.isEmpty() && fabricConfigs.size() == 1){
+ logger.debug("Found Fabric Configuration: {}", fabricConfigs.get(0));
+ return fabricConfigs.get(0);
+ }else
+ throw new EntityNotFoundException("Unable to find CvnfcConfigurationCustomization ModelCustomizationUUID:" + cvnfcCustomizationUuid);
}
- //fetch all VnfVfmoduleCvnfcConfigurationCustomization underneath a vnfc
- //find the VnfVfmoduleCvnfcConfigurationCustomization that is related to our vnf and our vf-module, filter all others.
- public VnfVfmoduleCvnfcConfigurationCustomization getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationUuidAndVfModuleCustomizationUuidAndCvnfcCustomizationUuid(
- String vnfCustomizationUuid, String vfModuleCustomizationUuid, String cvnfcCustomizationUuid) {
- CvnfcCustomization cvnfc = getCvnfcCustomizationByCustomizationUUID(cvnfcCustomizationUuid);
- if (cvnfc != null) {
- for(VnfVfmoduleCvnfcConfigurationCustomization vnfVfModuleCvnfcCust: cvnfc.getVnfVfmoduleCvnfcConfigurationCustomization()){
- if(vnfVfModuleCvnfcCust.getVnfResourceCustomization().getModelCustomizationUUID().equals(vnfCustomizationUuid) &&
- vnfVfModuleCvnfcCust.getVfModuleCustomization().getModelCustomizationUUID().equals(vfModuleCustomizationUuid)){
- return vnfVfModuleCvnfcCust;
- }
- }
- }
- return null;
-
- }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java
index 8664c1e2bc..ddb089dede 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java
@@ -20,11 +20,11 @@
package org.onap.so.db.catalog.data.repository;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
-@RepositoryRestResource(collectionResourceRel = "vnfVfmoduleCvnfcConfigurationCustomization", path = "vnfVfmoduleCvnfcConfigurationCustomization")
-public interface VnfVfmoduleCvnfcConfigurationCustomizationRepository extends JpaRepository<VnfVfmoduleCvnfcConfigurationCustomization, Integer> {
+@RepositoryRestResource(collectionResourceRel = "cvnfcConfigurationCustomization", path = "cvnfcConfigurationCustomization")
+public interface CvnfcConfigurationCustomizationRepository extends JpaRepository<CvnfcConfigurationCustomization, Integer> {
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java
index 059d0da498..879d7bf82f 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java
@@ -32,7 +32,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
public interface CvnfcCustomizationRepository extends JpaRepository<CvnfcCustomization, Integer> {
CvnfcCustomization findOneByModelCustomizationUUID(String modelCustomizationUuid);
List<CvnfcCustomization> findByModelCustomizationUUID(String modelCustomizationUUID);
-
- @Query(value = "SELECT * FROM cvnfc_customization WHERE VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID = ?1 AND VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID = ?2", nativeQuery = true)
- List<CvnfcCustomization> findByVnfResourceCustomizationAndVfModuleCustomization (@Param("VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID") String vnfResourceCustomization,@Param("VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID") String vfModuleCustomization);
+
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleCustomizationRepository.java
index ee2d08b6f2..e8fb654f57 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleCustomizationRepository.java
@@ -22,11 +22,12 @@ package org.onap.so.db.catalog.data.repository;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "vfModuleCustomization", path = "vfModuleCustomization")
-public interface VFModuleCustomizationRepository extends JpaRepository<VfModuleCustomization, String> {
- VfModuleCustomization findByModelCustomizationUUID(String modelCustomizationUUID);
+public interface VFModuleCustomizationRepository extends JpaRepository<VfModuleCustomization, Integer> {
+ VfModuleCustomization findFirstByModelCustomizationUUIDOrderByCreatedDesc(@Param("MODEL_CUSTOMIZATION_UUID")String modelCustomizationUUID);
- VfModuleCustomization findByModelCustomizationUUIDAndVfModuleModelUUID(String modelCustomizationUUID, String vfModuleModelUUID);
+ VfModuleCustomization findFirstByModelCustomizationUUIDAndVfModuleModelUUIDOrderByCreatedDesc(@Param("MODEL_CUSTOMIZATION_UUID")String modelCustomizationUUID, @Param("MODEL_UUID")String vfModuleModelUUID);
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java
index cd985dba9f..56ae11f4cb 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VFModuleRepository.java
@@ -43,9 +43,9 @@ public interface VFModuleRepository extends JpaRepository<VfModule, String> {
@Query(value = "SELECT * FROM vf_module WHERE MODEL_NAME = ?1 ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(MODEL_VERSION,'.0.0.0'),'.',4)) DESC LIMIT 1;", nativeQuery = true)
VfModule findFirstByModelNameOrderByModelVersionDesc(String modelName);
- VfModule findByModelInvariantUUIDAndModelUUID(String modelCustomizationUUID, String modelUUID);
+ VfModule findFirstByModelInvariantUUIDAndModelUUID(String modelCustomizationUUID, String modelUUID);
- VfModule findByModelInvariantUUID(String modelCustomizationUUID);
+ VfModule findFirstByModelInvariantUUID(String modelCustomizationUUID);
/**
* This method will not work for versions greater than 255, as it is utilizing an ip address function to do the sorting
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java
index 525c628e1c..fa8d8c065e 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepository.java
@@ -24,17 +24,16 @@ import java.util.List;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "vnfResourceCustomization", path = "vnfResourceCustomization")
-public interface VnfCustomizationRepository extends JpaRepository<VnfResourceCustomization, String> {
-
- List<VnfResourceCustomization> findByModelCustomizationUUID(String modelCustomizationUUID);
+public interface VnfCustomizationRepository extends JpaRepository<VnfResourceCustomization, Integer> {
+ List<VnfResourceCustomization> findByModelCustomizationUUID(@Param("MODEL_CUSTOMIZATION_UUID")String modelCustomizationUUID);
VnfResourceCustomization findOneByModelCustomizationUUID(String modelCustomizationUuid);
@Query(value = "SELECT * FROM vnf_resource_customization WHERE MODEL_INSTANCE_NAME = ?1 AND VNF_RESOURCE_MODEL_UUID = ?2 LIMIT 1;", nativeQuery = true)
- VnfResourceCustomization findByModelInstanceNameAndVnfResources(String modelInstanceName,
- String vnfResourceModelUUID);
+ VnfResourceCustomization findByModelInstanceNameAndVnfResources(@Param("MODEL_INSTANCE_NAME")String modelInstanceName, @Param("VNF_RESOURCE_MODEL_UUID")String vnfResourceModelUUID);
-} \ No newline at end of file
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcInstanceGroupCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcInstanceGroupCustomizationRepository.java
index f2fbbe6b57..c18bf006da 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcInstanceGroupCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfcInstanceGroupCustomizationRepository.java
@@ -29,5 +29,4 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "vnfcInstanceGroupCustomization", path = "vnfcInstanceGroupCustomization")
public interface VnfcInstanceGroupCustomizationRepository
extends JpaRepository<VnfcInstanceGroupCustomization, String> {
- List<VnfcInstanceGroupCustomization> findByModelCustomizationUUID(String modelCustomizationlUUID);
}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java
index 0226b86739..64b393628c 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TestApplication.java
@@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Profile;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-@SpringBootApplication(scanBasePackages = { "org.onap.so.db.catalog"})
+@SpringBootApplication(scanBasePackages = { "org.onap.so.db.catalog","org.onap.so.client", "org.onap.so.configuration"})
@EnableJpaRepositories("org.onap.so.db.catalog.data.repository")
@EntityScan("org.onap.so.db.catalog")
@Profile("test")
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/BeansTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/BeansTest.java
index 44439ede22..2188380bbd 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/BeansTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/BeansTest.java
@@ -29,6 +29,7 @@ import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
+import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.openpojo.rules.CustomSetterMustExistRule;
import org.onap.so.openpojo.rules.EqualsAndHashCodeTester;
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomizationTest.java
index b3ad06cca4..e5a17228b7 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomizationTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
-public class VnfVfmoduleCvnfcConfigurationCustomizationTest {
+public class CvnfcConfigurationCustomizationTest {
private static final String CONFIGURATION_FUNCTION = "testconfigurationFunction";
private static final String CONFIGURATION_ROLE = "testconfigurationRole";
@@ -37,7 +37,7 @@ public class VnfVfmoduleCvnfcConfigurationCustomizationTest {
@Test
public final void testVnfVfmoduleCvnfcConfigurationCustomization () {
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationFunction(CONFIGURATION_FUNCTION);
vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(setupConfigurationResource());
vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationRole(CONFIGURATION_ROLE);
@@ -50,9 +50,6 @@ public class VnfVfmoduleCvnfcConfigurationCustomizationTest {
vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName(MODEL_INSTANCE_NAME);
vnfVfmoduleCvnfcConfigurationCustomization.setPolicyName(POLICY_NAME);
- vnfVfmoduleCvnfcConfigurationCustomization.setVfModuleCustomization(setupVfModuleCustomization());
- vnfVfmoduleCvnfcConfigurationCustomization.setVnfResourceCustomization(setupVnfResourceCustomization());
-
assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getId().equals (new Integer(1)));
assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationFunction().equals (CONFIGURATION_FUNCTION));
assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationRole().equals (CONFIGURATION_ROLE));
@@ -61,21 +58,8 @@ public class VnfVfmoduleCvnfcConfigurationCustomizationTest {
assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME));
assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName().equals (POLICY_NAME));
assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getCvnfcCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
- assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getVnfResourceCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
- assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
- }
-
- private VfModuleCustomization setupVfModuleCustomization(){
- VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
- vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
- return vfModuleCustomization;
- }
-
- private VnfResourceCustomization setupVnfResourceCustomization(){
- VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
- vnfResourceCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
- return vnfResourceCustomization;
}
+
private ConfigurationResource setupConfigurationResource(){
ConfigurationResource configurationResource = new ConfigurationResource();
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java
index 7ec28205d6..4ab05f363a 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java
@@ -56,11 +56,9 @@ public class CvnfcCustomizationTest {
cvnfcCustomization.setNfcNamingCode(NFC_NAMING_CODE);
cvnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE);
cvnfcCustomization.setVfModuleCustomization(setupVfModuleCustomization());
- cvnfcCustomization.setVnfcCustomization(setupVnfcCustomization());
- cvnfcCustomization.setVnfResourceCustomization(setupVnfResourceCustomization());
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizationSet = new HashSet();
- vnfVfmoduleCvnfcConfigurationCustomizationSet.add(setupVnfVfmoduleCvnfcConfigurationCustomization());
- cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizationSet);
+ Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomizationSet = new HashSet();
+ cvnfcConfigurationCustomizationSet.add(setupCvnfcConfigurationCustomization());
+ cvnfcCustomization.setCvnfcConfigurationCustomization(cvnfcConfigurationCustomizationSet);
assertTrue (cvnfcCustomization.getId().equals (new Integer(1)));
assertTrue (cvnfcCustomization.getDescription().equals (DESCRIPTION));
@@ -73,7 +71,6 @@ public class CvnfcCustomizationTest {
assertTrue (cvnfcCustomization.getNfcFunction().equals (NFC_FUNCTION));
assertTrue (cvnfcCustomization.getNfcNamingCode().equals (NFC_NAMING_CODE));
assertTrue (cvnfcCustomization.getToscaNodeType().equals (TOSCA_NODE_TYPE));
- assertTrue (cvnfcCustomization.getVnfcCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
assertTrue (cvnfcCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
}
@@ -82,22 +79,11 @@ public class CvnfcCustomizationTest {
vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
return vfModuleCustomization;
}
+
- private VnfcCustomization setupVnfcCustomization(){
- VnfcCustomization vnfcCustomization = new VnfcCustomization();
- vnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
- return vnfcCustomization;
- }
-
- private VnfResourceCustomization setupVnfResourceCustomization(){
- VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
- vnfResourceCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
- return vnfResourceCustomization;
- }
-
- private VnfVfmoduleCvnfcConfigurationCustomization setupVnfVfmoduleCvnfcConfigurationCustomization(){
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
- vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
- return vnfVfmoduleCvnfcConfigurationCustomization;
+ private CvnfcConfigurationCustomization setupCvnfcConfigurationCustomization(){
+ CvnfcConfigurationCustomization cvnfcConfigurationCustomization = new CvnfcConfigurationCustomization();
+ cvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return cvnfcConfigurationCustomization;
}
} \ No newline at end of file
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java
index 4b6598427e..7aab47a625 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java
@@ -32,12 +32,12 @@ import org.junit.Assert;
import org.junit.Test;
import org.onap.so.db.catalog.BaseTest;
import org.onap.so.db.catalog.beans.ConfigurationResource;
+import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.VfModule;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResource;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.VnfcCustomization;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
@@ -74,16 +74,14 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
- List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
+ List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList<>();
vnfResourceCustomizations.add(vnfResourceCustomization);
vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
vnfResourceCustomization.setVnfResources(vnfResource);
- cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
- cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
cvnfcCustomizationRepository.save(cvnfcCustomization);
@@ -126,16 +124,16 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
- List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
+ List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList<>();
vnfResourceCustomizations.add(vnfResourceCustomization);
vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
vnfResourceCustomization.setVnfResources(vnfResource);
- cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
+
VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
- cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
+
@@ -186,11 +184,10 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
vnfResourceCustomization.setVnfResources(vnfResource);
- cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
+
VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
- cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
cvnfcCustomizationRepository.save(cvnfcCustomization);
@@ -204,137 +201,7 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
}
- @Test
- @Transactional
- public void createAndGetCvnfcCustomizationsTest() throws Exception {
-
- CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization();
- cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
-
- VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
- vfModuleCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
-
- VfModule vFModule = setUpVfModule();
- VnfResource vnfResource = setUpVnfResource();
-
- vFModule.setVnfResources(vnfResource);
- vfModuleCustomization.setVfModule(vFModule);
- cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
-
- VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
- vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
- vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
-
- List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
- vnfResourceCustomizations.add(vnfResourceCustomization);
- vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
- vnfResourceCustomization.setVnfResources(vnfResource);
-
- cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
-
- VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
- vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
- cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
-
- cvnfcCustomizationRepository.save(cvnfcCustomization);
-
- List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findByVnfResourceCustomizationAndVfModuleCustomization("cf9f6efc-9f14-11e8-98d0-529269fb1459","cf9f6efc-9f14-11e8-98d0-529269fb1459");
- boolean matchFound = false;
- for (CvnfcCustomization foundCvnfcCustomization : cvnfcCustomizationList) {
- if (foundCvnfcCustomization.getDescription().equalsIgnoreCase(cvnfcCustomization.getDescription())) {
-
- assertThat(cvnfcCustomization, sameBeanAs(foundCvnfcCustomization)
- .ignoring("id")
- .ignoring("created")
- .ignoring("vnfVfmoduleCvnfcConfigurationCustomization")
- .ignoring("vnfResourceCusteModelCustomizationUUID"));
-
- matchFound = true;
- break;
- }
- }
- Assert.assertTrue(matchFound);
- }
+
- @Test
- @Transactional
- public void createAndGetCvnfcCustomizationsExtractToscaModelTest() throws Exception {
-
- CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization();
- cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
-
- VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
- vfModuleCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
-
- VfModule vFModule = setUpVfModule();
- VnfResource vnfResource = setUpVnfResource();
-
- vFModule.setVnfResources(vnfResource);
- vfModuleCustomization.setVfModule(vFModule);
- cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
-
- VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
- vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
- vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
-
- List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
- vnfResourceCustomizations.add(vnfResourceCustomization);
- vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
- vnfResourceCustomization.setVnfResources(vnfResource);
-
- cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
-
- VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
- vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
- cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
-
- ConfigurationResource configurationResource = new ConfigurationResource();
- configurationResource.setToscaNodeType("FabricConfiguration");
- configurationResource.setModelInvariantUUID("modelInvariantUUID");
- configurationResource.setModelUUID("modelUUID");
- configurationResource.setModelName("modelName");
- configurationResource.setModelVersion("modelVersion");
- configurationResource.setDescription("description");
- configurationResource.setToscaNodeType("toscaNodeType");
-
- VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
- vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationFunction("configurationFunction");
- vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID("modelCustomizationUUID");
- vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(configurationResource);
- vnfVfmoduleCvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization);
- vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName("modelInstanceName");
- vnfVfmoduleCvnfcConfigurationCustomization.setVfModuleCustomization(vfModuleCustomization);
- vnfVfmoduleCvnfcConfigurationCustomization.setVnfResourceCustomization(vnfResourceCustomization);
-
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizationSet = new HashSet<VnfVfmoduleCvnfcConfigurationCustomization>();
- vnfVfmoduleCvnfcConfigurationCustomizationSet.add(vnfVfmoduleCvnfcConfigurationCustomization);
- cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizationSet);
- vfModuleCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizationSet);
- vnfResourceCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizationSet);
-
- cvnfcCustomizationRepository.save(cvnfcCustomization);
-
- List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findByVnfResourceCustomizationAndVfModuleCustomization("cf9f6efc-9f14-11e8-98d0-529269fb1459","cf9f6efc-9f14-11e8-98d0-529269fb1459");
- boolean matchFound = false;
- for (CvnfcCustomization foundCvnfcCustomization : cvnfcCustomizationList) {
- if (foundCvnfcCustomization.getDescription().equalsIgnoreCase(cvnfcCustomization.getDescription())) {
-
- assertThat(cvnfcCustomization, sameBeanAs(foundCvnfcCustomization)
- .ignoring("id")
- .ignoring("created")
- .ignoring("vnfVfmoduleCvnfcConfigurationCustomization")
- .ignoring("vnfResourceCusteModelCustomizationUUID"));
-
- matchFound = true;
-
- Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizations = foundCvnfcCustomization.getVnfVfmoduleCvnfcConfigurationCustomization();
- for(VnfVfmoduleCvnfcConfigurationCustomization customization : vnfVfmoduleCvnfcConfigurationCustomizations) {
- Assert.assertTrue(customization.getConfigurationResource().getToscaNodeType().equalsIgnoreCase("toscaNodeType"));
- }
- break;
- }
- }
- Assert.assertTrue(matchFound);
-
- }
+
}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepositoryTest.java
deleted file mode 100644
index be21ea9b35..0000000000
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfCustomizationRepositoryTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.db.catalog.data.repository;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.List;
-import org.junit.Test;
-import org.onap.so.db.catalog.BaseTest;
-import org.onap.so.db.catalog.beans.VnfResource;
-import org.onap.so.db.catalog.beans.VnfResourceCustomization;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.CollectionUtils;
-
-
-public class VnfCustomizationRepositoryTest extends BaseTest {
-
- @Autowired
- private VnfCustomizationRepository vnfCustomizationRepository;
-
- @Test
- public void findByModelCustomizationUUID_ValidUuid_ExpectedOutput() throws Exception {
- List<VnfResourceCustomization> vnfCustomizationList = vnfCustomizationRepository
- .findByModelCustomizationUUID("68dc9a92-214c-11e7-93ae-92361f002671");
- assertFalse(CollectionUtils.isEmpty(vnfCustomizationList));
- assertEquals("output contains one entity", 1, vnfCustomizationList.size());
-
- checkVnfResourceCustomization(vnfCustomizationList.get(0));
- }
-
- @Test
- public void findOneByModelCustomizationUUID_ValidUuid_ExpectedOutput() throws Exception {
- VnfResourceCustomization vnfResourceCustomization = vnfCustomizationRepository
- .findOneByModelCustomizationUUID("68dc9a92-214c-11e7-93ae-92361f002671");
- checkVnfResourceCustomization(vnfResourceCustomization);
- }
-
- @Test
- public void findByModelInstanceNameAndVnfResources_ValidNameAndUuid_ExpectedOutput() throws Exception {
- VnfResourceCustomization vnfResourceCustomization = vnfCustomizationRepository
- .findByModelInstanceNameAndVnfResources("vSAMP10a 1", "ff2ae348-214a-11e7-93ae-92361f002671");
- checkVnfResourceCustomization(vnfResourceCustomization);
- }
-
- private void checkVnfResourceCustomization(VnfResourceCustomization vnfResourceCustomization) {
- assertEquals("modelInstanceName", "vSAMP10a 1", vnfResourceCustomization.getModelInstanceName());
- assertEquals("blueprintName", "test_configuration_restconf", vnfResourceCustomization.getBlueprintName());
- assertEquals("blueprintVersion", "1.0.0", vnfResourceCustomization.getBlueprintVersion());
- VnfResource vnfResource = vnfResourceCustomization.getVnfResources();
- assertNotNull(vnfResource);
-
- assertEquals("VNFResource modelUUID", "ff2ae348-214a-11e7-93ae-92361f002671", vnfResource.getModelUUID());
- assertEquals("VNFResource modelInvariantUUID", "2fff5b20-214b-11e7-93ae-92361f002671",
- vnfResource.getModelInvariantUUID());
- assertEquals("VNFResource modelVersion", "1.0", vnfResource.getModelVersion());
- assertEquals("VNFResource orchestration mode", "HEAT", vnfResource.getOrchestrationMode());
- }
-}
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index ffd126545d..008f4ae737 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -44,8 +44,9 @@ insert into heat_environment(artifact_uuid, name, version, description, body, ar
insert into vnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, aic_version_min, aic_version_max, model_invariant_uuid, model_version, model_name, tosca_node_type, heat_template_artifact_uuid) values
('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', null);
-insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design, cds_blueprint_name, cds_blueprint_version) values
-('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null, "test_configuration_restconf", "1.0.0");
+insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design,SERVICE_MODEL_UUID) values
+('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null,'5df8b6de-2083-11e7-93ae-92361f002671');
+
insert into vf_module(model_uuid, model_invariant_uuid, model_version, model_name, description, is_base, heat_template_artifact_uuid, vol_heat_template_artifact_uuid, creation_timestamp, vnf_resource_model_uuid) values
@@ -57,11 +58,6 @@ insert into vf_module_customization(model_customization_uuid, label, initial_cou
('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671'),
('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671');
-
-insert into vnf_res_custom_to_vf_module_custom(vnf_resource_cust_model_customization_uuid, vf_module_cust_model_customization_uuid, creation_timestamp) values
-('68dc9a92-214c-11e7-93ae-92361f002671', 'cb82ffd8-252a-11e7-93ae-92361f002671', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002671', 'b4ea86b4-253f-11e7-93ae-92361f002671', '2017-05-26 15:08:24');
-
insert into allotted_resource(model_uuid, model_invariant_uuid, model_version, model_name, tosca_node_type, subcategory, description, creation_timestamp) values
('f6b7d4c6-e8a4-46e2-81bc-31cad5072842', 'b7a1b78e-6b6b-4b36-9698-8c9530da14af', '1.0', 'Tunnel_Xconn', '', '', '', '2017-05-26 15:08:24');
@@ -104,8 +100,8 @@ insert into vnf_resource(orchestration_mode, description, creation_timestamp, mo
('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', null);
-insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design) values
-('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null);
+insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design,SERVICE_MODEL_UUID) values
+('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null,'5df8b6de-2083-11e7-93ae-92361f002672');
@@ -126,9 +122,6 @@ insert into vf_module_customization(model_customization_uuid, label, initial_cou
('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672');
-insert into vnf_res_custom_to_vf_module_custom(vnf_resource_cust_model_customization_uuid, vf_module_cust_model_customization_uuid, creation_timestamp) values
-('68dc9a92-214c-11e7-93ae-92361f002672', 'cb82ffd8-252a-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
-('68dc9a92-214c-11e7-93ae-92361f002672', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24');
@@ -142,10 +135,6 @@ insert into network_resource_customization_to_service(service_model_uuid, resour
('5df8b6de-2083-11e7-93ae-92361f002672', '3bdbb104-476c-483e-9f8b-c095b3d308ac');
-insert into vnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002671', '68dc9a92-214c-11e7-93ae-92361f002671'),
-('5df8b6de-2083-11e7-93ae-92361f002672', '68dc9a92-214c-11e7-93ae-92361f002672');
-
insert into allotted_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
('5df8b6de-2083-11e7-93ae-92361f002671', '367a8ba9-057a-4506-b106-fbae818597c6' ),
('5df8b6de-2083-11e7-93ae-92361f002672', '367a8ba9-057a-4506-b106-fbae818597c6');
@@ -213,27 +202,31 @@ insert into network_recipe(id, model_name, action, description, orchestration_ur
('176', 'NEUTRON_BASIC', 'DELETE', '', '/mso/async/services/DeleteNetworkV2', '', '180', '', '2017-09-22 18:47:31', '1'),
('177', 'NEUTRON_BASIC', 'UPDATE', '', '/mso/async/services/UpdateNetworkV2', '', '180', '', '2017-09-22 18:47:31', '1');
-INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, IS_TOPLEVELFLOW, MIN_API_VERSION, MAX_API_VERSION) VALUES
-('Service-Create', 'createInstance', 'Service', true, true, '7','7'),
-('Service-Delete', 'deleteInstance', 'Service', true, true, '7','7'),
-('Service-Macro-Assign', 'assignInstance', 'Service', false, true, '7','7'),
-('Service-Macro-Activate', 'activateInstance', 'Service', false, true, '7','7'),
-('Service-Macro-Unassign', 'unassignInstance', 'Service', false, true, '7','7'),
-('Service-Macro-Create', 'createInstance', 'Service', false, true, '7','7'),
-('Service-Macro-Delete', 'deleteInstance', 'Service', false, true, '7','7'),
-('Network-Create', 'createInstance', 'Network', true, true, '7','7'),
-('Network-Delete', 'deleteInstance', 'Network', true, true, '7','7'),
-('VNF-Macro-Recreate', 'replaceInstance', 'Vnf', false, false, '7','7'),
-('VNF-Macro-Replace', 'internalReplace', 'Vnf', false, false, '7','7'),
-('VNF-Create', 'createInstance', 'Vnf', true, true, '7', '7'),
-('VNF-Delete', 'deleteInstance', 'Vnf', true, true, '7', '7'),
-('VolumeGroup-Create', 'createInstance', 'VolumeGroup', true, true, '7','7'),
-('VolumeGroup-Delete', 'deleteInstance', 'VolumeGroup', true, true, '7','7'),
-('VFModule-Create', 'createInstance', 'VfModule', true, true, '7','7'),
-('VFModule-Delete', 'deleteInstance', 'VfModule', true, true, '7','7'),
-('VFModule-DeactivateAndCloudDelete', 'deactivateAndCloudDelete', 'VfModule', true, true, '7','7'),
-('NetworkCollection-Macro-Create', 'createInstance', 'NetworkCollection', false, true, '7','7'),
-('NetworkCollection-Macro-Delete', 'deleteInstance', 'NetworkCollection', false, true, '7','7');
+INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, IS_TOPLEVELFLOW, MIN_API_VERSION, MAX_API_VERSION,cloud_owner) VALUES
+('Service-Create', 'createInstance', 'Service', true, true, '7','7','cloudOwner'),
+('Service-Delete', 'deleteInstance', 'Service', true, true, '7','7','cloudOwner'),
+('Service-Macro-Assign', 'assignInstance', 'Service', false, true, '7','7','cloudOwner'),
+('Service-Macro-Activate', 'activateInstance', 'Service', false, true, '7','7','cloudOwner'),
+('Service-Macro-Unassign', 'unassignInstance', 'Service', false, true, '7','7','cloudOwner'),
+('Service-Macro-Create', 'createInstance', 'Service', false, true, '7','7','cloudOwner'),
+('Service-Macro-Delete', 'deleteInstance', 'Service', false, true, '7','7','cloudOwner'),
+('Network-Create', 'createInstance', 'Network', true, true, '7','7','cloudOwner'),
+('Network-Delete', 'deleteInstance', 'Network', true, true, '7','7','cloudOwner'),
+('VNF-Macro-Recreate', 'replaceInstance', 'Vnf', false, false, '7','7','cloudOwner'),
+('VNF-Macro-Replace', 'internalReplace', 'Vnf', false, false, '7','7','cloudOwner'),
+('VNF-Create', 'createInstance', 'Vnf', true, true, '7', '7','cloudOwner'),
+('VNF-Delete', 'deleteInstance', 'Vnf', true, true, '7', '7','cloudOwner'),
+('VolumeGroup-Create', 'createInstance', 'VolumeGroup', true, true, '7','7','cloudOwner'),
+('VolumeGroup-Delete', 'deleteInstance', 'VolumeGroup', true, true, '7','7','cloudOwner'),
+('VFModule-Create', 'createInstance', 'VfModule', true, true, '7','7','cloudOwner'),
+('VFModule-Delete', 'deleteInstance', 'VfModule', true, true, '7','7','cloudOwner'),
+('VFModule-DeactivateAndCloudDelete', 'deactivateAndCloudDelete', 'VfModule', true, true, '7','7','cloudOwner'),
+('NetworkCollection-Macro-Create', 'createInstance', 'NetworkCollection', false, true, '7','7','cloudOwner'),
+('NetworkCollection-Macro-Delete', 'deleteInstance', 'NetworkCollection', false, true, '7','7','cloudOwner'),
+('InstanceGroup-Create', 'createInstance', 'InstanceGroup', true, true, '7','7','cloudOwner'),
+('InstanceGroup-Delete', 'deleteInstance', 'InstanceGroup', true, true, '7','7','cloudOwner'),
+('InstanceGroupMembers-Add', 'addMembers', 'InstanceGroupMembers', true, true, '7','7','cloudOwner'),
+('InstanceGroupMembers-Remove', 'removeMembers', 'InstanceGroupMembers', true, true, '7','7','cloudOwner');
INSERT INTO building_block_detail (BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION)
VALUES
@@ -379,7 +372,12 @@ INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FL
('NetworkCollection-Macro-Delete', '1', 'DeactivateNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete')),
('NetworkCollection-Macro-Delete', '2', 'DeleteNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete')),
('NetworkCollection-Macro-Delete', '3', 'UnassignNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete')),
-('NetworkCollection-Macro-Delete', '4', 'DeleteNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete'));
+('NetworkCollection-Macro-Delete', '4', 'DeleteNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete')),
+('InstanceGroup-Create', '1', 'CreateInstanceGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'InstanceGroup-Create')),
+('InstanceGroup-Delete', '1', 'DeleteInstanceGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'InstanceGroup-Delete')),
+('InstanceGroupMembers-Add', '1', 'AddInstanceGroupMembersBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'InstanceGroupMembers-Add')),
+('InstanceGroupmembers-Remove', '1', 'RemoveInstanceGroupMembersBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'InstanceGroupMembers-Remove'));
+
INSERT INTO orchestration_status_state_transition_directive (RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE)
VALUES
@@ -714,8 +712,6 @@ INSERT INTO `cvnfc_customization`
`nfc_function`,
`nfc_naming_code`,
`creation_timestamp`,
- `vnf_resource_cust_model_customization_uuid`,
- `vf_module_cust_model_customization_uuid`,
`vnfc_cust_model_customization_uuid`)
VALUES ( '1',
'9bcce658-9b37-11e8-98d0-529269fb1459',
@@ -729,32 +725,8 @@ VALUES ( '1',
'testNfcFunction',
'testNfcNamingCode',
'2018-07-17 14:05:08',
- '68dc9a92-214c-11e7-93ae-92361f002671',
- 'cb82ffd8-252a-11e7-93ae-92361f002671',
'9bcce658-9b37-11e8-98d0-529269fb1459');
-INSERT INTO vnf_vfmodule_cvnfc_configuration_customization
- (id,
- model_customization_uuid,
- CVNFC_CUSTOMIZATION_ID,
- model_instance_name,
- configuration_type,
- configuration_role,
- configuration_function,
- policy_name,
- creation_timestamp,
- configuration_model_uuid)
-VALUES ( '1',
- '7bcce658-9b37-11e8-98d0-529269fb1450',
- '1',
- 'testModelInstanceName',
- 'testConfigurationType',
- 'testConfigurationRole',
- 'testConfigurationFunction',
- 'testPolicyName',
- '2018-07-17 14:05:08',
- 'c59a41ca-9b3b-11e8-98d0-529269fb1459');
-
insert into service(model_uuid, model_name, model_invariant_uuid, model_version, description, creation_timestamp, tosca_csar_artifact_uuid, service_type, service_role, environment_context, workload_context) values
('5df8b6de-2083-11e7-93ae-92361f002676', 'PNF_routing_service', '9647dfc4-2083-11e7-93ae-92361f002676', '1.0', 'PNF service', '2019-03-08 12:00:29', null, 'NA', 'NA', 'Luna', 'Oxygen');
@@ -765,4 +737,4 @@ insert into pnf_resource_customization(model_customization_uuid, model_instance_
('68dc9a92-214c-11e7-93ae-92361f002680', 'PNF routing', 'routing', 'routing', 'routing', 'routing', '2019-03-08 12:00:29', 'ff2ae348-214a-11e7-93ae-92361f002680', null, "test_configuration_restconf", "1.0.0");
insert into pnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
-('5df8b6de-2083-11e7-93ae-92361f002676', '68dc9a92-214c-11e7-93ae-92361f002680'); \ No newline at end of file
+('5df8b6de-2083-11e7-93ae-92361f002676', '68dc9a92-214c-11e7-93ae-92361f002680');
diff --git a/mso-catalog-db/src/test/resources/logback-test.xml b/mso-catalog-db/src/test/resources/logback-test.xml
index 68e4fcf64d..1407ad0080 100644
--- a/mso-catalog-db/src/test/resources/logback-test.xml
+++ b/mso-catalog-db/src/test/resources/logback-test.xml
@@ -42,11 +42,6 @@
<logger name="org.onap" level="DEBUG" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
-
- <logger name="org.hibernate" level="DEBUG" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
<root level="info">
<appender-ref ref="STDOUT" />
</root>
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 7068ef9ba5..e61f5fc553 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -1,959 +1,1168 @@
+set foreign_key_checks=0;
+DROP TABLE IF EXISTS `allotted_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `SUBCATEGORY` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `allotted_resource_customization`
+--
-CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
-`MACRO_ACTION` VARCHAR(200) NOT NULL,
-`ACTION` VARCHAR(200) NOT NULL,
-`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
-`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 0,
-`MIN_API_VERSION` DOUBLE NOT NULL,
-`MAX_API_VERSION` DOUBLE NULL,
-PRIMARY KEY (`id`),
-UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC, `MACRO_ACTION` ASC))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS building_block_detail (
-id INT(11) AUTO_INCREMENT,
-BUILDING_BLOCK_NAME VARCHAR(200) NOT NULL,
-RESOURCE_TYPE VARCHAR(25) NOT NULL,
-TARGET_ACTION VARCHAR(25) NOT NULL,
-PRIMARY KEY(`id`),
-UNIQUE INDEX `UK_building_block_name`(`BUILDING_BLOCK_NAME`))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS `orchestration_flow_reference` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`COMPOSITE_ACTION` VARCHAR(200) NOT NULL,
-`SEQ_NO` INT(11) NOT NULL,
-`FLOW_NAME` VARCHAR(200) NOT NULL,
-`FLOW_VERSION` DOUBLE NOT NULL,
-`NB_REQ_REF_LOOKUP_ID` INT(11) NOT NULL,
-PRIMARY KEY (`id`),
-INDEX `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID` ASC),
-UNIQUE INDEX `UK_orchestration_flow_reference` (`COMPOSITE_ACTION` ASC, `FLOW_NAME` ASC, `SEQ_NO` ASC, `NB_REQ_REF_LOOKUP_ID` ASC),
-CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1`
-FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`)
-ON DELETE CASCADE ON UPDATE CASCADE
-)
-ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
-
-create table `allotted_resource` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) default null,
- `subcategory` varchar(200) default null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `allotted_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `providing_service_model_uuid` varchar(200) default null,
- `providing_service_model_invariant_uuid` varchar(200) default null,
- `providing_service_model_name` varchar(200) default null,
- `target_network_role` varchar(200) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `ar_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_customization_uuid`),
- key `fk_allotted_resource_customization__allotted_resource1_idx` (`ar_model_uuid`),
- constraint `fk_allotted_resource_customization__allotted_resource1` foreign key (`ar_model_uuid`) references `allotted_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_environment` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(100) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_files` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `body` longtext not null,
- `timeout_minutes` int(11) default null,
- `artifact_checksum` varchar(200) not null default 'manual record',
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-create table `heat_nested_template` (
- `parent_heat_template_uuid` varchar(200) not null,
- `child_heat_template_uuid` varchar(200) not null,
- `provider_resource_file` varchar(100) default null,
- primary key (`parent_heat_template_uuid`,`child_heat_template_uuid`),
- key `fk_heat_nested_template__heat_template2_idx` (`child_heat_template_uuid`),
- constraint `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` foreign key (`child_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` foreign key (`parent_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `heat_template_params` (
- `heat_template_artifact_uuid` varchar(200) not null,
- `param_name` varchar(100) not null,
- `is_required` bit(1) not null,
- `param_type` varchar(20) default null,
- `param_alias` varchar(45) default null,
- primary key (`heat_template_artifact_uuid`,`param_name`),
- constraint `fk_heat_template_params__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_recipe` (
- `id` int(11) not null auto_increment,
- `model_name` varchar(20) not null,
- `action` varchar(50) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `network_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_type` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `version_str` varchar(20) not null,
- primary key (`id`),
- unique key `uk_rl4f296i0p8lyokxveaiwkayi` (`model_name`,`action`,`version_str`)
-) engine=innodb auto_increment=178 default charset=latin1;
-
-
-
-
-create table `temp_network_heat_template_lookup` (
- `network_resource_model_name` varchar(200) not null,
- `heat_template_artifact_uuid` varchar(200) null,
- `aic_version_min` varchar(20) null,
- `aic_version_max` varchar(20) default null,
- primary key (`network_resource_model_name`),
- key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_temp_network_heat_template_lookup__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `network_resource` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) null,
- `neutron_network_type` varchar(20) default null,
- `model_version` varchar(20) default null,
- `tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) null,
- `aic_version_max` varchar(20) default null,
- `orchestration_mode` varchar(20) default 'heat',
- `resource_category` varchar(20) default null,
- `resource_sub_category` varchar(20) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`),
- key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
- key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `network_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `network_technology` varchar(45) default null,
- `network_type` varchar(45) default null,
- `network_role` varchar(200) default null,
- `network_scope` varchar(45) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `network_resource_model_uuid` varchar(200) not null,
- `resource_input` varchar(20000) default null,
- primary key (`model_customization_uuid`),
- key `fk_network_resource_customization__network_resource1_idx` (`network_resource_model_uuid`),
- constraint `fk_network_resource_customization__network_resource1` foreign key (`network_resource_model_uuid`) references `network_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-
-create table `tosca_csar` (
- `artifact_uuid` varchar(200) not null,
- `name` varchar(200) not null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `artifact_checksum` varchar(200) not null,
- `url` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`artifact_uuid`)
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `service` (
- `model_uuid` varchar(200) not null,
- `model_name` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `tosca_csar_artifact_uuid` varchar(200) default null,
- `service_type` varchar(200) default null,
- `service_role` varchar(200) default null,
- `environment_context` varchar(200) default null,
- `workload_context` varchar(200) default null,
- `service_category` varchar(200) default null,
- `resource_order` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_service__tosca_csar1_idx` (`tosca_csar_artifact_uuid`),
- constraint `fk_service__tosca_csar1` foreign key (`tosca_csar_artifact_uuid`) references `tosca_csar` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-create table `service_recipe` (
- `id` int(11) not null auto_increment,
- `action` varchar(50) not null,
- `version_str` varchar(20) default null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `service_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `service_timeout_interim` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `service_model_uuid` varchar(200) not null,
- primary key (`id`),
- unique key `uk_7fav5dkux2v8g9d2i5ymudlgc` (`service_model_uuid`,`action`),
- key `fk_service_recipe__service1_idx` (`service_model_uuid`),
- constraint `fk_service_recipe__service1` foreign key (`service_model_uuid`) references `service` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb auto_increment=86 default charset=latin1;
-
-
-
-create table `vnf_resource` (
- `orchestration_mode` varchar(20) not null default 'heat',
- `description` varchar(1200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `model_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) default null,
- `aic_version_max` varchar(20) default null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) default null,
- `tosca_node_type` varchar(200) default null,
- `resource_category` varchar(200) default null,
- `resource_sub_category` varchar(200) default null,
- `heat_template_artifact_uuid` varchar(200) default null,
- primary key (`model_uuid`),
- key `fk_vnf_resource__heat_template1` (`heat_template_artifact_uuid`),
- constraint `fk_vnf_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vf_module` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) default null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) default null,
- `is_base` int(11) not null,
- `heat_template_artifact_uuid` varchar(200) default null,
- `vol_heat_template_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- primary key (`model_uuid`,`vnf_resource_model_uuid`),
- key `fk_vf_module__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- key `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`heat_template_artifact_uuid`),
- key `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`vol_heat_template_artifact_uuid`),
- constraint `fk_vf_module__heat_template_art_uuid__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module__vol_heat_template_art_uuid__heat_template2` foreign key (`vol_heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_customization` (
- `model_customization_uuid` varchar(200) not null,
- `label` varchar(200) default null,
- `initial_count` int(11) default '0',
- `min_instances` int(11) default '0',
- `max_instances` int(11) default null,
- `availability_zone_count` int(11) default null,
- `heat_environment_artifact_uuid` varchar(200) default null,
- `vol_environment_artifact_uuid` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vf_module_model_uuid` varchar(200) not null,
- primary key (`model_customization_uuid`),
- key `fk_vf_module_customization__vf_module1_idx` (`vf_module_model_uuid`),
- key `fk_vf_module_customization__heat_env__heat_environment1_idx` (`heat_environment_artifact_uuid`),
- key `fk_vf_module_customization__vol_env__heat_environment2_idx` (`vol_environment_artifact_uuid`),
- constraint `fk_vf_module_customization__heat_env__heat_environment1` foreign key (`heat_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vf_module1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_customization__vol_env__heat_environment2` foreign key (`vol_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vf_module_to_heat_files`
---
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vf_module_to_heat_files` (
- `vf_module_model_uuid` varchar(200) not null,
- `heat_files_artifact_uuid` varchar(200) not null,
- primary key (`vf_module_model_uuid`,`heat_files_artifact_uuid`),
- key `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`heat_files_artifact_uuid`),
- constraint `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` foreign key (`heat_files_artifact_uuid`) references `heat_files` (`artifact_uuid`) on delete cascade on update cascade,
- constraint `fk_vf_module_to_heat_files__vf_module__model_uuid1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1 comment='il fait ce qu''il dit';
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vnf_components`
---
-
-
-/*!40101 set @saved_cs_client = @@character_set_client */;
-/*!40101 set character_set_client = utf8 */;
-create table `vnf_components` (
- `vnf_id` int(11) not null,
- `component_type` varchar(20) not null,
- `heat_template_id` int(11) default null,
- `heat_environment_id` int(11) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_id`,`component_type`)
-) engine=innodb default charset=latin1;
-/*!40101 set character_set_client = @saved_cs_client */;
-
---
--- table structure for table `vnf_components_recipe`
---
-
-
-
-create table `vnf_components_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `vnf_component_type` varchar(45) not null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_component_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_model_uuid` varchar(200) default null,
- primary key (`id`),
- unique key `uk_4dpdwddaaclhc11wxsb7h59ma` (`vf_module_model_uuid`,`vnf_component_type`,`action`,`version`)
-) engine=innodb auto_increment=26 default charset=latin1;
-
-
-
-
-create table `vnf_recipe` (
- `id` int(11) not null auto_increment,
- `vnf_type` varchar(200) default null,
- `action` varchar(50) not null,
- `service_type` varchar(45) default null,
- `version_str` varchar(20) not null,
- `description` varchar(1200) default null,
- `orchestration_uri` varchar(256) not null,
- `vnf_param_xsd` varchar(2048) default null,
- `recipe_timeout` int(11) default null,
- `creation_timestamp` datetime default current_timestamp,
- `vf_module_id` varchar(100) default null,
- primary key (`id`),
- unique key `uk_f3tvqau498vrifq3cr8qnigkr` (`vf_module_id`,`action`,`version_str`)
-) engine=innodb auto_increment=10006 default charset=latin1;
-
-
-
-
-
-
-
-
-create table `vnf_resource_customization` (
- `model_customization_uuid` varchar(200) not null,
- `model_instance_name` varchar(200) not null,
- `min_instances` int(11) default null,
- `max_instances` int(11) default null,
- `availability_zone_max_count` int(11) default null,
- `nf_type` varchar(200) default null,
- `nf_role` varchar(200) default null,
- `nf_function` varchar(200) default null,
- `nf_naming_code` varchar(200) default null,
- `creation_timestamp` datetime not null default current_timestamp,
- `vnf_resource_model_uuid` varchar(200) not null,
- `multi_stage_design` varchar(20) default null,
- `resource_input` varchar(20000) default null,
- `cds_blueprint_name` varchar(200) default null,
- `cds_blueprint_version` varchar(20) default null,
- primary key (`model_customization_uuid`),
- key `fk_vnf_resource_customization__vnf_resource1_idx` (`vnf_resource_model_uuid`),
- constraint `fk_vnf_resource_customization__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-
-
-create table `vnf_res_custom_to_vf_module_custom` (
- `vnf_resource_cust_model_customization_uuid` varchar(200) not null,
- `vf_module_cust_model_customization_uuid` varchar(200) not null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_cust_model_customization_uuid`,`vf_module_cust_model_customization_uuid`),
- key `fk_vnf_res_custom_to_vf_module_custom__vf_module_customizat_idx` (`vf_module_cust_model_customization_uuid`),
- constraint `fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1` foreign key (`vf_module_cust_model_customization_uuid`) references `vf_module_customization` (`model_customization_uuid`) on delete cascade on update cascade,
- constraint `fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1` foreign key (`vnf_resource_cust_model_customization_uuid`) references `vnf_resource_customization` (`model_customization_uuid`) on delete cascade on update cascade
-) engine=innodb default charset=latin1;
-
-
-create table if not exists external_service_to_internal_model_mapping (
-id int(11) not null,
-service_name varchar(200) not null,
-product_flavor varchar(200) null,
-subscription_service_type varchar(200) not null,
-service_model_uuid varchar(200) not null,
-primary key (id),
-unique index uk_external_service_to_internal_model_mapping
-(service_name asc, product_flavor asc, service_model_uuid asc));
-
-create table if not exists `collection_resource` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) not null,
- description varchar(200),
- creation_timestamp datetime not null default current_timestamp,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_customization` (
- model_customization_uuid varchar(200) not null,
- model_instance_name varchar(200) not null,
- role varchar(200) NULL,
- object_type varchar(200) not null,
- function varchar(200) NULL,
- collection_resource_type varchar(200) NULL,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- primary key (`model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `instance_group` (
- model_uuid varchar(200) not null,
- model_name varchar(200) not null,
- model_invariant_uuid varchar(200) not null,
- model_version varchar(20) not null,
- tosca_node_type varchar(200) NULL,
- role varchar(200) not null,
- object_type varchar(200) not null,
- creation_timestamp datetime not null default current_timestamp,
- cr_model_uuid varchar(200) not null,
- instance_group_type varchar(200) not null,
- primary key (`model_uuid`)
-)engine=innodb default charset=latin1;
-
-create table if not exists `collection_resource_instance_group_customization` (
- `collection_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `subinterface_network_quantity` int(11) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`collection_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_collection_resource_instance_group_customization__instan_idx` (`instance_group_model_uuid` asc),
- constraint `fk_collection_resource_instance_group_customization__collecti1`
- foreign key (`collection_resource_customization_model_uuid`)
- references `collection_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_collection_resource_instance_group_customization__instance1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
-create table if not exists `vnfc_instance_group_customization` (
- `vnf_resource_customization_model_uuid` varchar(200) not null,
- `instance_group_model_uuid` varchar(200) not null,
- `function` varchar(200) null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`vnf_resource_customization_model_uuid`, `instance_group_model_uuid`),
- index `fk_vnfc_instance_group_customization__instance_group1_idx` (`instance_group_model_uuid` asc),
- constraint `fk_vnfc_instance_group_customization__vnf_resource_customizat1`
- foreign key (`vnf_resource_customization_model_uuid`)
- references `vnf_resource_customization` (`model_customization_uuid`)
- on delete cascade
- on update cascade,
- constraint `fk_vnfc_instance_group_customization__instance_group1`
- foreign key (`instance_group_model_uuid`)
- references `instance_group` (`model_uuid`)
- on delete cascade
- on update cascade)
-engine = innodb
-default character set = latin1;
-
- create table if not exists `configuration`
- ( `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `tosca_node_type` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
- CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `MODEL_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
- `MODEL_VERSION` VARCHAR(20) NOT NULL,
- `MODEL_NAME` VARCHAR(200) NOT NULL,
- `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
- `DESCRIPTION` VARCHAR(1200) NULL,
- `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+DROP TABLE IF EXISTS `allotted_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `PROVIDING_SERVICE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `PROVIDING_SERVICE_MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TARGET_NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `AR_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
- INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
- UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
- INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_service_proxy_resource_customization__service1`
- FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
- REFERENCES `service` (`MODEL_UUID`)
- ON DELETE CASCADE
- ON UPDATE CASCADE)
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-create table if not exists `configuration_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`configuration_type` varchar(200) null,
-`configuration_role` varchar(200) null,
-`configuration_function` varchar(200) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`configuration_model_uuid` varchar(200) not null,
-`service_proxy_customization_model_customization_uuid` varchar(200) null,
-`configuration_customization_model_customization_uuid` varchar(200) null,
-primary key (`model_customization_uuid`),
-index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__service_proxy_customization_idx`
-(`service_proxy_customization_model_customization_uuid` asc),
-index `fk_configuration_customization__configuration_customization_idx`
-(`configuration_customization_model_customization_uuid` asc),
-constraint `fk_configuration_resource_customization__configuration_resour1`
-foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_configuration_customization__service_proxy_customization1` foreign
-key (`service_proxy_customization_model_customization_uuid`) references
-`service_proxy_customization` (`model_customization_uuid`)
-on delete cascade on update cascade, constraint
-`fk_configuration_customization__configuration_customization1` foreign
-key (`configuration_customization_model_customization_uuid`) references
-`configuration_customization` (`model_customization_uuid`)
-on delete cascade on update cascade)
-engine = innodb
-auto_increment =20654
-default character set = latin1;
-
-
-create table `service_proxy_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `configuration_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table if not exists `collection_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-create table `network_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `vnf_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-create table `allotted_resource_customization_to_service` (
- `service_model_uuid` varchar(200) not null,
- `resource_model_customization_uuid` varchar(200) not null,
- primary key (`service_model_uuid`,`resource_model_customization_uuid`)
-)engine=innodb default charset=latin1;
-
-
-
-create table ar_recipe (
- ID INT(11) not null auto_increment,
- MODEL_NAME VARCHAR(200) NOT NULL,
- `ACTION` VARCHAR(200) NOT NULL,
- VERSION_STR VARCHAR(200) NOT NULL,
- SERVICE_TYPE VARCHAR(200),
- DESCRIPTION VARCHAR(200),
- ORCHESTRATION_URI VARCHAR(200) NOT NULL,
- AR_PARAM_XSD VARCHAR(200),
- RECIPE_TIMEOUT INT(10),
- CREATION_TIMESTAMP DATETIME NOT NULL default current_timestamp,
- primary key (ID),
- unique key `uk_ar_recipe` (`model_name`,`action`,`version_str`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-alter table collection_resource_customization
-add foreign key ( cr_model_uuid)
-references collection_resource(model_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-alter table network_resource_customization
-add column
-instance_group_model_uuid varchar(200);
-
-
-alter table network_resource_customization
-add foreign key ( instance_group_model_uuid)
-references instance_group(model_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table vnf_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (service_model_uuid)
-references service(model_uuid)
-on delete cascade;
-
-
-alter table network_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references network_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table vnf_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references vnf_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table allotted_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references allotted_resource_customization(model_customization_uuid)
-on delete cascade;
-
-alter table collection_resource_customization_to_service
-add foreign key (resource_model_customization_uuid)
-references collection_resource_customization(model_customization_uuid)
-on delete cascade;
-
-
-create table if not exists `collection_network_resource_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`network_technology` varchar(45) null,
-`network_type` varchar(45) null,
-`network_role` varchar(200) null,
-`network_scope` varchar(45) null,
-`creation_timestamp` datetime not null default current_timestamp,
-`network_resource_model_uuid` varchar(200) not null, `instance_group_model_uuid` varchar(200) null,
-`crc_model_customization_uuid` varchar(200) not null, primary key
-(`model_customization_uuid`, `crc_model_customization_uuid`),
-index `fk_collection_net_resource_customization__network_resource1_idx`
-(`network_resource_model_uuid` asc), index
-`fk_collection_net_resource_customization__instance_group1_idx`
-(`instance_group_model_uuid` asc), index
-`fk_col_net_res_customization__collection_res_customization_idx`
-(`crc_model_customization_uuid` asc), constraint
-`fk_collection_net_resource_customization__network_resource10` foreign
-key (`network_resource_model_uuid`) references
-`network_resource` (`model_uuid`) on delete cascade on
-update cascade, constraint
-`fk_collection_net_resource_customization__instance_group10` foreign key
-(`instance_group_model_uuid`) references `instance_group`
-(`model_uuid`) on delete cascade on update cascade, constraint
-`fk_collection_network_resource_customization__collection_reso1` foreign
-key (`crc_model_customization_uuid`) references
-`collection_resource_customization`
-(`model_customization_uuid`) on delete cascade on update cascade) engine
-= innodb default character set = latin1;
-
-CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
-`id` INT(11) NOT NULL AUTO_INCREMENT,
-`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
-`MACRO_ACTION` VARCHAR(200) NOT NULL,
-`ACTION` VARCHAR(200) NOT NULL,
-`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
-`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 1,
-`MIN_API_VERSION` DOUBLE NOT NULL,
-`MAX_API_VERSION` DOUBLE NULL,
-PRIMARY KEY (`id`),
-UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC, `MACRO_ACTION` ASC))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS orchestration_status_state_transition_directive (
-id INT(11) AUTO_INCREMENT,
-RESOURCE_TYPE VARCHAR(25) NOT NULL,
-ORCHESTRATION_STATUS VARCHAR(25) NOT NULL,
-TARGET_ACTION VARCHAR(25) NOT NULL,
-FLOW_DIRECTIVE VARCHAR(25) NOT NULL,
-PRIMARY KEY (id),
-UNIQUE KEY UK_orchestration_status_state_transition_directive (RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION))
-ENGINE = InnoDB
-DEFAULT CHARACTER SET = latin1;
-
-create table if not exists model_recipe (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_ID` INT(11),
- `ACTION` VARCHAR(40),
- `SCHEMA_VERSION` VARCHAR(40),
- `DESCRIPTION` VARCHAR(40),
- `ORCHESTRATION_URI` VARCHAR(20),
- `MODEL_PARAM_XSD` VARCHAR(20),
- `RECIPE_TIMEOUT` INT(11),
- `CREATION_TIMESTAMP` datetime not null default current_timestamp,
- PRIMARY KEY (`ID`),
- CONSTRAINT uk1_model_recipe UNIQUE (`MODEL_ID`, `ACTION`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-create table if not exists model (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_ID` VARCHAR(40),
- `MODEL_CUSTOMIZATION_NAME` VARCHAR(40),
- `MODEL_INVARIANT_ID` VARCHAR(40),
- `MODEL_NAME` VARCHAR(40),
- `MODEL_TYPE` VARCHAR(20),
- `MODEL_VERSION` VARCHAR(20),
- `MODEL_VERSION_ID` VARCHAR(40),
- `CREATION_TIMESTAMP` datetime not null default current_timestamp,
- `RECIPE` INT(11),
- PRIMARY KEY (`ID`),
- CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
- FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-
-CREATE TABLE IF NOT EXISTS `controller_selection_reference` (
- `VNF_TYPE` VARCHAR(50) NOT NULL,
- `CONTROLLER_NAME` VARCHAR(100) NOT NULL,
- `ACTION_CATEGORY` VARCHAR(15) NOT NULL,
- PRIMARY KEY (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`)
-) ;
-
-ALTER TABLE `vnf_recipe`
-CHANGE COLUMN `VNF_TYPE` `NF_ROLE` VARCHAR(200) NULL DEFAULT NULL ;
-
-CREATE TABLE IF NOT EXISTS `identity_services` (
+ KEY `fk_allotted_resource_customization__allotted_resource1_idx` (`AR_MODEL_UUID`),
+ CONSTRAINT `fk_allotted_resource_customization__allotted_resource1` FOREIGN KEY (`AR_MODEL_UUID`) REFERENCES `allotted_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `allotted_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `allotted_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `allotted_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `allotted_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `allotted_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `ar_recipe`
+--
+
+DROP TABLE IF EXISTS `ar_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ar_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `VERSION_STR` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(200) NOT NULL,
+ `AR_PARAM_XSD` varchar(200) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk_ar_recipe` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `building_block_detail`
+--
+
+DROP TABLE IF EXISTS `building_block_detail`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `building_block_detail` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `BUILDING_BLOCK_NAME` varchar(200) NOT NULL,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_building_block_name` (`BUILDING_BLOCK_NAME`)
+) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloud_sites`
+--
+
+DROP TABLE IF EXISTS `cloud_sites`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloud_sites` (
`ID` varchar(50) NOT NULL,
- `IDENTITY_URL` varchar(200) DEFAULT NULL,
- `MSO_ID` varchar(255) DEFAULT NULL,
- `MSO_PASS` varchar(255) DEFAULT NULL,
- `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
- `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
- `ADMIN_TENANT` varchar(50) DEFAULT NULL,
- `MEMBER_ROLE` varchar(50) DEFAULT NULL,
- `TENANT_METADATA` tinyint(1) DEFAULT 0,
- `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
- `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
+ `REGION_ID` varchar(11) DEFAULT NULL,
+ `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
+ `CLOUD_VERSION` varchar(20) DEFAULT NULL,
+ `CLLI` varchar(11) DEFAULT NULL,
+ `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
+ `PLATFORM` varchar(50) DEFAULT NULL,
+ `ORCHESTRATOR` varchar(50) DEFAULT NULL,
`LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`ID`)
-) ;
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
+ CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cloudify_managers`
+--
-CREATE TABLE IF NOT EXISTS `cloudify_managers` (
+DROP TABLE IF EXISTS `cloudify_managers`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cloudify_managers` (
`ID` varchar(50) NOT NULL,
`CLOUDIFY_URL` varchar(200) DEFAULT NULL,
`USERNAME` varchar(255) DEFAULT NULL,
`PASSWORD` varchar(255) DEFAULT NULL,
`VERSION` varchar(20) DEFAULT NULL,
`LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`)
-) ;
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `collection_network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `CRC_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`,`CRC_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_collection_net_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ KEY `fk_collection_net_resource_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_col_net_res_customization__collection_res_customization_idx` (`CRC_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_collection_net_resource_customization__instance_group10` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_net_resource_customization__network_resource10` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_network_resource_customization__collection_reso1` FOREIGN KEY (`CRC_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource`
+--
+
+DROP TABLE IF EXISTS `collection_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization`
+--
-CREATE TABLE IF NOT EXISTS `cloud_sites` (
+DROP TABLE IF EXISTS `collection_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `role` varchar(200) DEFAULT NULL,
+ `object_type` varchar(200) NOT NULL,
+ `function` varchar(200) DEFAULT NULL,
+ `collection_resource_type` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`),
+ CONSTRAINT `collection_resource_customization_ibfk_1` FOREIGN KEY (`CR_MODEL_UUID`) REFERENCES `collection_resource` (`MODEL_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `collection_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `collection_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `collection_resource_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `collection_resource_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collection_resource_instance_group_customization` (
+ `COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID` varchar(200) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SUBINTERFACE_NETWORK_QUANTITY` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`,`INSTANCE_GROUP_MODEL_UUID`),
+ KEY `fk_collection_resource_instance_group_customization__instan_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_collection_resource_instance_group_customization__collecti1` FOREIGN KEY (`COLLECTION_RESOURCE_CUSTOMIZATION_MODEL_UUID`) REFERENCES `collection_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_collection_resource_instance_group_customization__instance1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration`
+--
+
+DROP TABLE IF EXISTS `configuration`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization`
+--
+
+DROP TABLE IF EXISTS `configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ KEY `fk_configuration_customization__service_proxy_customization_idx` (`SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_configuration_customization__configuration_customization_idx` (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_configuration_customization__configuration_customization1` FOREIGN KEY (`CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID`) REFERENCES `configuration_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_configuration_resource_customization__configuration_resour1` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `configuration_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `configuration_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `configuration_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `controller_selection_reference`
+--
+
+DROP TABLE IF EXISTS `controller_selection_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `controller_selection_reference` (
+ `VNF_TYPE` varchar(50) NOT NULL,
+ `CONTROLLER_NAME` varchar(100) NOT NULL,
+ `ACTION_CATEGORY` varchar(15) NOT NULL,
+ PRIMARY KEY (`VNF_TYPE`,`CONTROLLER_NAME`,`ACTION_CATEGORY`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_configuration_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_configuration_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_configuration_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `CONFIGURATION_TYPE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_ROLE` varchar(200) DEFAULT NULL,
+ `CONFIGURATION_FUNCTION` varchar(200) DEFAULT NULL,
+ `POLICY_NAME` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` varchar(200) NOT NULL,
+ `CVNFC_CUSTOMIZATION_ID` int(11) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID`),
+ CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `cvnfc_customization`
+--
+
+DROP TABLE IF EXISTS `cvnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cvnfc_customization` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `NFC_FUNCTION` varchar(200) DEFAULT NULL,
+ `NFC_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` varchar(200) DEFAULT NULL,
+ `VF_MODULE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_cvnfc_customization_to_vf_module_resource_customization` (`VF_MODULE_CUSTOMIZATION_ID`),
+ CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_cvnfc_customization_to_vf_module_resource_customization` FOREIGN KEY (`VF_MODULE_CUSTOMIZATION_ID`) REFERENCES `vf_module_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=20655 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `external_service_to_internal_model_mapping`
+--
+
+DROP TABLE IF EXISTS `external_service_to_internal_model_mapping`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `external_service_to_internal_model_mapping` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `SERVICE_NAME` varchar(200) NOT NULL,
+ `PRODUCT_FLAVOR` varchar(200) DEFAULT NULL,
+ `SUBSCRIPTION_SERVICE_TYPE` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_external_service_to_internal_model_mapping` (`SERVICE_NAME`,`PRODUCT_FLAVOR`,`SERVICE_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `flyway_schema_history`
+--
+
+DROP TABLE IF EXISTS `flyway_schema_history`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `flyway_schema_history` (
+ `installed_rank` int(11) NOT NULL,
+ `version` varchar(50) DEFAULT NULL,
+ `description` varchar(200) NOT NULL,
+ `type` varchar(20) NOT NULL,
+ `script` varchar(1000) NOT NULL,
+ `checksum` int(11) DEFAULT NULL,
+ `installed_by` varchar(100) NOT NULL,
+ `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `execution_time` int(11) NOT NULL,
+ `success` tinyint(1) NOT NULL,
+ PRIMARY KEY (`installed_rank`),
+ KEY `flyway_schema_history_s_idx` (`success`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_environment`
+--
+
+DROP TABLE IF EXISTS `heat_environment`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_environment` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(100) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_files`
+--
+
+DROP TABLE IF EXISTS `heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_files` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_nested_template`
+--
+
+DROP TABLE IF EXISTS `heat_nested_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_nested_template` (
+ `PARENT_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `CHILD_HEAT_TEMPLATE_UUID` varchar(200) NOT NULL,
+ `PROVIDER_RESOURCE_FILE` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`PARENT_HEAT_TEMPLATE_UUID`,`CHILD_HEAT_TEMPLATE_UUID`),
+ KEY `fk_heat_nested_template__heat_template2_idx` (`CHILD_HEAT_TEMPLATE_UUID`),
+ CONSTRAINT `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` FOREIGN KEY (`CHILD_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` FOREIGN KEY (`PARENT_HEAT_TEMPLATE_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template`
+--
+
+DROP TABLE IF EXISTS `heat_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext NOT NULL,
+ `TIMEOUT_MINUTES` int(11) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `heat_template_params`
+--
+
+DROP TABLE IF EXISTS `heat_template_params`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `heat_template_params` (
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NOT NULL,
+ `PARAM_NAME` varchar(100) NOT NULL,
+ `IS_REQUIRED` bit(1) NOT NULL,
+ `PARAM_TYPE` varchar(20) DEFAULT NULL,
+ `PARAM_ALIAS` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`,`PARAM_NAME`),
+ CONSTRAINT `fk_heat_template_params__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `identity_services`
+--
+
+DROP TABLE IF EXISTS `identity_services`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `identity_services` (
`ID` varchar(50) NOT NULL,
- `REGION_ID` varchar(11) DEFAULT NULL,
- `IDENTITY_SERVICE_ID` varchar(50) DEFAULT NULL,
- `CLOUD_VERSION` varchar(20) DEFAULT NULL,
- `CLLI` varchar(11) DEFAULT NULL,
- `CLOUDIFY_ID` varchar(50) DEFAULT NULL,
- `PLATFORM` varchar(50) DEFAULT NULL,
- `ORCHESTRATOR` varchar(50) DEFAULT NULL,
+ `IDENTITY_URL` varchar(200) DEFAULT NULL,
+ `MSO_ID` varchar(255) DEFAULT NULL,
+ `MSO_PASS` varchar(255) DEFAULT NULL,
+ `ADMIN_TENANT` varchar(50) DEFAULT NULL,
+ `MEMBER_ROLE` varchar(50) DEFAULT NULL,
+ `TENANT_METADATA` tinyint(1) DEFAULT '0',
+ `IDENTITY_SERVER_TYPE` varchar(50) DEFAULT NULL,
+ `IDENTITY_AUTHENTICATION_TYPE` varchar(50) DEFAULT NULL,
`LAST_UPDATED_BY` varchar(120) DEFAULT NULL,
- `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
- `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
+ `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `instance_group`
+--
+
+DROP TABLE IF EXISTS `instance_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `instance_group` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `ROLE` varchar(200) NOT NULL,
+ `OBJECT_TYPE` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CR_MODEL_UUID` varchar(200) DEFAULT NULL,
+ `INSTANCE_GROUP_TYPE` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `CR_MODEL_UUID` (`CR_MODEL_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model`
+--
+
+DROP TABLE IF EXISTS `model`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_ID` varchar(40) DEFAULT NULL,
+ `MODEL_CUSTOMIZATION_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_INVARIANT_ID` varchar(40) DEFAULT NULL,
+ `MODEL_NAME` varchar(40) DEFAULT NULL,
+ `MODEL_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION_ID` varchar(40) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RECIPE` int(11) DEFAULT NULL,
PRIMARY KEY (`ID`),
- KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
- CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
-) ;
-
-CREATE TABLE IF NOT EXISTS vnfc_customization (
-`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
-`MODEL_UUID` VARCHAR(200) NOT NULL,
-`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
-`MODEL_VERSION` VARCHAR(20) NOT NULL,
-`MODEL_NAME` VARCHAR(200) NOT NULL,
-`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
-`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
-`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
-PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`))
-ENGINE = InnoDB
-AUTO_INCREMENT = 20654
-DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS cvnfc_customization (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `MODEL_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
- `MODEL_VERSION` VARCHAR(20) NOT NULL,
- `MODEL_NAME` VARCHAR(200) NOT NULL,
- `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
- `DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
- `NFC_FUNCTION` VARCHAR(200) NULL,
- `NFC_NAMING_CODE` VARCHAR(200) NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- PRIMARY KEY (`ID`),
- INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC
- ),
- INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (
- `VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC
- ),
- INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC
- ),
- UNIQUE INDEX `UK_cvnfc_customization` (
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC,
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC,
- `MODEL_CUSTOMIZATION_UUID` ASC
- ),
- INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC),
- CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (
- `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`
- ) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (
- `VNFC_CUST_MODEL_CUSTOMIZATION_UUID`
- ) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`
- ) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1;
-
-CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization (
- `ID` INT(11) NOT NULL AUTO_INCREMENT,
- `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
- `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
- `CONFIGURATION_TYPE` VARCHAR(200) NULL,
- `CONFIGURATION_ROLE` VARCHAR(200) NULL,
- `CONFIGURATION_FUNCTION` VARCHAR(200) NULL,
- `POLICY_NAME` VARCHAR(200) NULL,
- `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL,
- `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL,
- `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL,
- `CVNFC_CUSTOMIZATION_ID` INT(11) DEFAULT NULL,
- PRIMARY KEY (`ID`),
- INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC),
-
- CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`)
- REFERENCES `configuration` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE = INNODB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = LATIN1;
+ UNIQUE KEY `uk1_model` (`MODEL_TYPE`,`MODEL_VERSION_ID`),
+ KEY `RECIPE` (`RECIPE`),
+ CONSTRAINT `model_ibfk_1` FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `model_recipe`
+--
+
+DROP TABLE IF EXISTS `model_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `model_recipe` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_ID` int(11) DEFAULT NULL,
+ `ACTION` varchar(40) DEFAULT NULL,
+ `SCHEMA_VERSION` varchar(40) DEFAULT NULL,
+ `DESCRIPTION` varchar(40) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(20) DEFAULT NULL,
+ `MODEL_PARAM_XSD` varchar(20) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `uk1_model_recipe` (`MODEL_ID`,`ACTION`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_recipe`
+--
+
+DROP TABLE IF EXISTS `network_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_NAME` varchar(20) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `NETWORK_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_rl4f296i0p8lyokxveaiwkayi` (`MODEL_NAME`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource`
+--
+
+DROP TABLE IF EXISTS `network_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `NEUTRON_NETWORK_TYPE` varchar(20) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `ORCHESTRATION_MODE` varchar(20) DEFAULT 'HEAT',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_network_resource__temp_network_heat_template_lookup1_idx` (`MODEL_NAME`),
+ KEY `fk_network_resource__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_network_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE,
+ CONSTRAINT `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` FOREIGN KEY (`MODEL_NAME`) REFERENCES `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `NETWORK_TECHNOLOGY` varchar(45) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(45) DEFAULT NULL,
+ `NETWORK_ROLE` varchar(200) DEFAULT NULL,
+ `NETWORK_SCOPE` varchar(45) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `NETWORK_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_network_resource_customization__network_resource1_idx` (`NETWORK_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_network_resource_customization__network_resource1` FOREIGN KEY (`NETWORK_RESOURCE_MODEL_UUID`) REFERENCES `network_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `network_resource_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `network_resource_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `network_resource_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ KEY `RESOURCE_MODEL_CUSTOMIZATION_UUID` (`RESOURCE_MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `network_resource_customization_to_service_ibfk_1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE,
+ CONSTRAINT `network_resource_customization_to_service_ibfk_2` FOREIGN KEY (`RESOURCE_MODEL_CUSTOMIZATION_UUID`) REFERENCES `network_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `northbound_request_ref_lookup`
+--
+
+DROP TABLE IF EXISTS `northbound_request_ref_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `northbound_request_ref_lookup` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `REQUEST_SCOPE` varchar(200) NOT NULL,
+ `MACRO_ACTION` varchar(200) NOT NULL,
+ `ACTION` varchar(200) NOT NULL,
+ `IS_ALACARTE` tinyint(1) NOT NULL DEFAULT '0',
+ `MIN_API_VERSION` double NOT NULL,
+ `MAX_API_VERSION` double DEFAULT NULL,
+ `IS_TOPLEVELFLOW` tinyint(1) DEFAULT NULL,
+ `CLOUD_OWNER` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_northbound_request_ref_lookup` (`MIN_API_VERSION`,`REQUEST_SCOPE`,`ACTION`,`IS_ALACARTE`,`MACRO_ACTION`,`CLOUD_OWNER`)
+) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_flow_reference`
+--
+
+DROP TABLE IF EXISTS `orchestration_flow_reference`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_flow_reference` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `COMPOSITE_ACTION` varchar(200) NOT NULL,
+ `SEQ_NO` int(11) NOT NULL,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `FLOW_VERSION` double NOT NULL,
+ `NB_REQ_REF_LOOKUP_ID` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_flow_reference` (`COMPOSITE_ACTION`,`FLOW_NAME`,`SEQ_NO`,`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID`),
+ KEY `fk_orchestration_flow_reference__building_block_detail` (`FLOW_NAME`),
+ CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1` FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=398 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `orchestration_status_state_transition_directive`
+--
+
+DROP TABLE IF EXISTS `orchestration_status_state_transition_directive`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `orchestration_status_state_transition_directive` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `RESOURCE_TYPE` varchar(25) NOT NULL,
+ `ORCHESTRATION_STATUS` varchar(25) NOT NULL,
+ `TARGET_ACTION` varchar(25) NOT NULL,
+ `FLOW_DIRECTIVE` varchar(25) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_orchestration_status_state_transition_directive` (`RESOURCE_TYPE`,`ORCHESTRATION_STATUS`,`TARGET_ACTION`)
+) ENGINE=InnoDB AUTO_INCREMENT=686 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `rainy_day_handler_macro`
+--
+
+DROP TABLE IF EXISTS `rainy_day_handler_macro`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `rainy_day_handler_macro` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `FLOW_NAME` varchar(200) NOT NULL,
+ `SERVICE_TYPE` varchar(200) NOT NULL,
+ `VNF_TYPE` varchar(200) NOT NULL,
+ `ERROR_CODE` varchar(200) NOT NULL,
+ `WORK_STEP` varchar(200) NOT NULL,
+ `POLICY` varchar(200) NOT NULL,
+ `SECONDARY_POLICY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service`
+--
+
+DROP TABLE IF EXISTS `service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `TOSCA_CSAR_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(200) DEFAULT NULL,
+ `SERVICE_ROLE` varchar(200) DEFAULT NULL,
+ `ENVIRONMENT_CONTEXT` varchar(200) DEFAULT NULL,
+ `WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
+ `SERVICE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_ORDER` varchar(200) default NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
+ CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `SOURCE_SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ KEY `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1` FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_proxy_customization_to_service`
+--
+
+DROP TABLE IF EXISTS `service_proxy_customization_to_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_proxy_customization_to_service` (
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ `RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `service_recipe`
+--
+
+DROP TABLE IF EXISTS `service_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `service_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ACTION` varchar(50) NOT NULL,
+ `VERSION_STR` varchar(20) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `SERVICE_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `SERVICE_TIMEOUT_INTERIM` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_7fav5dkux2v8g9d2i5ymudlgc` (`SERVICE_MODEL_UUID`,`ACTION`),
+ KEY `fk_service_recipe__service1_idx` (`SERVICE_MODEL_UUID`),
+ CONSTRAINT `fk_service_recipe__service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `temp_network_heat_template_lookup`
+--
+
+DROP TABLE IF EXISTS `temp_network_heat_template_lookup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `temp_network_heat_template_lookup` (
+ `NETWORK_RESOURCE_MODEL_NAME` varchar(200) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) NULL,
+ `AIC_VERSION_MIN` varchar(20) NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`NETWORK_RESOURCE_MODEL_NAME`),
+ KEY `fk_temp_network_heat_template_lookup__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_temp_network_heat_template_lookup__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE NO ACTION ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `tosca_csar`
+--
+
+DROP TABLE IF EXISTS `tosca_csar`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tosca_csar` (
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) NOT NULL,
+ `URL` varchar(200) NOT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ARTIFACT_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module`
+--
+
+DROP TABLE IF EXISTS `vf_module`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module` (
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `IS_BASE` tinyint(1) NOT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`MODEL_UUID`,`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ KEY `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module__heat_template_art_uuid__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module__vol_heat_template_art_uuid__heat_template2` FOREIGN KEY (`VOL_HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_customization`
+--
+
+DROP TABLE IF EXISTS `vf_module_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `LABEL` varchar(200) DEFAULT NULL,
+ `INITIAL_COUNT` int(11) DEFAULT '0',
+ `MIN_INSTANCES` int(11) DEFAULT '0',
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_COUNT` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `VOL_ENVIRONMENT_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) DEFAULT NULL,
+ PRIMARY KEY (`ID`),
+ KEY `fk_vf_module_customization__vf_module1_idx` (`VF_MODULE_MODEL_UUID`),
+ KEY `fk_vf_module_customization__heat_env__heat_environment1_idx` (`HEAT_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization__vol_env__heat_environment2_idx` (`VOL_ENVIRONMENT_ARTIFACT_UUID`),
+ KEY `fk_vf_module_customization_to_vnf_resource_customization` (`VNF_RESOURCE_CUSTOMIZATION_ID`),
+ KEY `vf_module_customization_model_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vf_module_customization__heat_env__heat_environment1` FOREIGN KEY (`HEAT_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vf_module1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization__vol_env__heat_environment2` FOREIGN KEY (`VOL_ENVIRONMENT_ARTIFACT_UUID`) REFERENCES `heat_environment` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_customization_to_vnf_resource_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vf_module_to_heat_files`
+--
+
+DROP TABLE IF EXISTS `vf_module_to_heat_files`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vf_module_to_heat_files` (
+ `VF_MODULE_MODEL_UUID` varchar(200) NOT NULL,
+ `HEAT_FILES_ARTIFACT_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`VF_MODULE_MODEL_UUID`,`HEAT_FILES_ARTIFACT_UUID`),
+ KEY `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`HEAT_FILES_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` FOREIGN KEY (`HEAT_FILES_ARTIFACT_UUID`) REFERENCES `heat_files` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vf_module_to_heat_files__vf_module__model_uuid1` FOREIGN KEY (`VF_MODULE_MODEL_UUID`) REFERENCES `vf_module` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='il fait ce qu''il dit';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components`
+--
+
+DROP TABLE IF EXISTS `vnf_components`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components` (
+ `VNF_ID` int(11) NOT NULL,
+ `COMPONENT_TYPE` varchar(20) NOT NULL,
+ `HEAT_TEMPLATE_ID` int(11) DEFAULT NULL,
+ `HEAT_ENVIRONMENT_ID` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`VNF_ID`,`COMPONENT_TYPE`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_components_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_components_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_components_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `VNF_TYPE` varchar(200) DEFAULT NULL,
+ `VNF_COMPONENT_TYPE` varchar(45) NOT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_COMPONENT_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_MODEL_UUID` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_4dpdwddaaclhc11wxsb7h59ma` (`VF_MODULE_MODEL_UUID`,`VNF_COMPONENT_TYPE`,`ACTION`,`VERSION`)
+) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_recipe`
+--
+
+DROP TABLE IF EXISTS `vnf_recipe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_recipe` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `ACTION` varchar(50) NOT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `VERSION_STR` varchar(20) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `ORCHESTRATION_URI` varchar(256) NOT NULL,
+ `VNF_PARAM_XSD` varchar(2048) DEFAULT NULL,
+ `RECIPE_TIMEOUT` int(11) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP,
+ `VF_MODULE_ID` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `UK_f3tvqau498vrifq3cr8qnigkr` (`VF_MODULE_ID`,`ACTION`,`VERSION_STR`)
+) ENGINE=InnoDB AUTO_INCREMENT=10015 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource`
+--
+
+DROP TABLE IF EXISTS `vnf_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource` (
+ `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `AIC_VERSION_MIN` varchar(20) DEFAULT NULL,
+ `AIC_VERSION_MAX` varchar(20) DEFAULT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) DEFAULT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) DEFAULT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) DEFAULT NULL,
+ `HEAT_TEMPLATE_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
+ `RESOURCE_CATEGORY` varchar(200) DEFAULT NULL,
+ `RESOURCE_SUB_CATEGORY` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`MODEL_UUID`),
+ KEY `fk_vnf_resource__heat_template1` (`HEAT_TEMPLATE_ARTIFACT_UUID`),
+ CONSTRAINT `fk_vnf_resource__heat_template1` FOREIGN KEY (`HEAT_TEMPLATE_ARTIFACT_UUID`) REFERENCES `heat_template` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnf_resource_customization`
+--
+
+DROP TABLE IF EXISTS `vnf_resource_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnf_resource_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MIN_INSTANCES` int(11) DEFAULT NULL,
+ `MAX_INSTANCES` int(11) DEFAULT NULL,
+ `AVAILABILITY_ZONE_MAX_COUNT` int(11) DEFAULT NULL,
+ `NF_TYPE` varchar(200) DEFAULT NULL,
+ `NF_ROLE` varchar(200) DEFAULT NULL,
+ `NF_FUNCTION` varchar(200) DEFAULT NULL,
+ `NF_NAMING_CODE` varchar(200) DEFAULT NULL,
+ `MULTI_STAGE_DESIGN` varchar(20) DEFAULT NULL,
+ `RESOURCE_INPUT` varchar(20000) DEFAULT NULL,
+ `CDS_BLUEPRINT_NAME` varchar(200) default null,
+ `CDS_BLUEPRINT_VERSION` varchar(20) default null,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `SERVICE_MODEL_UUID` varchar(200) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ KEY `fk_vnf_resource_customization_to_service` (`SERVICE_MODEL_UUID`),
+ KEY `vnf_resource_customization_mod_cust_uuid_idx` (`MODEL_CUSTOMIZATION_UUID`),
+ CONSTRAINT `fk_vnf_resource_customization__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnf_resource_customization_to_service` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_customization` (
+ `MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` varchar(200) NOT NULL,
+ `MODEL_UUID` varchar(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` varchar(200) NOT NULL,
+ `MODEL_VERSION` varchar(20) NOT NULL,
+ `MODEL_NAME` varchar(200) NOT NULL,
+ `TOSCA_NODE_TYPE` varchar(200) NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `vnfc_instance_group_customization`
+--
+
+DROP TABLE IF EXISTS `vnfc_instance_group_customization`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `vnfc_instance_group_customization` (
+ `ID` int(13) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ `VNF_RESOURCE_CUSTOMIZATION_ID` int(13) NOT NULL,
+ `INSTANCE_GROUP_MODEL_UUID` varchar(200) NOT NULL,
+ `FUNCTION` varchar(200) DEFAULT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ KEY `fk_vnfc_instance_group_customization__instance_group1_idx` (`INSTANCE_GROUP_MODEL_UUID`),
+ CONSTRAINT `fk_vnfc_instance_group_customization__instance_group1` FOREIGN KEY (`INSTANCE_GROUP_MODEL_UUID`) REFERENCES `instance_group` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnfc_instance_group_customization_vnf_customization` FOREIGN KEY (`VNF_RESOURCE_CUSTOMIZATION_ID`) REFERENCES `vnf_resource_customization` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+set foreign_key_checks=1;
CREATE TABLE IF NOT EXISTS `pnf_resource` (
`ORCHESTRATION_MODE` varchar(20) DEFAULT NULL,
@@ -991,4 +1200,4 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization_to_service` (
`SERVICE_MODEL_UUID` varchar(200) NOT NULL,
`RESOURCE_MODEL_CUSTOMIZATION_UUID` varchar(200) NOT NULL,
PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
-)ENGINE=InnoDB DEFAULT CHARSET=latin1; \ No newline at end of file
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;