*/
package org.opendaylight.transportpce.servicehandler.impl;
+import com.google.common.collect.ImmutableClassToInstanceMap;
import com.google.common.util.concurrent.ListenableFuture;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.Map;
import java.util.Optional;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.transportpce.common.OperationResult;
import org.opendaylight.transportpce.common.ResponseCodes;
import org.opendaylight.transportpce.pce.service.PathComputationService;
import org.opendaylight.transportpce.servicehandler.validation.ServiceCreateValidation;
import org.opendaylight.transportpce.servicehandler.validation.checks.ComplianceCheckResult;
import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerComplianceCheck;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.PathComputationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.PathComputationRerouteRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.path.computation.reroute.request.input.EndpointsBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.RpcActions;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.ServiceNotificationTypes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev211210.sdnc.request.header.SdncRequestHeaderBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.PathComputationRerouteRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev230925.path.computation.reroute.request.input.EndpointsBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.RpcActions;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.ServiceNotificationTypes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev230526.sdnc.request.header.SdncRequestHeaderBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.operational.mode.catalog.rev211210.operational.mode.catalog.OpenroadmOperationalModes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.operational.mode.catalog.rev211210.operational.mode.catalog.SpecificOperationalModes;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.HardConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev211210.routing.constraints.SoftConstraints;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddOpenroadmOperationalModesToCatalogInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddOpenroadmOperationalModesToCatalogOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddSpecificOperationalModesToCatalogInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.AddSpecificOperationalModesToCatalogOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.EquipmentNotificationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.EquipmentNotificationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.NetworkReOptimizationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.NetworkReOptimizationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelRequestCancelInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OpticalTunnelRequestCancelOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.OrgOpenroadmServiceService;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateBulkInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateBulkOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateComplexResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateComplexResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteComplexResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteComplexResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceDeleteResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckBulkInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckBulkOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceFeasibilityCheckOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureBulkInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureBulkOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReconfigureResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteConfirmResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRerouteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRestorationResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceReversionResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollResultNotificationRequestInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceRollResultNotificationRequestOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceSrlgGetInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceSrlgGetOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateBulkInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateBulkOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfo.TailRetention;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.delete.input.ServiceDeleteReqInfoBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.operational.mode.catalog.rev230526.operational.mode.catalog.OpenroadmOperationalModes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.operational.mode.catalog.rev230526.operational.mode.catalog.SpecificOperationalModes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.routing.constraints.HardConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constraints.rev221209.routing.constraints.SoftConstraints;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.AddOpenroadmOperationalModesToCatalog;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.AddOpenroadmOperationalModesToCatalogInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.AddOpenroadmOperationalModesToCatalogOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.AddSpecificOperationalModesToCatalog;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.AddSpecificOperationalModesToCatalogInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.AddSpecificOperationalModesToCatalogOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalActivationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalActivationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalActivationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalDeactivationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalDeactivationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalDeactivationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalPerformanceInfoRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalPerformanceInfoRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalPerformanceInfoRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalPowerControl;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalPowerControlInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EndTerminalPowerControlOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EquipmentNotification;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EquipmentNotificationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.EquipmentNotificationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.NetworkReOptimization;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.NetworkReOptimizationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.NetworkReOptimizationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OpticalTunnelCreate;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OpticalTunnelCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OpticalTunnelCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OpticalTunnelRequestCancel;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OpticalTunnelRequestCancelInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OpticalTunnelRequestCancelOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.OrgOpenroadmServiceService;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreate;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateBulk;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateComplexResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateComplexResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateComplexResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceCreateResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDelete;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteComplexResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteComplexResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteComplexResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceDeleteResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceFeasibilityCheck;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceFeasibilityCheckBulk;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceFeasibilityCheckBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceFeasibilityCheckBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceFeasibilityCheckInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceFeasibilityCheckOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigure;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureBulk;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReconfigureResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReroute;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteConfirm;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteConfirmInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteConfirmOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteConfirmResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteConfirmResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteConfirmResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRerouteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRestoration;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRestorationInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRestorationOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRestorationResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRestorationResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRestorationResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReversion;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReversionInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReversionOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReversionResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReversionResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceReversionResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRoll;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRollInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRollOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRollResultNotificationRequest;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRollResultNotificationRequestInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceRollResultNotificationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceSrlgGet;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceSrlgGetInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.ServiceSrlgGetOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceCreate;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceCreateBulk;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceCreateBulkInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceCreateBulkOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceCreateOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceDelete;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceDeleteInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.TempServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.service.delete.input.ServiceDeleteReqInfo.TailRetention;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.service.delete.input.ServiceDeleteReqInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501.path.description.atoz.direction.AToZ;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501.path.description.atoz.direction.AToZKey;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501.pce.resource.resource.resource.TerminationPoint;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths;
-import org.opendaylight.yang.gen.v1.nbi.notifications.rev211013.PublishNotificationProcessService;
-import org.opendaylight.yang.gen.v1.nbi.notifications.rev211013.PublishNotificationProcessServiceBuilder;
-import org.opendaylight.yang.gen.v1.nbi.notifications.rev211013.notification.process.service.ServiceAEndBuilder;
-import org.opendaylight.yang.gen.v1.nbi.notifications.rev211013.notification.process.service.ServiceZEndBuilder;
+import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.PublishNotificationProcessService;
+import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.PublishNotificationProcessServiceBuilder;
+import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.notification.process.service.ServiceAEndBuilder;
+import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.notification.process.service.ServiceZEndBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+import org.opendaylight.yangtools.concepts.Registration;
+import org.opendaylight.yangtools.yang.binding.Rpc;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
+import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private NetworkListener networkModelListenerImpl;
private NotificationPublishService notificationPublishService;
private CatalogDataStoreOperations catalogDataStoreOperations;
+ private Registration reg;
@Activate
- public ServicehandlerImpl(@Reference PathComputationService pathComputationService,
+ public ServicehandlerImpl(@Reference RpcProviderService rpcProviderService,
+ @Reference PathComputationService pathComputationService,
@Reference RendererServiceOperations rendererServiceOperations,
@Reference NotificationPublishService notificationPublishService,
@Reference PceListener pceListenerImpl,
this.pceListenerImpl = pceListenerImpl;
this.rendererListenerImpl = rendererListenerImpl;
this.networkModelListenerImpl = networkModelListenerImpl;
+ this.reg = rpcProviderService.registerRpcImplementations(registerRPCs());
LOG.info("ServicehandlerImpl Initiated");
}
+ @Deactivate
+ public void close() {
+ this.reg.close();
+ LOG.info("ServicehandlerImpl Closed");
+ }
+
// This is class is public so that these messages can be accessed from Junit (avoid duplications).
public static final class LogMessages {
}
@Override
- public ListenableFuture<RpcResult<ServiceCreateOutput>> serviceCreate(ServiceCreateInput input) {
+ public final ListenableFuture<RpcResult<ServiceCreateOutput>> serviceCreate(ServiceCreateInput input) {
LOG.info("RPC serviceCreate received");
// Validation
OperationResult validationResult = ServiceCreateValidation.validateServiceCreateRequest(
input, ResponseCodes.FINAL_ACK_YES,
validationResult.getResultMessage(), ResponseCodes.RESPONSE_FAILED);
}
- //Check any presence of services with the same name
+ //Check any presence of services with the same nameequipmentNotification
String serviceName = input.getServiceName();
if (this.serviceDataStoreOperations.getService(serviceName).isPresent()) {
LOG.warn(SERVICE_CREATE_MSG, LogMessages.serviceInDS(serviceName));
return ModelMappingUtils.createCreateServiceReply(input, ResponseCodes.FINAL_ACK_YES,
LogMessages.serviceInDS(serviceName), ResponseCodes.RESPONSE_FAILED);
}
+ // TODO: Here we also have to check if there is an associated temp-service.
+ // TODO: If there is one, delete it from the temp-service-list??
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(false);
this.pceListenerImpl.setTempService(false);
this.pceListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
this.rendererListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
this.rendererListenerImpl.setServiceInput(new ServiceInput(input));
+ // This ensures that the temp-service boolean is false, especially, when
+ // service-create is initiated after the temp-service-create
+ this.rendererListenerImpl.setTempService(false);
this.networkModelListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
LOG.debug(SERVICE_CREATE_MSG, LogMessages.PCE_CALLING);
PathComputationRequestOutput output = this.pceServiceWrapper.performPCE(input, true);
}
@Override
- public ListenableFuture<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
+ public final ListenableFuture<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
String serviceName = input.getServiceDeleteReqInfo().getServiceName();
LOG.info("RPC serviceDelete request received for {}", serviceName);
LOG.debug("serviceDelete: Service '{}' found in datastore", serviceName);
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(false);
+ this.pceListenerImpl.setTempService(false);
this.pceListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
+ this.rendererListenerImpl.setTempService(false);
this.rendererListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
this.rendererListenerImpl.setServiceInput(new ServiceInput(input));
this.networkModelListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
}
@Override
- public ListenableFuture<RpcResult<ServiceFeasibilityCheckOutput>> serviceFeasibilityCheck(
+ public final ListenableFuture<RpcResult<ServiceFeasibilityCheckOutput>> serviceFeasibilityCheck(
ServiceFeasibilityCheckInput input) {
LOG.info("RPC serviceFeasibilityCheck received");
// Validation
}
@Override
- public ListenableFuture<RpcResult<ServiceReconfigureOutput>> serviceReconfigure(ServiceReconfigureInput input) {
+ public final ListenableFuture<RpcResult<
+ ServiceReconfigureOutput>> serviceReconfigure(ServiceReconfigureInput input) {
String serviceName = input.getServiceName();
LOG.info("RPC serviceReconfigure received for {}", serviceName);
Optional<Services> servicesObject = this.serviceDataStoreOperations.getService(serviceName);
}
@Override
- public ListenableFuture<RpcResult<ServiceRestorationOutput>> serviceRestoration(ServiceRestorationInput input) {
+ public final ListenableFuture<RpcResult<
+ ServiceRestorationOutput>> serviceRestoration(ServiceRestorationInput input) {
String serviceName = input.getServiceName();
LOG.info("RPC serviceRestoration received for {}", serviceName);
Optional<Services> servicesObject = this.serviceDataStoreOperations.getService(serviceName);
}
@Override
- public ListenableFuture<RpcResult<EquipmentNotificationOutput>>
+ public final ListenableFuture<RpcResult<EquipmentNotificationOutput>>
equipmentNotification(EquipmentNotificationInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<EquipmentNotificationOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceRerouteConfirmOutput>>
+ public final ListenableFuture<RpcResult<ServiceRerouteConfirmOutput>>
serviceRerouteConfirm(ServiceRerouteConfirmInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceRerouteConfirmOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceRerouteOutput>> serviceReroute(ServiceRerouteInput input) {
+ public final ListenableFuture<RpcResult<ServiceRerouteOutput>> serviceReroute(ServiceRerouteInput input) {
String serviceName = input.getServiceName();
LOG.info("RPC serviceReroute received for {}", serviceName);
Optional<Services> servicesObject = this.serviceDataStoreOperations.getService(serviceName);
}
@Override
- public ListenableFuture<RpcResult<ServiceReversionOutput>> serviceReversion(ServiceReversionInput input) {
+ public final ListenableFuture<RpcResult<ServiceReversionOutput>> serviceReversion(ServiceReversionInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceReversionOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceRollOutput>> serviceRoll(ServiceRollInput input) {
+ public final ListenableFuture<RpcResult<ServiceRollOutput>> serviceRoll(ServiceRollInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceRollOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<NetworkReOptimizationOutput>>
+ public final ListenableFuture<RpcResult<NetworkReOptimizationOutput>>
networkReOptimization(NetworkReOptimizationInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<NetworkReOptimizationOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<TempServiceDeleteOutput>> tempServiceDelete(TempServiceDeleteInput input) {
+ public final ListenableFuture<RpcResult<TempServiceDeleteOutput>> tempServiceDelete(TempServiceDeleteInput input) {
String commonId = input.getCommonId();
LOG.info("RPC temp serviceDelete request received for {}", commonId);
//Check presence of service to be deleted
LOG.debug("service common-id '{}' is compliant", commonId);
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.temp.service.list.Services>
- service =
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526.temp.service.list.Services>
+ serviceOpt =
this.serviceDataStoreOperations.getTempService(commonId);
- if (service.isEmpty()) {
+ if (serviceOpt.isEmpty()) {
LOG.error(TEMP_SERVICE_DELETE_MSG, LogMessages.serviceNotInDS(commonId));
return ModelMappingUtils.createDeleteServiceReply(
input, ResponseCodes.FINAL_ACK_YES,
LogMessages.serviceNotInDS(commonId), ResponseCodes.RESPONSE_FAILED);
}
-
LOG.info("Service '{}' present in datastore !", commonId);
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(false);
+ this.pceListenerImpl.setTempService(true);
this.pceListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
this.rendererListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
this.rendererListenerImpl.setServiceInput(new ServiceInput(input));
this.rendererListenerImpl.setTempService(true);
this.networkModelListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
+ org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev230526
+ .temp.service.list.Services service = serviceOpt.orElseThrow();
org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev210915.ServiceDeleteOutput output =
- this.rendererServiceWrapper.performRenderer(input, ServiceNotificationTypes.ServiceDeleteResult);
+ this.rendererServiceWrapper.performRenderer(input, ServiceNotificationTypes.ServiceDeleteResult,
+ service);
if (output == null) {
LOG.error(TEMP_SERVICE_DELETE_MSG, LogMessages.RENDERER_DELETE_FAILED);
return ModelMappingUtils.createDeleteServiceReply(
}
@Override
- public ListenableFuture<RpcResult<TempServiceCreateOutput>> tempServiceCreate(TempServiceCreateInput input) {
+ public final ListenableFuture<RpcResult<TempServiceCreateOutput>> tempServiceCreate(TempServiceCreateInput input) {
LOG.info("RPC tempServiceCreate received");
// Validation
OperationResult validationResult = ServiceCreateValidation.validateServiceCreateRequest(
validationResult.getResultMessage(), ResponseCodes.RESPONSE_FAILED);
}
+ //Check any presence of temp-service with the same commonId
+ String commonId = input.getCommonId();
+ if (this.serviceDataStoreOperations.getTempService(commonId).isPresent()) {
+ LOG.warn(TEMP_SERVICE_CREATE_MSG, LogMessages.serviceInDS("Temp (" + commonId + ")"));
+ return ModelMappingUtils.createCreateServiceReply(input, ResponseCodes.FINAL_ACK_YES,
+ LogMessages.serviceInDS("Temp (" + commonId + ")"), ResponseCodes.RESPONSE_FAILED);
+ }
+
// Starting service create operation
LOG.debug(TEMP_SERVICE_CREATE_MSG, LogMessages.PCE_CALLING);
this.pceListenerImpl.setInput(new ServiceInput(input));
}
@Override
- public ListenableFuture<RpcResult<
+ public final ListenableFuture<RpcResult<
ServiceDeleteComplexResultNotificationRequestOutput>> serviceDeleteComplexResultNotificationRequest(
ServiceDeleteComplexResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceDeleteComplexResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<
+ public final ListenableFuture<RpcResult<
ServiceCreateResultNotificationRequestOutput>> serviceCreateResultNotificationRequest(
ServiceCreateResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceCreateResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<
+ public final ListenableFuture<RpcResult<
ServiceDeleteResultNotificationRequestOutput>> serviceDeleteResultNotificationRequest(
ServiceDeleteResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceDeleteResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<
+ public final ListenableFuture<RpcResult<
ServiceCreateComplexResultNotificationRequestOutput>> serviceCreateComplexResultNotificationRequest(
ServiceCreateComplexResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceCreateComplexResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceFeasibilityCheckBulkOutput>> serviceFeasibilityCheckBulk(
+ public final ListenableFuture<RpcResult<ServiceFeasibilityCheckBulkOutput>> serviceFeasibilityCheckBulk(
ServiceFeasibilityCheckBulkInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceFeasibilityCheckBulkOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
- /**
- * Send notification to NBI notification in order to publish message.
- * @param service PublishNotificationService
- */
- private void sendNbiNotification(PublishNotificationProcessService service) {
- try {
- notificationPublishService.putNotification(service);
- } catch (InterruptedException e) {
- LOG.warn("Cannot send notification to nbi", e);
- Thread.currentThread().interrupt();
- }
- }
-
-
@Override
- public ListenableFuture<RpcResult<ServiceCreateBulkOutput>> serviceCreateBulk(ServiceCreateBulkInput input) {
+ public final ListenableFuture<RpcResult<ServiceCreateBulkOutput>> serviceCreateBulk(ServiceCreateBulkInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceCreateBulkOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<TempServiceCreateBulkOutput>> tempServiceCreateBulk(
+ public final ListenableFuture<RpcResult<TempServiceCreateBulkOutput>> tempServiceCreateBulk(
TempServiceCreateBulkInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<TempServiceCreateBulkOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceRollResultNotificationRequestOutput>> serviceRollResultNotificationRequest(
- ServiceRollResultNotificationRequestInput input) {
+ public final ListenableFuture<RpcResult<
+ ServiceRollResultNotificationRequestOutput>> serviceRollResultNotificationRequest(
+ ServiceRollResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceRollResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceReconfigureBulkOutput>> serviceReconfigureBulk(
+ public final ListenableFuture<RpcResult<ServiceReconfigureBulkOutput>> serviceReconfigureBulk(
ServiceReconfigureBulkInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceReconfigureBulkOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceReconfigureResultNotificationRequestOutput>>
+ public final ListenableFuture<RpcResult<ServiceReconfigureResultNotificationRequestOutput>>
serviceReconfigureResultNotificationRequest(ServiceReconfigureResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceReconfigureResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceRestorationResultNotificationRequestOutput>>
+ public final ListenableFuture<RpcResult<ServiceRestorationResultNotificationRequestOutput>>
serviceRestorationResultNotificationRequest(ServiceRestorationResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceRestorationResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceReversionResultNotificationRequestOutput>>
+ public final ListenableFuture<RpcResult<ServiceReversionResultNotificationRequestOutput>>
serviceReversionResultNotificationRequest(ServiceReversionResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceReversionResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<ServiceRerouteConfirmResultNotificationRequestOutput>>
+ public final ListenableFuture<RpcResult<ServiceRerouteConfirmResultNotificationRequestOutput>>
serviceRerouteConfirmResultNotificationRequest(ServiceRerouteConfirmResultNotificationRequestInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceRerouteConfirmResultNotificationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<OpticalTunnelCreateOutput>> opticalTunnelCreate(OpticalTunnelCreateInput input) {
+ public final ListenableFuture<RpcResult<
+ OpticalTunnelCreateOutput>> opticalTunnelCreate(OpticalTunnelCreateInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<OpticalTunnelCreateOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
- public ListenableFuture<RpcResult<OpticalTunnelRequestCancelOutput>> opticalTunnelRequestCancel(
+ public final ListenableFuture<RpcResult<OpticalTunnelRequestCancelOutput>> opticalTunnelRequestCancel(
OpticalTunnelRequestCancelInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<OpticalTunnelRequestCancelOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
}
@Override
* @param input AddOpenroadmOperationalModesToCatalogInput to be added to Catalog
* @return Result of the request
*/
- public ListenableFuture<RpcResult<AddOpenroadmOperationalModesToCatalogOutput>>
+ public final ListenableFuture<RpcResult<AddOpenroadmOperationalModesToCatalogOutput>>
addOpenroadmOperationalModesToCatalog(AddOpenroadmOperationalModesToCatalogInput input) {
LOG.info("RPC addOpenroadmOperationalModesToCatalog in progress");
* @param input AddSpecificOperationalModesToCatalogInput to be added to Catalog
* @return Result of the request
*/
- public ListenableFuture<RpcResult<AddSpecificOperationalModesToCatalogOutput>> addSpecificOperationalModesToCatalog(
- AddSpecificOperationalModesToCatalogInput input) {
+ public final ListenableFuture<RpcResult<AddSpecificOperationalModesToCatalogOutput>>
+ addSpecificOperationalModesToCatalog(AddSpecificOperationalModesToCatalogInput input) {
LOG.info("RPC addSpecificOperationalModesToCatalog in progress");
LOG.debug(" Input openSpecificRoadm {}", input);
}
@Override
- public ListenableFuture<RpcResult<ServiceSrlgGetOutput>> serviceSrlgGet(ServiceSrlgGetInput input) {
+ public final ListenableFuture<RpcResult<ServiceSrlgGetOutput>> serviceSrlgGet(ServiceSrlgGetInput input) {
// TODO Auto-generated method stub
- return null;
+ return RpcResultBuilder.<ServiceSrlgGetOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
+ }
+
+ @Override
+ public final ListenableFuture<RpcResult<EndTerminalPerformanceInfoRequestOutput>> endTerminalPerformanceInfoRequest(
+ EndTerminalPerformanceInfoRequestInput input) {
+ // TODO Auto-generated method stub
+ return RpcResultBuilder.<EndTerminalPerformanceInfoRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
+ }
+
+ @Override
+ public final ListenableFuture<RpcResult<EndTerminalActivationRequestOutput>> endTerminalActivationRequest(
+ EndTerminalActivationRequestInput input) {
+ // TODO Auto-generated method stub
+ return RpcResultBuilder.<EndTerminalActivationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
+ }
+
+ @Override
+ public final ListenableFuture<RpcResult<EndTerminalDeactivationRequestOutput>> endTerminalDeactivationRequest(
+ EndTerminalDeactivationRequestInput input) {
+ // TODO Auto-generated method stub
+ return RpcResultBuilder.<EndTerminalDeactivationRequestOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
+ }
+
+ @Override
+ public final ListenableFuture<RpcResult<EndTerminalPowerControlOutput>> endTerminalPowerControl(
+ EndTerminalPowerControlInput input) {
+ // TODO Auto-generated method stub
+ return RpcResultBuilder.<EndTerminalPowerControlOutput>failed()
+ .withError(ErrorType.RPC, ErrorTag.OPERATION_NOT_SUPPORTED, "RPC not implemented yet")
+ .buildFuture();
+ }
+
+ public Registration getRegisteredRpc() {
+ return reg;
+ }
+
+ /**
+ * Send notification to NBI notification in order to publish message.
+ * @param service PublishNotificationService
+ */
+ private void sendNbiNotification(PublishNotificationProcessService service) {
+ try {
+ notificationPublishService.putNotification(service);
+ } catch (InterruptedException e) {
+ LOG.warn("Cannot send notification to nbi", e);
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ private ImmutableClassToInstanceMap<Rpc<?, ?>> registerRPCs() {
+ return ImmutableClassToInstanceMap.<Rpc<?, ?>>builder()
+ .put(ServiceCreate.class, this::serviceCreate)
+ .put(ServiceDelete.class, this::serviceDelete)
+ .put(ServiceFeasibilityCheck.class, this::serviceFeasibilityCheck)
+ .put(ServiceReconfigure.class, this::serviceReconfigure)
+ .put(ServiceRestoration.class, this::serviceRestoration)
+ .put(EquipmentNotification.class, this::equipmentNotification)
+ .put(ServiceRerouteConfirm.class, this::serviceRerouteConfirm)
+ .put(ServiceReroute.class, this::serviceReroute)
+ .put(ServiceReversion.class, this::serviceReversion)
+ .put(ServiceRoll.class, this::serviceRoll)
+ .put(NetworkReOptimization.class, this::networkReOptimization)
+ .put(TempServiceDelete.class, this::tempServiceDelete)
+ .put(TempServiceCreate.class, this::tempServiceCreate)
+ .put(ServiceDeleteComplexResultNotificationRequest.class,
+ this::serviceDeleteComplexResultNotificationRequest)
+ .put(ServiceCreateResultNotificationRequest.class, this::serviceCreateResultNotificationRequest)
+ .put(ServiceDeleteResultNotificationRequest.class, this::serviceDeleteResultNotificationRequest)
+ .put(ServiceCreateComplexResultNotificationRequest.class,
+ this::serviceCreateComplexResultNotificationRequest)
+ .put(ServiceFeasibilityCheckBulk.class, this::serviceFeasibilityCheckBulk)
+ .put(ServiceCreateBulk.class, this::serviceCreateBulk)
+ .put(TempServiceCreateBulk.class, this::tempServiceCreateBulk)
+ .put(ServiceRollResultNotificationRequest.class, this::serviceRollResultNotificationRequest)
+ .put(ServiceReconfigureBulk.class, this::serviceReconfigureBulk)
+ .put(ServiceReconfigureResultNotificationRequest.class, this::serviceReconfigureResultNotificationRequest)
+ .put(ServiceRestorationResultNotificationRequest.class, this::serviceRestorationResultNotificationRequest)
+ .put(ServiceReversionResultNotificationRequest.class, this::serviceReversionResultNotificationRequest)
+ .put(ServiceRerouteConfirmResultNotificationRequest.class,
+ this::serviceRerouteConfirmResultNotificationRequest)
+ .put(OpticalTunnelCreate.class, this::opticalTunnelCreate)
+ .put(OpticalTunnelRequestCancel.class, this::opticalTunnelRequestCancel)
+ .put(AddOpenroadmOperationalModesToCatalog.class, this::addOpenroadmOperationalModesToCatalog)
+ .put(AddSpecificOperationalModesToCatalog.class, this::addSpecificOperationalModesToCatalog)
+ .put(ServiceSrlgGet.class, this::serviceSrlgGet)
+ .put(EndTerminalPerformanceInfoRequest.class, this::endTerminalPerformanceInfoRequest)
+ .put(EndTerminalActivationRequest.class, this::endTerminalActivationRequest)
+ .put(EndTerminalDeactivationRequest.class, this::endTerminalDeactivationRequest)
+ .put(EndTerminalPowerControl.class, this::endTerminalPowerControl)
+ .build();
}
}