import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev201125.ServiceDeleteOutput;
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.ServiceImplementationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU4;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODUCn;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU4;
import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
-import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev201210.PathDescription;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev210705.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev200128.RpcStatusEx;
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.servicepath.rev171017.ServicePathList;
case Service:
if ((ServiceFormat.Ethernet.equals(service.getServiceAEnd().getServiceFormat())
|| ServiceFormat.OC.equals(service.getServiceAEnd().getServiceFormat()))
- && Uint32.valueOf("100").equals(service.getServiceAEnd().getServiceRate())) {
+ && (Uint32.valueOf("100").equals(service.getServiceAEnd().getServiceRate())
+ || Uint32.valueOf("400").equals(service.getServiceAEnd().getServiceRate()))) {
if (!manageServicePathDeletion(serviceName, pathDescription)) {
return ModelMappingUtils.createServiceDeleteResponse(ResponseCodes.RESPONSE_FAILED,
OPERATION_FAILED);
private boolean manageOtnServicePathDeletion(String serviceName, PathDescription pathDescription,
Services service) {
OtnServicePathInput ospi = null;
- if (ConnectionType.Infrastructure.equals(service.getConnectionType())) {
- ospi = ModelMappingUtils.rendererCreateOtnServiceInput(
- serviceName, service.getServiceAEnd().getServiceFormat().getName(), "100G", pathDescription, true);
- } else if (ConnectionType.Service.equals(service.getConnectionType())) {
- ospi = ModelMappingUtils.rendererCreateOtnServiceInput(serviceName,
+ ospi = ModelMappingUtils.rendererCreateOtnServiceInput(serviceName,
service.getServiceAEnd().getServiceFormat().getName(),
service.getServiceAEnd().getServiceRate().toString() + "G", pathDescription, true);
- }
LOG.info("Deleting otn-service path {} via renderer", serviceName);
sendNotifications(ServicePathNotificationTypes.ServiceDelete, serviceName, RpcStatusEx.Pending,
"Deleting otn-service path via renderer");