+ public static ServiceCreateInput buildServiceCreateInputWithHardConstraints() {
+
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ .ServiceAEnd serviceAEnd = getServiceAEndBuild()
+ .build();
+ 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)
+ .setNodeId(new NodeIdType("XPONDER-3-2"))
+ .setTxDirection(getTxDirection())
+ .setRxDirection(getRxDirection())
+ .build();
+
+ ServiceCreateInputBuilder builtInput = new ServiceCreateInputBuilder()
+ .setCommonId("commonId")
+ .setConnectionType(ConnectionType.Service)
+ .setCustomer("Customer")
+ .setServiceName("service 1")
+ .setServiceAEnd(serviceAEnd)
+ .setServiceZEnd(serviceZEnd)
+ .setSdncRequestHeader(new SdncRequestHeaderBuilder().setRequestId("request 1")
+ .setRpcAction(RpcActions.ServiceCreate).setNotificationUrl("notification url").build())
+ .setHardConstraints(new HardConstraintsBuilder().build());
+
+ return builtInput.build();
+ }
+
+ public static ServiceCreateInput buildServiceCreateInputWithSoftConstraints() {
+
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input
+ .ServiceAEnd serviceAEnd = getServiceAEndBuild()
+ .build();
+ 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)
+ .setNodeId(new NodeIdType("XPONDER-3-2"))
+ .setTxDirection(getTxDirection())
+ .setRxDirection(getRxDirection())
+ .build();
+
+ ServiceCreateInputBuilder builtInput = new ServiceCreateInputBuilder()
+ .setCommonId("commonId")
+ .setConnectionType(ConnectionType.Service)
+ .setCustomer("Customer")
+ .setServiceName("service 1")
+ .setServiceAEnd(serviceAEnd)
+ .setServiceZEnd(serviceZEnd)
+ .setSdncRequestHeader(new SdncRequestHeaderBuilder().setRequestId("request 1")
+ .setRpcAction(RpcActions.ServiceCreate).setNotificationUrl("notification url").build())
+ .setSoftConstraints(new SoftConstraintsBuilder().build());
+
+ return builtInput.build();
+ }
+
+ public static PathComputationRequestInput createPceRequestInput(ServiceCreateInput input) {
+ MappingConstraints mappingConstraints =
+ new MappingConstraints(input.getHardConstraints(), input.getSoftConstraints());
+ mappingConstraints.serviceToServicePathConstarints();
+ ServiceHandlerHeaderBuilder serviceHandlerHeader = new ServiceHandlerHeaderBuilder();
+ SdncRequestHeader serviceHandler = input.getSdncRequestHeader();
+ if (serviceHandler != null) {
+ serviceHandlerHeader.setRequestId(serviceHandler.getRequestId());
+ }
+ return new PathComputationRequestInputBuilder()
+ .setServiceName(input.getServiceName())
+ .setResourceReserve(true)
+ .setServiceHandlerHeader(serviceHandlerHeader.build())
+ .setHardConstraints(mappingConstraints.getServicePathHardConstraints())
+ .setSoftConstraints(mappingConstraints.getServicePathSoftConstraints())
+ .setPceMetric(PceMetric.TEMetric)
+ .setServiceAEnd(ModelMappingUtils.createServiceAEnd(input.getServiceAEnd()))
+ .setServiceZEnd(ModelMappingUtils.createServiceZEnd(input.getServiceZEnd()))
+ .build();
+ }
+
+ public static TempServiceCreateInput buildTempServiceCreateInput() {
+
+ 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)
+ .setNodeId(new NodeIdType("XPONDER-1-2"))
+ .setTxDirection(getTxDirection())
+ .setRxDirection(getRxDirection())
+ .build();
+ 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)
+ .setNodeId(new NodeIdType("XPONDER-3-2"))
+ .setTxDirection(getTxDirection())
+ .setRxDirection(getRxDirection())
+ .build();
+
+ TempServiceCreateInputBuilder builtInput = new TempServiceCreateInputBuilder()
+ .setCommonId("commonId")
+ .setConnectionType(ConnectionType.Service)
+ .setCustomer("Customer")
+ .setServiceAEnd(serviceAEnd)
+ .setServiceZEnd(serviceZEnd)
+ .setSdncRequestHeader(new SdncRequestHeaderBuilder().setRequestId("request 1")
+ .setRpcAction(RpcActions.TempServiceCreate).setNotificationUrl("notification url").build());
+
+ return builtInput.build();
+ }
+
+ public static ServiceFeasibilityCheckInput buildServiceFeasibilityCheckInput() {
+
+ ServiceAEnd serviceAEnd = new ServiceAEndBuilder()
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setNodeId(new NodeIdType("XPONDER-1-2"))
+ .setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
+ ServiceZEnd serviceZEnd = new ServiceZEndBuilder()
+ .setClli("clli").setServiceFormat(ServiceFormat.OC).setServiceRate((long) 1)
+ .setNodeId(new NodeIdType("XPONDER-3-2"))
+ .setTxDirection(getTxDirection()).setRxDirection(getRxDirection()).build();
+ ServiceAEnd serviceAEndvalue = new ServiceAEndBuilder().build();
+
+ ServiceFeasibilityCheckInputBuilder builtInput = new ServiceFeasibilityCheckInputBuilder()
+ .setCommonId("commonId")
+ .setConnectionType(ConnectionType.Service)
+ .setCustomer("Customer")
+ .setServiceAEnd(serviceAEnd)
+ .setServiceZEnd(serviceZEnd)
+ .setSdncRequestHeader(new SdncRequestHeaderBuilder().setRequestId("request 1")
+ .setRpcAction(RpcActions.ServiceFeasibilityCheck).setNotificationUrl("notification url").build());
+ return builtInput.build();
+ }
+
+ public static org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.create.input