'Perform the maximal amount of repair within the specified
protection level.
:param protection_level: the protection level to use for limiting
repairs, a host_protections.Protection'

def repair_with_protection(self, protection_level):

    protection = host_protections.Protection
    if (protection_level == protection.DO_NOT_REPAIR):
        logging.info('Protection    is    "Do    not    repair"    so    just    verifying')
        self.verify()
    elif (protection_level == protection.REPAIR_FILESYSTEM_ONLY):
        logging.info('Attempting    filesystem-only    repair')
        self.repair_filesystem_only()
    elif (protection_level == protection.REPAIR_SOFTWARE_ONLY):
        logging.info('Attempting    software    repair    only')
        self.repair_software_only()
    elif (protection_level == protection.NO_PROTECTION):
        logging.info('Attempting    full    repair')
        self.repair_full()
    else:
        raise NotImplementedError(('Unknown    host    protection    level    %s' % protection_level))
