X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=servicehandler%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Futils%2FModelMappingUtils.java;h=241425887a2f84cd22267babe3e136efec2f3f76;hb=2a29f9ab006d8806f77b1a1e073b478e5351cc5f;hp=d9eec40ec82ef0e2a4b296f3bfb6505d3fa05b92;hpb=4378fca1d31d1f75c0480c752aa711fb885e6135;p=transportpce.git diff --git a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ModelMappingUtils.java b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ModelMappingUtils.java index d9eec40ec..241425887 100644 --- a/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ModelMappingUtils.java +++ b/servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/utils/ModelMappingUtils.java @@ -8,18 +8,17 @@ package org.opendaylight.transportpce.servicehandler.utils; import com.google.common.util.concurrent.ListenableFuture; - import org.opendaylight.transportpce.servicehandler.MappingConstraints; import org.opendaylight.transportpce.servicehandler.ServiceInput; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.PathComputationRequestOutput; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.path.computation.request.input.ServiceAEnd; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.path.computation.request.input.ServiceAEndBuilder; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.path.computation.request.input.ServiceZEnd; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.path.computation.request.input.ServiceZEndBuilder; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.service.path.rpc.result.PathDescription; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInputBuilder; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInput; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceImplementationRequestInputBuilder; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestOutput; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.path.computation.request.input.ServiceAEnd; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.path.computation.request.input.ServiceAEndBuilder; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.path.computation.request.input.ServiceZEnd; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.path.computation.request.input.ServiceZEndBuilder; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.service.path.rpc.result.PathDescription; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.ServiceDeleteInputBuilder; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.ServiceImplementationRequestInput; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.ServiceImplementationRequestInputBuilder; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev181130.NodeIdType; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon; import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder; @@ -72,37 +71,39 @@ public final class ModelMappingUtils { ServiceImplementationRequestInputBuilder serviceImplementationRequestInputBuilder = new ServiceImplementationRequestInputBuilder(); serviceImplementationRequestInputBuilder.setServiceName(input.getServiceName()); - org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation - .request.input.ServiceAEndBuilder serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight - .transportpce.renderer.rev171017.service.implementation.request.input.ServiceAEndBuilder(); + org.opendaylight.yang.gen.v1.http + .org.opendaylight.transportpce.renderer.rev201125.service.implementation.request.input.ServiceAEndBuilder + serviceAEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125 + .service.implementation.request.input.ServiceAEndBuilder(); serviceAEnd.setServiceFormat(input.getServiceAEnd().getServiceFormat()) .setServiceRate(input.getServiceAEnd().getServiceRate()).setClli(input.getServiceAEnd().getClli()) .setNodeId(input.getServiceAEnd().getNodeId().getValue()) - .setTxDirection(new org.opendaylight.yang.gen.v1.http.org - .transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.TxDirectionBuilder() + .setTxDirection(new org.opendaylight.yang.gen.v1.http + .org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.TxDirectionBuilder() .setPort(input.getServiceAEnd().getTxDirection().getPort()).build()) - .setRxDirection(new org.opendaylight.yang.gen.v1.http.org - .transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.RxDirectionBuilder() + .setRxDirection(new org.opendaylight.yang.gen.v1.http + .org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.RxDirectionBuilder() .setPort(input.getServiceAEnd().getRxDirection().getPort()).build()); - org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation - .request.input.ServiceZEndBuilder serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight - .transportpce.renderer.rev171017.service.implementation.request.input.ServiceZEndBuilder(); + org.opendaylight.yang.gen.v1.http + .org.opendaylight.transportpce.renderer.rev201125.service.implementation.request.input.ServiceZEndBuilder + serviceZEnd = new org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125 + .service.implementation.request.input.ServiceZEndBuilder(); serviceZEnd.setServiceFormat(input.getServiceZEnd().getServiceFormat()) .setServiceRate(input.getServiceZEnd().getServiceRate()).setClli(input.getServiceZEnd().getClli()) .setNodeId(input.getServiceZEnd().getNodeId().getValue()) - .setTxDirection(new org.opendaylight.yang.gen.v1.http.org - .transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.TxDirectionBuilder() + .setTxDirection(new org.opendaylight.yang.gen.v1.http + .org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.TxDirectionBuilder() .setPort(input.getServiceZEnd().getTxDirection().getPort()).build()) - .setRxDirection(new org.opendaylight.yang.gen.v1.http.org - .transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.RxDirectionBuilder() + .setRxDirection(new org.opendaylight.yang.gen.v1.http + .org.transportpce.b.c._interface.service.types.rev200128.service.endpoint.sp.RxDirectionBuilder() .setPort(input.getServiceZEnd().getRxDirection().getPort()).build()); serviceImplementationRequestInputBuilder.setServiceAEnd(serviceAEnd.build()); serviceImplementationRequestInputBuilder.setServiceZEnd(serviceZEnd.build()); serviceImplementationRequestInputBuilder.setServiceHandlerHeader( new ServiceHandlerHeaderBuilder().setRequestId(input.getSdncRequestHeader().getRequestId()).build()); - org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.service.implementation - .request.input.PathDescriptionBuilder pathDescBuilder = new org.opendaylight.yang.gen.v1.http.org - .opendaylight.transportpce.renderer.rev171017.service.implementation.request.input + org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.service.implementation + .request.input.PathDescriptionBuilder pathDescBuilder = new org.opendaylight.yang.gen.v1.http + .org.opendaylight.transportpce.renderer.rev201125.service.implementation.request.input .PathDescriptionBuilder(); pathDescBuilder.setAToZDirection(pathDescription.getAToZDirection()); pathDescBuilder.setZToADirection(pathDescription.getZToADirection()); @@ -110,7 +111,7 @@ public final class ModelMappingUtils { return serviceImplementationRequestInputBuilder.build(); } - public static org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017 + public static org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125 .ServiceDeleteInput createServiceDeleteInput(ServiceInput serviceInput) { ServiceDeleteInputBuilder builder = new ServiceDeleteInputBuilder(); builder.setServiceName(serviceInput.getServiceName()); @@ -119,7 +120,7 @@ public final class ModelMappingUtils { return builder.build(); } - public static org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017 + public static org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125 .ServiceDeleteInput createServiceDeleteInput(ServiceRerouteInput serviceRerouteinput, Services services) { ServiceDeleteInputBuilder builder = new ServiceDeleteInputBuilder(); builder.setServiceName(serviceRerouteinput.getServiceName()); @@ -128,8 +129,8 @@ public final class ModelMappingUtils { return builder.build(); } - public static ServiceAEnd createServiceAEnd(org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types - .rev190531.ServiceEndpoint serviceAEnd) { + public static ServiceAEnd createServiceAEnd(org.opendaylight.yang.gen.v1.http + .org.openroadm.common.service.types.rev190531.ServiceEndpoint serviceAEnd) { ServiceAEndBuilder serviceAEndBuilder = new ServiceAEndBuilder(); serviceAEndBuilder.setClli(serviceAEnd.getClli()); serviceAEndBuilder.setNodeId(new NodeIdType(serviceAEnd.getNodeId().getValue()).getValue()); @@ -140,8 +141,8 @@ public final class ModelMappingUtils { return serviceAEndBuilder.build(); } - public static ServiceZEnd createServiceZEnd(org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types - .rev190531.ServiceEndpoint serviceZEnd) { + public static ServiceZEnd createServiceZEnd(org.opendaylight.yang.gen.v1.http + .org.openroadm.common.service.types.rev190531.ServiceEndpoint serviceZEnd) { ServiceZEndBuilder serviceZEndBuilder = new ServiceZEndBuilder(); serviceZEndBuilder.setClli(serviceZEnd.getClli()); serviceZEndBuilder.setNodeId(new NodeIdType(serviceZEnd.getNodeId().getValue()).getValue()); @@ -152,15 +153,15 @@ public final class ModelMappingUtils { return serviceZEndBuilder.build(); } - public static RxDirection createRxDirection(org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types - .rev190531.service.endpoint.RxDirection rxDirection) { + public static RxDirection createRxDirection(org.opendaylight.yang.gen.v1.http + .org.openroadm.common.service.types.rev190531.service.endpoint.RxDirection rxDirection) { RxDirectionBuilder rxDirectionBuilder = new RxDirectionBuilder(); rxDirectionBuilder.setPort(rxDirection.getPort()); return rxDirectionBuilder.build(); } - public static TxDirection createTxDirection(org.opendaylight.yang.gen.v1.http.org.openroadm.common.service - .types.rev190531.service.endpoint.TxDirection txDirection) { + public static TxDirection createTxDirection(org.opendaylight.yang.gen.v1.http + .org.openroadm.common.service.types.rev190531.service.endpoint.TxDirection txDirection) { TxDirectionBuilder txDirectionBuilder = new TxDirectionBuilder(); txDirectionBuilder.setPort(txDirection.getPort()); return txDirectionBuilder.build();