Example #1
0
    def getABStubForComposeService(self, context, composeService):
		'Return a Stub for the supplied composeService, will cache'
		if composeService in self.atomicBroadcastStubsDict:
			return self.atomicBroadcastStubsDict[composeService]
		# Get the IP address of the server that the user registered on
		channel = getGRPCChannel(*bdd_test_util.getPortHostMapping(context.compose_containers, composeService, 7050))
		newABStub = ab_pb2.beta_create_AtomicBroadcast_stub(channel)
		self.atomicBroadcastStubsDict[composeService] = newABStub
		return newABStub
Example #2
0
 def getABStubForComposeService(self, context, composeService):
     'Return a Stub for the supplied composeService, will cache'
     if composeService in self.atomicBroadcastStubsDict:
         return self.atomicBroadcastStubsDict[composeService]
     # Get the IP address of the server that the user registered on
     channel = getGRPCChannel(*bdd_test_util.getPortHostMapping(context.compose_containers, composeService, 7050))
     newABStub = ab_pb2.beta_create_AtomicBroadcast_stub(channel)
     self.atomicBroadcastStubsDict[composeService] = newABStub
     return newABStub
Example #3
0
    def getABStubForComposeService(self, context, composeService):
		'Return a Stub for the supplied composeService, will cache'
		if composeService in self.atomicBroadcastStubsDict:
			return self.atomicBroadcastStubsDict[composeService]
		# Get the IP address of the server that the user registered on
		ipAddress = bdd_test_util.ipFromContainerNamePart(composeService, context.compose_containers)
		channel = getGRPCChannel(ipAddress)
		newABStub = ab_pb2.beta_create_AtomicBroadcast_stub(channel)
		self.atomicBroadcastStubsDict[composeService] = newABStub
		return newABStub
Example #4
0
    def getABStubForComposeService(self, context, composeService):
		'Return a Stub for the supplied composeService, will cache'
		if composeService in self.atomicBroadcastStubsDict:
			return self.atomicBroadcastStubsDict[composeService]
		# Get the IP address of the server that the user registered on
		ipAddress = bdd_test_util.ipFromContainerNamePart(composeService, context.compose_containers)
		channel = getGRPCChannel(ipAddress)
		newABStub = ab_pb2.beta_create_AtomicBroadcast_stub(channel)
		self.atomicBroadcastStubsDict[composeService] = newABStub
		return newABStub