From 6cf060d13e4a06894db3050ed23e4e7667fb021f Mon Sep 17 00:00:00 2001 From: vidhyasree Date: Wed, 21 Feb 2018 11:19:33 -0500 Subject: Task to add ConfigScaleOut to LCM API, Yang Model. A new action ConfigScaleOut is added to LCM API and Yang model. Removed old action item configscaleout supporting VM action level which is no longer needed. Issue-ID: APPC-479 Change-Id: Ie5452f4d5625fc3be6b66c0f403d12baa64fa096 Signed-off-by: vidhyasree --- .../onap/appc/provider/AppcProviderLcmTest.java | 37 +--------------------- 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'appc-provider/appc-provider-bundle/src/test/java') diff --git a/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java b/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java index 064f5679f..1d0594837 100644 --- a/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java +++ b/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= @@ -53,8 +53,6 @@ import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigModifyInpu import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigModifyOutput; import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigRestoreInput; import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigRestoreOutput; -import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigScaleoutInput; -import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigScaleoutOutput; import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigureInput; import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigureOutput; import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.DetachVolumeInput; @@ -595,39 +593,6 @@ public class AppcProviderLcmTest extends AbstractDataBrokerTest { verify(appcProviderLcm, times(1)).executeRequest(any()); } - @Test - public void testConfigScaleout() throws Exception { - // Validation success - doReturn("Success").when(successlcmStatus).getMessage(); - doReturn(responseContext).when(requestHandlerOutput).getResponseContext(); - doReturn(requestHandlerOutput).when(appcProviderLcm).executeRequest(any()); - doReturn(null).when(validationService).validateInput(any(), any(), any()); - - ConfigScaleoutInput configScaleoutInput = mock(ConfigScaleoutInput.class); - doReturn(newCommonHeader("request-id-test")).when(configScaleoutInput).getCommonHeader(); - doReturn(newActionIdentifier("vnf-id", "vnfc-id", "vserver-id")) - .when(configScaleoutInput).getActionIdentifiers(); - - Future> results = appcProviderLcm.configScaleout(configScaleoutInput); - Assert.assertTrue(400 == results.get().getResult().getStatus().getCode()); - Assert.assertEquals("Success", results.get().getResult().getStatus().getMessage()); - verify(appcProviderLcm, times(1)).executeRequest(any()); - - // Validation failed - doReturn(failStatus).when(validationService).validateInput(any(), any(), any()); - results = appcProviderLcm.configScaleout(configScaleoutInput); - Assert.assertEquals(failStatus, results.get().getResult().getStatus()); - verify(appcProviderLcm, times(1)).executeRequest(any()); - - // parse exception - doReturn(null).when(validationService).validateInput(any(), any(), any()); - doReturn(null).when(configScaleoutInput).getActionIdentifiers(); - results = appcProviderLcm.configScaleout(configScaleoutInput); - Assert.assertTrue(LCMCommandStatus.REQUEST_PARSING_FAILED.getResponseCode() - == results.get().getResult().getStatus().getCode()); - verify(appcProviderLcm, times(1)).executeRequest(any()); - } - @Test public void testConfigRestore() throws Exception { // Validation success -- cgit 1.2.3-korg