blob: bc97b1e54ad23c4371b9679a8a422990888ea148 [file] [log] [blame]
Benjamin, Max (mb388a)5a6a6de2018-07-30 15:56:09 -04001use catalogdb;
2
3insert 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');
4
5insert into temp_network_heat_template_lookup(network_resource_model_name, heat_template_artifact_uuid, aic_version_min, aic_version_max) values
6('CONTRAIL30_GNDIRECT', 'ff874603-4222-11e7-9252-005056850d2e', '3', '3'),
7('MSO_Example', 'ff874603-4222-11e7-9252-005056850d2e', '3', '3'),
8('ExtVL', 'ff874603-4222-11e7-9252-005056850d2e', '3', '3'),
9('AIC30_CONTRAIL_BASIC', 'ff874603-4222-11e7-9252-005056850d2e', '3', '3'),
10('CONTRAIL30_BASIC', 'ff874603-4222-11e7-9252-005056850d2e', '3', '3');
11
12insert 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
13('10b36f65-f4e6-4be6-ae49-9596dc1c47fc', 'CONTRAIL30_GNDIRECT', 'ce4ff476-9641-4e60-b4d5-b4abbec1271d', 'Contrail 30 GNDIRECT NW', 'ff874603-4222-11e7-9252-005056850d2e', 'BASIC', '1.0', '', '3.0', '', 'HEAT', '2017-01-17 20:35:05');
14
15insert 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
16('3bdbb104-476c-483e-9f8b-c095b3d308ac', 'CONTRAIL30_GNDIRECT 9', '', '', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c47fc');
17
18
19
20INSERT INTO temp_network_heat_template_lookup(NETWORK_RESOURCE_MODEL_NAME, HEAT_TEMPLATE_ARTIFACT_UUID, AIC_VERSION_MIN, AIC_VERSION_MAX) VALUES
21('TENANT_OAM_NETWORK', 'ff874603-4222-11e7-9252-005056850d2e', '3.0', NULL);
22INSERT INTO temp_network_heat_template_lookup(NETWORK_RESOURCE_MODEL_NAME, HEAT_TEMPLATE_ARTIFACT_UUID, AIC_VERSION_MIN, AIC_VERSION_MAX) VALUES
23('SRIOV_PROVIDER_NETWORK', 'ff874603-4222-11e7-9252-005056850d2e', '3.0', NULL);
Ramesh Parthasarathy2fcd0d82019-05-16 21:15:29 -070024INSERT INTO temp_network_heat_template_lookup(NETWORK_RESOURCE_MODEL_NAME, HEAT_TEMPLATE_ARTIFACT_UUID, AIC_VERSION_MIN, AIC_VERSION_MAX) VALUES
25('Generic NeutronNet', 'ff874603-4222-11e7-9252-005056850d2e', '3.0', NULL);
Benjamin, Max (mb388a)5a6a6de2018-07-30 15:56:09 -040026
Elena Kuleshova2aea242019-04-10 09:26:02 -040027insert 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
28('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);
29
30insert into workflow(artifact_uuid, artifact_name, name, operation_name, version, description, body, resource_target, source) values
Elena Kuleshova385c0c2019-05-09 12:27:30 -040031('5b0c4322-643d-4c9f-b184-4516049e99b1', 'testingWorkflow.bpmn', 'testingWorkflow', 'create', 1, 'Test Workflow', null, 'vnf', 'sdc');
Elena Kuleshova2aea242019-04-10 09:26:02 -040032
33insert into vnf_resource_to_workflow(vnf_resource_model_uuid, workflow_id) values
34('ff2ae348-214a-11e7-93ae-92361f002671', '1');
35
36insert into activity_spec(name, description, version) values
37('testActivity1', 'Test Activity 1', 1.0);
38
39insert into workflow_activity_spec_sequence(workflow_id, activity_spec_id, seq_no) values
40(1, 1, 1);
41
42INSERT INTO activity_spec (NAME, DESCRIPTION, VERSION)
43VALUES
44('VNFSetInMaintFlagActivity','Activity to Set InMaint Flag in A&AI',1.0),
45('VNFCheckPserversLockedFlagActivity','Activity Check Pservers Locked Flag VNF',1.0),
46('VNFCheckInMaintFlagActivity','Activity CheckIn Maint Flag on VNF',1.0),
47('VNFCheckClosedLoopDisabledFlagActivity','Activity Check Closed Loop Disabled Flag on VNF',1.0),
48('VNFSetClosedLoopDisabledFlagActivity','Activity Set Closed Loop Disabled Flag on VNF',1.0),
49('VNFUnsetClosedLoopDisabledFlagActivity','Activity Unset Closed Loop Disabled Flag on VNF',1.0),
50('VNFLockActivity','Activity Lock on VNF',1.0),
51('VNFUnlockActivity','Activity UnLock on VNF',1.0),
52('VNFStopActivity','Activity Stop on VNF',1.0),
53('VNFStartActivity','Activity Start on VNF',1.0),
54('VNFSnapShotActivity','Activity Snap Shot on VNF',1.0),
55('FlowCompleteActivity','Activity Complete on VNF',1.0),
56('PauseForManualTaskActivity','Activity Pause For Manual Task on VNF',1.0),
57('DistributeTrafficActivity','Activity Distribute Traffic on VNF',1.0),
58('DistributeTrafficCheckActivity','Activity Distribute Traffic Check on VNF',1.0),
59('VNFHealthCheckActivity','Activity Health Check on VNF',1.0),
60('VNFQuiesceTrafficActivity','Activity Quiesce Traffic on VNF',1.0),
61('VNFResumeTrafficActivity','Activity Resume Traffic on VNF',1.0),
62('VNFUnsetInMaintFlagActivity','Activity Unset InMaint Flag on VNF',1.0),
63('VNFUpgradeBackupActivity','Activity Upgrade Backup on VNF',1.0),
64('VNFUpgradePostCheckActivity','Activity Upgrade Post Check on VNF',1.0),
65('VNFUpgradePreCheckActivity','Activity Upgrade PreCheck on VNF',1.0),
66('VNFUpgradeSoftwareActivity','Activity UpgradeS oftware on VNF',1.0),
67('VnfInPlaceSoftwareUpdate','Activity InPlace Software Update on VNF',1.0);
68
69INSERT INTO activity_spec_categories (NAME)
70VALUES ('VNF');
71
72INSERT INTO activity_spec_to_activity_spec_categories(ACTIVITY_SPEC_ID, ACTIVITY_SPEC_CATEGORIES_ID)
73VALUES
74((select ID from activity_spec where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0),
75(select ID from activity_spec_categories where NAME='VNF')),
76((select ID from activity_spec where NAME='VNFCheckPserversLockedFlagActivity' and VERSION=1.0),
77(select ID from activity_spec_categories where NAME='VNF')),
78((select ID from activity_spec where NAME='VNFCheckInMaintFlagActivity' and VERSION=1.0),
79(select ID from activity_spec_categories where NAME='VNF')),
80((select ID from activity_spec where NAME='VNFCheckClosedLoopDisabledFlagActivity' and VERSION=1.0),
81(select ID from activity_spec_categories where NAME='VNF')),
82((select ID from activity_spec where NAME='VNFSetClosedLoopDisabledFlagActivity' and VERSION=1.0),
83(select ID from activity_spec_categories where NAME='VNF')),
84((select ID from activity_spec where NAME='VNFUnsetClosedLoopDisabledFlagActivity' and VERSION=1.0),
85(select ID from activity_spec_categories where NAME='VNF')),
86((select ID from activity_spec where NAME='VNFLockActivity' and VERSION=1.0),
87(select ID from activity_spec_categories where NAME='VNF')),
88((select ID from activity_spec where NAME='VNFUnlockActivity' and VERSION=1.0),
89(select ID from activity_spec_categories where NAME='VNF')),
90((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
91(select ID from activity_spec_categories where NAME='VNF')),
92((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
93(select ID from activity_spec_categories where NAME='VNF')),
94((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
95(select ID from activity_spec_categories where NAME='VNF')),
96((select ID from activity_spec where NAME='FlowCompleteActivity' and VERSION=1.0),
97(select ID from activity_spec_categories where NAME='VNF')),
98((select ID from activity_spec where NAME='PauseForManualTaskActivity' and VERSION=1.0),
99(select ID from activity_spec_categories where NAME='VNF')),
100((select ID from activity_spec where NAME='DistributeTrafficActivity' and VERSION=1.0),
101(select ID from activity_spec_categories where NAME='VNF')),
102((select ID from activity_spec where NAME='DistributeTrafficCheckActivity' and VERSION=1.0),
103(select ID from activity_spec_categories where NAME='VNF')),
104((select ID from activity_spec where NAME='VNFHealthCheckActivity' and VERSION=1.0),
105(select ID from activity_spec_categories where NAME='VNF')),
106((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0),
107(select ID from activity_spec_categories where NAME='VNF')),
108((select ID from activity_spec where NAME='VNFResumeTrafficActivity' and VERSION=1.0),
109(select ID from activity_spec_categories where NAME='VNF')),
110((select ID from activity_spec where NAME='VNFUnsetInMaintFlagActivity' and VERSION=1.0),
111(select ID from activity_spec_categories where NAME='VNF')),
112((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
113(select ID from activity_spec_categories where NAME='VNF')),
114((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
115(select ID from activity_spec_categories where NAME='VNF')),
116((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
117(select ID from activity_spec_categories where NAME='VNF')),
118((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
119(select ID from activity_spec_categories where NAME='VNF')),
120((select ID from activity_spec where NAME='VnfInPlaceSoftwareUpdate' and VERSION=1.0),
121(select ID from activity_spec_categories where NAME='VNF'));
122
123INSERT INTO activity_spec_parameters (NAME, TYPE, DIRECTION, DESCRIPTION)
124VALUES('WorkflowException','WorkflowException','output','Description');
125
126INSERT INTO activity_spec_to_activity_spec_parameters( ACTIVITY_SPEC_ID, ACTIVITY_SPEC_PARAMETERS_ID)
127VALUES
128((select ID from activity_spec where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0),
129(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
130((select ID from activity_spec where NAME='VNFCheckPserversLockedFlagActivity' and VERSION=1.0),
131(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
132((select ID from activity_spec where NAME='VNFCheckInMaintFlagActivity' and VERSION=1.0),
133(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
134((select ID from activity_spec where NAME='VNFCheckClosedLoopDisabledFlagActivity' and VERSION=1.0),
135(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
136((select ID from activity_spec where NAME='VNFSetClosedLoopDisabledFlagActivity' and VERSION=1.0),
137(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
138((select ID from activity_spec where NAME='VNFUnsetClosedLoopDisabledFlagActivity' and VERSION=1.0),
139(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
140((select ID from activity_spec where NAME='VNFLockActivity' and VERSION=1.0),
141(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
142((select ID from activity_spec where NAME='VNFUnlockActivity' and VERSION=1.0),
143(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
144((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
145(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
146((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
147(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
148((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
149(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
150((select ID from activity_spec where NAME='FlowCompleteActivity' and VERSION=1.0),
151(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
152((select ID from activity_spec where NAME='PauseForManualTaskActivity' and VERSION=1.0),
153(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
154((select ID from activity_spec where NAME='DistributeTrafficActivity' and VERSION=1.0),
155(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
156((select ID from activity_spec where NAME='DistributeTrafficCheckActivity' and VERSION=1.0),
157(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
158((select ID from activity_spec where NAME='VNFHealthCheckActivity' and VERSION=1.0),
159(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
160((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0),
161(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
162((select ID from activity_spec where NAME='VNFResumeTrafficActivity' and VERSION=1.0),
163(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
164((select ID from activity_spec where NAME='VNFUnsetInMaintFlagActivity' and VERSION=1.0),
165(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
166((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
167(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
168((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
169(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
170((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
171(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')),
172((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
173(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output'));
174
175INSERT INTO `user_parameters`(`NAME`,`PAYLOAD_LOCATION`,`LABEL`,`TYPE`,`DESCRIPTION`,`IS_REQUIRED`,`MAX_LENGTH`,`ALLOWABLE_CHARS`)
176VALUES
177('cloudOwner','cloudConfiguration','Cloud Owner','text','',1,7,''),
178('operations_timeout','userParams','Operations Timeout','text','',1,50,''),
179('existing_software_version','userParams','Existing Software Version','text','',1,50,''),
180('tenantId','cloudConfiguration','Tenant/Project ID','text','',1,36,''),
181('new_software_version','userParams','New Software Version','text','',1,50,''),
182('lcpCloudRegionId','cloudConfiguration','Cloud Region ID','text','',1,7,'');
183
184INSERT INTO `activity_spec_to_user_parameters`(`ACTIVITY_SPEC_ID`,`USER_PARAMETERS_ID`)
185VALUES
186((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
187(select ID from user_parameters where NAME='lcpCloudRegionId')),
188((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0),
189(select ID from user_parameters where NAME='tenantId')),
190((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
191(select ID from user_parameters where NAME='lcpCloudRegionId')),
192((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0),
193(select ID from user_parameters where NAME='tenantId')),
194((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
195(select ID from user_parameters where NAME='lcpCloudRegionId')),
196((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0),
197(select ID from user_parameters where NAME='tenantId')),
198((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0),
199(select ID from user_parameters where NAME='operations_timeout')),
200((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
201(select ID from user_parameters where NAME='existing_software_version')),
202((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0),
203(select ID from user_parameters where NAME='new_software_version')),
204((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
205(select ID from user_parameters where NAME='existing_software_version')),
206((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0),
207(select ID from user_parameters where NAME='new_software_version')),
208((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
209(select ID from user_parameters where NAME='existing_software_version')),
210((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0),
211(select ID from user_parameters where NAME='new_software_version')),
212((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
213(select ID from user_parameters where NAME='existing_software_version')),
214((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0),
215(select ID from user_parameters where NAME='new_software_version'));
216
Benjamin, Max (mb388a)5a6a6de2018-07-30 15:56:09 -0400217
218--------START Request DB INSERTS --------
Benjamin, Max (mb388a)20e1b652019-02-24 10:42:15 -0500219insert into requestdb.watchdog_distributionid_status(DISTRIBUTION_ID, DISTRIBUTION_ID_STATUS,LOCK_VERSION) values
220('watchdogTestStatusSuccess', 'SUCCESS',0),
221('watchdogTestStatusFailure', 'FAILURE',0),
222('watchdogTestStatusTimeout', 'TIMEOUT',0),
223('watchdogTestStatusIncomplete', 'INCOMPLETE',0),
224('watchdogTestStatusException', 'EXCEPTION',0),
225('watchdogTestStatusNull', 'NULL',0),
226('testStatusSuccessTosca', 'SUCCESS',0),
227('testStatusFailureTosca', 'FAILURE',0),
228('testStatusTimeoutTosca', 'TIMEOUT',0),
229('testStatusIncompleteTosca', 'INCOMPLETE',0),
230('testStatusExceptionTosca', 'EXCEPTION',0),
231('testStatusNullTosca', 'NULL',0);
Benjamin, Max (mb388a)5a6a6de2018-07-30 15:56:09 -0400232
233--WatchdogDistrubutionTest
234insert into requestdb.watchdog_per_component_distribution_status(DISTRIBUTION_ID, COMPONENT_NAME, COMPONENT_DISTRIBUTION_STATUS) values
235('watchdogTestStatusSuccess', 'SO', 'COMPONENT_DONE_OK'),
236('watchdogTestStatusSuccess', 'AAI', 'COMPONENT_DONE_OK'),
237('watchdogTestStatusSuccess', 'SDNC', 'COMPONENT_DONE_OK'),
238('watchdogTestStatusFailure', 'SO', 'COMPONENT_DONE_ERROR'),
239('watchdogTestStatusFailure', 'AAI', 'COMPONENT_DONE_ERROR'),
240('watchdogTestStatusFailure', 'SDNC', 'COMPONENT_DONE_ERROR'),
241('watchdogTestStatusException', 'SO', 'COMPONENT_MALFORMED'),
242('watchdogTestStatusException', 'AAI', 'COMPONENT_MALFORMED'),
243('watchdogTestStatusException', 'SDNC', 'COMPONENT_MALFORMED'),
244('testStatusSuccessTosca', 'SO', 'COMPONENT_DONE_OK'),
245('testStatusSuccessTosca', 'AAI', 'COMPONENT_DONE_OK'),
246('testStatusSuccessTosca', 'SDNC', 'COMPONENT_DONE_OK'),
247('testStatusFailureTosca', 'SO', 'COMPONENT_DONE_ERROR'),
248('testStatusFailureTosca', 'AAI', 'COMPONENT_DONE_ERROR'),
249('testStatusFailureTosca', 'SDNC', 'COMPONENT_DONE_ERROR'),
250('testStatusExceptionTosca', 'SO', 'COMPONENT_MALFORMED'),
251('testStatusExceptionTosca', 'AAI', 'COMPONENT_MALFORMED'),
252('testStatusExceptionTosca', 'SDNC', 'COMPONENT_MALFORMED');
253
Benjamin, Max (mb388a)9e795be2019-02-06 21:17:24 -0500254insert into requestdb.watchdog_service_mod_ver_id_lookup(DISTRIBUTION_ID, SERVICE_MODEL_VERSION_ID, DISTRIBUTION_NOTIFICATION, CONSUMER_ID) values
255('watchdogTestStatusSuccess', '5df8b6de-2083-11e7-93ae-92361f002671', NULL, NULL),
Elena Kuleshova2aea242019-04-10 09:26:02 -0400256('watchdogTestStatusNull', '00000000-0000-0000-0000-000000000000', NULL, NULL);