X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=servicehandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Fservice%2FServiceDataStoreOperations.java;h=ced0f3969eb971f51de4f02173906f2391ee056b;hb=26ae7f03806a3079dca25ec6e3285f2ba369c481;hp=144cc3ef1911cfd159f184d0e7ae16f5c8246f88;hpb=a05bba4c09700f9e2bc0520d5de384477abd0107;p=transportpce.git diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperations.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperations.java index 144cc3ef1..ced0f3969 100644 --- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperations.java +++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/service/ServiceDataStoreOperations.java @@ -8,14 +8,18 @@ package org.opendaylight.transportpce.servicehandler.service; import java.util.Optional; - import org.opendaylight.transportpce.common.OperationResult; import org.opendaylight.transportpce.servicehandler.ServiceInput; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev190624.PathComputationRequestOutput; -import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.State; -import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput; -import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.TempServiceCreateInput; -import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.PathComputationRequestOutput; +import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State; +import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates; +import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceCreateInput; +import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.ServiceList; +import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.TempServiceCreateInput; +import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev211210.service.list.Services; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118.service.path.PathDescription; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.ServicePathList; +import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev171017.service.path.list.ServicePaths; /** * OpenROADM Service operations API providing basic operations on services. @@ -31,26 +35,33 @@ public interface ServiceDataStoreOperations { * get service by name. * * @param serviceName - * unique name of the service + * unique name of the service * @return Optional of Services */ Optional getService(String serviceName); + /** + * get all OR services. + * + * @return Optional of Services + */ + Optional getServices(); + /** * get temp service by common-id. * * @param commonId - * unique common-id of the service + * unique common-id of the service * @return Optional of Services */ - Optional getTempService(String commonId); /** * deleteService service by name. * * @param serviceName - * unique name of the service + * unique name of the service * @return result of Delete operation */ OperationResult deleteService(String serviceName); @@ -59,7 +70,7 @@ public interface ServiceDataStoreOperations { * deleteService service by common-id. * * @param commonId - * unique common-id of the service + * unique common-id of the service * @return result of Delete operation */ OperationResult deleteTempService(String commonId); @@ -68,14 +79,14 @@ public interface ServiceDataStoreOperations { * modifyService service attributes. * * @param serviceName - * unique name of the service + * unique name of the service * @param operationalState - * operational state of service + * operational state of service * @param administrativeState - * administrative state of service + * administrative state of service * @return result of modifyService operation */ - OperationResult modifyService(String serviceName, State operationalState, State administrativeState); + OperationResult modifyService(String serviceName, State operationalState, AdminStates administrativeState); /** * modify Temp Service. @@ -85,7 +96,7 @@ public interface ServiceDataStoreOperations { * @param administrativeState administrative state of service * @return result of modifyTempService operation */ - OperationResult modifyTempService(String commonId, State operationalState, State administrativeState); + OperationResult modifyTempService(String commonId, State operationalState, AdminStates administrativeState); /** * create new service entry. @@ -95,13 +106,15 @@ public interface ServiceDataStoreOperations { */ OperationResult createService(ServiceCreateInput serviceCreateInput); + Optional getServicePath(String serviceName); + /** * create new servicePath entry. * * @param serviceInput - * ServiceInput data for creation of service + * ServiceInput data for creation of service * @param outputFromPce - * output from pce request which is used as input for creating of service. + * output from pce request which is used as input for creating of service. * @return result of createServicePath operation */ OperationResult createServicePath(ServiceInput serviceInput, PathComputationRequestOutput outputFromPce); @@ -115,11 +128,15 @@ public interface ServiceDataStoreOperations { */ OperationResult createTempService(TempServiceCreateInput tempServiceCreateInput); + Optional getServicePaths(); + + OperationResult modifyServicePath(PathDescription pathDescription, String serviceName); + /** * deleteServicePath by name. * * @param serviceName - * unique name of the service + * unique name of the service * @return result of Delete operation */ OperationResult deleteServicePath(String serviceName); @@ -129,7 +146,7 @@ public interface ServiceDataStoreOperations { * This method exists only for backwards compatibility. It will be deleted once refactoring is done. * * @param serviceName - * unique name of the service + * unique name of the service * @param input ServiceCreateInput data * @param output PathComputationRequestOutput data * @param choice 0:modify, 1:delete, 2:write