Beispiel #1
0
 def _formatted_config(self):
     cfg = dict(self.config["holland:backup"])
     cfg["stop-time"] = format_datetime(cfg["stop-time"])
     cfg["start-time"] = format_datetime(cfg["start-time"])
     cfg["estimated-size"] = format_bytes(cfg["estimated-size"])
     cfg["on-disk-size"] = format_bytes(cfg["on-disk-size"])
     return cfg
Beispiel #2
0
    def __str__(self):
        """
        format plugin info
        """
        from textwrap import dedent
        from holland.core.util.fmt import format_bytes, format_datetime

        return (
            dedent(
                """
        Backup: %s
        start-time:     %s
        stop-time:      %s
        estimated-size: %s
        on-disk-size:   %s
        """
            ).strip()
            % (
                self.name,
                format_datetime(self.config.lookup("holland:backup.start-time")),
                format_datetime(self.config.lookup("holland:backup.stop-time")),
                format_bytes(self.config.lookup("holland:backup.estimated-size")),
                format_bytes(self.config.lookup("holland:backup.on-disk-size")),
            )
        )
Beispiel #3
0
 def _formatted_config(self):
     from holland.core.util.fmt import format_bytes, format_datetime
     cfg = dict(self.config['holland:backup'])
     cfg['stop-time'] = format_datetime(cfg['stop-time'])
     cfg['start-time'] = format_datetime(cfg['start-time'])
     cfg['estimated-size'] = format_bytes(cfg['estimated-size'])
     cfg['on-disk-size'] = format_bytes(cfg['on-disk-size'])
     return cfg
Beispiel #4
0
 def _formatted_config(self):
     from holland.core.util.fmt import format_bytes, format_datetime
     cfg = dict(self.config['holland:backup'])
     cfg['stop-time'] = format_datetime(cfg['stop-time'])
     cfg['start-time'] = format_datetime(cfg['start-time'])
     cfg['estimated-size'] = format_bytes(cfg['estimated-size'])
     cfg['on-disk-size'] = format_bytes(cfg['on-disk-size'])
     return cfg
Beispiel #5
0
 def __str__(self):
     """
     format plugin info
     """
     return (
         dedent(
             """
     Backup: %s
     start-time:     %s
     stop-time:      %s
     estimated-size: %s
     on-disk-size:   %s
     """
         ).strip()
         % (
             self.name,
             format_datetime(self.config.lookup("holland:backup.start-time")),
             format_datetime(self.config.lookup("holland:backup.stop-time")),
             format_bytes(self.config.lookup("holland:backup.estimated-size")),
             format_bytes(self.config.lookup("holland:backup.on-disk-size")),
         )
     )