summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
a073922)
JIRA: TRNSPRTPCE-334
Signed-off-by: manuedelf <emmanuelle.delfour@orange.com>
Change-Id: Ia7ed580e7c15050cbffd75be433aef5806097e2c
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
import com.google.common.util.concurrent.ListenableFuture;
import org.junit.Assert;
import com.google.common.util.concurrent.ListenableFuture;
import org.junit.Assert;
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.pathComputationServiceMock);
+ Mockito.verifyNoInteractions(this.pathComputationServiceMock);
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.pathComputationServiceMock);
+ Mockito.verifyNoInteractions(this.pathComputationServiceMock);
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.pathComputationServiceMock);
+ Mockito.verifyNoInteractions(this.pathComputationServiceMock);
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
pceResponse.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
pceResponse.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.pathComputationServiceMock);
+ Mockito.verifyNoInteractions(this.pathComputationServiceMock);
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
import com.google.common.util.concurrent.ListenableFuture;
import org.junit.Assert;
import com.google.common.util.concurrent.ListenableFuture;
import org.junit.Assert;
response.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
response.getConfigurationResponseCommon().getResponseCode());
response.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
response.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.rendererServiceOperationsMock);
+ Mockito.verifyNoInteractions(this.rendererServiceOperationsMock);
response.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
response.getConfigurationResponseCommon().getResponseCode());
response.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
response.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.rendererServiceOperationsMock);
+ Mockito.verifyNoInteractions(this.rendererServiceOperationsMock);
response.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
response.getConfigurationResponseCommon().getResponseCode());
response.getConfigurationResponseCommon().getAckFinalIndicator());
Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
response.getConfigurationResponseCommon().getResponseCode());
- verifyZeroInteractions(this.rendererServiceOperationsMock);
+ Mockito.verifyNoInteractions(this.rendererServiceOperationsMock);
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParameters;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParametersBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.response.parameters.PathDescriptionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParameters;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.ResponseParametersBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.response.parameters.sp.response.parameters.PathDescriptionBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
//writeOrModifyOrDeleteServiceList deprecated method should not raise warnings in tests
@SuppressWarnings("deprecation")
//writeOrModifyOrDeleteServiceList deprecated method should not raise warnings in tests
@SuppressWarnings("deprecation")
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).build();
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).build();
- OperationResult createOutput = this.serviceDataStoreOperations.createService(createInput);
+ this.serviceDataStoreOperations.createService(createInput);
String result = serviceDataStoreOperations.writeOrModifyOrDeleteServiceList("service 1",
createInput, pathComputationRequestOutput, 0);
Assert.assertNull(result);
String result = serviceDataStoreOperations.writeOrModifyOrDeleteServiceList("service 1",
createInput, pathComputationRequestOutput, 0);
Assert.assertNull(result);
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).build();
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).build();
- OperationResult createOutput = this.serviceDataStoreOperations.createService(createInput);
+ this.serviceDataStoreOperations.createService(createInput);
String result = serviceDataStoreOperations.writeOrModifyOrDeleteServiceList("service 1",
createInput, pathComputationRequestOutput, 1);
Assert.assertNull(result);
String result = serviceDataStoreOperations.writeOrModifyOrDeleteServiceList("service 1",
createInput, pathComputationRequestOutput, 1);
Assert.assertNull(result);
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).build();
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).build();
- OperationResult createOutput = this.serviceDataStoreOperations.createService(createInput);
+ this.serviceDataStoreOperations.createService(createInput);
String result = serviceDataStoreOperations.writeOrModifyOrDeleteServiceList("service 1",
createInput, pathComputationRequestOutput, 2);
Assert.assertNull(result);
String result = serviceDataStoreOperations.writeOrModifyOrDeleteServiceList("service 1",
createInput, pathComputationRequestOutput, 2);
Assert.assertNull(result);
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
ResponseParameters responseParameters = new ResponseParametersBuilder()
.setPathDescription(new PathDescriptionBuilder()
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
ResponseParameters responseParameters = new ResponseParametersBuilder()
.setPathDescription(new PathDescriptionBuilder()
- .setAToZDirection(new AToZDirectionBuilder().setAToZWavelengthNumber(1L).setRate(1L).build())
- .setZToADirection(new ZToADirectionBuilder().setZToAWavelengthNumber(1L).setRate(1L).build()).build())
+ .setAToZDirection(new AToZDirectionBuilder()
+ .setAToZWavelengthNumber(Uint32.valueOf(1)).setRate(Uint32.valueOf(1)).build())
+ .setZToADirection(new ZToADirectionBuilder()
+ .setZToAWavelengthNumber(Uint32.valueOf(1)).setRate(Uint32.valueOf(1)).build()).build())
.build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).setResponseParameters(responseParameters)
.build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).setResponseParameters(responseParameters)
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
ResponseParameters responseParameters = new ResponseParametersBuilder()
.setPathDescription(new PathDescriptionBuilder()
.setResponseCode(ResponseCodes.RESPONSE_OK).setResponseMessage("PCE calculation in progress").build();
ResponseParameters responseParameters = new ResponseParametersBuilder()
.setPathDescription(new PathDescriptionBuilder()
- .setAToZDirection(new AToZDirectionBuilder().setAToZWavelengthNumber(1L).setRate(1L).build())
- .setZToADirection(new ZToADirectionBuilder().setZToAWavelengthNumber(1L).setRate(1L).build()).build())
+ .setAToZDirection(new AToZDirectionBuilder()
+ .setAToZWavelengthNumber(Uint32.valueOf(1)).setRate(Uint32.valueOf(1)).build())
+ .setZToADirection(new ZToADirectionBuilder()
+ .setZToAWavelengthNumber(Uint32.valueOf(1)).setRate(Uint32.valueOf(1)).build()).build())
.build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).setResponseParameters(responseParameters)
.build();
PathComputationRequestOutput pathComputationRequestOutput = new PathComputationRequestOutputBuilder()
.setConfigurationResponseCommon(configurationResponseCommon).setResponseParameters(responseParameters)
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.HardConstraintsBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraints;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev190329.routing.constraints.SoftConstraintsBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
/**
* Utility Class to Build Hard Constraints and Soft Constraints.
/**
* Utility Class to Build Hard Constraints and Soft Constraints.
.setSrlg(Boolean.TRUE)
.build())
.build())
.setSrlg(Boolean.TRUE)
.build())
.build())
- .setLatency(new LatencyBuilder().setMaxLatency(1L).build())
+ .setLatency(new LatencyBuilder().setMaxLatency(Uint32.valueOf(1)).build())
.build())
.setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
.build();
.build())
.setCustomerCode(new ArrayList<>(Collections.singletonList("customer-code 1")))
.build();
public static void inject(final Object injectable, final String fieldname, final Object value) {
try {
final java.lang.reflect.Field field = injectable.getClass().getDeclaredField(fieldname);
public static void inject(final Object injectable, final String fieldname, final Object value) {
try {
final java.lang.reflect.Field field = injectable.getClass().getDeclaredField(fieldname);
- final boolean origionalValue = field.isAccessible();
+ final boolean origionalValue = field.canAccess(injectable);
field.setAccessible(true);
field.set(injectable, value);
field.setAccessible(origionalValue);
field.setAccessible(true);
field.set(injectable, value);
field.setAccessible(origionalValue);
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.ServicePathNotificationTypes;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.handler.header.ServiceHandlerHeaderBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.ServicePathNotificationTypes;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.service.handler.header.ServiceHandlerHeaderBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+import org.opendaylight.yangtools.yang.common.Uint32;
public final class ServiceDataUtils {
public final class ServiceDataUtils {
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.create.input.ServiceZEndBuilder()
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.create.input.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.create.input.ServiceZEndBuilder()
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.create.input.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.create.input.ServiceZEndBuilder()
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.create.input.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.create.input
.ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
.temp.service.create.input.ServiceAEndBuilder()
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.create.input
.ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531
.temp.service.create.input.ServiceAEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp
.service.create.input.ServiceZEndBuilder()
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.create.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp
.service.create.input.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
public static ServiceFeasibilityCheckInput buildServiceFeasibilityCheckInput() {
ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
public static ServiceFeasibilityCheckInput buildServiceFeasibilityCheckInput() {
ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
.setNodeId(new NodeIdType("XPONDER-3-2"))
.setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
- ServiceAEnd serviceAEndvalue = new ServiceAEndBuilder().build();
ServiceFeasibilityCheckInputBuilder builtInput = new ServiceFeasibilityCheckInputBuilder()
.setCommonId("commonId")
ServiceFeasibilityCheckInputBuilder builtInput = new ServiceFeasibilityCheckInputBuilder()
.setCommonId("commonId")
.ServiceAEndBuilder getServiceAEndBuild() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceAEndBuilder()
.ServiceAEndBuilder getServiceAEndBuild() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceAEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
.ServiceZEndBuilder getServiceZEndBuild() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEndBuilder()
.ServiceZEndBuilder getServiceZEndBuild() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.reconfigure.input.ServiceAEndBuilder()
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceAEnd serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.reconfigure.input.ServiceAEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2")).setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.build();
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.reconfigure.input.ServiceZEndBuilder()
.setNodeId(new NodeIdType("XPONDER-1-2")).setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.build();
org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceZEnd serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service
.reconfigure.input.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-3-2")).setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.build();
.setNodeId(new NodeIdType("XPONDER-3-2")).setTxDirection(getTxDirection())
.setRxDirection(getRxDirection())
.build();
public static ServicePathRpcResult buildServicePathRpcResult(
ServicePathNotificationTypes servicePathNotificationTypes, String serviceName, RpcStatusEx rpcStatusEx,
String message, Boolean pathDescription) {
public static ServicePathRpcResult buildServicePathRpcResult(
ServicePathNotificationTypes servicePathNotificationTypes, String serviceName, RpcStatusEx rpcStatusEx,
String message, Boolean pathDescription) {
- DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx");
- OffsetDateTime offsetDateTime = OffsetDateTime.now(ZoneOffset.UTC);
- DateAndTime datetime = new DateAndTime(dtf.format(offsetDateTime));
ServicePathRpcResultBuilder builder = new ServicePathRpcResultBuilder();
builder.setNotificationType(servicePathNotificationTypes)
.setServiceName(serviceName)
ServicePathRpcResultBuilder builder = new ServicePathRpcResultBuilder();
builder.setNotificationType(servicePathNotificationTypes)
.setServiceName(serviceName)
public static ServiceRpcResultSp buildServiceRpcResultSp(ServicePathNotificationTypes servicePathNotificationTypes,
String serviceName, RpcStatusEx rpcStatusEx, String message) {
public static ServiceRpcResultSp buildServiceRpcResultSp(ServicePathNotificationTypes servicePathNotificationTypes,
String serviceName, RpcStatusEx rpcStatusEx, String message) {
- DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx");
- OffsetDateTime offsetDateTime = OffsetDateTime.now(ZoneOffset.UTC);
- DateAndTime datetime = new DateAndTime(dtf.format(offsetDateTime));
ServiceRpcResultSpBuilder builder = new ServiceRpcResultSpBuilder();
builder.setNotificationType(servicePathNotificationTypes).setServiceName(serviceName)
.setStatus(rpcStatusEx).setStatusMessage(message);
ServiceRpcResultSpBuilder builder = new ServiceRpcResultSpBuilder();
builder.setNotificationType(servicePathNotificationTypes).setServiceName(serviceName)
.setStatus(rpcStatusEx).setStatusMessage(message);
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx
rpcStatusEx,
String message) {
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx
rpcStatusEx,
String message) {
- DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssxxx");
- OffsetDateTime offsetDateTime = OffsetDateTime.now(ZoneOffset.UTC);
- DateAndTime datetime = new DateAndTime(dtf.format(offsetDateTime));
ServiceRpcResultShBuilder builder = new ServiceRpcResultShBuilder();
builder.setNotificationType(serviceNotificationTypes).setServiceName(serviceName)
.setStatus(rpcStatusEx).setStatusMessage(message);
ServiceRpcResultShBuilder builder = new ServiceRpcResultShBuilder();
builder.setNotificationType(serviceNotificationTypes).setServiceName(serviceName)
.setStatus(rpcStatusEx).setStatusMessage(message);
public static PathDescription createPathDescription(long azRate, long azWaveLength, long zaRate,
long zaWaveLength) {
AToZDirection atozDirection = new AToZDirectionBuilder()
public static PathDescription createPathDescription(long azRate, long azWaveLength, long zaRate,
long zaWaveLength) {
AToZDirection atozDirection = new AToZDirectionBuilder()
- .setRate(azRate)
- .setAToZWavelengthNumber(azWaveLength)
+ .setRate(Uint32.valueOf(azRate))
+ .setAToZWavelengthNumber(Uint32.valueOf(azWaveLength))
.build();
ZToADirection ztoaDirection = new ZToADirectionBuilder()
.build();
ZToADirection ztoaDirection = new ZToADirectionBuilder()
- .setRate(zaRate)
- .setZToAWavelengthNumber(zaWaveLength)
+ .setRate(Uint32.valueOf(zaRate))
+ .setZToAWavelengthNumber(Uint32.valueOf(zaWaveLength))
.build();
PathDescription pathDescription = new PathDescriptionBuilder()
.setAToZDirection(atozDirection)
.build();
PathDescription pathDescription = new PathDescriptionBuilder()
.setAToZDirection(atozDirection)
.ServiceAEndBuilder getServiceAEndBuildReconfigure() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceAEndBuilder()
.ServiceAEndBuilder getServiceAEndBuildReconfigure() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceAEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
.ServiceZEndBuilder getServiceZEndBuildReconfigure() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceZEndBuilder()
.ServiceZEndBuilder getServiceZEndBuildReconfigure() {
return new org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.reconfigure.input
.ServiceZEndBuilder()
- .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate(Uint32.valueOf(1))
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
.setNodeId(new NodeIdType("XPONDER-1-2"))
.setTxDirection(getTxDirection())
.setRxDirection(getRxDirection());
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.lgx.LgxBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.service.port.PortBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
+import org.opendaylight.yangtools.yang.common.Uint32;
public class ServicehandlerTxRxCheckTest {
public class ServicehandlerTxRxCheckTest {
@Test
public void checkForServiceRateEquals0() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(
@Test
public void checkForServiceRateEquals0() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(
- new ServiceAEndBuilder().setServiceRate(0L).build(), ServiceEndpointType.SERVICEAEND);
+ new ServiceAEndBuilder().setServiceRate(Uint32.valueOf(0)).build(), ServiceEndpointType.SERVICEAEND);
Assert.assertFalse(result.hasPassed());
Assert.assertEquals(LogMessages.rateNotSet(ServiceEndpointType.SERVICEAEND), result.getMessage());
Assert.assertFalse(result.hasPassed());
Assert.assertEquals(LogMessages.rateNotSet(ServiceEndpointType.SERVICEAEND), result.getMessage());
@Test
public void checkForServiceFormatNull() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(
@Test
public void checkForServiceFormatNull() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(
- new ServiceAEndBuilder().setServiceRate(3L).build(), ServiceEndpointType.SERVICEAEND);
+ new ServiceAEndBuilder().setServiceRate(Uint32.valueOf(3)).build(), ServiceEndpointType.SERVICEAEND);
Assert.assertFalse(result.hasPassed());
Assert.assertEquals(LogMessages.formatNotSet(ServiceEndpointType.SERVICEAEND), result.getMessage());
Assert.assertFalse(result.hasPassed());
Assert.assertEquals(LogMessages.formatNotSet(ServiceEndpointType.SERVICEAEND), result.getMessage());
@Test
public void checkForClliEmpty() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(new ServiceAEndBuilder()
@Test
public void checkForClliEmpty() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(new ServiceAEndBuilder()
- .setServiceRate(3L).setClli("").setServiceFormat(ServiceFormat.Ethernet).build(),
+ .setServiceRate(Uint32.valueOf(3)).setClli("").setServiceFormat(ServiceFormat.Ethernet).build(),
ServiceEndpointType.SERVICEAEND);
Assert.assertFalse(result.hasPassed());
ServiceEndpointType.SERVICEAEND);
Assert.assertFalse(result.hasPassed());
@Test
public void checkForFailTxOrRx() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(new ServiceAEndBuilder()
@Test
public void checkForFailTxOrRx() {
ComplianceCheckResult result = ServicehandlerTxRxCheck.check(new ServiceAEndBuilder()
- .setServiceRate(3L).setClli("cc").setServiceFormat(ServiceFormat.Ethernet).build(),
+ .setServiceRate(Uint32.valueOf(3)).setClli("cc").setServiceFormat(ServiceFormat.Ethernet).build(),
ServiceEndpointType.SERVICEAEND);
Assert.assertFalse(result.hasPassed());
ServiceEndpointType.SERVICEAEND);
Assert.assertFalse(result.hasPassed());