From a5af334f3b70d927565c33390807d5c49593822e Mon Sep 17 00:00:00 2001 From: "Plummer, Brittany" Date: Fri, 31 May 2019 11:48:34 -0400 Subject: apih to populate original request id Updated schema.sql to fix failing tests Added constants for request parameters Added originalRequestId to be saved on resume request Added originalRequestId to orchestrationRequests response Change-Id: If2b86d233ee3db9bbe0e1185d92874bca2b3a07a Issue-ID: SO-1960 Signed-off-by: Benjamin, Max (mb388a) --- .../org/onap/so/db/request/beans/InfraActiveRequests.java | 3 ++- .../java/org/onap/so/db/request/beans/InfraRequests.java | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'mso-api-handlers/mso-requests-db/src/main/java/org/onap') 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 37fbfd023c..9aa04ea8b2 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 @@ -87,6 +87,7 @@ public class InfraActiveRequests extends InfraRequests { .append("networkName", getNetworkName()).append("networkType", getNetworkType()) .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) - .append("operationalEnvName", getOperationalEnvName()).append("requestUrl", getRequestUrl()).toString(); + .append("operationalEnvName", getOperationalEnvName()).append("requestUrl", getRequestUrl()) + .append("originalRequestId", getOriginalRequestId()).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 7c58c6171e..1a925f2531 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 @@ -152,6 +152,8 @@ public abstract class InfraRequests implements java.io.Serializable { private String instanceGroupName; @Column(name = "REQUEST_URL", length = 500) private String requestUrl; + @Column(name = "ORIGINAL_REQUEST_ID", length = 45) + private String originalRequestId; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "SO_REQUEST_ID", referencedColumnName = "REQUEST_ID") @@ -569,6 +571,14 @@ public abstract class InfraRequests implements java.io.Serializable { this.requestUrl = requestUrl; } + public String getOriginalRequestId() { + return this.originalRequestId; + } + + public void setOriginalRequestId(String originalRequestId) { + this.originalRequestId = originalRequestId; + } + @PrePersist protected void onCreate() { if (requestScope == null) @@ -630,6 +640,7 @@ public abstract class InfraRequests implements java.io.Serializable { .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId()) .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId()) .append("operationalEnvName", getOperationalEnvName()).append("instanceGroupId", getInstanceGroupId()) - .append("instanceGroupName", getInstanceGroupName()).append("requestUrl", getRequestUrl()).toString(); + .append("instanceGroupName", getInstanceGroupName()).append("requestUrl", getRequestUrl()) + .append("originalRequestId", originalRequestId).toString(); } } -- cgit 1.2.3-korg