diff options
author | Rachitha Ramappa <rachitha.ramappa@att.com> | 2020-09-23 12:42:19 +0530 |
---|---|---|
committer | Ikram Ikramullah <ikram@research.att.com> | 2020-10-08 10:53:16 +0000 |
commit | 226ef715d7afe3758fbc88c05cf4d752c6bed51b (patch) | |
tree | 26915a243c02d977cd906937330234860cbed6dd /vid-automation/src/test | |
parent | 30eb0655f49fd3565d737b91146baf9ce4e02f9d (diff) |
New audit info screen changes7.0.0
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
Diffstat (limited to 'vid-automation/src/test')
3 files changed, 63 insertions, 11 deletions
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<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte(UUID.randomUUID().toString(), "aa1234d1-5a33-55df-13ab-12abad84e333", "bc305d54-75b4-431b-adb2-eb6b9e546014"); + List<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte(UUID.randomUUID().toString(), "aa1234d1-5a33-55df-13ab-12abad84e333", "937d9e51-03b9-416b-bccd-aa898a85d711"); List<JobAuditStatus> 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<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "serviceInstanceName"); String uuid = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS).get(0); - List<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte( uuid, "405652f4-ceb3-4a75-9474-8aea71480a77", null); - List<JobAuditStatus> expectedMsoAudits = ImmutableList.of( - new JobAuditStatus("serviceInstanceName", "FAILED", UUID.fromString("405652f4-ceb3-4a75-9474-8aea71480a77"),"Service Instance was failed.",false, "service")); + List<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte( uuid, "7ba7900c-3e51-4d87-b1b4-3c53bdfaaa7d", null); + List<JobAuditStatus> 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", + "<b>Source:</b> VID</br><b>StatusMessage:</b>STATUS: ALaCarte-Service-createInstance request was executed correctly.</br><b>FlowStatus:</b> Successfully completed all Building Blocks</br><b>SubscriptionServiceType:</b> FIRSTNET</br><b>Alacarte:</b> true</br><b>TestAPI:</b> GR_API</br><b>ProjectName: FIRSTNET</br><b>OwningEntityId:</b> 10c645f5-9924-4b89-bec0-b17cf49d3cad</br><b>OwningEntityName:</b> MOBILITY-CORE</br>" + )); 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<JobAuditStatus> 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") , "<b>Source:</b> VID</br><b>StatusMessage:</b>"+INSTANCE_GROUP_LABEL+" instance creation</br>", null, "createInstance"), + new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , "<b>Source:</b> VID</br><b>StatusMessage:</b>"+INSTANCE_GROUP_LABEL+" instance creation</br>", null, "createInstance"), + new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , "<b>Source:</b> VID</br><b>StatusMessage:</b>"+INSTANCE_GROUP_LABEL+" instance deletion</br>", null, "deleteInstance"), + new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , "<b>Source:</b> VID</br><b>StatusMessage:</b>"+INSTANCE_GROUP_LABEL+" instance deletion</br>", 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": "<b>Source:</b> VID</br><b>StatusMessage:</b>STATUS: ALaCarte-Service-createInstance request was executed correctly.</br><b>FlowStatus:</b> Successfully completed all Building Blocks</br><b>SubscriptionServiceType:</b> FIRSTNET</br><b>Alacarte:</b> true</br><b>TestAPI:</b> GR_API</br><b>ProjectName: FIRSTNET</br><b>OwningEntityId:</b> 10c645f5-9924-4b89-bec0-b17cf49d3cad</br><b>OwningEntityName:</b> MOBILITY-CORE</br>" + }, + { + "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": "<b>Source:</b> VID</br><b>StatusMessage:</b>STATUS: ALaCarte-Vnf-createInstance request was executed correctly.</br><b>FlowStatus:</b> Successfully completed all Building Blocks</br><b>TestAPI:</b> GR_API</br><b>TenantId:</b> ad299b37da30413391e9c28138f0b0cd</br><b>TenantName:</b> FNCORE-30052-D-MC-RDM54c</br><b>CloudOwner:</b> att-nc</br><b>PlatformName:</b> FIRSTNET-DEDICATED,NETWORK-CLOUD</br><b>LineOfBusiness:</b> FIRSTNET</br>" + }, + { + "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": "<b>Source:</b> VID</br><b>StatusMessage:</b>STATUS: ALaCarte-VfModule-createInstance request was executed correctly.</br><b>FlowStatus:</b> Successfully completed all Building Blocks</br><b>TestAPI:</b> GR_API</br><b>TenantId:</b> ad299b37da30413391e9c28138f0b0cd</br><b>TenantName:</b> FNCORE-30052-D-MC-RDM54c</br><b>CloudOwner:</b> att-nc</br>" + }, + { + "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": "<b>Source:</b> VID</br><b>StatusMessage:</b>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'</br><b>FlowStatus:</b> All Rollback flows have completed successfully</br><b>TestAPI:</b> GR_API</br><b>TenantId:</b> ad299b37da30413391e9c28138f0b0cd</br><b>TenantName:</b> FNCORE-30052-D-MC-RDM54c</br><b>CloudOwner:</b> att-nc</br>" + } +] |