diff options
Diffstat (limited to 'sdnr/northbound/ranSlice')
12 files changed, 142 insertions, 147 deletions
diff --git a/sdnr/northbound/ranSlice/feature/pom.xml b/sdnr/northbound/ranSlice/feature/pom.xml index 4ee6e4122..c390455f5 100644 --- a/sdnr/northbound/ranSlice/feature/pom.xml +++ b/sdnr/northbound/ranSlice/feature/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/sdnr/northbound/ranSlice/installer/pom.xml b/sdnr/northbound/ranSlice/installer/pom.xml index 1fe6d1071..d84c7c52b 100644 --- a/sdnr/northbound/ranSlice/installer/pom.xml +++ b/sdnr/northbound/ranSlice/installer/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/sdnr/northbound/ranSlice/model/pom.xml b/sdnr/northbound/ranSlice/model/pom.xml index 8de853138..924e4eee2 100644 --- a/sdnr/northbound/ranSlice/model/pom.xml +++ b/sdnr/northbound/ranSlice/model/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/sdnr/northbound/ranSlice/pom.xml b/sdnr/northbound/ranSlice/pom.xml index 15071417c..5c4435672 100644 --- a/sdnr/northbound/ranSlice/pom.xml +++ b/sdnr/northbound/ranSlice/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/sdnr/northbound/ranSlice/provider/pom.xml b/sdnr/northbound/ranSlice/provider/pom.xml index 03563b9cc..a4e068015 100644 --- a/sdnr/northbound/ranSlice/provider/pom.xml +++ b/sdnr/northbound/ranSlice/provider/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> @@ -39,14 +39,7 @@ <dependencyManagement> <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>1.6.1</version> - <type>pom</type> - <scope>import</scope> - </dependency> - <dependency> + <dependency> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-core-artifacts</artifactId> <version>${ccsdk.sli.core.version}</version> @@ -61,27 +54,13 @@ <artifactId>ranSlice-model</artifactId> <version>${project.version}</version> </dependency> - <!-- - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-binding-config</artifactId> - </dependency> - --> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-binding-api</artifactId> - </dependency> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-common-util</artifactId> - </dependency> <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-core-api</artifactId> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>mdsal-binding-api</artifactId> </dependency> <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>sal-binding-broker-impl</artifactId> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>mdsal-dom-api</artifactId> </dependency> <dependency> <groupId>org.opendaylight.yangtools</groupId> diff --git a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceClient.java b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceClient.java index f3d2a7da7..0b1d8c512 100644 --- a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceClient.java +++ b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceClient.java @@ -27,7 +27,7 @@ import java.util.Properties; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; +import org.opendaylight.mdsal.dom.api.DOMDataBroker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProvider.java b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProvider.java index a88595bfb..fbaab938c 100644 --- a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProvider.java +++ b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProvider.java @@ -27,17 +27,15 @@ 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.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.mdsal.binding.api.DataBroker; +import org.opendaylight.mdsal.binding.api.NotificationPublishService; +import org.opendaylight.mdsal.binding.api.RpcProviderService; +import org.opendaylight.mdsal.dom.api.DOMDataBroker; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.*; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.common.header.CommonHeaderBuilder; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.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; @@ -46,8 +44,6 @@ import org.slf4j.LoggerFactory; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import org.onap.ccsdk.features.sdnr.northbound.ranSlice.RANSliceResponseCode.*; - /** * Defines a base implementation for your provider. This class extends from a * helper class which provides storage for the most commonly used components of @@ -97,43 +93,56 @@ public class RANSliceProvider implements AutoCloseable, RanSliceApiService { protected DataBroker dataBroker; protected DOMDataBroker domDataBroker; protected NotificationPublishService notificationService; - protected RpcProviderRegistry rpcRegistry; - private final RANSliceClient RANSliceClient; + protected RpcProviderService rpcProviderRegistry; + private RANSliceClient RANSliceClient; - protected BindingAwareBroker.RpcRegistration<RanSliceApiService> rpcRegistration; + private ObjectRegistration<RanSliceApiService> rpcRegistration; - public RANSliceProvider(final DataBroker dataBroker, final NotificationPublishService notificationPublishService, - final RpcProviderRegistry rpcProviderRegistry, final RANSliceClient rANSliceClient) { + public RANSliceProvider() { LOG.info("Creating provider for {}", APPLICATION_NAME); executor = Executors.newFixedThreadPool(1); + this.dataBroker = null; + this.domDataBroker = null; + this.notificationService = null; + this.rpcProviderRegistry = null; + this.rpcRegistration = null; + this.RANSliceClient = null; + } + + public void setDataBroker(DataBroker dataBroker) { this.dataBroker = dataBroker; - if (dataBroker instanceof AbstractForwardedDataBroker) { - domDataBroker = ((AbstractForwardedDataBroker) dataBroker).getDelegate(); - } - notificationService = notificationPublishService; - rpcRegistry = rpcProviderRegistry; - this.RANSliceClient = rANSliceClient; - initialize(); } - public void initialize() { - LOG.info("Initializing {} for {}", this.getClass().getName(), APPLICATION_NAME); + public void setDomDataBroker(DOMDataBroker domDataBroker) { + this.domDataBroker = domDataBroker; + } + + public void setRpcProviderRegistry(RpcProviderService rpcProviderRegistry) { + this.rpcProviderRegistry = rpcProviderRegistry; + } + public void setNotificationPublishService(NotificationPublishService notificationPublishService) { + this.notificationService = notificationPublishService; + } + + public void setClient(RANSliceClient client) { + this.RANSliceClient = client; + } + + public void init() { + LOG.info("Initializing {} for {}", this.getClass().getName(), APPLICATION_NAME); + if (rpcRegistration == null) { - if (rpcRegistry != null) { - rpcRegistration = rpcRegistry.addRpcImplementation(RanSliceApiService.class, this); + if (rpcProviderRegistry != null) { + rpcRegistration = rpcProviderRegistry.registerRpcImplementation(RanSliceApiService.class, this); LOG.info("Initialization complete for {}", APPLICATION_NAME); } else { LOG.warn("Error initializing {} : rpcRegistry unset", APPLICATION_NAME); } } } - - protected void initializeChild() { - // Override if you have custom initialization intelligence - } - + @Override public void close() throws Exception { LOG.info("Closing provider for " + APPLICATION_NAME); diff --git a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceResponseCode.java b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceResponseCode.java index 814b27e64..77c09d172 100644 --- a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceResponseCode.java +++ b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceResponseCode.java @@ -1,3 +1,24 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2020 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.ccsdk.features.sdnr.northbound.ranSlice; public enum RANSliceResponseCode { diff --git a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceRpcInvocationException.java b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceRpcInvocationException.java index 18b66312d..3e6fcb4ce 100644 --- a/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceRpcInvocationException.java +++ b/sdnr/northbound/ranSlice/provider/src/main/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceRpcInvocationException.java @@ -1,3 +1,24 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2020 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + package org.onap.ccsdk.features.sdnr.northbound.ranSlice; import org.onap.ccsdk.sli.core.sli.SvcLogicException; diff --git a/sdnr/northbound/ranSlice/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml b/sdnr/northbound/ranSlice/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml deleted file mode 100644 index 57ebfbfcc..000000000 --- a/sdnr/northbound/ranSlice/provider/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ ============LICENSE_START======================================================= - ~ ONAP : ccsdk features - ~ ================================================================================ - ~ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. - ~ ================================================================================ - ~ Licensed under the Apache License, Version 2.0 (the "License"); - ~ you may not use this file except in compliance with the License. - ~ You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - ~ ============LICENSE_END======================================================= - ~ - --> - -<blueprint xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" - xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true"> - - <reference id="svcLogicService" - interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService"/> - - <bean id="client" class="org.onap.ccsdk.features.sdnr.northbound.ranSlice.RANSliceClient"> - <argument ref="svcLogicService"/> - </bean> - - <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" - odl:type="default"/> - - <reference id="notificationService" - interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" - odl:type="default"/> - - <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry" - odl:type="default"/> - - <bean id="provider" class="org.onap.ccsdk.features.sdnr.northbound.ranSlice.RANSliceProvider"> - <argument ref="dataBroker"/> - <argument ref="rpcRegistry"/> - <argument ref="notificationService"/> - <argument ref="client"/> - </bean> - - <odl:rpc-implementation ref="provider"/> - -</blueprint> diff --git a/sdnr/northbound/ranSlice/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/northbound/ranSlice/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml index 57ebfbfcc..896c0575a 100644 --- a/sdnr/northbound/ranSlice/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml +++ b/sdnr/northbound/ranSlice/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml @@ -30,21 +30,25 @@ <argument ref="svcLogicService"/> </bean> - <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" - odl:type="default"/> - - <reference id="notificationService" - interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService" - odl:type="default"/> - - <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry" - odl:type="default"/> - - <bean id="provider" class="org.onap.ccsdk.features.sdnr.northbound.ranSlice.RANSliceProvider"> - <argument ref="dataBroker"/> - <argument ref="rpcRegistry"/> - <argument ref="notificationService"/> - <argument ref="client"/> + <reference id="dataBroker" + interface="org.opendaylight.mdsal.binding.api.DataBroker"/> + + <reference id="domDataBroker" + interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"/> + + <reference id="notificationPublishService" + interface="org.opendaylight.mdsal.binding.api.NotificationPublishService" /> + + <reference id="rpcProviderRegistry" + interface="org.opendaylight.mdsal.binding.api.RpcProviderService" /> + + <bean id="provider" class="org.onap.ccsdk.features.sdnr.northbound.ranSlice.RANSliceProvider" + init-method="init" destroy-method="close"> + <property name="dataBroker" ref="dataBroker"/> + <property name="domDataBroker" ref="domDataBroker"/> + <property name="rpcProviderRegistry" ref="rpcProviderRegistry"/> + <property name="notificationPublishService" ref="notificationPublishService"/> + <property name="client" ref="client"/> </bean> <odl:rpc-implementation ref="provider"/> diff --git a/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProviderTest.java b/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProviderTest.java index f1e1524ec..4bd3e5049 100644 --- a/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProviderTest.java +++ b/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProviderTest.java @@ -42,13 +42,17 @@ 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.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.mdsal.binding.api.DataBroker; +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.rev200806.*; +*/import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.*; import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.common.header.CommonHeaderBuilder; - +import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,10 +67,12 @@ public class RANSliceProviderTest { @Before public void setUp() throws Exception { DataBroker dataBroker = mock(DataBroker.class); + DOMDataBroker domDataBroker = mock(DOMDataBroker.class); NotificationPublishService notifyService = mock(NotificationPublishService.class); - RpcProviderRegistry rpcRegistry = mock(RpcProviderRegistry.class); - BindingAwareBroker.RpcRegistration<RanSliceApiService> rpcRegistration = (BindingAwareBroker.RpcRegistration<RanSliceApiService>) mock(BindingAwareBroker.RpcRegistration.class); - when(rpcRegistry.addRpcImplementation(any(Class.class), any(RanSliceApiService.class))).thenReturn(rpcRegistration); + //RpcProviderRegistry rpcRegistry = mock(RpcProviderRegistry.class); + RpcProviderService rpcRegistry = mock(RpcProviderService.class); + ObjectRegistration<RanSliceApiService> rpcRegistration = mock(ObjectRegistration.class); + when(rpcRegistry.registerRpcImplementation(any(Class.class), any(RanSliceApiService.class))).thenReturn(rpcRegistration); // Load svclogic.properties and get a SvcLogicStore @@ -95,7 +101,14 @@ public class RANSliceProviderTest { // Finally ready to create sliapiProvider RANSliceClient client = new RANSliceClient(svc); - provider = new RANSliceProvider(dataBroker, notifyService, rpcRegistry, client); + provider = new RANSliceProvider(); + provider.setDataBroker(dataBroker); + provider.setDomDataBroker(domDataBroker); + provider.setNotificationPublishService(notifyService); + provider.setClient(client); + provider.init(); + + } /** @@ -103,7 +116,7 @@ public class RANSliceProviderTest { */ @After public void tearDown() throws Exception { - provider.close(); + //provider.close(); } @@ -124,7 +137,7 @@ public class RANSliceProviderTest { try { ConfigureNearRTRICOutput results = provider.configureNearRTRIC(builder.build()).get().getResult(); LOG.info("configureNearRTRIC returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("configureNearRTRIC threw exception"); @@ -150,7 +163,7 @@ public class RANSliceProviderTest { try { InstantiateRANSliceOutput results = provider.instantiateRANSlice(builder.build()).get().getResult(); LOG.info("instantiateRANSlice returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("instantiateRANSlice threw exception"); @@ -176,7 +189,7 @@ public class RANSliceProviderTest { try { ConfigureRANSliceInstanceOutput results = provider.configureRANSliceInstance(builder.build()).get().getResult(); LOG.info("configureRANSliceInstance returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("configureRANSliceInstance threw exception"); @@ -201,7 +214,7 @@ public class RANSliceProviderTest { try { ConfigureCUOutput results = provider.configureCU(builder.build()).get().getResult(); LOG.info("configureCU returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("configureCU threw exception"); @@ -227,7 +240,7 @@ public class RANSliceProviderTest { try { ConfigureDUOutput results = provider.configureDU(builder.build()).get().getResult(); LOG.info("configureDU returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("configureDU threw exception"); @@ -252,7 +265,7 @@ public class RANSliceProviderTest { try { ActivateRANSliceInstanceOutput results = provider.activateRANSliceInstance(builder.build()).get().getResult(); LOG.info("activateRANSliceInstance returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("activateRANSliceInstance threw exception"); @@ -278,7 +291,7 @@ public class RANSliceProviderTest { try { DeactivateRANSliceInstanceOutput results = provider.deactivateRANSliceInstance(builder.build()).get().getResult(); LOG.info("deactivateRANSliceInstance returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("deactivateRANSliceInstance threw exception"); @@ -303,7 +316,7 @@ public class RANSliceProviderTest { try { TerminateRANSliceInstanceOutput results = provider.terminateRANSliceInstance(builder.build()).get().getResult(); LOG.info("terminateRANSliceInstance returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("terminateRANSliceInstance threw exception"); @@ -328,7 +341,7 @@ public class RANSliceProviderTest { try { DetermineRANSliceResourcesOutput results = provider.determineRANSliceResources(builder.build()).get().getResult(); LOG.info("determineRANSliceResources returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("determineRANSliceResources threw exception"); @@ -354,7 +367,7 @@ public class RANSliceProviderTest { try { ConfigNotificationOutput results = provider.configNotification(builder.build()).get().getResult(); LOG.info("configNotification returned status {} : {}", results.getStatus().getCode(), results.getStatus().getMessage()); - assert(results.getStatus().getCode() == 400); + assert(results.getStatus().getCode().intValue() == 400); } catch (InterruptedException | ExecutionException e) { LOG.error("Caught exception", e); fail("configNotification threw exception"); |