diff options
Diffstat (limited to 'sdnr/northbound/ranSlice/provider/src/test')
15 files changed, 767 insertions, 0 deletions
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 new file mode 100644 index 000000000..f1e1524ec --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/RANSliceProviderTest.java @@ -0,0 +1,366 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.ccsdk.features.sdnr.northbound.ranSlice; + + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; +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; +import java.util.Date; +import java.util.Properties; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.onap.ccsdk.sli.core.sli.SvcLogicLoader; +import org.onap.ccsdk.sli.core.sli.SvcLogicStore; +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.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.common.header.CommonHeaderBuilder; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RANSliceProviderTest { + + Logger LOG = LoggerFactory.getLogger(RANSliceProvider.class); + private RANSliceProvider provider; + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + DataBroker dataBroker = mock(DataBroker.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); + + + // Load svclogic.properties and get a SvcLogicStore + InputStream propStr = RANSliceProviderTest.class.getResourceAsStream("/svclogic.properties"); + Properties svcprops = new Properties(); + svcprops.load(propStr); + + SvcLogicStore store = SvcLogicStoreFactory.getSvcLogicStore(svcprops); + + assertNotNull(store); + + URL graphUrl = RANSliceProviderTest.class.getClassLoader().getResource("graphs"); + LOG.info("Graph URL:" + graphUrl); + + + if (graphUrl == null) { + fail("Cannot find graphs directory"); + } + + SvcLogicLoader loader = new SvcLogicLoader(graphUrl.getPath(), store); + loader.loadAndActivate(); + + // Create a ServiceLogicService + SvcLogicServiceImpl svc = new SvcLogicServiceImpl(new SvcLogicPropertiesProviderImpl(), + new SvcLogicClassResolver()); + + // Finally ready to create sliapiProvider + RANSliceClient client = new RANSliceClient(svc); + provider = new RANSliceProvider(dataBroker, notifyService, rpcRegistry, client); + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + provider.close(); + } + + + @Test + public void testConfigureNearRTRIC() { + ConfigureNearRTRICInputBuilder builder = new ConfigureNearRTRICInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("configureNearRTRIC threw exception"); + } + + } + + + @Test + public void testInstantiateRANSlice() { + InstantiateRANSliceInputBuilder builder = new InstantiateRANSliceInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("instantiateRANSlice threw exception"); + } + + } + + + @Test + public void testConfigureRANSliceInstance() { + ConfigureRANSliceInstanceInputBuilder builder = new ConfigureRANSliceInstanceInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("configureRANSliceInstance threw exception"); + } + + } + + @Test + public void testConfigureCU() { + ConfigureCUInputBuilder builder = new ConfigureCUInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("configureCU threw exception"); + } + + } + + + @Test + public void testConfigureDU() { + ConfigureDUInputBuilder builder = new ConfigureDUInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("configureDU threw exception"); + } + + } + + @Test + public void testActivateRANSliceInstance() { + ActivateRANSliceInstanceInputBuilder builder = new ActivateRANSliceInstanceInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("activateRANSliceInstance threw exception"); + } + + } + + + @Test + public void testDeactivateRANSliceInstance() { + DeactivateRANSliceInstanceInputBuilder builder = new DeactivateRANSliceInstanceInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("deactivateRANSliceInstance threw exception"); + } + + } + + @Test + public void testTerminateRANSliceInstance() { + TerminateRANSliceInstanceInputBuilder builder = new TerminateRANSliceInstanceInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("terminateRANSliceInstance threw exception"); + } + + } + + @Test + public void testDetermineRANSliceResources() { + DetermineRANSliceResourcesInputBuilder builder = new DetermineRANSliceResourcesInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("determineRANSliceResources threw exception"); + } + + } + + + @Test + public void testConfigNotification() { + ConfigNotificationInputBuilder builder = new ConfigNotificationInputBuilder(); + + CommonHeaderBuilder hdrBuilder = new CommonHeaderBuilder(); + hdrBuilder.setApiVer("1"); + hdrBuilder.setFlags(null); + hdrBuilder.setOriginatorId("jUnit"); + hdrBuilder.setRequestId("123"); + hdrBuilder.setTimestamp(new ZULU(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(new Date()))); + builder.setCommonHeader(hdrBuilder.build()); + + builder.setAction(Action.Reconfigure); + + 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); + } catch (InterruptedException | ExecutionException e) { + LOG.error("Caught exception", e); + fail("configNotification threw exception"); + } + + } + + + } diff --git a/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/TestRANSliceRpcInvocationException.java b/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/TestRANSliceRpcInvocationException.java new file mode 100644 index 000000000..4c32c22bf --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/java/org/onap/ccsdk/features/sdnr/northbound/ranSlice/TestRANSliceRpcInvocationException.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + + +package org.onap.ccsdk.features.sdnr.northbound.ranSlice; + +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.common.header.CommonHeader; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev200806.status.Status; + + +public class TestRANSliceRpcInvocationException { + + @Test(expected = SvcLogicException.class) + public void testRANSliceRpcInvocationException() throws SvcLogicException{ + Status status = null; + CommonHeader commonHeader = null; + RANSliceRpcInvocationException exception = new RANSliceRpcInvocationException(status, commonHeader); + assert(exception.getStatus() == status); + assert(exception.getCommonHeader() == commonHeader); + throw exception; + } +} diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/graph.versions b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/graph.versions new file mode 100644 index 000000000..e9642a45f --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/graph.versions @@ -0,0 +1,10 @@ +ran-slice-api configureNearRTRIC 1.0.1 sync +ran-slice-api instantiateRANSlice 1.0.1 sync +ran-slice-api configureRANSliceInstance 1.0.1 sync +ran-slice-api configureCU 1.0.1 sync +ran-slice-api configureDU 1.0.1 sync +ran-slice-api activateRANSliceInstance 1.0.1 sync +ran-slice-api deactivateRANSliceInstance 1.0.1 sync +ran-slice-api terminateRANSliceInstance 1.0.1 sync +ran-slice-api determineRANSliceResources 1.0.1 sync +ran-slice-api configNotification 1.0.1 sync diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_activateRANSliceInstance.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_activateRANSliceInstance.xml new file mode 100644 index 000000000..b7ab247ba --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_activateRANSliceInstance.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='activateRANSliceInstance' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configNotification.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configNotification.xml new file mode 100644 index 000000000..bad05304c --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configNotification.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='configNotification' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureCU.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureCU.xml new file mode 100644 index 000000000..f1e52ea75 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureCU.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='configureCU' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureDU.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureDU.xml new file mode 100644 index 000000000..097376580 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureDU.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='configureDU' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureNearRTRIC.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureNearRTRIC.xml new file mode 100644 index 000000000..eadcf768a --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureNearRTRIC.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='configureNearRTRIC' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureRANSliceInstance.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureRANSliceInstance.xml new file mode 100644 index 000000000..08242f4b3 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_configureRANSliceInstance.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='configureRANSliceInstance' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_deactivateRANSliceInstance.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_deactivateRANSliceInstance.xml new file mode 100644 index 000000000..e7b5c00b9 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_deactivateRANSliceInstance.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='deactivateRANSliceInstance' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_determineRANSliceResources.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_determineRANSliceResources.xml new file mode 100644 index 000000000..7b7a69786 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_determineRANSliceResources.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='determineRANSliceResources' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_instantiateRANSlice.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_instantiateRANSlice.xml new file mode 100644 index 000000000..71f8655cc --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_instantiateRANSlice.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='instantiateRANSlice' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_terminateRANSliceInstance.xml b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_terminateRANSliceInstance.xml new file mode 100644 index 000000000..372f3ae0b --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/graphs/ranSlice/ran-slice-api_terminateRANSliceInstance.xml @@ -0,0 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 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========================================================= + --> + +<service-logic xmlns="http://www.onap.org/sdnc/svclogic" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" + module='ran-slice-api' version='1.0.1'> + <method rpc='terminateRANSliceInstance' mode='sync'> + <set> + <parameter name='status.code' value='400' /> + <parameter name='status.message' value='SUCCESS' /> + </set> + </method> +</service-logic> diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/simplelogger.properties b/sdnr/northbound/ranSlice/provider/src/test/resources/simplelogger.properties new file mode 100644 index 000000000..001dfd427 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/simplelogger.properties @@ -0,0 +1,22 @@ +### +# ============LICENSE_START======================================================= +# ONAP : CCSDK +# ================================================================================ +# Copyright (C) 2017 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========================================================= +### + +org.slf4j.simpleLogger.defaultLogLevel=debug diff --git a/sdnr/northbound/ranSlice/provider/src/test/resources/svclogic.properties b/sdnr/northbound/ranSlice/provider/src/test/resources/svclogic.properties new file mode 100644 index 000000000..426960f76 --- /dev/null +++ b/sdnr/northbound/ranSlice/provider/src/test/resources/svclogic.properties @@ -0,0 +1,27 @@ +### +# ============LICENSE_START======================================================= +# ONAP : CCSDK +# ================================================================================ +# Copyright (C) 2017 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========================================================= +### + +org.onap.ccsdk.sli.dbtype = jdbc +org.onap.ccsdk.sli.jdbc.url=jdbc:derby:memory:sdnctl;create=true +org.onap.ccsdk.sli.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver +org.onap.ccsdk.sli.jdbc.database = sdnctl +org.onap.ccsdk.sli.jdbc.user = test +org.onap.ccsdk.sli.jdbc.password = test |