Esempio n. 1
0
 def __init__(self, config, logger, parameters):
     ActionPlugin.__init__(self, config, logger, parameters)
     if not "source" in parameters.keys():
         self.raiseException("EnrichRegexp", "Need parameter 'source'.")
     if not "target" in parameters.keys():
         self.raiseException("EnrichRegexp", "Need parameter 'target'.")
     if not "regexp" in parameters.keys():
         self.raiseException("EnrichRegexp", "Need parameter 'regexp'.")
     self.source = parameters['source']
     self.target = parameters['target']
     try:
         self.regexp = re.compile(parameters['regexp'])
     except re.error:
         self.raiseException("EnrichRegexp", "Error compiling regexp.")
Esempio n. 2
0
	def __init__(self, config, logger, parameters):
		ActionPlugin.__init__(self, config, logger, parameters)
		if not parameters.has_key("subject"):
			self.raiseException("MailAction", "Plugin needs parameter 'subject'.")
		if not parameters.has_key("text"):
			self.raiseException("MailAction", "Plugin needs parameter 'text'.")
		if not parameters.has_key("to"):
			self.raiseException("MailAction", "Plugin needs parameter 'to'.")
		if not parameters.has_key("from"):
			self.raiseException("MailAction", "Plugin needs parameter 'from'.")
		self.to = parameters['to']
		self.from_ = parameters['from']
		self.text = parameters['text']
		self.subject = parameters['subject']
Esempio n. 3
0
 def __init__(self, config, logger, parameters):
     ActionPlugin.__init__(self, config, logger, parameters)
     if not "source" in parameters.keys():
         self.raiseException("EnrichRegexp", "Need parameter 'source'.")
     if not "target" in parameters.keys():
         self.raiseException("EnrichRegexp", "Need parameter 'target'.")
     if not "regexp" in parameters.keys():
         self.raiseException("EnrichRegexp", "Need parameter 'regexp'.")
     self.source = parameters["source"]
     self.target = parameters["target"]
     try:
         self.regexp = re.compile(parameters["regexp"])
     except re.error:
         self.raiseException("EnrichRegexp", "Error compiling regexp.")
Esempio n. 4
0
 def __init__(self, config, logger, parameters):
     ActionPlugin.__init__(self, config, logger, parameters)
     if not parameters.has_key("subject"):
         self.raiseException("MailAction",
                             "Plugin needs parameter 'subject'.")
     if not parameters.has_key("text"):
         self.raiseException("MailAction", "Plugin needs parameter 'text'.")
     if not parameters.has_key("to"):
         self.raiseException("MailAction", "Plugin needs parameter 'to'.")
     if not parameters.has_key("from"):
         self.raiseException("MailAction", "Plugin needs parameter 'from'.")
     self.to = parameters['to']
     self.from_ = parameters['from']
     self.text = parameters['text']
     self.subject = parameters['subject']