def _create_sensor_client(self, erlang_cookie=None, nodename="txrabbitmq"): #XXX Move the below into the 'txrabbitmq' library from txrabbitmq.service import RabbitMQControlService from twotp.node import Process, readCookie, buildNodeName cookie = readCookie() #TODO: allow passing 'erlang_cookie' nodeName = buildNodeName(nodename) process = Process(nodeName, cookie) return RabbitMQControlService(process)
def rabbitmqctl_client(local_nodename, remote_nodename, erlang_cookie=None): if erlang_cookie: cookie = erlang_cookie else: cookie = readCookie() local_nodename = buildNodeName(local_nodename) process = Process(local_nodename, cookie) return RabbitMQControlService(process, remote_nodename)
def setUp(self): cookie = readCookie() node = os.environ.get("TXRABBITMQ_NODENAME") or "rabbit@localhost" nodeName = buildNodeName(node) self.process = Process(nodeName, cookie) self.service = RabbitMQControlService(self.process, nodeName)
def setUp(self): cookie = readCookie() nodeName = buildNodeName("test-txrabbitmq") self.process = Process(nodeName, cookie) self.service = RabbitMQControlService(self.process)