def create(self, req, body):
        context = req.environ['nova.context']
        authorize(context, action='create')

        if not self.is_valid_body(body, 'snapshot'):
            raise webob.exc.HTTPBadRequest()

        try:
            snapshot = body['snapshot']
            create_info = snapshot['create_info']
            volume_id = snapshot['volume_id']
        except KeyError:
            raise webob.exc.HTTPBadRequest()

        LOG.info(_LI("Create assisted snapshot from volume %s"), volume_id,
                  context=context)

        return self.compute_api.volume_snapshot_create(context, volume_id,
                                                       create_info)
Creates a new snapshot.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/contrib/assisted_volume_snapshots.py/AssistedVolumeSnapshotsController.create