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>
diff --git a/extra/sql/bulkload/clds-stored-procedures.sql b/extra/sql/bulkload/clds-stored-procedures.sql
index aa8edb8..b48e86a 100644
--- a/extra/sql/bulkload/clds-stored-procedures.sql
+++ b/extra/sql/bulkload/clds-stored-procedures.sql
@@ -134,6 +134,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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