micro version not able to handle V3.1

Bug #1552088 reported by Sheel Rana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Low
Unassigned

Bug Description

Seems some issue in cinder/api/openstack/api_version_request.py

If we pass ("3.1", None), some sample debug prints:

ver_major= 1
ver_minor= 0
ver_major= 2
ver_minor= 0
ver_major= 3
ver_minor= 0

Request parameters:
GET /v3/fake/volumes HTTP/1.0
Openstack-Volume-Microversion: 3.1

versionString=3.1
major_Version extracted=3
minor_Version extracted=1
API Version Request Major: 3, Minor: 1

How to reproduce:

Step 1: update Max_Version field in "cinder/api/openstack/api_version_request.py"

_MIN_API_VERSION = "3.0"
_MAX_API_VERSION = "3.1"

Step 2: Run below test case to check latest version:

class V3TestCase(test.TestCase):

    def setUp(self):
        super(self.__class__, self).setUp()
        self.controller = volumes.VolumeController('VolumeActions')

    @mock.patch.object(vol, 'check_volume_filters_strict')
    def test_check_volume_filters_strict(self, filter_volume):
        print("Test Start")
        volume_api = cinder.volume.api.API()
        req = fakes.HTTPRequest.blank('/fake/volumes', base_url='http://localhost/v3')
        req.method = 'GET'
        req.content_type = 'application/json'
        req.headers = {version_header_name: 3.1}
        response = self.controller.index(req)
        self.assertTrue(filter_volume.called)

tox -epy27 -- --no-discover cinder.tests.unit.test_volume.V3TestCase.test_check_volume_filters_strict

Changed in cinder:
importance: Undecided → High
description: updated
Changed in cinder:
importance: High → Low
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.