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 --- .../onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java | 2 ++ .../V7.3__Add_Columns_Tenant_Name_Product_Family_Name.sql | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.3__Add_Columns_Tenant_Name_Product_Family_Name.sql (limited to 'adapters/mso-requests-db-adapter/src') diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index 3deabb3ce1..24dab2fc5b 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -145,6 +145,8 @@ public class ArchiveInfraRequestsScheduler { archivedInfra.setVnfType(iar.getVnfType()); archivedInfra.setVolumeGroupId(iar.getVolumeGroupId()); archivedInfra.setVolumeGroupName(iar.getVolumeGroupName()); + archivedInfra.setProductFamilyName(iar.getProductFamilyName()); + archivedInfra.setTenantName(iar.getTenantName()); newArchivedReqs.add(archivedInfra); oldInfraReqs.add(iar); diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.3__Add_Columns_Tenant_Name_Product_Family_Name.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.3__Add_Columns_Tenant_Name_Product_Family_Name.sql new file mode 100644 index 0000000000..a79b1a86c1 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.3__Add_Columns_Tenant_Name_Product_Family_Name.sql @@ -0,0 +1,7 @@ +use requestdb; + +ALTER TABLE infra_active_requests ADD COLUMN IF NOT EXISTS TENANT_NAME varchar(200); +ALTER TABLE archived_infra_requests ADD COLUMN IF NOT EXISTS TENANT_NAME varchar(200); + +ALTER TABLE infra_active_requests ADD COLUMN IF NOT EXISTS PRODUCT_FAMILY_NAME varchar(200); +ALTER TABLE archived_infra_requests ADD COLUMN IF NOT EXISTS PRODUCT_FAMILY_NAME varchar(200); \ No newline at end of file -- cgit 1.2.3-korg