summaryrefslogtreecommitdiffstats
path: root/extra/sql
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2018-11-08 17:11:10 +0100
committersebdet <sebastien.determe@intl.att.com>2018-11-09 10:32:54 +0100
commit2579386298fc4862a87073f8c719986925d77424 (patch)
tree58e8cff333a1d3c4b6eb4958b3457b22c39e41b4 /extra/sql
parentac4958ae6d30e60c5cf0bd66ce8f3c79191c6726 (diff)
Fix DCAE status refresh
Fix the DCAE status refresh that was not done during the loading of the model in Clamp Issue-ID: CLAMP-246 Change-Id: I61ec1de74d46879ba638833bcab5143966d37228 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'extra/sql')
-rw-r--r--extra/sql/bulkload/clds-create-db-objects.sql1
-rw-r--r--extra/sql/bulkload/clds-stored-procedures.sql15
2 files changed, 13 insertions, 3 deletions
diff --git a/extra/sql/bulkload/clds-create-db-objects.sql b/extra/sql/bulkload/clds-create-db-objects.sql
index 38cc466f5..ac64b5d76 100644
--- a/extra/sql/bulkload/clds-create-db-objects.sql
+++ b/extra/sql/bulkload/clds-create-db-objects.sql
@@ -59,6 +59,7 @@ CREATE TABLE model (
control_name_uuid VARCHAR(36) NOT NULL,
service_type_id VARCHAR(80) NULL,
deployment_id VARCHAR(80) NULL,
+ deployment_status_url VARCHAR(300) NULL,
PRIMARY KEY (model_id),
UNIQUE (model_name),
UNIQUE (control_name_uuid),
diff --git a/extra/sql/bulkload/clds-stored-procedures.sql b/extra/sql/bulkload/clds-stored-procedures.sql
index aa8edb81a..b48e86afe 100644
--- a/extra/sql/bulkload/clds-stored-procedures.sql
+++ b/extra/sql/bulkload/clds-stored-procedures.sql
@@ -134,6 +134,7 @@ CREATE PROCEDURE get_model
OUT v_model_id VARCHAR(36),
OUT v_service_type_id VARCHAR(80),
OUT v_deployment_id VARCHAR(80),
+ OUT v_deployment_status_url VARCHAR(300),
OUT v_template_name VARCHAR(80),
OUT v_template_id VARCHAR(36),
OUT v_model_prop_id VARCHAR(36),
@@ -153,6 +154,7 @@ BEGIN
m.model_id,
m.service_type_id,
m.deployment_id,
+ m.deployment_status_url,
t.template_name,
m.template_id,
mp.model_prop_id,
@@ -171,6 +173,7 @@ BEGIN
v_model_id,
v_service_type_id,
v_deployment_id,
+ v_deployment_status_url,
v_template_name,
v_template_id,
v_model_prop_id,
@@ -210,6 +213,7 @@ CREATE PROCEDURE get_model_template
OUT v_model_id VARCHAR(36),
OUT v_service_type_id VARCHAR(80),
OUT v_deployment_id VARCHAR(80),
+ OUT v_deployment_status_url VARCHAR(300),
OUT v_template_name VARCHAR(80),
OUT v_template_id VARCHAR(36),
OUT v_model_prop_id VARCHAR(36),
@@ -240,6 +244,7 @@ BEGIN
v_model_id,
v_service_type_id,
v_deployment_id,
+ v_deployment_status_url,
v_template_name,
v_template_id,
v_model_prop_id,
@@ -274,6 +279,7 @@ CREATE PROCEDURE set_model
IN v_model_blueprint_text MEDIUMTEXT,
IN v_service_type_id VARCHAR(80),
IN v_deployment_id VARCHAR(80),
+ IN v_deployment_status_url VARCHAR(300),
INOUT v_control_name_prefix VARCHAR(80),
INOUT v_control_name_uuid VARCHAR(36),
OUT v_model_id VARCHAR(36),
@@ -295,6 +301,7 @@ BEGIN
DECLARE v_old_model_blueprint_text MEDIUMTEXT;
DECLARE v_old_service_type_id VARCHAR(80);
DECLARE v_old_deployment_id VARCHAR(80);
+ DECLARE v_old_deployment_status_url VARCHAR(300);
SET v_model_id = NULL;
CALL get_model(
v_model_name,
@@ -303,6 +310,7 @@ BEGIN
v_model_id,
v_old_service_type_id,
v_old_deployment_id,
+ v_old_deployment_status_url,
v_old_template_name,
v_old_template_id,
v_model_prop_id,
@@ -325,8 +333,8 @@ BEGIN
END IF;
SET v_model_id = v_control_name_uuid;
INSERT INTO model
- (model_id, model_name, template_id, control_name_prefix, control_name_uuid, service_type_id, deployment_id)
- VALUES (v_model_id, v_model_name, v_template_id, v_control_name_prefix, v_control_name_uuid, v_service_type_id, v_deployment_id);
+ (model_id, model_name, template_id, control_name_prefix, control_name_uuid, service_type_id, deployment_id, deployment_status_url)
+ VALUES (v_model_id, v_model_name, v_template_id, v_control_name_prefix, v_control_name_uuid, v_service_type_id, v_deployment_id,v_deployment_status_url);
# since just created model, insert CREATED event as initial default event
SET v_action_cd = 'CREATE';
SET v_action_state_cd = 'COMPLETED';
@@ -368,7 +376,8 @@ BEGIN
model_prop_id = v_model_prop_id,
model_blueprint_id = v_model_blueprint_id,
service_type_id = v_service_type_id,
- deployment_id = v_deployment_id
+ deployment_id = v_deployment_id,
+ deployment_status_url = v_deployment_status_url
WHERE model_id = v_model_id;
END;
CREATE PROCEDURE ins_model_instance