Checks if a given page of an autoinstall contains a particular string.
"""
page = deployment.fetch(page)
- logging.info("checkWebPage:\n\n" + page)
- return page.find(output) != -1
+ result = page.find(output) != -1
+ if result:
+ logging.debug("checkWebPage (passed):\n\n" + page)
+ else:
+ logging.info("checkWebPage (failed):\n\n" + page)
+ return result
def checkConfig(self, deployment):
"""
Checks whether or not an autoinstall has been configured/installed
class InstallFailure(Error):
"""Installation failed for unknown reason."""
- pass
+ def __str__(self):
+ return """Installation failed for unknown reason."""
class RecoverableInstallFailure(InstallFailure):
"""
class UpgradeVerificationFailure(Failure):
"""Upgrade script passed, but website wasn't accessible afterwards"""
- #: String details of failure (possibly stdout or stderr output)
- details = None
- def __init__(self, details):
- self.details = details
def __str__(self):
return """
-ERROR: Upgrade script passed, but website wasn't accessible afterwards. Details:
-
-%s""" % self.details
+ERROR: Upgrade script passed, but website wasn't accessible afterwards. Check
+the debug logs for the contents of the page."""
class BackupFailure(Failure):
"""Backup script failed."""