From 226ef715d7afe3758fbc88c05cf4d752c6bed51b Mon Sep 17 00:00:00 2001 From: Rachitha Ramappa Date: Wed, 23 Sep 2020 12:42:19 +0530 Subject: New audit info screen changes Audit screen css changes and export mso status to external file Change-Id: I71d577121e18090eab7a388ed01707823e45ac82 Issue-ID: VID-901 Signed-off-by: rachitha.ramappa@att.com --- .../api/AsyncInstantiationALaCarteApiTest2.java | 24 +++++++++---- .../vid/api/AsyncInstantiationMacroApiTest.java | 8 ++--- .../a-la-carte/auditInfoMSOALaCarteNew.json | 42 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 11 deletions(-) create mode 100644 vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarteNew.json (limited to 'vid-automation/src/test') diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java index b38d3da91..802b3426b 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java +++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java @@ -21,6 +21,9 @@ import vid.automation.test.model.ServiceAction; import vid.automation.test.services.AsyncJobsService; import vid.automation.test.services.SimulatorApi; import vid.automation.test.services.SimulatorApi.RegistrationStrategy; +import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGetByRequestIdNew; +import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGetByServiceInstanceIdExtraInfo; + import java.io.IOException; import java.util.List; @@ -124,11 +127,11 @@ public class AsyncInstantiationALaCarteApiTest2 extends AsyncInstantiationBase { @Test public void getAuditInfoForALaCarteByServiceInstanceId() throws IOException { - final String expectedMsoAuditInfo = "a-la-carte/auditInfoMSOALaCarte.json"; + final String expectedMsoAuditInfo = "a-la-carte/auditInfoMSOALaCarteNew.json"; registerExpectationFromPreset( - new PresetMSOOrchestrationRequestsGetByServiceInstanceId(), + new PresetMSOOrchestrationRequestsGetByServiceInstanceIdExtraInfo(), RegistrationStrategy.CLEAR_THEN_SET); - List actualMsoAudits = getJobMsoAuditStatusForAlaCarte(UUID.randomUUID().toString(), "aa1234d1-5a33-55df-13ab-12abad84e333", "bc305d54-75b4-431b-adb2-eb6b9e546014"); + List actualMsoAudits = getJobMsoAuditStatusForAlaCarte(UUID.randomUUID().toString(), "aa1234d1-5a33-55df-13ab-12abad84e333", "937d9e51-03b9-416b-bccd-aa898a85d711"); List expectedMsoAudits = getExpectedAuditFromFile(expectedMsoAuditInfo); assertThat(actualMsoAudits, is(expectedMsoAudits)); @@ -137,13 +140,20 @@ public class AsyncInstantiationALaCarteApiTest2 extends AsyncInstantiationBase { @Test public void getAuditInfoForALaCarteByRequestId() { registerExpectationFromPreset( - new PresetMSOOrchestrationRequestsGetByRequestId(), + new PresetMSOOrchestrationRequestsGetByRequestIdNew(), RegistrationStrategy.CLEAR_THEN_SET); final ImmutableMap names = ImmutableMap.of(SERVICE_NAME, "serviceInstanceName"); String uuid = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS).get(0); - List actualMsoAudits = getJobMsoAuditStatusForAlaCarte( uuid, "405652f4-ceb3-4a75-9474-8aea71480a77", null); - List expectedMsoAudits = ImmutableList.of( - new JobAuditStatus("serviceInstanceName", "FAILED", UUID.fromString("405652f4-ceb3-4a75-9474-8aea71480a77"),"Service Instance was failed.",false, "service")); + List actualMsoAudits = getJobMsoAuditStatusForAlaCarte( uuid, "7ba7900c-3e51-4d87-b1b4-3c53bdfaaa7d", null); + List expectedMsoAudits = ImmutableList.of(new JobAuditStatus(UUID.fromString("7ba7900c-3e51-4d87-b1b4-3c53bdfaaa7d"), + "zrdm54cfmgw01_svc", + "service", + "createInstance", + "Mon, 24 Aug 2020 22:37:53 GMT", + "Mon, 24 Aug 2020 22:38:10 GMT", + "COMPLETE", + "Source: VID
StatusMessage:STATUS: ALaCarte-Service-createInstance request was executed correctly.
FlowStatus: Successfully completed all Building Blocks
SubscriptionServiceType: FIRSTNET
Alacarte: true
TestAPI: GR_API
ProjectName: FIRSTNET
OwningEntityId: 10c645f5-9924-4b89-bec0-b17cf49d3cad
OwningEntityName: MOBILITY-CORE
" + )); assertThat(actualMsoAudits, is(expectedMsoAudits)); } diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationMacroApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationMacroApiTest.java index 00aa69120..a8c186a1d 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationMacroApiTest.java +++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationMacroApiTest.java @@ -344,10 +344,10 @@ public class AsyncInstantiationMacroApiTest extends AsyncInstantiationBase { SimulatorApi.registerExpectationFromPreset(new PresetMSOOrchestrationRequestsManyInstanceStatusesGet(INSTANCE_GROUP_ID_LABEL, INSTANCE_GROUP_LABEL), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET); final List expectedAuditStatusList = getAuditStatusesForInstance("VNFGROUP", "df305d54-75b4-431b-adb2-eb6b9e5460df"); verifyInstanceAuditStatuses(Arrays.asList( - new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , INSTANCE_GROUP_LABEL+" instance creation", null, INSTANCE_GROUP_LABEL), - new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , INSTANCE_GROUP_LABEL+" instance creation", null, INSTANCE_GROUP_LABEL), - new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , INSTANCE_GROUP_LABEL+" instance deletion", null, INSTANCE_GROUP_LABEL), - new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , INSTANCE_GROUP_LABEL+" instance deletion", null, INSTANCE_GROUP_LABEL)), + new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , "Source: VID
StatusMessage:"+INSTANCE_GROUP_LABEL+" instance creation
", null, "createInstance"), + new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , "Source: VID
StatusMessage:"+INSTANCE_GROUP_LABEL+" instance creation
", null, "createInstance"), + new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , "Source: VID
StatusMessage:"+INSTANCE_GROUP_LABEL+" instance deletion
", null, "deleteInstance"), + new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , "Source: VID
StatusMessage:"+INSTANCE_GROUP_LABEL+" instance deletion
", null, "deleteInstance")), expectedAuditStatusList); } diff --git a/vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarteNew.json b/vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarteNew.json new file mode 100644 index 000000000..0f13a4db3 --- /dev/null +++ b/vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarteNew.json @@ -0,0 +1,42 @@ +[ + { + "requestId": "7ba7900c-3e51-4d87-b1b4-3c53bdfaaa7d", + "instanceName" : "zrdm54cfmgw01_svc", + "modelType": "service", + "instanceType": "createInstance", + "startTime": "Mon, 24 Aug 2020 22:37:53 GMT", + "finishTime": "Mon, 24 Aug 2020 22:38:10 GMT", + "jobStatus": "COMPLETE", + "additionalInfo": "Source: VID
StatusMessage:STATUS: ALaCarte-Service-createInstance request was executed correctly.
FlowStatus: Successfully completed all Building Blocks
SubscriptionServiceType: FIRSTNET
Alacarte: true
TestAPI: GR_API
ProjectName: FIRSTNET
OwningEntityId: 10c645f5-9924-4b89-bec0-b17cf49d3cad
OwningEntityName: MOBILITY-CORE
" + }, + { + "requestId": "f1aa7175-c237-4b56-ba64-7cb728a38ff2", + "instanceName" : "zrdm54cfmgw01", + "modelType": "vnf", + "instanceType": "createInstance", + "startTime": "Mon, 24 Aug 2020 22:38:18 GMT", + "finishTime": "Mon, 24 Aug 2020 22:44:24 GMT", + "jobStatus": "COMPLETE", + "additionalInfo": "Source: VID
StatusMessage:STATUS: ALaCarte-Vnf-createInstance request was executed correctly.
FlowStatus: Successfully completed all Building Blocks
TestAPI: GR_API
TenantId: ad299b37da30413391e9c28138f0b0cd
TenantName: FNCORE-30052-D-MC-RDM54c
CloudOwner: att-nc
PlatformName: FIRSTNET-DEDICATED,NETWORK-CLOUD
LineOfBusiness: FIRSTNET
" + }, + { + "requestId": "a4e43d9e-4813-42e4-94bf-c5c6f22ed0bc", + "instanceName" : "zrdm54cfmgw01_base", + "modelType": "vfModule", + "instanceType": "createInstance", + "startTime": "Mon, 24 Aug 2020 22:44:42 GMT", + "finishTime": "Mon, 24 Aug 2020 22:54:17 GMT", + "jobStatus": "COMPLETE", + "additionalInfo": "Source: VID
StatusMessage:STATUS: ALaCarte-VfModule-createInstance request was executed correctly.
FlowStatus: Successfully completed all Building Blocks
TestAPI: GR_API
TenantId: ad299b37da30413391e9c28138f0b0cd
TenantName: FNCORE-30052-D-MC-RDM54c
CloudOwner: att-nc
" + }, + { + "requestId": "1fc2ef3b-26f0-4e62-a00a-6a31502d39e2", + "instanceName" : "zrdm54cfmgw01_sup_1", + "modelType": "vfModule", + "instanceType": "createInstance", + "startTime": "Mon, 24 Aug 2020 22:54:29 GMT", + "finishTime": "Mon, 24 Aug 2020 22:56:35 GMT", + "jobStatus": "ROLLED_BACK_TO_ASSIGNED", + "additionalInfo": "Source: VID
StatusMessage:STATUS: Error Source: OPENSTACK, Error Message: Received vfModuleException from VnfAdapter: category='INTERNAL' message='Exception during create VF 400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect., error.type=UserParameterMissing, error.message=The Parameter (VSFO_CP0_compute_node) was not provided.' rolledBack='true'
FlowStatus: All Rollback flows have completed successfully
TestAPI: GR_API
TenantId: ad299b37da30413391e9c28138f0b0cd
TenantName: FNCORE-30052-D-MC-RDM54c
CloudOwner: att-nc
" + } +] -- cgit 1.2.3-korg