Skip to content
Snippets Groups Projects
Commit d33c3249 authored by Konstantinos Poulakakis's avatar Konstantinos Poulakakis
Browse files

Return an empty object.

parent 76d76870
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!238Automation component skeleton
......@@ -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()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment