[Bug 1248519] Re: 'search_opts' unexpected keyword argument for resource manager list()

Doug Hellmann doug at doughellmann.com
Wed Jul 8 22:54:13 UTC 2015


** Changed in: python-cinderclient
       Status: Fix Committed => Fix Released

** Changed in: python-cinderclient
    Milestone: None => 1.3.1

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-cinderclient in Ubuntu.
https://bugs.launchpad.net/bugs/1248519

Title:
  'search_opts' unexpected keyword argument for resource manager list()

Status in Python client library for Cinder:
  Fix Released
Status in python-cinderclient package in Ubuntu:
  Fix Released
Status in python-cinderclient source package in Trusty:
  Fix Released

Bug description:
  Location: cinderclient.base.ManagerWithFind
  Method: findall
  Version: cinder/cinderclient 1.0.7.76, latest master branch as of Nov. 6, 2013

  The following three cinder commands yield the following error:

  Commands:
  type-key
  encryption-type-create
  encryption-type-show

  ERROR: list() got an unexpected keyword argument 'search_opts'

  I've traced this error to the findall() method in the
  cinderclient.base.ManagerWithFind class. A recent commit to python-
  cinderclient (Change-Id: I4e9957b66c11b7e1081f066d189cedc5a3cb2a6c)
  modified the list() call to include a 'search_opts' argument for
  searching across all tenants. The list() method in the
  VolumeEncryptionTypeManager  and the VolumeTypeManager , which support
  the above commands, do not support a 'search_opts' keyword argument,
  causing the error.

  A temporary work around to get the above commands to work is to use the
  resource ID instead of the resource name. The query for the ID uses a
  different code path, bypassing the 'search_opts' problem.

  Proposed Fix:
  Add a 'search_opts' keyword argument to both resource managers and implement the required functionality. The argument should also be added to the list() signature in the cinderclient.base.ManagerWithFind base class to clarify to all current/future subclass developers what the list() implementation requirements are.

  Note:
  There are several other resource managers that lack the list() 'search_opts' keyword argument. See the VolumeBackupManager, the AvailabilityZoneManager, the VolumeTransferManager, the ServiceManager, and the QoSSpecsManager (v1 and v2 for all), all of which are subclasses of base.ManagerWithFind and all capable of triggering this error if called from ManagerWithFind.findall().

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-cinderclient/+bug/1248519/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list