From d33c32499d39804b46fd32f46dabfd4212e8a078 Mon Sep 17 00:00:00 2001
From: kpoulakakis <kpoulakakis@ubitech.eu>
Date: Tue, 4 Jun 2024 16:41:40 +0300
Subject: [PATCH] Return an empty object.

---
 .../service/AutomationServiceServicerImpl.py  | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/automation/service/AutomationServiceServicerImpl.py b/src/automation/service/AutomationServiceServicerImpl.py
index 173cb89e3..e3dd7864e 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()
-- 
GitLab