From 2f0863b7d4d20198f496534d5ffef85e68ff45fc Mon Sep 17 00:00:00 2001 From: Xiao Chen Date: Mon, 20 Jan 2014 15:29:55 +0800 Subject: [PATCH] Fix 'search_opts' unexpected keyword argument error When executing 'encryption-type-create' command using resource name, it will use the findall() in base.py, then error will occur because list() in findall() used 'search_opts' argument which list() in VolumeEncryptionTypeManager did not have. Some other command like 'transfer-delete' met same issue. This patch will add 'search_opts' argument in list() function in child class to avoid the bug. Closes-Bug: #1248519 Related-Bug: #1252665 Change-Id: If1cd8b812af21335e5d4351766539a927a8fbdf4 --- cinderclient/v1/volume_encryption_types.py | 2 +- cinderclient/v1/volume_transfers.py | 2 +- cinderclient/v2/volume_encryption_types.py | 2 +- cinderclient/v2/volume_transfers.py | 2 +- doc/source/index.rst | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cinderclient/v1/volume_encryption_types.py b/cinderclient/v1/volume_encryption_types.py index b97c6f02a..60d2f47a9 100644 --- a/cinderclient/v1/volume_encryption_types.py +++ b/cinderclient/v1/volume_encryption_types.py @@ -36,7 +36,7 @@ class VolumeEncryptionTypeManager(base.ManagerWithFind): """ resource_class = VolumeEncryptionType - def list(self): + def list(self, search_opts=None): """ List all volume encryption types. diff --git a/cinderclient/v1/volume_transfers.py b/cinderclient/v1/volume_transfers.py index 8aace0231..e6b0e30ab 100644 --- a/cinderclient/v1/volume_transfers.py +++ b/cinderclient/v1/volume_transfers.py @@ -64,7 +64,7 @@ class VolumeTransferManager(base.ManagerWithFind): """ return self._get("/os-volume-transfer/%s" % transfer_id, "transfer") - def list(self, detailed=True): + def list(self, detailed=True, search_opts=None): """Get a list of all volume transfer. :rtype: list of :class:`VolumeTransfer` diff --git a/cinderclient/v2/volume_encryption_types.py b/cinderclient/v2/volume_encryption_types.py index b97c6f02a..60d2f47a9 100644 --- a/cinderclient/v2/volume_encryption_types.py +++ b/cinderclient/v2/volume_encryption_types.py @@ -36,7 +36,7 @@ class VolumeEncryptionTypeManager(base.ManagerWithFind): """ resource_class = VolumeEncryptionType - def list(self): + def list(self, search_opts=None): """ List all volume encryption types. diff --git a/cinderclient/v2/volume_transfers.py b/cinderclient/v2/volume_transfers.py index 8aace0231..e6b0e30ab 100644 --- a/cinderclient/v2/volume_transfers.py +++ b/cinderclient/v2/volume_transfers.py @@ -64,7 +64,7 @@ class VolumeTransferManager(base.ManagerWithFind): """ return self._get("/os-volume-transfer/%s" % transfer_id, "transfer") - def list(self, detailed=True): + def list(self, detailed=True, search_opts=None): """Get a list of all volume transfer. :rtype: list of :class:`VolumeTransfer` diff --git a/doc/source/index.rst b/doc/source/index.rst index 8475660d5..5f40bb13b 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -43,6 +43,7 @@ MASTER .. _1251385: http://bugs.launchpad.net/python-cinderclient/+bug/1251385 .. _1264415: http://bugs.launchpad.net/python-cinderclient/+bug/1264415 .. _1258489: http://bugs.launchpad.net/python-cinderclient/+bug/1258489 +.. _1248519: http://bugs.launchpad.net/python-cinderclient/+bug/1248519 1.0.7 -----