summaryrefslogtreecommitdiffstats
path: root/generic-resource-api/provider/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'generic-resource-api/provider/src/test')
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadNetworkTopologyRPCTest.java185
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java185
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/MDSALUtil.java40
3 files changed, 410 insertions, 0 deletions
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadNetworkTopologyRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadNetworkTopologyRPCTest.java
new file mode 100644
index 00000000..b05f1b27
--- /dev/null
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadNetworkTopologyRPCTest.java
@@ -0,0 +1,185 @@
+package org.onap.sdnc.northbound;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.onap.sdnc.northbound.GenericResourceApiProvider.APP_NAME;
+import static org.onap.sdnc.northbound.GenericResourceApiProvider.NO_SERVICE_LOGIC_ACTIVE;
+import static org.onap.sdnc.northbound.util.MDSALUtil.build;
+import static org.onap.sdnc.northbound.util.MDSALUtil.exec;
+import static org.onap.sdnc.northbound.util.MDSALUtil.networkTopologyIdentifierBuilder;
+import static org.onap.sdnc.northbound.util.MDSALUtil.networkTopologyInformationBuilder;
+import static org.onap.sdnc.northbound.util.MDSALUtil.preloadNetworkTopologyOperationInput;
+import static org.onap.sdnc.northbound.util.MDSALUtil.preloadNetworkTopologyOperationOutput;
+import static org.onap.sdnc.northbound.util.MDSALUtil.requestInformation;
+import static org.onap.sdnc.northbound.util.MDSALUtil.sdncRequestHeader;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.sdnc.northbound.util.PropBuilder;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionChainClosedException;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadNetworkTopologyOperationInput;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadNetworkTopologyOperationOutput;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformation;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeader.SvcAction;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+
+@RunWith(MockitoJUnitRunner.class)
+public class PreloadNetworkTopologyRPCTest extends GenericResourceApiProviderTest {
+
+ private static final String SVC_OPERATION = "preload-network-topology-operation";
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ svcClient.setScvOperation(SVC_OPERATION);
+ }
+
+ @Test
+ public void should_fail_when_invalid_vnf_topology() throws Exception {
+
+ PreloadNetworkTopologyOperationInput input = build(preloadNetworkTopologyOperationInput());
+
+ PreloadNetworkTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadNetworkTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("403", output.getResponseCode());
+ assertEquals("input is null", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+
+ @Test
+ public void should_fail_when_invalid_preload_data() throws Exception {
+
+ PreloadNetworkTopologyOperationInput input = build(preloadNetworkTopologyOperationInput()
+ .setNetworkTopologyInformation(build(networkTopologyInformationBuilder()
+ .setNetworkTopologyIdentifier(build(networkTopologyIdentifierBuilder()
+ .setNetworkName("test-network-name")))))
+ );
+
+ PreloadNetworkTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadNetworkTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("403", output.getResponseCode());
+ assertEquals("invalid input: network-name or network-type is null or empty", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+
+ @Test
+ public void should_fail_when_client_execution_failed() throws Exception {
+
+ svcClient.mockHasGraph(true);
+ svcClient.mockExecuteWoServiceData(new RuntimeException("test exception"));
+
+ PreloadNetworkTopologyOperationInput input = build(preloadNetworkTopologyOperationInput()
+ .setNetworkTopologyInformation(build(networkTopologyInformationBuilder()
+ .setNetworkTopologyIdentifier(build(networkTopologyIdentifierBuilder()
+ .setNetworkName("test-network-name")
+ .setNetworkType("test-network-type")))))
+ );
+
+ PreloadNetworkTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadNetworkTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("500", output.getResponseCode());
+ assertEquals("test exception", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+ @Test
+ public void should_fail_when_client_has_no_graph() throws Exception {
+
+ svcClient.mockHasGraph(false);
+
+ PreloadNetworkTopologyOperationInput input = build(preloadNetworkTopologyOperationInput()
+ .setNetworkTopologyInformation(build(networkTopologyInformationBuilder()
+ .setNetworkTopologyIdentifier(build(networkTopologyIdentifierBuilder()
+ .setNetworkName("test-network-name")
+ .setNetworkType("test-network-type")))))
+ );
+
+ PreloadNetworkTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadNetworkTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("503", output.getResponseCode());
+ assertEquals(NO_SERVICE_LOGIC_ACTIVE + APP_NAME + ": '" + SVC_OPERATION + "'", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+ @Test
+ public void should_fail_when_failed_to_update_mdsal() throws Exception {
+
+ PropBuilder svcResultProp = svcClient.createExecuteOKResult();
+ svcClient.mockExecuteWoServiceData(svcResultProp);
+ svcClient.mockHasGraph(true);
+ WriteTransaction mockWriteTransaction = mock(WriteTransaction.class);
+ when(mockWriteTransaction.submit()).thenThrow(new TransactionChainClosedException("test exception"));
+
+ DataBroker spyDataBroker = Mockito.spy(dataBroker);
+ when(spyDataBroker.newWriteOnlyTransaction()).thenReturn(mockWriteTransaction);
+ genericResourceApiProvider.setDataBroker(spyDataBroker);
+
+ PreloadNetworkTopologyOperationInput input = build(preloadNetworkTopologyOperationInput()
+ .setNetworkTopologyInformation(build(networkTopologyInformationBuilder()
+ .setNetworkTopologyIdentifier(build(networkTopologyIdentifierBuilder()
+ .setNetworkName("test-network-name")
+ .setNetworkType("test-network-type")))))
+ );
+
+ PreloadNetworkTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadNetworkTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("500", output.getResponseCode());
+ assertEquals("test exception", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+ @Test
+ public void should_complete_with_success_when_no_errors() throws Exception {
+
+ svcClient.mockHasGraph(true);
+ PropBuilder svcResultProp = svcClient.createExecuteOKResult();
+ svcClient.mockExecute(svcResultProp);
+
+ PreloadNetworkTopologyOperationInput input = build(preloadNetworkTopologyOperationInput()
+ .setNetworkTopologyInformation(build(networkTopologyInformationBuilder()
+ .setNetworkTopologyIdentifier(build(networkTopologyIdentifierBuilder()
+ .setNetworkName("test-network-name")
+ .setNetworkType("test-network-type")))))
+ .setSdncRequestHeader(build(sdncRequestHeader()
+ .setSvcRequestId("test-svc-request-id")
+ .setSvcAction(SvcAction.Assign)
+ ))
+ .setRequestInformation(build(requestInformation()
+ .setRequestId("test-request-id")
+ .setRequestAction(RequestInformation.RequestAction.CreateServiceInstance)
+ ))
+ );
+
+ PreloadNetworkTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadNetworkTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("200", output.getResponseCode());
+ assertEquals("Y", output.getAckFinalIndicator());
+
+ PreloadNetworkTopologyOperationOutput expectedOutput = createExpectedOutput(svcResultProp, input);
+ assertEquals(expectedOutput, output);
+ }
+
+ private PreloadNetworkTopologyOperationOutput createExpectedOutput(PropBuilder svcResultProp,
+ PreloadNetworkTopologyOperationInput input) {
+ return build(preloadNetworkTopologyOperationOutput()
+ .setSvcRequestId(input.getSdncRequestHeader().getSvcRequestId())
+ .setResponseCode(svcResultProp.get(svcClient.errorCode))
+ .setAckFinalIndicator(svcResultProp.get(svcClient.ackFinal))
+ );
+ }
+
+}
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java
new file mode 100644
index 00000000..8a854a91
--- /dev/null
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java
@@ -0,0 +1,185 @@
+package org.onap.sdnc.northbound;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.onap.sdnc.northbound.GenericResourceApiProvider.APP_NAME;
+import static org.onap.sdnc.northbound.GenericResourceApiProvider.NO_SERVICE_LOGIC_ACTIVE;
+import static org.onap.sdnc.northbound.util.MDSALUtil.build;
+import static org.onap.sdnc.northbound.util.MDSALUtil.exec;
+import static org.onap.sdnc.northbound.util.MDSALUtil.preloadVnfTopologyOperationInput;
+import static org.onap.sdnc.northbound.util.MDSALUtil.preloadVnfTopologyOperationOutput;
+import static org.onap.sdnc.northbound.util.MDSALUtil.requestInformation;
+import static org.onap.sdnc.northbound.util.MDSALUtil.sdncRequestHeader;
+import static org.onap.sdnc.northbound.util.MDSALUtil.vnfTopologyIdentifierBuilder;
+import static org.onap.sdnc.northbound.util.MDSALUtil.vnfTopologyInformationBuilder;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.sdnc.northbound.util.PropBuilder;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionChainClosedException;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadVnfTopologyOperationInput;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadVnfTopologyOperationOutput;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformation;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeader.SvcAction;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+
+@RunWith(MockitoJUnitRunner.class)
+public class PreloadVnfTopologyOperationRPCTest extends GenericResourceApiProviderTest {
+
+ private static final String SVC_OPERATION = "preload-vnf-topology-operation";
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ svcClient.setScvOperation(SVC_OPERATION);
+ }
+
+ @Test
+ public void should_fail_when_invalid_vnf_topology() throws Exception {
+
+ PreloadVnfTopologyOperationInput input = build(preloadVnfTopologyOperationInput());
+
+ PreloadVnfTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVnfTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("403", output.getResponseCode());
+ assertEquals("invalid input: input is null", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+
+ @Test
+ public void should_fail_when_invalid_preload_data() throws Exception {
+
+ PreloadVnfTopologyOperationInput input = build(preloadVnfTopologyOperationInput()
+ .setVnfTopologyInformation(build(vnfTopologyInformationBuilder()
+ .setVnfTopologyIdentifier(build(vnfTopologyIdentifierBuilder()
+ .setVnfName("test-vnf-name")))))
+ );
+
+ PreloadVnfTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVnfTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("403", output.getResponseCode());
+ assertEquals("invalid input: vnf-name or vnf-type is null or empty", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+
+ @Test
+ public void should_fail_when_client_execution_failed() throws Exception {
+
+ svcClient.mockHasGraph(true);
+ svcClient.mockExecuteWoServiceData(new RuntimeException("test exception"));
+
+ PreloadVnfTopologyOperationInput input = build(preloadVnfTopologyOperationInput()
+ .setVnfTopologyInformation(build(vnfTopologyInformationBuilder()
+ .setVnfTopologyIdentifier(build(vnfTopologyIdentifierBuilder()
+ .setVnfName("test-vnf-name")
+ .setVnfType("test-vnf-type")))))
+ );
+
+ PreloadVnfTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVnfTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("500", output.getResponseCode());
+ assertEquals("test exception", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+ @Test
+ public void should_fail_when_client_has_no_graph() throws Exception {
+
+ svcClient.mockHasGraph(false);
+
+ PreloadVnfTopologyOperationInput input = build(preloadVnfTopologyOperationInput()
+ .setVnfTopologyInformation(build(vnfTopologyInformationBuilder()
+ .setVnfTopologyIdentifier(build(vnfTopologyIdentifierBuilder()
+ .setVnfName("test-vnf-name")
+ .setVnfType("test-vnf-type")))))
+ );
+
+ PreloadVnfTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVnfTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("503", output.getResponseCode());
+ assertEquals(NO_SERVICE_LOGIC_ACTIVE + APP_NAME + ": '" + SVC_OPERATION + "'", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+ @Test
+ public void should_fail_when_failed_to_update_mdsal() throws Exception {
+
+ PropBuilder svcResultProp = svcClient.createExecuteOKResult();
+ svcClient.mockExecuteWoServiceData(svcResultProp);
+ svcClient.mockHasGraph(true);
+ WriteTransaction mockWriteTransaction = mock(WriteTransaction.class);
+ when(mockWriteTransaction.submit()).thenThrow(new TransactionChainClosedException("test exception"));
+
+ DataBroker spyDataBroker = Mockito.spy(dataBroker);
+ when(spyDataBroker.newWriteOnlyTransaction()).thenReturn(mockWriteTransaction);
+ genericResourceApiProvider.setDataBroker(spyDataBroker);
+
+ PreloadVnfTopologyOperationInput input = build(preloadVnfTopologyOperationInput()
+ .setVnfTopologyInformation(build(vnfTopologyInformationBuilder()
+ .setVnfTopologyIdentifier(build(vnfTopologyIdentifierBuilder()
+ .setVnfName("test-vnf-name")
+ .setVnfType("test-vnf-type")))))
+ );
+
+ PreloadVnfTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVnfTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("500", output.getResponseCode());
+ assertEquals("test exception", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+ @Test
+ public void should_complete_with_success_when_no_errors() throws Exception {
+
+ svcClient.mockHasGraph(true);
+ PropBuilder svcResultProp = svcClient.createExecuteOKResult();
+ svcClient.mockExecute(svcResultProp);
+
+ PreloadVnfTopologyOperationInput input = build(preloadVnfTopologyOperationInput()
+ .setVnfTopologyInformation(build(vnfTopologyInformationBuilder()
+ .setVnfTopologyIdentifier(build(vnfTopologyIdentifierBuilder()
+ .setVnfName("test-vnf-name")
+ .setVnfType("test-vnf-type")))))
+ .setSdncRequestHeader(build(sdncRequestHeader()
+ .setSvcRequestId("test-svc-request-id")
+ .setSvcAction(SvcAction.Assign)
+ ))
+ .setRequestInformation(build(requestInformation()
+ .setRequestId("test-request-id")
+ .setRequestAction(RequestInformation.RequestAction.CreateServiceInstance)
+ ))
+ );
+
+ PreloadVnfTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVnfTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("200", output.getResponseCode());
+ assertEquals("Y", output.getAckFinalIndicator());
+
+ PreloadVnfTopologyOperationOutput expectedOutput = createExpectedOutput(svcResultProp, input);
+ assertEquals(expectedOutput, output);
+ }
+
+ private PreloadVnfTopologyOperationOutput createExpectedOutput(PropBuilder svcResultProp,
+ PreloadVnfTopologyOperationInput input) {
+ return build(preloadVnfTopologyOperationOutput()
+ .setSvcRequestId(input.getSdncRequestHeader().getSvcRequestId())
+ .setResponseCode(svcResultProp.get(svcClient.errorCode))
+ .setAckFinalIndicator(svcResultProp.get(svcClient.ackFinal))
+ );
+ }
+
+}
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/MDSALUtil.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/MDSALUtil.java
index 1c3c5969..fd9a7f32 100644
--- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/MDSALUtil.java
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/util/MDSALUtil.java
@@ -30,6 +30,10 @@ import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.re
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.ContrailRouteTopologyOperationOutputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.NetworkTopologyOperationInputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.NetworkTopologyOperationOutputBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadNetworkTopologyOperationInputBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadNetworkTopologyOperationOutputBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadVnfTopologyOperationInputBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.PreloadVnfTopologyOperationOutputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.SecurityZoneTopologyOperationInputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.SecurityZoneTopologyOperationOutputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.ServiceTopologyOperationInputBuilder;
@@ -44,6 +48,8 @@ import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.re
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.contrail.route.response.information.ContrailRouteResponseInformationBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.network.information.NetworkInformationBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.network.response.information.NetworkResponseInformationBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.network.topology.identifier.NetworkTopologyIdentifierBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.network.topology.information.NetworkTopologyInformationBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformationBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeaderBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.security.zone.response.information.SecurityZoneResponseInformationBuilder;
@@ -57,6 +63,8 @@ import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.re
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.vf.module.information.VfModuleInformationBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.vnf.information.VnfInformationBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.vnf.response.information.VnfResponseInformationBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.vnf.topology.identifier.VnfTopologyIdentifierBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.vnf.topology.information.VnfTopologyInformationBuilder;
import org.opendaylight.yangtools.concepts.Builder;
import org.opendaylight.yangtools.yang.common.RpcResult;
@@ -88,6 +96,22 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
*/
public class MDSALUtil {
+ public static PreloadVnfTopologyOperationInputBuilder preloadVnfTopologyOperationInput() {
+ return new PreloadVnfTopologyOperationInputBuilder();
+ }
+
+ public static PreloadVnfTopologyOperationOutputBuilder preloadVnfTopologyOperationOutput() {
+ return new PreloadVnfTopologyOperationOutputBuilder();
+ }
+
+ public static PreloadNetworkTopologyOperationInputBuilder preloadNetworkTopologyOperationInput() {
+ return new PreloadNetworkTopologyOperationInputBuilder();
+ }
+
+ public static PreloadNetworkTopologyOperationOutputBuilder preloadNetworkTopologyOperationOutput() {
+ return new PreloadNetworkTopologyOperationOutputBuilder();
+ }
+
public static BrgTopologyOperationInputBuilder brgTopologyOperationInput() {
return new BrgTopologyOperationInputBuilder();
}
@@ -182,6 +206,22 @@ public class MDSALUtil {
return new ServiceInformationBuilder();
}
+ public static VnfTopologyInformationBuilder vnfTopologyInformationBuilder() {
+ return new VnfTopologyInformationBuilder();
+ }
+
+ public static NetworkTopologyInformationBuilder networkTopologyInformationBuilder() {
+ return new NetworkTopologyInformationBuilder();
+ }
+
+ public static NetworkTopologyIdentifierBuilder networkTopologyIdentifierBuilder(){
+ return new NetworkTopologyIdentifierBuilder();
+ }
+
+ public static VnfTopologyIdentifierBuilder vnfTopologyIdentifierBuilder() {
+ return new VnfTopologyIdentifierBuilder();
+ }
+
public static VnfInformationBuilder vnfInformationBuilder() {
return new VnfInformationBuilder();
}