~ubuntu-branches/ubuntu/raring/cinder/raring-updates

« back to all changes in this revision

Viewing changes to cinder/api/v2/types.py

Tags: upstream-2013.1~g2
ImportĀ upstreamĀ versionĀ 2013.1~g2

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#    License for the specific language governing permissions and limitations
16
16
#    under the License.
17
17
 
18
 
""" The volume type & volume types extra specs extension"""
 
18
"""The volume type & volume types extra specs extension."""
19
19
 
20
20
from webob import exc
21
21
 
50
50
 
51
51
 
52
52
class VolumeTypesController(wsgi.Controller):
53
 
    """ The volume types API controller for the OpenStack API """
 
53
    """The volume types API controller for the OpenStack API."""
54
54
 
55
55
    _view_builder_class = views_types.ViewBuilder
56
56
 
57
57
    @wsgi.serializers(xml=VolumeTypesTemplate)
58
58
    def index(self, req):
59
 
        """ Returns the list of volume types """
 
59
        """Returns the list of volume types."""
60
60
        context = req.environ['cinder.context']
61
61
        vol_types = volume_types.get_all_types(context).values()
62
62
        return self._view_builder.index(req, vol_types)
63
63
 
64
64
    @wsgi.serializers(xml=VolumeTypeTemplate)
65
65
    def show(self, req, id):
66
 
        """ Return a single volume type item """
 
66
        """Return a single volume type item."""
67
67
        context = req.environ['cinder.context']
68
68
 
69
69
        try: