diff --git a/src/automation/service/AutomationServiceServicerImpl.py b/src/automation/service/AutomationServiceServicerImpl.py index 173cb89e369e292dc014aac427d4986963d6e18f..e3dd7864ef39af20a201d70ebfb2277cedaa891d 100644 --- a/src/automation/service/AutomationServiceServicerImpl.py +++ b/src/automation/service/AutomationServiceServicerImpl.py @@ -12,10 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, os, grpc +import grpc , logging, os, grpc from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.Decorator import MetricsPool from common.proto.automation_pb2_grpc import AutomationServiceServicer +from common.proto.automation_pb2 import ( ZSMCreateRequest , ZSMService ,ZSMServiceID ,ZSMServiceState,ZSMCreateUpdate , ZSMServiceStateEnum) +from common.proto.context_pb2 import ( ServiceId , ContextId , Uuid , Empty) +from common.proto.policy_pb2 import ( PolicyRuleList) LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('Automation', 'RPC') @@ -23,22 +26,27 @@ METRICS_POOL = MetricsPool('Automation', 'RPC') class AutomationServiceServicerImpl(AutomationServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) - def ZSMCreate(self) -> None: + def ZSMCreate(self, request : ZSMCreateRequest, context : grpc.ServicerContext) -> ZSMService: LOGGER.info('NOT IMPLEMENTED ZSMCreate') + return ZSMService() @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) - def ZSMUpdate(self) -> None: + def ZSMUpdate(self, request : ZSMCreateUpdate, context : grpc.ServicerContext) -> ZSMService: LOGGER.info('NOT IMPLEMENTED ZSMUpdate') + return ZSMService() @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) - def ZSMDelete(self) -> None: + def ZSMDelete(self, request : ZSMServiceID, context : grpc.ServicerContext) -> ZSMServiceState: LOGGER.info('NOT IMPLEMENTED ZSMDelete') + return ZSMServiceState() @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) - def ZSMGetById(self) -> None: + def ZSMGetById(self, request : ZSMServiceID, context : grpc.ServicerContext) -> ZSMService: LOGGER.info('NOT IMPLEMENTED ZSMGetById') + return ZSMService() @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) - def ZSMGetByService(self) -> None: + def ZSMGetByService(self, request : ServiceId, context : grpc.ServicerContext) -> ZSMService: LOGGER.info('NOT IMPLEMENTED ZSMGetByService') + return ZSMService()