Example #1
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     try:
         self.template = self.loader.load(self.name, cls=NewTextTemplate,
                                          encoding=self.encoding)
     except:
         raise PluginExecutionError("Failed to load template: %s" %
                                    sys.exc_info()[1])
Example #2
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     try:
         self.template = \
             self.environment.get_template(self.name)
     except:
         raise PluginExecutionError("Failed to load template: %s" %
                                    sys.exc_info()[1])
Example #3
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     try:
         self.template = \
             self.environment.get_template(self.name)
     except:
         raise PluginExecutionError("Failed to load template: %s" %
                                    sys.exc_info()[1])
Example #4
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     try:
         self.template = \
             self.loader.load(self.name, cls=NewTextTemplate,
                              encoding=Bcfg2.Options.setup.encoding)
     except:
         raise PluginExecutionError("Failed to load template: %s" %
                                    sys.exc_info()[1])
Example #5
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     if self.data is None:
         return
     # todo: let the user specify a passphrase by name
     try:
         self.data = bruteforce_decrypt(self.data)
     except EVPError:
         raise PluginExecutionError("Failed to decrypt %s" % self.name)
Example #6
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     if self.data is None:
         return
     # todo: let the user specify a passphrase by name
     try:
         self.data = bruteforce_decrypt(self.data)
     except EVPError:
         raise PluginExecutionError("Failed to decrypt %s" % self.name)
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     if self.data is None:
         return
     # todo: let the user specify a passphrase by name
     try:
         self.data = bruteforce_decrypt(self.data, setup=SETUP,
                                        algorithm=get_algorithm(SETUP))
     except EVPError:
         msg = "Failed to decrypt %s" % self.name
         LOGGER.error(msg)
         raise PluginExecutionError(msg)
Example #8
0
 def handle_event(self, event):
     if event.code2str() == 'deleted':
         return
     CfgGenerator.handle_event(self, event)
     try:
         self.template = self.loader.load(self.name, cls=NewTextTemplate,
                                          encoding=self.encoding)
     except Exception:
         msg = "Cfg: Could not load template %s: %s" % (self.name,
                                                        sys.exc_info()[1])
         logger.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
Example #9
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     if self.data is None:
         return
     try:
         self.template = self.loader.load(self.name, cls=NewTextTemplate,
                                          encoding=self.encoding)
     except:
         msg = "Cfg: Could not load template %s: %s" % (self.name,
                                                        sys.exc_info()[1])
         LOGGER.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
 def handle_event(self, event):
     if event.code2str() == 'deleted':
         return
     CfgGenerator.handle_event(self, event)
     try:
         self.template = self.loader.load(self.name,
                                          cls=NewTextTemplate,
                                          encoding=self.encoding)
     except Exception:
         msg = "Cfg: Could not load template %s: %s" % (self.name,
                                                        sys.exc_info()[1])
         logger.error(msg)
         raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
Example #11
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     if self.data is None:
         return
     # todo: let the user specify a passphrase by name
     try:
         self.data = bruteforce_decrypt(self.data)
     except EVPError:
         msg = "Cfg: Failed to decrypt %s" % self.name
         if Bcfg2.Options.setup.lax_decryption:
             self.logger.debug(msg)
         else:
             raise PluginExecutionError(msg)
Example #12
0
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     if self.data is None:
         return
     # todo: let the user specify a passphrase by name
     try:
         self.data = bruteforce_decrypt(self.data)
     except EVPError:
         msg = "Cfg: Failed to decrypt %s" % self.name
         if Bcfg2.Options.setup.lax_decryption:
             self.logger.debug(msg)
         else:
             raise PluginExecutionError(msg)
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     StructFile.HandleEvent(self, event)
     self.cache = dict()
 def handle_event(self, event):
     CfgGenerator.handle_event(self, event)
     StructFile.HandleEvent(self, event)
     self.cache = dict()