def set_journal(self, default=False):
"""
Return the journal device, if defined
"""
if self._config_version() == OSDConfig.V1:
struct = self._convert_data_journals(__pillar__['storage']['data+journals'])
log.debug("struct: \n{}".format(pprint.pformat(struct)))
if self.device in struct:
return struct[self.device]
else:
log.info("No journal specified for {}".format(self.device))
if self._config_version() == OSDConfig.V2:
if (self.device in self.tli and
'journal' in self.tli[self.device]):
return self.tli[self.device]['journal']
else:
log.info("No journal specified for {}".format(self.device))
return default
# pylint: disable=no-self-use
评论列表
文章目录