Commit cee2767c authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

SIMAP Connector - SimapUpdater:

- Skip context events
- Polish code
parent 46b973bd
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -14,9 +14,9 @@


import logging, queue, threading
from typing import Any, Callable, Optional, Set
from typing import Any, Optional, Set
from common.DeviceTypes import DeviceTypeEnum
from common.proto.context_pb2 import DeviceEvent, Empty, EventTypeEnum, LinkEvent, TopologyEvent
from common.proto.context_pb2 import ContextEvent, DeviceEvent, Empty, LinkEvent, TopologyEvent
from common.tools.grpc.BaseEventCollector import BaseEventCollector
from common.tools.grpc.BaseEventDispatcher import BaseEventDispatcher
from common.tools.grpc.Tools import grpc_message_to_json_string
@@ -69,6 +69,11 @@ class EventDispatcher(BaseEventDispatcher):
        LOGGER.warning(MSG.format(grpc_message_to_json_string(event)))


    def dispatch_context(self, context_event : ContextEvent) -> None:
        MSG = 'Skipping Context Event: {:s}'
        LOGGER.debug(MSG.format(grpc_message_to_json_string(context_event)))


    def dispatch_topology_create(self, topology_event : TopologyEvent) -> None:
        MSG = 'Processing Topology Event: {:s}'
        LOGGER.info(MSG.format(grpc_message_to_json_string(topology_event)))