From 088deea64dd65f9de66a38df32e459518983ccbf Mon Sep 17 00:00:00 2001 From: "Kuleshov, Elena" Date: Fri, 21 Feb 2020 10:24:39 -0500 Subject: mso to add tenant name and product family name to Add productFamilyName and tenantName to requests DB and request status results. Add more JUnits, fix JUnit schema files. Robot test adjustments to create service object in AAI when needed. Update robot tests to verify presence of productFamilyName and tenantName in return data. Add missing return of retrieved productFamilyName in robot test Add checking of tenantName on return to another robot test. Update archiving of infra requests for tenantName and productFamilyName. Issue-ID: SO-2674 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I2950b7783ee863dc59360c6124f38bee89cb2140 --- .../so/db/request/beans/InfraActiveRequests.java | 3 ++- .../onap/so/db/request/beans/InfraRequests.java | 23 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'mso-api-handlers/mso-requests-db') 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 9b246460b8..750fa13c77 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 @@ -89,6 +89,7 @@ public class InfraActiveRequests extends InfraRequests { .append("operationalEnvName", getOperationalEnvName()).append("requestUrl", getRequestUrl()) .append("originalRequestId", getOriginalRequestId()) .append("extSystemErrorSource", getExtSystemErrorSource()) - .append("rollbackExtSystemErrorSource", getRollbackExtSystemErrorSource()).toString(); + .append("rollbackExtSystemErrorSource", getRollbackExtSystemErrorSource()) + .append("tenantName", getTenantName()).append("productFamilyName", getProductFamilyName()).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 6d6b5a825e..66768ea349 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 @@ -149,6 +149,10 @@ public abstract class InfraRequests implements java.io.Serializable { private String extSystemErrorSource; @Column(name = "ROLLBACK_EXT_SYSTEM_ERROR_SOURCE", length = 80) private String rollbackExtSystemErrorSource; + @Column(name = "TENANT_NAME", length = 80) + private String tenantName; + @Column(name = "PRODUCT_FAMILY_NAME", length = 80) + private String productFamilyName; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "SO_REQUEST_ID", referencedColumnName = "REQUEST_ID", updatable = false) @@ -550,6 +554,22 @@ public abstract class InfraRequests implements java.io.Serializable { this.rollbackExtSystemErrorSource = rollbackExtSystemErrorSource; } + public String getTenantName() { + return tenantName; + } + + public void setTenantName(String tenantName) { + this.tenantName = tenantName; + } + + public String getProductFamilyName() { + return productFamilyName; + } + + public void setProductFamilyName(String productFamilyName) { + this.productFamilyName = productFamilyName; + } + @PrePersist protected void onCreate() { if (requestScope == null) @@ -609,6 +629,7 @@ public abstract class InfraRequests implements java.io.Serializable { .append("operationalEnvName", getOperationalEnvName()).append("instanceGroupId", getInstanceGroupId()) .append("instanceGroupName", getInstanceGroupName()).append("requestUrl", getRequestUrl()) .append("originalRequestId", originalRequestId).append("extSystemErrorSource", extSystemErrorSource) - .append("rollbackExtSystemErrorSource", rollbackExtSystemErrorSource).toString(); + .append("rollbackExtSystemErrorSource", rollbackExtSystemErrorSource).append("tenantName", tenantName) + .append("productFamilyName", productFamilyName).toString(); } } -- cgit 1.2.3-korg