예제 #1
0
 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)
예제 #2
0
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)
예제 #3
0
 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)
예제 #4
0
 def setUp(self):
     cookie = readCookie()
     nodeName = buildNodeName("test-txrabbitmq")
     self.process = Process(nodeName, cookie)
     self.service = RabbitMQControlService(self.process)