Exemplo n.º 1
0
 def reset(self):
     self.system = System.get_instance()
     self.config = AttributeDictionary()
     self.resources = {}
     self.resource_list = []
     self.delayed_actions = set()
     self.update_config({'date': datetime.now(), 'kokki.long_version': long_version()})
Exemplo n.º 2
0
 def meta(self):
     if self._meta is None:
         metapath = os.path.join(self.path, "metadata.py")
         with open(metapath, "rb") as fp:
             source = fp.read()
         meta = {'system': System.get_instance()}
         exec compile(source, metapath, "exec") in meta
         self._meta = meta
     return self._meta
Exemplo n.º 3
0
 def meta(self):
     if self._meta is None:
         metapath = os.path.join(self.path, "metadata.py")
         with open(metapath, "rb") as fp:
             source = fp.read()
         meta = {"system": System.get_instance()}
         exec compile(source, metapath, "exec") in meta
         self._meta = meta
     return self._meta
Exemplo n.º 4
0
 def reset(self):
     self.system = System.get_instance()
     self.config = AttributeDictionary()
     self.resources = {}
     self.resource_list = []
     self.delayed_actions = set()
     self.update_config({
         'date': datetime.now(),
         'kokki.long_version': long_version(),
         'kokki.backup.path': '/tmp/kokki/backup',
         'kokki.backup.prefix': datetime.now().strftime("%Y%m%d%H%M%S"),
     })
Exemplo n.º 5
0
 def reset(self):
     self.system = System.get_instance()
     self.config = AttributeDictionary()
     self.resources = {}
     self.resource_list = []
     self.delayed_actions = set()
     self.update_config({
         'date': datetime.now(),
         'kokki.long_version': long_version(),
         'kokki.backup.path': '/tmp/kokki/backup',
         'kokki.backup.prefix': datetime.now().strftime("%Y%m%d%H%M%S"),
     })
Exemplo n.º 6
0
    def meta(self):
        if self._meta is None:
            metapath = os.path.join(self.path, "metadata.py")
            if not os.path.exists(metapath):
                self.log.warning("Metadata for cookbook %s not found" % self.name)
            else:
                with open(metapath, "rb") as fp:
                    source = fp.read()
                meta = {'system': System.get_instance()}
                exec compile(source, metapath, "exec") in meta
                self._meta = meta

        return self._meta