summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-06-09 19:45:23 +0000
committerGerrit Code Review <gerrit@onap.org>2019-06-09 19:45:23 +0000
commitbb271cc82880d15dc9396170ac6ed95de22958a3 (patch)
treee7f5379db4eff4dbeea5ae9d801f98313e5609d4
parentfabcae6be329ed3c2d9aa0bb763dfe6cbe66b62b (diff)
parentb7cde4474b9688a1527254dcae6114123ea00c9c (diff)
Merge "Added ext_system_error_source column to requestdb"
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql4
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql3
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java3
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java13
4 files changed, 20 insertions, 3 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql
new file mode 100644
index 0000000000..e76dbbe883
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.9__Add_Column_Ext_System_Error_Source.sql
@@ -0,0 +1,4 @@
+use requestdb;
+
+ALTER TABLE infra_active_requests ADD COLUMN IF NOT EXISTS EXT_SYSTEM_ERROR_SOURCE varchar(80);
+ALTER TABLE archived_infra_requests ADD COLUMN IF NOT EXISTS EXT_SYSTEM_ERROR_SOURCE varchar(80); \ No newline at end of file
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
index ef13df5cbd..a47e1c44af 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
@@ -97,7 +97,8 @@ CREATE TABLE IF NOT EXISTS PUBLIC.INFRA_ACTIVE_REQUESTS(
INSTANCE_GROUP_ID VARCHAR SELECTIVITY 1,
INSTANCE_GROUP_NAME VARCHAR SELECTIVITY 1,
REQUEST_URL VARCHAR SELECTIVITY 1,
- ORIGINAL_REQUEST_ID VARCHAR SELECTIVITY 1
+ ORIGINAL_REQUEST_ID VARCHAR SELECTIVITY 1,
+ EXT_SYSTEM_ERROR_SOURCE VARCHAR SELECTIVITY 1
);
INSERT INTO PUBLIC.INFRA_ACTIVE_REQUESTS(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, AIC_CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME, REQUEST_URL) VALUES
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
index 9aa04ea8b2..9da6ff21ac 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
@@ -88,6 +88,7 @@ public class InfraActiveRequests extends InfraRequests {
.append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
.append("operationalEnvName", getOperationalEnvName()).append("requestUrl", getRequestUrl())
- .append("originalRequestId", getOriginalRequestId()).toString();
+ .append("originalRequestId", getOriginalRequestId())
+ .append("extSystemErrorSource", getExtSystemErrorSource()).toString();
}
}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
index 5b40e40eb9..ecc4f46149 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
@@ -155,6 +155,8 @@ public abstract class InfraRequests implements java.io.Serializable {
private String requestUrl;
@Column(name = "ORIGINAL_REQUEST_ID", length = 45)
private String originalRequestId;
+ @Column(name = "EXT_SYSTEM_ERROR_SOURCE", length = 80)
+ private String extSystemErrorSource;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "SO_REQUEST_ID", referencedColumnName = "REQUEST_ID")
@@ -580,6 +582,14 @@ public abstract class InfraRequests implements java.io.Serializable {
this.originalRequestId = originalRequestId;
}
+ public String getExtSystemErrorSource() {
+ return this.extSystemErrorSource;
+ }
+
+ public void setExtSystemErrorSource(String extSystemErrorSource) {
+ this.extSystemErrorSource = extSystemErrorSource;
+ }
+
@PrePersist
protected void onCreate() {
if (requestScope == null)
@@ -642,6 +652,7 @@ public abstract class InfraRequests implements java.io.Serializable {
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
.append("operationalEnvName", getOperationalEnvName()).append("instanceGroupId", getInstanceGroupId())
.append("instanceGroupName", getInstanceGroupName()).append("requestUrl", getRequestUrl())
- .append("originalRequestId", originalRequestId).toString();
+ .append("originalRequestId", originalRequestId).append("extSystemErrorSource", extSystemErrorSource)
+ .toString();
}
}