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()})
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
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
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"), })
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