def getOpenFlowClientFactory(self, dpid): f = ClientFactory() f.protocol = OpenFlowClientProtocol f.dpid = dpid f.add_controllerConnection = self.add_controllerConnection f.handle_controller_openflow_msg = self.handle_controller_openflow_msg f.remove_controllerConnection = self.remove_controllerConnection return f