Merge pull request #30 from moly7x/moly7x-fix-No-weighed-backend-found

Fix No weighed backend found
This commit is contained in:
Vitaliy Filippov
2021-11-10 17:13:17 +03:00
committed by GitHub
+9
View File
@@ -275,6 +275,15 @@ class VitastorDriver(driver.CloneableImageVD,
LOG.exception('error getting vitastor pool stats: '+str(e))
self._stats = stats
def get_volume_stats(self, refresh=False):
"""Get volume stats.
If 'refresh' is True, run update the stats first.
"""
if not self._stats or refresh:
self._update_volume_stats()
return self._stats
def _next_id(self, resp):
if len(resp['kvs']) == 0: