def restore(self, backup=None, delete_backup=False):
resp = self._cli.action(self.resource_class, self.get_id(),<EOL>'<STR_LIT>', copyName=backup)<EOL>resp.raise_if_err()<EOL>backup = resp.first_content['<STR_LIT>']<EOL>backup_snap = UnitySnap(_id=backup['<STR_LIT:id>'], cli=self._cli)<EOL>if delete_backup:<EOL><INDENT>log.info("<STR_LIT>"<EOL>"<STR_LIT>".format(backup['<STR_LIT:id>']))<EOL>backup_snap.delete()<EOL><DEDENT>return backup_snap<EOL>
Restore the snapshot to the associated storage resource.

        :param backup: name of the backup snapshot
        :param delete_backup: Whether to delete the backup snap after a
                              successful restore.