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

Fix No weighed backend found
nbd-vmsplice
Vitaliy Filippov 2021-11-10 17:13:17 +03:00 committed by GitHub
commit 0544a16f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

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: