diff options
author | andre.schmid <andre.schmid@est.tech> | 2021-12-15 19:44:06 +0000 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-01-21 13:25:16 +0000 |
commit | 049d078d8abbe637b213a2f14c2192379208c168 (patch) | |
tree | 3fb61e7fe7a95684499329cfa120c82de0c533b5 /openecomp-be/tools/install/database/init_schemas.cql | |
parent | b3761a858f0ec676dd0236101b29f8948d5d6a2e (diff) |
Onboarding upload control
Brings the initial structure to control asynchronously a VSP package
upload during the onboarding.
Instead of blocking the UI, the upload and processing status will be
controlled by the backend, so the frontend can query it and control the
behaviour of the UI.
Updates the upload endpoint to obtain/verify an upload lock, and creates
a second endpoint to check for the upload status.
Change-Id: If1c43fb4f0b11e1d8a5627578bafc75f266393c2
Issue-ID: SDC-3826, SDC-3827
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/tools/install/database/init_schemas.cql')
-rw-r--r-- | openecomp-be/tools/install/database/init_schemas.cql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openecomp-be/tools/install/database/init_schemas.cql b/openecomp-be/tools/install/database/init_schemas.cql index 7e3bc0a0b2..a5c97770f5 100644 --- a/openecomp-be/tools/install/database/init_schemas.cql +++ b/openecomp-be/tools/install/database/init_schemas.cql @@ -44,6 +44,20 @@ CREATE TABLE IF NOT EXISTS NOTIFICATION_SUBSCRIBERS (entity_id text PRIMARY KEY, CREATE TABLE IF NOT EXISTS last_notification (owner_id text PRIMARY KEY, event_id timeuuid); CREATE TABLE IF NOT EXISTS notifications (owner_id text, event_id timeuuid, read boolean, originator_id text, event_type text, event_attributes text, PRIMARY KEY (owner_id, event_id)) WITH CLUSTERING ORDER BY (event_id DESC); CREATE TABLE IF NOT EXISTS vsp_merge_hint (space text, item_id text, version_id text, model_id text, model_resolution text, PRIMARY KEY ((space, item_id, version_id))); +CREATE TABLE IF NOT EXISTS dox.vsp_upload_status +( + vsp_id text, + vsp_version_id text, + created timestamp, + is_complete boolean, + lock_id uuid, + status text, + updated timestamp, + primary key ( (vsp_id, vsp_version_id), lock_id, created) +) WITH CLUSTERING ORDER BY (lock_id ASC, created DESC); +CREATE INDEX IF NOT EXISTS vsp_upload_status_is_complete_index on dox.vsp_upload_status (is_complete); +CREATE INDEX IF NOT EXISTS vsp_upload_status_status_index on dox.vsp_upload_status (status); + INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'composition.component', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string"<#if !manual>, "enum": [ "${component.name}" ], "default": "${component.name}"</#if> }, "displayName": { "type": "string"<#if !manual && component.displayName??>, "enum": [ "${component.displayName}" ], "default": "${component.displayName}"</#if>},"description": {"type": "string"}},"additionalProperties": false,"required": ["name"<#if !manual && component.displayName??>,"displayName"</#if>]}'); INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'composition.compute', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string" <#if !manual>, "enum": [ "${compute.name}" ], "default": "${compute.name}"</#if> }, "description": { "type": "string", "maxLength": 300 } } }'); INSERT INTO application_config (namespace,key,value) VALUES ('vsp.schemaTemplates', 'composition.deployment', '{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "model": { "type": "string", "maxLength": 30 }, "description": { "type": "string", "maxLength": 300 }, "featureGroupId":{ "type": "string", "enum": [<#if featureGroupIds??> <#list featureGroupIds as featureGroupId> "${featureGroupId}"<#sep>,</#list> </#if> ] }, "componentComputeAssociations": { "type": "array", "properties": { "vfcid": { "type": "string" }, "computeFlavorid": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false, "required": [ "model" ] }'); |