@retry()
    def erase_snapshot(self, name):
        if self.has_snapshot(name):

            snapshot = self._get_snapshot(name)
            snap_type = snapshot.get_type
            if snap_type == 'external':
                # EXTERNAL SNAPSHOT DELETE
                if snapshot.children_num > 0:
                    logger.error("Cannot delete external snapshots "
                                 "with children")
                    return

                self.destroy()

                # Update domain to snapshot state
                xml_domain = snapshot._xml_tree.find('domain')
                self.driver.conn.defineXML(ET.tostring(xml_domain))
                self._delete_snapshot_files(snapshot)
                snapshot.delete(2)

                for disk in self.disk_devices:
                    if disk.device == 'disk':
                        snap_disk = disk.volume
                        # update disk on node
                        disk.volume = disk.volume.backing_store
                        disk.save()
                        snap_disk.remove()

            else:
                # ORIGINAL DELETE
                snapshot.delete(0)
dataset/ETHPy150Open openstack/fuel-devops/devops/driver/libvirt/libvirt_driver.py/LibvirtNode.erase_snapshot/original