← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1550337] Re: api_version_request.matches does not accept a string

 

I don't see this pattern used in Manila or Nova, but it won't work
without a fix.

** Also affects: nova
   Importance: Undecided
       Status: New

** Also affects: manila
   Importance: Undecided
       Status: New

** Changed in: manila
     Assignee: (unassigned) => Scott DAngelo (scott-dangelo)

** Changed in: nova
     Assignee: (unassigned) => Scott DAngelo (scott-dangelo)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1550337

Title:
  api_version_request.matches does not accept a string

Status in Cinder:
  New
Status in Manila:
  New
Status in OpenStack Compute (nova):
  New

Bug description:
  According to the Cinder devref (https://github.com/openstack/cinder/blob/master/doc/source/devref/api_microversion_dev.rst)
  you should be able to use the following pattern:

  def index(self, req):
      <common code>

      req_version = req.api_version_request
      if req_version.matches("3.1", "3.5"):
          ....stuff....
      elif req_version.matches("3.6", "3.10"):
          ....other stuff....
      elif req_version > api_version_request.APIVersionRequest("3.10"):
          ....more stuff.....

      <common code>

  However, the api_version_request.matches() function will not accept a
  string, it requires an api_version_request object.

  Fix this to accept a string.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1550337/+subscriptions