def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int = DEFAULT_RPC_TIMEOUT): return TBBRPC( RPCClient(service_name=DEFAULT_TBB_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int = DEFAULT_RPC_TIMEOUT): return ValidationRPC( RPCClient(service_name=VALIDATION_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int = DEFAULT_CLEANUPRPC_TIMEOUT): """Create a CleanupRPC connecting to the given exchange/broker on the default DEFAULT_CLEANUP_SERVICENAME service""" return CleanupRPC( RPCClient(service_name=DEFAULT_CLEANUP_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def create(exchange=DEFAULT_BUSNAME, broker=DEFAULT_BROKER, timeout=DEFAULT_RPC_TIMEOUT): """Create a OTDBRPC connecting to the given exchange/broker on the default DEFAULT_OTDB_SERVICENAME service""" return ObservationControlRPCClient( RPCClient(service_name=DEFAULT_OBSERVATION_CONTROL_SERVICE_NAME, exchange=exchange, broker=broker, timeout=timeout))
def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int = DEFAULT_RPC_TIMEOUT): """Create a SpecificationRPC connecting to the given exchange/broker on the default DEFAULT_MOMQUERY_SERVICENAME service""" return SpecificationRPC( RPCClient(service_name=SPECIFICATION_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def __init__(self, rpc_client: RPCClient = None): """Create an instance of the CleanupRPC using the given RPCClient, or if None given, to a default RPCClient connecting to the DEFAULT_CLEANUP_SERVICENAME service""" super().__init__() self._rpc_client = rpc_client or RPCClient( service_name=DEFAULT_CLEANUP_SERVICENAME)
def __init__(self, rpc_client: RPCClient = RPCClient( service_name=DEFAULT_OBSERVATION_CONTROL_SERVICE_NAME)): super().__init__() self._rpc_client = rpc_client
def __init__(self, rpc_client: RPCClient = None): super(TriggerRPC, self).__init__() self._rpc_client = rpc_client or RPCClient(service_name=TRIGGER_SERVICENAME)
print("** Executing {0}({1})...".format(method_name, arg_dict)) answer = rpc_instance.execute(method_name=method_name, **arg_dict) print("result =", answer) print("======") return answer with TemporaryExchange(__name__) as tmp_exchange: exchange = tmp_exchange.address with BusListenerJanitor( create_service(exchange=exchange, dbcreds=test_db.dbcreds)) as service: with RPCClient( service_name=service.service_name, exchange=exchange, timeout=10 ) as otdbRPC: # Existing: otdb_id:1099268, mom_id:353713 do_rpc(otdbRPC, "TaskGetIDs", { 'OtdbID': 1099268, 'MomID': 353713 }) do_rpc(otdbRPC, "TaskGetIDs", {'OtdbID': 1099268, 'MomID': 5}) do_rpc(otdbRPC, "TaskGetIDs", { 'OtdbID': 1099268, 'MomID': None }) do_rpc(otdbRPC, "TaskGetIDs", {'OtdbID': 5, 'MomID': 353713}) do_rpc_catch_exception('', otdbRPC, "TaskGetIDs", { 'OtdbID': 5, 'MomID': 5
def __init__(self, rpc_client: RPCClient = None): super(ValidationRPC, self).__init__() self._rpc_client = rpc_client or RPCClient(VALIDATION_SERVICENAME)
def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int=DEFAULT_RPC_TIMEOUT): """Create a TriggerRPC connecting to the given exchange/broker on the default TRIGGER_SERVICENAME service""" return TriggerRPC(RPCClient(service_name=TRIGGER_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def __init__(self, rpc_client: RPCClient = None): super(TaskManagementRPC, self).__init__() self._rpc_client = rpc_client or RPCClient(DEFAULT_SERVICENAME)
def __init__(self, rpc_client: RPCClient = None): """Create an instance of the SpecificationRPC using the given RPCClient, or if None given, to a default RPCClient connecting to the SPECIFICATION_SERVICENAME service""" super().__init__() self._rpc_client = rpc_client or RPCClient( service_name=SPECIFICATION_SERVICENAME)
def __init__(self, rpc_client: RPCClient = None): super(TBBRPC, self).__init__() self._rpc_client = rpc_client or RPCClient(DEFAULT_TBB_SERVICENAME)
def __init__(self, rpc_client: RPCClient = None): super(TranslationRPC, self).__init__() self._rpc_client = rpc_client or RPCClient(SPECIFICATIONTRANSLATION_SERVICENAME)
def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int = DEFAULT_RPC_TIMEOUT): return TranslationRPC(RPCClient(service_name=SPECIFICATIONTRANSLATION_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def create(exchange: str = DEFAULT_BUSNAME, broker: str = DEFAULT_BROKER, timeout: int=DEFAULT_RPC_TIMEOUT): """Create a StorageQueryRPC connecting to the given exchange/broker on the default DEFAULT_STORAGEQUERY_SERVICENAME service""" return StorageQueryRPC(RPCClient(service_name=DEFAULT_STORAGEQUERY_SERVICENAME, exchange=exchange, broker=broker, timeout=timeout))
def __init__(self, rpc_client: RPCClient = None): """Create an instance of the StorageQueryRPC using the given RPCClient, or if None given, to a default RPCClient connecting to the DEFAULT_STORAGEQUERY_SERVICENAME service""" super().__init__() self._rpc_client = rpc_client or RPCClient(service_name=DEFAULT_STORAGEQUERY_SERVICENAME)