def create_snap(self, volume, name, pool=None, protect=False):
        LOG.debug('creating snapshot(%(snap)s) on rbd image(%(img)s)',
                  {'snap': name, 'img': volume})
        with RBDVolumeProxy(self, str(volume), pool=pool) as vol:
            tpool.execute(vol.create_snap, name)
            if protect and not vol.is_protected_snap(name):
                tpool.execute(vol.protect_snap, name)
Extends the model with the given list of documents.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/storage/rbd_utils.py/RBDDriver.create_snap--crossover with--dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/Model.extend