self.logger.error("Backup FAILED at {} (see {} ).".format(backup_end,status_url))
elifnotbackup_started:
self.logger.error("Can't find backup start date. Is there a problem with status file? (see {} ).".format(status_url))
elifbackup_start<prev_cron:
self.logger.error("Backup didn't start at correct time: it started at {} but should have started after {}. (see {} ).".format(backup_start,prev_cron,status_url))
elifnotbackup_ended:
self.logger.info("Backup currently running, started at {} (see {} ).".format(backup_start,status_url))
else:
self.logger.info("Backup OK, started at {} and lasted {} (see full stats at {} and status at {} ).".format(
backup_start,
backup_end-backup_start,
statistic_url,
status_url
))
deftest(self):
"""
Test is never failing because we don't want to check when buildout deploy
the instance that the backup is working as it may not have started yet.
"""
returnTestResult(problem=False,message="")
defanomaly(self):
"""
Anomaly returns a TestResult instead of AnomalyResult because we don't
want to call bang when there is a problem. Usually the problem won't be
in the deployment of this instance but rather in the instance we are