'Create a new volume transfer.'

@wsgi.response(http_client.ACCEPTED)
def create(self, req, body):

    LOG.debug('Creating    new    volume    transfer    %s', body)
    self.assert_valid_body(body, 'transfer')
    context = req.environ['cinder.context']
    transfer = body['transfer']
    try:
        volume_id = transfer['volume_id']
    except KeyError:
        msg = _('Incorrect    request    body    format')
        raise exc.HTTPBadRequest(explanation=msg)
    name = transfer.get('name', None)
    if (name is not None):
        self.validate_string_length(name, 'Transfer    name', min_length=1, max_length=255, remove_whitespaces=True)
        name = name.strip()
    LOG.info('Creating    transfer    of    volume    %s', volume_id)
    try:
        new_transfer = self.transfer_api.create(context, volume_id, name)
    except exception.InvalidVolume as error:
        raise exc.HTTPBadRequest(explanation=error.msg)
    transfer = self._view_builder.create(req, dict(new_transfer))
    return transfer
