<commit_before># Copyright 2011 OpenStack Foundation
# Copyright 2013 IBM Corp.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

import inspect
import math
import time

from lxml import etree
import six
import webob
from xml.dom import minidom
from xml.parsers import expat

from cinder import exception
from cinder.openstack.common import gettextutils
from cinder.openstack.common import jsonutils
from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi


XMLNS_V1 = 'http://docs.openstack.org/volume/api/v1'
XMLNS_ATOM = 'http://www.w3.org/2005/Atom'

LOG = logging.getLogger(__name__)

# The vendor content types should serialize identically to the non-vendor
# content types. So to avoid littering the code with both options, we
# map the vendor to the other when looking up the type
_CONTENT_TYPE_MAP = {
    'application/vnd.openstack.volume+json': 'application/json',
    'application/vnd.openstack.volume+xml': 'application/xml',
}

SUPPORTED_CONTENT_TYPES = (
    'application/json',
    'application/vnd.openstack.volume+json',
    'application/xml',
    'application/vnd.openstack.volume+xml',
)

_MEDIA_TYPE_MAP = {
    'application/vnd.openstack.volume+json': 'json',
    'application/json': 'json',
    'application/vnd.openstack.volume+xml': 'xml',
    'application/xml': 'xml',
    'application/atom+xml': 'atom',
}


class Request(webob.Request):
    """Add some OpenStack API-specific logic to the base webob.Request."""<commit_msg>Remove unused variable<commit_after># Copyright 2011 OpenStack Foundation
# Copyright 2013 IBM Corp.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

import inspect
import math
import time

from lxml import etree
import six
import webob
from xml.dom import minidom
from xml.parsers import expat

from cinder import exception
from cinder.openstack.common import gettextutils
from cinder.openstack.common import jsonutils
from cinder.openstack.common import log as logging
from cinder import utils
from cinder import wsgi


XMLNS_V1 = 'http://docs.openstack.org/volume/api/v1'
XMLNS_ATOM = 'http://www.w3.org/2005/Atom'

LOG = logging.getLogger(__name__)

SUPPORTED_CONTENT_TYPES = (
    'application/json',
    'application/vnd.openstack.volume+json',
    'application/xml',
    'application/vnd.openstack.volume+xml',
)

_MEDIA_TYPE_MAP = {
    'application/vnd.openstack.volume+json': 'json',
    'application/json': 'json',
    'application/vnd.openstack.volume+xml': 'xml',
    'application/xml': 'xml',
    'application/atom+xml': 'atom',
}


class Request(webob.Request):
    """Add some OpenStack API-specific logic to the base webob.Request."""
{'fraction_non_alphanumeric': 0.09377504675394069, 'fraction_numerical': 0.01015228426395939, 'mean_word_length': 4.1287671232876715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '490840', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1086, 'n_words': 381}