vast: return all available export locations

Related-Bug: #2088269
Change-Id: I4590b7cdb477b078bcf412d4f98550a47da673e7
This commit is contained in:
Volodymyr Boiko 2024-11-15 15:48:23 +02:00
parent faec042d06
commit 82238c7800
3 changed files with 20 additions and 6 deletions

View File

@ -169,7 +169,7 @@ class VASTShareDriver(driver.ShareDriver):
return f"{root}/manila-{share_id}"
def create_share(self, context, share, share_server=None):
return self._ensure_share(share)[0]
return self._ensure_share(share)
def delete_share(self, context, share, share_server=None):
"""Called to delete a share"""

View File

@ -192,12 +192,18 @@ class VASTShareDriverTestCase(unittest.TestCase):
mock_rest.views.ensure.assert_called_once_with(
name="fakeid", path="/fake/manila-fakeid", policy_id=1
)
self.assertDictEqual(
self.assertListEqual(
location,
{
'path': '1.1.1.0:/fake/manila-fakeid',
'is_admin_only': False
}
[
{
'path': '1.1.1.0:/fake/manila-fakeid',
'is_admin_only': False
},
{
'path': '1.1.1.1:/fake/manila-fakeid',
'is_admin_only': False
},
]
)
if not policy:
mock_rest.views.update.assert_called_once_with(

View File

@ -0,0 +1,8 @@
---
fixes:
- |
`Launchpad bug #2037422 <https://bugs.launchpad.net/manila/+bug/2088269>`_:
Fixed an issue within the VASTData driver that made only one export path
available for mounting, regardless if more mount paths were available. Now,
the amount of export locations will correspond to the way the storage is
configured for better load balancing.