def deactivate_tracing(self): lm_function = lambda request: self.lm_stub.deactivateTracing.future( request=request, metadata=self.metadata_call) response = self._call_logicmodule(CommonMessages.EmptyMessage(), lm_function) if response.isException: raise DataClayException(response.exceptionMessage)
def check_alive(self): lm_function = lambda request: self.lm_stub.checkAlive.future( request=request, metadata=self.metadata_call) response = self._call_logicmodule(CommonMessages.EmptyMessage(), lm_function) if response.isException: raise DataClayException(response.exceptionMessage)
def return_empty_message(resp_obs): """Return a protobuf empty message. :param resp_obs: string msg with UUID. """ resp = common_messages.EmptyMessage() resp_obs(resp)
def get_num_objects(self): lm_function = lambda request: self.lm_stub.getNumObjects.future( request=request, metadata=self.metadata_call) response = self._call_logicmodule(CommonMessages.EmptyMessage(), lm_function) if response.excInfo.isException: raise DataClayException(response.excInfo.exceptionMessage) return response.numObjs
def is_prefetching_enabled(self): lm_function = lambda request: self.lm_stub.isPrefetchingEnabled.future( request=request, metadata=self.metadata_call) response = self._call_logicmodule(CommonMessages.EmptyMessage(), lm_function) if response.excInfo.isException: raise DataClayException(response.excInfo.exceptionMessage) return response.enabled
def deactivate_tracing(self): try: response = self.ds_stub.deactivateTracing( CommonMessages.EmptyMessage()) except RuntimeError as e: raise e if response.isException: raise DataClayException(response.exceptionMessage)
def get_dataclay_id(self): lm_function = lambda request: self.lm_stub.getDataClayID.future( request=request, metadata=self.metadata_call) response = self._call_logicmodule(CommonMessages.EmptyMessage(), lm_function) if response.excInfo.isException: raise DataClayException(response.exceptionMessage) return Utils.get_id(response.dataClayID)
def get_traces(self): try: response = self.ds_stub.getTraces(CommonMessages.EmptyMessage()) except RuntimeError as e: raise e result = dict() for k, v in response.stubs.items(): result[k] = v return result
def get_traces(self): lm_function = lambda request: self.lm_stub.getTraces.future( request=request, metadata=self.metadata_call) response = self._call_logicmodule(CommonMessages.EmptyMessage(), lm_function) if response.excInfo.isException: raise DataClayException(response.excInfo.exceptionMessage) result = dict() for k, v in response.traces.items(): result[k] = v return result