From f5f13c4f6b6fe3b4d98e349dfd7db59339803436 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 19 Feb 2017 12:35:04 +0200 Subject: push addional code Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74 Signed-off-by: Michael Lando --- .../tools/build/scripts/cassandra-commands.json | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 openecomp-be/tools/build/scripts/cassandra-commands.json (limited to 'openecomp-be/tools/build/scripts/cassandra-commands.json') diff --git a/openecomp-be/tools/build/scripts/cassandra-commands.json b/openecomp-be/tools/build/scripts/cassandra-commands.json new file mode 100644 index 0000000000..8354ff2532 --- /dev/null +++ b/openecomp-be/tools/build/scripts/cassandra-commands.json @@ -0,0 +1,76 @@ +{ + "create": { + "version": "CREATE TYPE IF NOT EXISTS version (major int, minor int)", + "user_candidate_version": "CREATE TYPE IF NOT EXISTS user_candidate_version (version frozen, user text)", + "version_info": "CREATE TABLE IF NOT EXISTS version_info (entity_type text, entity_id text, active_version frozen, status text, candidate frozen, viewable_versions set>, latest_final_version frozen, PRIMARY KEY (entity_type, entity_id))", + "version_info_deleted": "CREATE TABLE IF NOT EXISTS version_info_deleted (entity_type text, entity_id text, active_version frozen, status text, candidate frozen, viewable_versions set>, latest_final_version frozen, PRIMARY KEY (entity_type, entity_id))", + "unique_value" : "CREATE TABLE IF NOT EXISTS unique_value (type text, value text, PRIMARY KEY ((type, value)))", + "choice_or_other": "CREATE TYPE IF NOT EXISTS choice_or_other (result text)", + "multi_choice_or_other": "CREATE TYPE IF NOT EXISTS multi_choice_or_other (results set)", + "vendor_license_model": "CREATE TABLE IF NOT EXISTS vendor_license_model (vlm_id text, version frozen, vendor_name text, description text, icon text, PRIMARY KEY ((vlm_id, version)))", + "license_agreement": "CREATE TABLE IF NOT EXISTS license_agreement (vlm_id text, version frozen, la_id text, name text, description text, lic_term frozen, req_const text, fg_ids set, PRIMARY KEY ((vlm_id, version), la_id))", + "feature_group": "CREATE TABLE IF NOT EXISTS feature_group (vlm_id text, version frozen, fg_id text, name text, description text, part_num text, ep_ids set, lkg_ids set, ref_la_ids set, PRIMARY KEY ((vlm_id, version), fg_id))", + "license_key_group": "CREATE TABLE IF NOT EXISTS license_key_group (vlm_id text, version frozen, lkg_id text,name text,description text, type text, operational_scope frozen, ref_fg_ids set, version_uuid text, PRIMARY KEY ((vlm_id, version), lkg_id))", + "entitlement_pool": "CREATE TABLE IF NOT EXISTS entitlement_pool (vlm_id text, version frozen, ep_id text,name text,description text,threshold float,threshold_unit text,entitlement_metric frozen,increments text,aggregation_func frozen, operational_scope frozen, time frozen,manufacturer_ref_num text,ref_fg_ids set, version_uuid text, PRIMARY KEY ((vlm_id, version), ep_id))", + "vsp_information": "CREATE TABLE IF NOT EXISTS vsp_information (VSP_ID text, version frozen, NAME text,DESCRIPTION text,CATEGORY text,SUB_CATEGORY text,ICON text,PACKAGE_NAME text,PACKAGE_VERSION text,vendor_name text, vendor_id text,LICENSE_AGREEMENT text,FEATURE_GROUPS list,VALIDATION_DATA text,CONTENT_DATA blob, questionnaire_data text, vlm_version frozen, PRIMARY KEY ((VSP_ID, version)))", + "package_details": "CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version frozen,DISPLAY_NAME text,vsp_name text,vsp_description text,VENDOR_NAME text,CATEGORY text,SUB_CATEGORY text,VENDOR_RELEASE text,PACKAGE_CHECKSUM text,PACKAGE_TYPE text,TRANSLATE_CONTENT blob,PRIMARY KEY ((VSP_ID, version)))", + "vsp_network": "CREATE TABLE IF NOT EXISTS vsp_network (vsp_id text, version frozen, network_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), network_id))", + "vsp_component": "CREATE TABLE IF NOT EXISTS vsp_component (vsp_id text, version frozen, component_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id))", + "vsp_component_nic": "CREATE TABLE IF NOT EXISTS vsp_component_nic (vsp_id text, version frozen, component_id text, nic_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, nic_id))", + "vsp_process" : "CREATE TABLE IF NOT EXISTS vsp_process (vsp_id text, version frozen, component_id text, process_id text, name text, description text, artifact_name text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, process_id))", + "vsp_service_artifact" : "CREATE TABLE IF NOT EXISTS vsp_service_artifact (vsp_id text, version frozen, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", + "vsp_service_template" : "CREATE TABLE IF NOT EXISTS vsp_service_template (vsp_id text, version frozen, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", + "vsp_enriched_service_template" : "CREATE TABLE IF NOT EXISTS vsp_enriched_service_template (vsp_id text, version frozen, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", + "vsp_enriched_service_artifact" : "CREATE TABLE IF NOT EXISTS vsp_enriched_service_artifact (vsp_id text, version frozen, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))", + "application_config" : "CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key))", + "action" : "CREATE TABLE IF NOT EXISTS dox.Action (actionUUID text, actionInvariantUUID text, version frozen, status text, name text, vendor_list set, category_list set, timestamp timestamp, user text, supportedModels set, supportedComponents set, data text, PRIMARY KEY ((actionInvariantUUID, version)))", + "supportedComponents_index" : "CREATE INDEX IF NOT EXISTS action_supportedComponents ON dox.Action (supportedComponents)", + "category_list_index" : "CREATE INDEX IF NOT EXISTS action_category_list ON dox.Action (category_list)", + "supportedModels_index" : "CREATE INDEX IF NOT EXISTS action_supportedModels ON dox.Action (supportedModels)", + "vendor_list_index" : "CREATE INDEX IF NOT EXISTS action_vendor_list ON dox.Action (vendor_list)", + "actionUUID_index" : "CREATE INDEX IF NOT EXISTS action_actionUUID ON dox.Action (actionUUID)", + "ecomp_component": "CREATE TABLE IF NOT EXISTS dox.ecompcomponent(id text PRIMARY KEY, name text)", + "vsp_component_artifact": "CREATE TABLE IF NOT EXISTS vsp_component_artifact (vsp_id text, version frozen, component_id text, artifact_type text, artifact_id text, name text, description text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, artifact_type, artifact_id))", + "name_index": "CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name)", + "action_artifact":"CREATE TABLE IF NOT EXISTS action_artifact(artifactuuid text, effective_version int, artifact blob, PRIMARY KEY(artifactuuid, effective_version)) WITH CLUSTERING ORDER BY (effective_version DESC)" + }, + "drop": { + "version_info": "DROP TABLE IF EXISTS version_info", + "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted", + "unique_value": "DROP TABLE IF EXISTS unique_value", + "entitlement_pool": "DROP TABLE IF EXISTS entitlement_pool", + "vendor_license_model": "DROP TABLE IF EXISTS vendor_license_model", + "license_agreement": "DROP TABLE IF EXISTS license_agreement", + "feature_group": "DROP TABLE IF EXISTS feature_group", + "license_key_group": "DROP TABLE IF EXISTS license_key_group", + "vsp_information": "DROP TABLE IF EXISTS vsp_information", + "package_details": "DROP TABLE IF EXISTS package_details", + "vsp_network": "DROP TABLE IF EXISTS vsp_network", + "vsp_component": "DROP TABLE IF EXISTS vsp_component", + "vsp_component_nic": "DROP TABLE IF EXISTS vsp_component_nic", + "vsp_process":"DROP TABLE IF EXISTS vsp_process", + "choice_or_other": "DROP TYPE IF EXISTS choice_or_other", + "multi_choice_or_other": "DROP TYPE IF EXISTS multi_choice_or_other", + "application_config" : "DROP TABLE IF EXISTS application_config", + "vsp_service_artifact" :"DROP TABLE IF EXISTS vsp_service_artifact", + "vsp_service_template" :"DROP TABLE IF EXISTS vsp_service_template", + "vsp_enriched_service_artifact" :"DROP TABLE IF EXISTS vsp_enriched_service_artifact", + "vsp_enriched_service_template" :"DROP TABLE IF EXISTS vsp_enriched_service_template", + "action" : "DROP TABLE IF EXISTS action", + "supportedComponents_index" : "DROP INDEX IF EXISTS dox.action_supportedComponents", + "category_list_index" : "DROP INDEX IF EXISTS dox.action_category_list", + "supportedModels_index" : "DROP INDEX IF EXISTS dox.action_supportedModels", + "vendor_list_index" : "DROP INDEX IF EXISTS dox.action_vendor_list", + "actionUUID_index" : "DROP INDEX IF EXISTS dox.action_actionUUID", + "name_index" : "DROP INDEX IF EXISTS dox.action_name", + "ecomp_component": "DROP TABLE IF EXISTS dox.ecompcomponent", + "vsp_component_artifact": "DROP TABLE IF EXISTS dox.vsp_component_artifact", + "action_artifact":"DROP TABLE IF EXISTS action_artifact" + }, + "alter": { + "vsp_information": "ALTER TABLE vsp_information ADD questionnaire_data text", + "vsp_information_1": "ALTER TABLE vsp_information ADD vlm_version frozen", + "entitlement_pool": "alter table entitlement_pool ADD version_uuid text", + "license_key_group": "alter table license_key_group ADD version_uuid text" + } +} -- cgit 1.2.3-korg