Workaround SDK bug in listing shares
python-manilaclient 3.3.0 [1] has a bug that causes the shares panel to fail to load with an error: Error: Unable to retrieve share list. Details 'NoneType' object has no attribute 'pop' Workaround this problem so we don't have to add the client version to a block-list in the UI's requirements files. Closes-Bug: #1967312 [1] https://pypi.org/project/python-manilaclient/3.3.0/ Change-Id: I9e79972d9aca4fc7845f4d274751351d948f41ef Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
parent
99c0be8e7f
commit
3221aceb34
|
@ -88,6 +88,7 @@ def manilaclient(request):
|
|||
|
||||
|
||||
def share_list(request, search_opts=None):
|
||||
search_opts = search_opts or {}
|
||||
return manilaclient(request).shares.list(search_opts=search_opts)
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class ManilaApiTests(base.APITestCase):
|
|||
|
||||
@ddt.data(
|
||||
{},
|
||||
None,
|
||||
{"name": "fake_share"},
|
||||
{"limit": "3"},
|
||||
{"host": "fake_share_host"},
|
||||
|
@ -44,8 +45,9 @@ class ManilaApiTests(base.APITestCase):
|
|||
self.assertEqual(
|
||||
self.manilaclient.shares.list.return_value, result)
|
||||
|
||||
expected_kwargs = kwargs or {}
|
||||
self.manilaclient.shares.list.assert_called_once_with(
|
||||
search_opts=kwargs)
|
||||
search_opts=expected_kwargs)
|
||||
|
||||
def test_share_get(self):
|
||||
api.share_get(self.request, self.id)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
`Bug #1967312 <https://launchpad.net/bugs/1967312>`_ that caused the
|
||||
shares dashboard to fail loading has now been fixed.
|
Loading…
Reference in New Issue