'Creates a new snapshot.'

@wsgi.Controller.api_version('2.1', MAX_PROXY_API_SUPPORT_VERSION)
@extensions.expected_errors((400, 403))
@validation.schema(volumes_schema.snapshot_create)
def create(self, req, body):

    context = req.environ['nova.context']
    context.can(vol_policies.BASE_POLICY_NAME)
    snapshot = body['snapshot']
    volume_id = snapshot['volume_id']
    force = snapshot.get('force', False)
    force = strutils.bool_from_string(force, strict=True)
    if force:
        create_func = self.volume_api.create_snapshot_force
    else:
        create_func = self.volume_api.create_snapshot
    try:
        new_snapshot = create_func(context, volume_id, snapshot.get('display_name'), snapshot.get('display_description'))
    except exception.OverQuota as e:
        raise exc.HTTPForbidden(explanation=e.format_message())
    retval = _translate_snapshot_detail_view(context, new_snapshot)
    return {'snapshot': retval}
