summaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src/test/resources/db
diff options
context:
space:
mode:
authorMarcus G K Williams <marcus.williams@intel.com>2018-11-28 12:37:54 -0800
committerMarcus Williams <marcus.williams@intel.com>2018-11-30 02:08:50 +0000
commit17078f031da59e4a3b7a4e18cf5b23daf9ddac56 (patch)
tree6080dc352f7b2203ca141cf4abaf1ac26cb666c5 /adapters/mso-catalog-db-adapter/src/test/resources/db
parentf8e7af7517c6a825ec252ec38475a7e08bdeb41f (diff)
Fix alacarte homing flows
This fix adds homingInstance bean and stores homing info in the database. It then retreves that info when homing ala carte and populates homingSiteId and oofDirectives. SO-1254 Issue-ID: SO-1258 Change-Id: I6f8d5d3aff9ebeb669064a02926c779886dc59dd Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/test/resources/db')
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql14
1 files changed, 13 insertions, 1 deletions
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 c8475564a4..7ac3c53420 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
@@ -49,6 +49,14 @@ CREATE TABLE IF NOT EXISTS `cloud_sites` (
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,
+`CLOUD_OWNER` VARCHAR(200) NOT NULL,
+`CLOUD_REGION_ID` VARCHAR(200) NOT NULL,
+`OOF_DIRECTIVES` longtext NULL DEFAULT NULL,
+PRIMARY KEY (`SERVICE_INSTANCE_ID`)
+) ;
+
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');
@@ -203,4 +211,8 @@ VALUES
INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_MODEL_UUID)
VALUES
-('volumeGroup', 'createInstance', '1', 'Gr api recipe to create volume-group', '/mso/async/services/WorkflowActionBB', 180, '20c4431c-246d-11e7-93ae-92361f002671'); \ No newline at end of file
+('volumeGroup', 'createInstance', '1', 'Gr api recipe to create volume-group', '/mso/async/services/WorkflowActionBB', 180, '20c4431c-246d-11e7-93ae-92361f002671');
+
+insert into homing_instances (service_instance_id, cloud_owner, cloud_region_id, oof_directives) values
+('5df8b6de-2083-11e7-93ae-92361f232671', 'CloudOwner', 'CloudRegionId', '{"directives": [{"directives": [{"attributes": [{"attribute_value": "onap.hpa.flavor32","attribute_name": "firewall_flavor_name"}],"type": "flavor_directives"}],"type": "vnfc","id": "vfw"},{"directives": [{"attributes": [{"attribute_value": "onap.hpa.flavor33","attribute_name": "packetgen_flavor_name"}],"type": "flavor_directives"}],"type": "vnfc","id": "vgenerator"},{"directives": [{"attributes": [{"attribute_value": "onap.hpa.flavor32","attribute_name": "sink_flavor_name"}],"type": "flavor_directives"}],"type": "vnfc","id": "vsink"}]}'),
+('5df8b6de-2083-11e7-93ae-92361f562672', 'CloudOwner', 'CloudRegionId', '{"directives": [{"directives": [{"attributes": [{"attribute_value": "onap.hpa.flavor32","attribute_name": "firewall_flavor_name"}],"type": "flavor_directives"}],"type": "vnfc","id": "vfw"},{"directives": [{"attributes": [{"attribute_value": "onap.hpa.flavor33","attribute_name": "packetgen_flavor_name"}],"type": "flavor_directives"}],"type": "vnfc","id": "vgenerator"},{"directives": [{"attributes": [{"attribute_value": "onap.hpa.flavor32","attribute_name": "sink_flavor_name"}],"type": "flavor_directives"}],"type": "vnfc","id": "vsink"}]}'); \ No newline at end of file