import static org.onap.sdnc.northbound.GenericResourceApiProvider.INVALID_INPUT_ERROR_MESSAGE;
import static org.onap.sdnc.northbound.GenericResourceApiProvider.NO_SERVICE_LOGIC_ACTIVE;
import static org.onap.sdnc.northbound.GenericResourceApiProvider.NULL_OR_EMPTY_ERROR_PARAM;
import static org.onap.sdnc.northbound.GenericResourceApiProvider.INVALID_INPUT_ERROR_MESSAGE;
import static org.onap.sdnc.northbound.GenericResourceApiProvider.NO_SERVICE_LOGIC_ACTIVE;
import static org.onap.sdnc.northbound.GenericResourceApiProvider.NULL_OR_EMPTY_ERROR_PARAM;
import static org.onap.sdnc.northbound.util.MDSALUtil.exec;
import static org.onap.sdnc.northbound.util.MDSALUtil.networkInformation;
import static org.onap.sdnc.northbound.util.MDSALUtil.networkResponseInformation;
import static org.onap.sdnc.northbound.util.MDSALUtil.exec;
import static org.onap.sdnc.northbound.util.MDSALUtil.networkInformation;
import static org.onap.sdnc.northbound.util.MDSALUtil.networkResponseInformation;
NetworkTopologyOperationOutput output =
exec(genericResourceApiProvider::networkTopologyOperation, input, RpcResult::getResult);
NetworkTopologyOperationOutput output =
exec(genericResourceApiProvider::networkTopologyOperation, input, RpcResult::getResult);
- NetworkTopologyOperationInput input = build(networkTopologyOperationInput()
- .setServiceInformation(build(serviceInformationBuilder()
- .setServiceInstanceId("test-service-instance-id")
- ))
- );
+ NetworkTopologyOperationInput input = networkTopologyOperationInput()
+ .setServiceInformation(serviceInformationBuilder()
+ .setServiceInstanceId("test-service-instance-id").build()
+ ).build();
NetworkTopologyOperationOutput output =
exec(genericResourceApiProvider::networkTopologyOperation, input, RpcResult::getResult);
NetworkTopologyOperationOutput output =
exec(genericResourceApiProvider::networkTopologyOperation, input, RpcResult::getResult);
- NetworkTopologyOperationInput input = build(networkTopologyOperationInput()
- .setServiceInformation(build(serviceInformationBuilder()
- .setServiceInstanceId("test-service-instance-id")
- ))
- );
+ NetworkTopologyOperationInput input = networkTopologyOperationInput()
+ .setServiceInformation(serviceInformationBuilder()
+ .setServiceInstanceId("test-service-instance-id").build()
+ ).build();
- NetworkTopologyOperationInput input = build(networkTopologyOperationInput()
- .setServiceInformation(build(serviceInformationBuilder()
- .setServiceInstanceId("test-service-instance-id")
- ))
- );
+ NetworkTopologyOperationInput input = networkTopologyOperationInput()
+ .setServiceInformation(serviceInformationBuilder()
+ .setServiceInstanceId("test-service-instance-id").build()
+ ).build();
when(spyDataBroker.newWriteOnlyTransaction()).thenReturn(mockWriteTransaction);
genericResourceApiProvider.setDataBroker(spyDataBroker);
when(spyDataBroker.newWriteOnlyTransaction()).thenReturn(mockWriteTransaction);
genericResourceApiProvider.setDataBroker(spyDataBroker);
- NetworkTopologyOperationInput input = build(networkTopologyOperationInput()
- .setServiceInformation(build(serviceInformationBuilder()
- .setServiceInstanceId("test-service-instance-id")
- ))
- );
+ NetworkTopologyOperationInput input = networkTopologyOperationInput()
+ .setServiceInformation(serviceInformationBuilder()
+ .setServiceInstanceId("test-service-instance-id").build()
+ ).build();
- .setRequestAction(RequestInformation.RequestAction.CreateServiceInstance)
- ))
- .setServiceInformation(build(serviceInformationBuilder()
- .setServiceInstanceId("service-instance-id: xyz")
- ))
- .setNetworkInformation(build(
- networkInformation()
- ))
- );
+ .setRequestAction(RequestInformation.RequestAction.CreateServiceInstance).build()
+ )
+ .setServiceInformation(serviceInformationBuilder()
+ .setServiceInstanceId("service-instance-id: xyz").build()
+ )
+ .setNetworkInformation(networkInformation().build()
+ ).build();
}
private Service persistServiceInDataBroker(
NetworkTopologyOperationInput networkTopologyOperationInput
) throws Exception {
}
private Service persistServiceInDataBroker(
NetworkTopologyOperationInput networkTopologyOperationInput
) throws Exception {
.setLastRpcAction(LastRpcAction.Activate)
.setLastOrderStatus(LastOrderStatus.PendingAssignment)
.setLastAction(LastAction.ActivateNetworkInstance)
.setLastRpcAction(LastRpcAction.Activate)
.setLastOrderStatus(LastOrderStatus.PendingAssignment)
.setLastAction(LastAction.ActivateNetworkInstance)
private NetworkTopologyOperationOutput createExpectedNTOO(
PropBuilder expectedSvcResultProp,
NetworkTopologyOperationInput expectedNetworkTopologyOperationInput) {
private NetworkTopologyOperationOutput createExpectedNTOO(
PropBuilder expectedSvcResultProp,
NetworkTopologyOperationInput expectedNetworkTopologyOperationInput) {
networkTopologyOperationOutput()
.setSvcRequestId(expectedNetworkTopologyOperationInput.getSdncRequestHeader().getSvcRequestId())
.setResponseCode(expectedSvcResultProp.get(svcClient.errorCode))
.setAckFinalIndicator(expectedSvcResultProp.get(svcClient.ackFinal))
.setResponseMessage(expectedSvcResultProp.get(svcClient.errorMessage))
networkTopologyOperationOutput()
.setSvcRequestId(expectedNetworkTopologyOperationInput.getSdncRequestHeader().getSvcRequestId())
.setResponseCode(expectedSvcResultProp.get(svcClient.errorCode))
.setAckFinalIndicator(expectedSvcResultProp.get(svcClient.ackFinal))
.setResponseMessage(expectedSvcResultProp.get(svcClient.errorMessage))
- .setObjectPath(expectedSvcResultProp.get(svcClient.serviceObjectPath))
- ))
- .setNetworkResponseInformation(build(
+ .setObjectPath(expectedSvcResultProp.get(svcClient.serviceObjectPath)).build()
+ )
+ .setNetworkResponseInformation(
ServiceInformation expectedServiceInformation = expectedNetworkTopologyOperationInput.getServiceInformation();
RequestInformation expectedRequestInformation = expectedNetworkTopologyOperationInput.getRequestInformation();
ServiceInformation expectedServiceInformation = expectedNetworkTopologyOperationInput.getServiceInformation();
RequestInformation expectedRequestInformation = expectedNetworkTopologyOperationInput.getRequestInformation();