From 0e4e58bf061df695341ac250beb97a978cefdaf7 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Fri, 29 Jan 2021 17:42:42 +0000 Subject: Revert "migrate sli to alu-SR1" This reverts commit ce4e5f9a00d2677495240ad367b9bfc4b74752d0. Reason for revert: ODL upgrade changes need to be backed out until issues in ccsdk/features are resolved. Change-Id: I168e2519e37f3eee61609d0da890c14db49ec49e --- .../org/onap/ccsdk/sli/northbound/LcmProvider.java | 34 ++++--- .../onap/ccsdk/sli/northbound/LcmSliClient.java | 3 +- .../resources/OSGI-INF/blueprint/lcm-blueprint.xml | 34 +++++++ .../org/opendaylight/blueprint/lcm-blueprint.xml | 9 +- .../onap/ccsdk/sli/northbound/TestLcmProvider.java | 111 +++++++++++---------- 5 files changed, 120 insertions(+), 71 deletions(-) create mode 100644 northbound/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml (limited to 'northbound/lcm/provider/src') diff --git a/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java b/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java index 4dd46d597..100496e39 100644 --- a/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java +++ b/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java @@ -21,26 +21,32 @@ package org.onap.ccsdk.sli.northbound; * ============LICENSE_END========================================================= */ -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.Future; import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; -import org.opendaylight.mdsal.binding.api.NotificationPublishService; -import org.opendaylight.mdsal.binding.api.RpcProviderService; -import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker; +import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.*; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.common.header.CommonHeaderBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.status.StatusBuilder; -import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; + +import org.onap.ccsdk.sli.northbound.LcmResponseCode.*; + /** * Defines a base implementation for your provider. This class extends from a * helper class which provides storage for the most commonly used components of @@ -87,19 +93,23 @@ public class LcmProvider implements AutoCloseable, LCMService { private static final String APPLICATION_NAME = "LCM"; private final ExecutorService executor; + protected DataBroker dataBroker; protected DOMDataBroker domDataBroker; protected NotificationPublishService notificationService; - protected RpcProviderService rpcRegistry; + protected RpcProviderRegistry rpcRegistry; private final LcmSliClient lcmSliClient; - protected ObjectRegistration rpcRegistration; + protected BindingAwareBroker.RpcRegistration rpcRegistration; - public LcmProvider(final DOMDataBroker dataBroker, final NotificationPublishService notificationPublishService, - final RpcProviderService rpcProviderRegistry, final LcmSliClient lcmSliClient) { + public LcmProvider(final DataBroker dataBroker, final NotificationPublishService notificationPublishService, + final RpcProviderRegistry rpcProviderRegistry, final LcmSliClient lcmSliClient) { LOG.info("Creating provider for {}", APPLICATION_NAME); executor = Executors.newFixedThreadPool(1); - domDataBroker = dataBroker; + this.dataBroker = dataBroker; + if (dataBroker instanceof AbstractForwardedDataBroker) { + domDataBroker = ((AbstractForwardedDataBroker) dataBroker).getDelegate(); + } notificationService = notificationPublishService; rpcRegistry = rpcProviderRegistry; this.lcmSliClient = lcmSliClient; @@ -111,7 +121,7 @@ public class LcmProvider implements AutoCloseable, LCMService { if (rpcRegistration == null) { if (rpcRegistry != null) { - rpcRegistration = rpcRegistry.registerRpcImplementation(LCMService.class, this); + rpcRegistration = rpcRegistry.addRpcImplementation(LCMService.class, this); LOG.info("Initialization complete for {}", APPLICATION_NAME); } else { LOG.warn("Error initializing {} : rpcRegistry unset", APPLICATION_NAME); diff --git a/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java b/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java index 05bb43f82..54e53c776 100644 --- a/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java +++ b/northbound/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java @@ -24,9 +24,10 @@ package org.onap.ccsdk.sli.northbound; import java.util.Properties; + import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/northbound/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml b/northbound/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml new file mode 100644 index 000000000..5597d0801 --- /dev/null +++ b/northbound/lcm/provider/src/main/resources/OSGI-INF/blueprint/lcm-blueprint.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/northbound/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml b/northbound/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml index 7550c8b93..5597d0801 100644 --- a/northbound/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml +++ b/northbound/lcm/provider/src/main/resources/org/opendaylight/blueprint/lcm-blueprint.xml @@ -11,13 +11,16 @@ + interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" + odl:type="default" /> + interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" + odl:type="default" /> + interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry" + odl:type="default" /> diff --git a/northbound/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java b/northbound/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java index 85325cb56..b73151e8d 100644 --- a/northbound/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java +++ b/northbound/lcm/provider/src/test/java/org/onap/ccsdk/sli/northbound/TestLcmProvider.java @@ -2,9 +2,10 @@ package org.onap.ccsdk.sli.northbound; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; -import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; + import java.io.InputStream; import java.net.URL; import java.text.SimpleDateFormat; @@ -20,14 +21,13 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicStoreFactory; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicClassResolver; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicPropertiesProviderImpl; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicServiceImpl; -import org.opendaylight.mdsal.binding.api.NotificationPublishService; -import org.opendaylight.mdsal.binding.api.RpcProviderService; -import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.Action; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActionStatusInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActionStatusOutput; -import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActivateNESwInputBuilder; -import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActivateNESwOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.AttachVolumeInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.AttachVolumeOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.AuditInputBuilder; @@ -52,8 +52,6 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329. import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DetachVolumeOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DistributeTrafficInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DistributeTrafficOutput; -import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DownloadNESwInputBuilder; -import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DownloadNESwOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.EvacuateInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.EvacuateOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.HealthCheckInputBuilder; @@ -108,10 +106,13 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329. import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.UpgradePreCheckOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.UpgradeSoftwareInputBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.UpgradeSoftwareOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DownloadNESwInputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.DownloadNESwOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActivateNESwInputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ActivateNESwOutput; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.ZULU; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.action.identifiers.ActionIdentifiersBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.lcm.rev180329.common.header.CommonHeaderBuilder; -import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -125,11 +126,11 @@ public class TestLcmProvider { */ @Before public void setUp() throws Exception { - DOMDataBroker dataBroker = mock(DOMDataBroker.class); + DataBroker dataBroker = mock(DataBroker.class); NotificationPublishService notifyService = mock(NotificationPublishService.class); - RpcProviderService rpcRegistry = mock(RpcProviderService.class); - ObjectRegistration rpcRegistration = mock(ObjectRegistration.class); - when(rpcRegistry.registerRpcImplementation(any(Class.class), any(LCMService.class))).thenReturn(rpcRegistration); + RpcProviderRegistry rpcRegistry = mock(RpcProviderRegistry.class); + BindingAwareBroker.RpcRegistration rpcRegistration = (BindingAwareBroker.RpcRegistration) mock(BindingAwareBroker.RpcRegistration.class); + when(rpcRegistry.addRpcImplementation(any(Class.class), any(LCMService.class))).thenReturn(rpcRegistration); // Load svclogic.properties and get a SvcLogicStore @@ -193,7 +194,7 @@ public class TestLcmProvider { try { CheckLockOutput results = provider.checkLock(builder.build()).get().getResult(); LOG.info("CheckLock returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("CheckLock threw exception"); @@ -228,7 +229,7 @@ public class TestLcmProvider { try { RebootOutput results = provider.reboot(builder.build()).get().getResult(); LOG.info("Reboot returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Reboot threw exception"); @@ -263,7 +264,7 @@ public class TestLcmProvider { try { UpgradeBackupOutput results = provider.upgradeBackup(builder.build()).get().getResult(); LOG.info("UpgradeBackout returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("CheckLock threw exception"); @@ -297,7 +298,7 @@ public class TestLcmProvider { try { RollbackOutput results = provider.rollback(builder.build()).get().getResult(); LOG.info("Rollback returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Rollback threw exception"); @@ -331,7 +332,7 @@ public class TestLcmProvider { try { SyncOutput results = provider.sync(builder.build()).get().getResult(); LOG.info("Sync returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Sync threw exception"); @@ -364,7 +365,7 @@ public class TestLcmProvider { try { QueryOutput results = provider.query(builder.build()).get().getResult(); LOG.info("Query returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Query threw exception"); @@ -398,7 +399,7 @@ public class TestLcmProvider { try { ConfigExportOutput results = provider.configExport(builder.build()).get().getResult(); LOG.info("ConfigExport returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigExport threw exception"); @@ -433,7 +434,7 @@ public class TestLcmProvider { try { StopApplicationOutput results = provider.stopApplication(builder.build()).get().getResult(); LOG.info("StopApplication returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("StopApplication threw exception"); @@ -467,7 +468,7 @@ public class TestLcmProvider { try { SoftwareUploadOutput results = provider.softwareUpload(builder.build()).get().getResult(); LOG.info("SoftwareUpload returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("SoftwareUpload threw exception"); @@ -501,7 +502,7 @@ public class TestLcmProvider { try { ResumeTrafficOutput results = provider.resumeTraffic(builder.build()).get().getResult(); LOG.info("ResumeTraffic returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ResumeTraffic threw exception"); @@ -535,7 +536,7 @@ public class TestLcmProvider { try { DistributeTrafficOutput results = provider.distributeTraffic(builder.build()).get().getResult(); LOG.info("DistributeTraffic returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("DistributeTraffic threw exception"); @@ -569,7 +570,7 @@ public class TestLcmProvider { try { ConfigureOutput results = provider.configure(builder.build()).get().getResult(); LOG.info("Configure returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Configure threw exception"); @@ -603,7 +604,7 @@ public class TestLcmProvider { try { ActionStatusOutput results = provider.actionStatus(builder.build()).get().getResult(); LOG.info("ActionStatus returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ActionStatus threw exception"); @@ -637,7 +638,7 @@ public class TestLcmProvider { try { UpgradePreCheckOutput results = provider.upgradePreCheck(builder.build()).get().getResult(); LOG.info("UpgradePreCheck returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("UpgradePreCheck threw exception"); @@ -671,7 +672,7 @@ public class TestLcmProvider { try { LiveUpgradeOutput results = provider.liveUpgrade(builder.build()).get().getResult(); LOG.info("LiveUpgrade returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("LiveUpgrade threw exception"); @@ -705,7 +706,7 @@ public class TestLcmProvider { try { ConfigModifyOutput results = provider.configModify(builder.build()).get().getResult(); LOG.info("ConfigModify returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigModify threw exception"); @@ -739,7 +740,7 @@ public class TestLcmProvider { try { RestartOutput results = provider.restart(builder.build()).get().getResult(); LOG.info("Restart returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Restart threw exception"); @@ -773,7 +774,7 @@ public class TestLcmProvider { try { HealthCheckOutput results = provider.healthCheck(builder.build()).get().getResult(); LOG.info("HealthCheck returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("HealthCheck threw exception"); @@ -807,7 +808,7 @@ public class TestLcmProvider { try { LockOutput results = provider.lock(builder.build()).get().getResult(); LOG.info("Lock returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Lock threw exception"); @@ -841,7 +842,7 @@ public class TestLcmProvider { try { TerminateOutput results = provider.terminate(builder.build()).get().getResult(); LOG.info("Terminate returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Terminate threw exception"); @@ -875,7 +876,7 @@ public class TestLcmProvider { try { AttachVolumeOutput results = provider.attachVolume(builder.build()).get().getResult(); LOG.info("AttachVolume returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("AttachVolume threw exception"); @@ -909,7 +910,7 @@ public class TestLcmProvider { try { MigrateOutput results = provider.migrate(builder.build()).get().getResult(); LOG.info("Migrate returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Migrate threw exception"); @@ -943,7 +944,7 @@ public class TestLcmProvider { try { QuiesceTrafficOutput results = provider.quiesceTraffic(builder.build()).get().getResult(); LOG.info("QuiesceTraffic returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("QuiesceTraffic threw exception"); @@ -977,7 +978,7 @@ public class TestLcmProvider { try { ConfigRestoreOutput results = provider.configRestore(builder.build()).get().getResult(); LOG.info("ConfigRestore returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigRestore threw exception"); @@ -1011,7 +1012,7 @@ public class TestLcmProvider { try { UpgradeBackoutOutput results = provider.upgradeBackout(builder.build()).get().getResult(); LOG.info("UpgradeBackout returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("UpgradeBackout threw exception"); @@ -1045,7 +1046,7 @@ public class TestLcmProvider { try { EvacuateOutput results = provider.evacuate(builder.build()).get().getResult(); LOG.info("Evacuate returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Evacuate threw exception"); @@ -1079,7 +1080,7 @@ public class TestLcmProvider { try { UnlockOutput results = provider.unlock(builder.build()).get().getResult(); LOG.info("Unlock returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Unlock threw exception"); @@ -1112,7 +1113,7 @@ public class TestLcmProvider { try { ConfigBackupDeleteOutput results = provider.configBackupDelete(builder.build()).get().getResult(); LOG.info("ConfigBackupDelete returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigBackupDelete threw exception"); @@ -1146,7 +1147,7 @@ public class TestLcmProvider { try { UpgradeSoftwareOutput results = provider.upgradeSoftware(builder.build()).get().getResult(); LOG.info("UpgradeSoftware returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("UpgradeSoftware threw exception"); @@ -1181,7 +1182,7 @@ public class TestLcmProvider { try { DownloadNESwOutput results = provider.downloadNESw(builder.build()).get().getResult(); LOG.info("DownloadNESw returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("DownloadNESw threw exception"); @@ -1216,7 +1217,7 @@ public class TestLcmProvider { try { ActivateNESwOutput results = provider.activateNESw(builder.build()).get().getResult(); LOG.info("ActivateNESw returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ActivateNESw threw exception"); @@ -1250,7 +1251,7 @@ public class TestLcmProvider { try { StopOutput results = provider.stop(builder.build()).get().getResult(); LOG.info("Stop returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Stop threw exception"); @@ -1284,7 +1285,7 @@ public class TestLcmProvider { try { DetachVolumeOutput results = provider.detachVolume(builder.build()).get().getResult(); LOG.info("DetachVolume returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("DetachVolume threw exception"); @@ -1318,7 +1319,7 @@ public class TestLcmProvider { try { ConfigScaleOutOutput results = provider.configScaleOut(builder.build()).get().getResult(); LOG.info("ConfigScaleOut returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigScaleOut threw exception"); @@ -1352,7 +1353,7 @@ public class TestLcmProvider { try { UpgradePostCheckOutput results = provider.upgradePostCheck(builder.build()).get().getResult(); LOG.info("UpgradePostCheck returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("UpgradePostCheck threw exception"); @@ -1386,7 +1387,7 @@ public class TestLcmProvider { try { TestOutput results = provider.test(builder.build()).get().getResult(); LOG.info("Test returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Test threw exception"); @@ -1420,7 +1421,7 @@ public class TestLcmProvider { try { StartApplicationOutput results = provider.startApplication(builder.build()).get().getResult(); LOG.info("StartApplication returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("StartApplication threw exception"); @@ -1454,7 +1455,7 @@ public class TestLcmProvider { try { ConfigBackupOutput results = provider.configBackup(builder.build()).get().getResult(); LOG.info("ConfigBackup returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigBackup threw exception"); @@ -1488,7 +1489,7 @@ public class TestLcmProvider { try { ConfigBackupOutput results = provider.configBackup(builder.build()).get().getResult(); LOG.info("ConfigBackup returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("ConfigBackup threw exception"); @@ -1522,7 +1523,7 @@ public class TestLcmProvider { try { AuditOutput results = provider.audit(builder.build()).get().getResult(); LOG.info("Audit returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Audit threw exception"); @@ -1556,7 +1557,7 @@ public class TestLcmProvider { try { StartOutput results = provider.start(builder.build()).get().getResult(); LOG.info("Start returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Start threw exception"); @@ -1590,7 +1591,7 @@ public class TestLcmProvider { try { SnapshotOutput results = provider.snapshot(builder.build()).get().getResult(); LOG.info("Snapshot returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode().intValue() == 400); + assert(results.getStatus().getCode() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("Snapshot threw exception"); -- cgit 1.2.3-korg