Add SO WFD activity BBs to building_block_detail
[so.git] / mso-catalog-db / src / test / resources / data.sql
index 14834ea..13ab018 100644 (file)
@@ -44,8 +44,8 @@ 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
@@ -58,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');
 
@@ -105,9 +100,11 @@ 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(id, 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
+('1429', '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 vnfc_instance_group_customization (`ID`, `INSTANCE_GROUP_MODEL_UUID`, `FUNCTION`, `VNF_RESOURCE_CUSTOMIZATION_ID`) VALUES 
+('1450', '21e43a7c-d823-4f5b-a427-5235f63035ff', 'FUNCTION', '1429');
 
 
 
@@ -127,9 +124,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');
 
 
 
@@ -143,10 +137,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');
@@ -214,27 +204,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
@@ -272,18 +266,43 @@ VALUES
 ('DeleteVfModuleBB', 'VF_MODULE', 'DELETE'),
 ('DeleteNetworkBB', 'NETWORK', 'DELETE'),
 ('DeleteNetworkCollectionBB', 'NETWORK', 'DELETE'),
-('AssignAndActivateVpnBondingLinksBB', 'CUSTOM', 'CUSTOM'),
-('AvpnAssignServiceInstanceBB', 'CUSTOM', 'CUSTOM'),
-('CreateCustomerVpnBindingBB', 'CUSTOM', 'CUSTOM'),
-('SniroHoming', 'CUSTOM', 'CUSTOM'),
-('DeactivateAndUnassignVpnBondingLinksBB', 'CUSTOM', 'CUSTOM'),
-('DeactivateNetworkCollectionBB', 'CUSTOM', 'CUSTOM'),
-('AAICheckVnfInMaintBB', 'CUSTOM', 'CUSTOM'),
-('AAISetVnfInMaintBB', 'CUSTOM', 'CUSTOM'),
-('AAIUnsetVnfInMaintBB', 'CUSTOM', 'CUSTOM'),
-('SDNOVnfHealthCheckBB', 'CUSTOM', 'CUSTOM'),
-('VNF-Macro-Replace', 'CUSTOM', 'CUSTOM'),
-('HomingBB', 'CUSTOM', 'CUSTOM');
+('AssignAndActivateVpnBondingLinksBB', 'NO_VALIDATE', 'CUSTOM'),
+('AvpnAssignServiceInstanceBB', 'NO_VALIDATE', 'CUSTOM'),
+('CreateCustomerVpnBindingBB', 'NO_VALIDATE', 'CUSTOM'),
+('SniroHoming', 'NO_VALIDATE', 'CUSTOM'),
+('DeactivateAndUnassignVpnBondingLinksBB', 'NO_VALIDATE', 'CUSTOM'),
+('DeactivateNetworkCollectionBB', 'NO_VALIDATE', 'CUSTOM'),
+('AAICheckVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'),
+('AAISetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'),
+('AAIUnsetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'),
+('SDNOVnfHealthCheckBB', 'NO_VALIDATE', 'CUSTOM'),
+('VNF-Macro-Replace', 'NO_VALIDATE', 'CUSTOM'),
+('HomingBB', 'NO_VALIDATE', 'CUSTOM'),
+('VNFSetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFCheckPserversLockedFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFCheckInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFCheckClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFSetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUnsetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFLockActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUnlockActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFStopActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFStartActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFSnapShotActivity', 'NO_VALIDATE', 'CUSTOM'),
+('FlowCompleteActivity', 'NO_VALIDATE', 'CUSTOM'),
+('PauseForManualTaskActivity', 'NO_VALIDATE', 'CUSTOM'),
+('DistributeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'),
+('DistributeTrafficCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFHealthCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFQuiesceTrafficActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFResumeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUnsetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradeBackupActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradePostCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradePreCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradeSoftwareActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VnfInPlaceSoftwareUpdate', 'NO_VALIDATE', 'CUSTOM');
+
 
 INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES
 ('Service-Create', '1', 'AssignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Create')),
@@ -380,7 +399,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
@@ -645,15 +669,15 @@ VALUES
 ('VOLUME_GROUP', 'PENDING', 'DELETE', 'SILENT_SUCCESS'),
 ('VF_MODULE', 'PENDING', 'DELETE', 'FAIL'),
 ('NETWORK', 'PENDING', 'DELETE', 'FAIL'),
-('CUSTOM', 'ACTIVE', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'ASSIGNED', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'CREATED', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'INVENTORIED', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PRECREATED', 'CUSTOM', 'CONTINUE');
+('NO_VALIDATE', 'ACTIVE', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'ASSIGNED', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'CREATED', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'INVENTORIED', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PRECREATED', 'CUSTOM', 'CONTINUE');
 
 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');
 
@@ -715,8 +739,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',
@@ -730,32 +752,203 @@ 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,
-             vnf_resource_cust_model_customization_uuid,
-             vf_module_model_customization_uuid,
-             cvnfc_model_customization_uuid,
-             model_instance_name,
-             configuration_type,
-             configuration_role,
-             configuration_function,
-             policy_name,
-             creation_timestamp,
-             configuration_model_uuid)
-VALUES      ( '1',
-              '7bcce658-9b37-11e8-98d0-529269fb1450',
-              '68dc9a92-214c-11e7-93ae-92361f002671',
-              'cb82ffd8-252a-11e7-93ae-92361f002671',
-              '9bcce658-9b37-11e8-98d0-529269fb1459',
-              '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');
+
+insert into pnf_resource(orchestration_mode, description, creation_timestamp, model_uuid, model_invariant_uuid, model_version, model_name, tosca_node_type) values
+('', 'PNF routing', '2019-03-08 12:00:28', 'ff2ae348-214a-11e7-93ae-92361f002680', '2fff5b20-214b-11e7-93ae-92361f002680', '1.0', 'PNF resource', null);
+
+insert into pnf_resource_customization(model_customization_uuid, model_instance_name, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, pnf_resource_model_uuid, multi_stage_design, cds_blueprint_name, cds_blueprint_version) values
+('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');
+
+insert into workflow(artifact_uuid, artifact_name, name, operation_name, version, description, body, resource_target, source) values
+('5b0c4322-643d-4c9f-b184-4516049e99b1', 'testingWorkflow.bpmn', 'testingWorkflow', 'create', 1, 'Test Workflow', null, 'vnf', 'sdc');
+
+insert into vnf_resource_to_workflow(vnf_resource_model_uuid, workflow_id) values
+('ff2ae348-214a-11e7-93ae-92361f002671', '1');
+
+insert into activity_spec(name, description, version) values
+('testActivity1', 'Test Activity 1', 1);
+
+insert into workflow_activity_spec_sequence(workflow_id, activity_spec_id, seq_no) values
+(1, 1, 1);
+
+INSERT INTO activity_spec (NAME, DESCRIPTION, VERSION) 
+VALUES 
+('VNFSetInMaintFlagActivity','Activity to Set InMaint Flag in A&AI',1.0),
+('VNFCheckPserversLockedFlagActivity','Activity Check Pservers Locked Flag VNF',1.0),
+('VNFCheckInMaintFlagActivity','Activity CheckIn Maint Flag on VNF',1.0),
+('VNFCheckClosedLoopDisabledFlagActivity','Activity Check Closed Loop Disabled Flag on VNF',1.0),
+('VNFSetClosedLoopDisabledFlagActivity','Activity Set Closed Loop Disabled Flag on VNF',1.0),
+('VNFUnsetClosedLoopDisabledFlagActivity','Activity Unset Closed Loop Disabled Flag on VNF',1.0),
+('VNFLockActivity','Activity Lock on VNF',1.0),
+('VNFUnlockActivity','Activity UnLock on VNF',1.0),
+('VNFStopActivity','Activity Stop on VNF',1.0),
+('VNFStartActivity','Activity Start on VNF',1.0),
+('VNFSnapShotActivity','Activity Snap Shot on VNF',1.0),
+('FlowCompleteActivity','Activity Complete on VNF',1.0),
+('PauseForManualTaskActivity','Activity Pause For Manual Task on VNF',1.0),
+('DistributeTrafficActivity','Activity Distribute Traffic on VNF',1.0),
+('DistributeTrafficCheckActivity','Activity Distribute Traffic Check on VNF',1.0),
+('VNFHealthCheckActivity','Activity Health Check on VNF',1.0),
+('VNFQuiesceTrafficActivity','Activity Quiesce Traffic on VNF',1.0),
+('VNFResumeTrafficActivity','Activity Resume Traffic on VNF',1.0),
+('VNFUnsetInMaintFlagActivity','Activity Unset InMaint Flag on VNF',1.0),
+('VNFUpgradeBackupActivity','Activity Upgrade Backup on VNF',1.0),
+('VNFUpgradePostCheckActivity','Activity Upgrade Post Check on VNF',1.0),
+('VNFUpgradePreCheckActivity','Activity Upgrade PreCheck on VNF',1.0),
+('VNFUpgradeSoftwareActivity','Activity UpgradeS oftware on VNF',1.0),
+('VnfInPlaceSoftwareUpdate','Activity InPlace Software Update on VNF',1.0);
+
+INSERT INTO activity_spec_categories (NAME)
+VALUES ('VNF');
+
+INSERT INTO activity_spec_to_activity_spec_categories(ACTIVITY_SPEC_ID, ACTIVITY_SPEC_CATEGORIES_ID) 
+VALUES
+((select ID from activity_spec where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFCheckPserversLockedFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFCheckInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFCheckClosedLoopDisabledFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFSetClosedLoopDisabledFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUnsetClosedLoopDisabledFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFLockActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUnlockActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='FlowCompleteActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='PauseForManualTaskActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='DistributeTrafficActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='DistributeTrafficCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFHealthCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFResumeTrafficActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUnsetInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF')),
+((select ID from activity_spec where NAME='VnfInPlaceSoftwareUpdate' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF'));
+
+INSERT INTO activity_spec_parameters (NAME, TYPE, DIRECTION, DESCRIPTION) 
+VALUES('WorkflowException','WorkflowException','output','Description');
+
+INSERT INTO activity_spec_to_activity_spec_parameters( ACTIVITY_SPEC_ID, ACTIVITY_SPEC_PARAMETERS_ID) 
+VALUES
+((select ID from activity_spec where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFCheckPserversLockedFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFCheckInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFCheckClosedLoopDisabledFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFSetClosedLoopDisabledFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUnsetClosedLoopDisabledFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFLockActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUnlockActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='FlowCompleteActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='PauseForManualTaskActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='DistributeTrafficActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='DistributeTrafficCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFHealthCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFResumeTrafficActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUnsetInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
+((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output'));
+
+INSERT INTO `user_parameters`(`NAME`,`PAYLOAD_LOCATION`,`LABEL`,`TYPE`,`DESCRIPTION`,`IS_REQUIRED`,`MAX_LENGTH`,`ALLOWABLE_CHARS`)
+VALUES 
+('cloudOwner','cloudConfiguration','Cloud Owner','text','',1,7,''), 
+('operations_timeout','userParams','Operations Timeout','text','',1,50,''),
+('existing_software_version','userParams','Existing Software Version','text','',1,50,''),
+('tenantId','cloudConfiguration','Tenant/Project ID','text','',1,36,''),
+('new_software_version','userParams','New Software Version','text','',1,50,''),
+('lcpCloudRegionId','cloudConfiguration','Cloud Region ID','text','',1,7,'');
+
+INSERT INTO `activity_spec_to_user_parameters`(`ACTIVITY_SPEC_ID`,`USER_PARAMETERS_ID`)
+VALUES
+((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='lcpCloudRegionId')),
+((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='tenantId')),
+((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='lcpCloudRegionId')),
+((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='tenantId')),
+((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='lcpCloudRegionId')),
+((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='tenantId')),
+((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='operations_timeout')),
+((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='existing_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='new_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='existing_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='new_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='existing_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='new_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='existing_software_version')),
+((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
+(select ID from user_parameters where NAME='new_software_version'));