patch-pbgpp_Application_Handler_py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. $OpenBSD: patch-pbgpp_Application_Handler_py,v 1.1.1.1 2017/01/13 14:15:41 phessler Exp $
  2. Avoid using Kafka
  3. --- pbgpp/Application/Handler.py.orig Fri Nov 25 10:19:53 2016
  4. +++ pbgpp/Application/Handler.py Fri Jan 13 12:18:39 2017
  5. @@ -46,7 +46,7 @@ from pbgpp.Output.Formatters.JSON import JSONFormatter
  6. from pbgpp.Output.Formatters.LineBased import LineBasedFormatter
  7. from pbgpp.Output.Handler import OutputHandler
  8. from pbgpp.Output.Pipes.FilePipe import FilePipe
  9. -from pbgpp.Output.Pipes.KafkaPipe import KafkaPipe
  10. +#from pbgpp.Output.Pipes.KafkaPipe import KafkaPipe
  11. from pbgpp.Output.Pipes.StdOutPipe import StdOutPipe
  12. from pbgpp.PCAP.Ethernet import PCAPEthernet
  13. from pbgpp.PCAP.IP import PCAPIP
  14. @@ -65,8 +65,8 @@ class PBGPPHandler:
  15. self.fields = None
  16. self.progress = False
  17. - self.kafka_server = None
  18. - self.kafka_topic = None
  19. +# self.kafka_server = None
  20. +# self.kafka_topic = None
  21. self.formatter = None
  22. self.pipe = None
  23. @@ -241,10 +241,10 @@ class PBGPPHandler:
  24. self.pipe = FilePipe(self.args.output_target)
  25. elif self.args.pipe == "STDOUT":
  26. self.pipe = StdOutPipe()
  27. - elif self.args.pipe == "KAFKA":
  28. - if self.args.kafka_server is None or self.args.kafka_topic is None:
  29. - self.__parser.error("You need to specify Kafka server (--kafka-server) and topic (--kafka-topic) when using KAFKA as output pipe.")
  30. - self.pipe = KafkaPipe(server=self.args.kafka_server, topic=self.args.kafka_topic)
  31. +# elif self.args.pipe == "KAFKA":
  32. +# if self.args.kafka_server is None or self.args.kafka_topic is None:
  33. +# self.__parser.error("You need to specify Kafka server (--kafka-server) and topic (--kafka-topic) when using KAFKA as output pipe.")
  34. +# self.pipe = KafkaPipe(server=self.args.kafka_server, topic=self.args.kafka_topic)
  35. else:
  36. self.__parser.error("Can't recognize the output pipe.")