Example #1
0
 def sandesh_logging_params_status_handle_request(self, sandesh_req):
     # Return the logging params
     sandesh_logging_resp = SandeshLoggingParams(
         enable=self._sandesh.is_local_logging_enabled(),
         category=self._sandesh.logging_category(),
         level=SandeshLevel._VALUES_TO_NAMES[self._sandesh.logging_level()])
     sandesh_logging_resp.response(sandesh_req.context())
 def sandesh_logging_params_set_handle_request(self, sandesh_req):
     # Set the logging params
     if sandesh_req.enable is not None:
         if sandesh_req.enable:
             benable = True
         else:
             benable = False
         self._sandesh.set_local_logging(benable)
     if sandesh_req.category is not None:
         self._sandesh.set_logging_category(sandesh_req.category)
     if sandesh_req.log_level is not None:
         self._sandesh.set_logging_level(sandesh_req.log_level)
     if sandesh_req.sandesh_throttling_rate is not None:
         SandeshSystem.set_sandesh_send_rate_limit(
             sandesh_req.sandesh_throttling_rate)
     # Return the logging params
     sandesh_logging_resp = SandeshLoggingParams(
         enable=self._sandesh.is_local_logging_enabled(),
         category=self._sandesh.logging_category(),
         log_level=SandeshLevel._VALUES_TO_NAMES[
             self._sandesh.logging_level()],
         sandesh_throttling_rate=SandeshSystem.get_sandesh_send_rate_limit(
         ))
     sandesh_logging_resp.response(sandesh_req.context(),
                                   sandesh=self._sandesh)
 def sandesh_logging_params_status_handle_request(self, sandesh_req):
     # Return the logging params
     sandesh_logging_resp = SandeshLoggingParams(
         enable=self._sandesh.is_local_logging_enabled(),
         category=self._sandesh.logging_category(),
         log_level=SandeshLevel._VALUES_TO_NAMES[self._sandesh.logging_level()])
     sandesh_logging_resp.response(sandesh_req.context(),
                                   sandesh=self._sandesh)
Example #4
0
 def sandesh_logging_params_status_handle_request(self, sandesh_req):
     # Return the logging params
     sandesh_logging_resp = SandeshLoggingParams(
         enable=self._sandesh.is_local_logging_enabled(),
         category=self._sandesh.logging_category(
         ),
         log_level=SandeshLevel._VALUES_TO_NAMES[self._sandesh.logging_level()],
         sandesh_throttling_rate=SandeshSystem.get_sandesh_send_rate_limit())
     sandesh_logging_resp.response(sandesh_req.context(),
                                   sandesh=self._sandesh)
 def sandesh_logging_params_set_handle_request(self, sandesh_req):
     # Set the logging params
     if sandesh_req.enable is not None:
         if sandesh_req.enable:
             benable = True
         else:
             benable = False
         self._sandesh.set_local_logging(benable)
     if sandesh_req.category is not None:
         self._sandesh.set_logging_category(sandesh_req.category)
     if sandesh_req.log_level is not None:
         self._sandesh.set_logging_level(sandesh_req.log_level)
     # Return the logging params
     sandesh_logging_resp = SandeshLoggingParams(
         enable=self._sandesh.is_local_logging_enabled(),
         category=self._sandesh.logging_category(),
         log_level=SandeshLevel._VALUES_TO_NAMES[self._sandesh.logging_level()])
     sandesh_logging_resp.response(sandesh_req.context(),
                                   sandesh=self._sandesh)