|
|
|
@ -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: |
|
|
|
@ -824,7 +833,6 @@ class VitastorDriver(driver.CloneableImageVD, |
|
|
|
|
|
|
|
|
|
def manage_existing_get_size(self, volume, existing_ref): |
|
|
|
|
"""Return size of an existing image for manage_existing. |
|
|
|
|
|
|
|
|
|
:param volume: volume ref info to be set |
|
|
|
|
:param existing_ref: {'source-name': <image name>} |
|
|
|
|
""" |
|
|
|
@ -836,9 +844,7 @@ class VitastorDriver(driver.CloneableImageVD, |
|
|
|
|
|
|
|
|
|
def manage_existing(self, volume, existing_ref): |
|
|
|
|
"""Manages an existing image. |
|
|
|
|
|
|
|
|
|
Renames the image name to match the expected name for the volume. |
|
|
|
|
|
|
|
|
|
:param volume: volume ref info to be set |
|
|
|
|
:param existing_ref: {'source-name': <image name>} |
|
|
|
|
""" |
|
|
|
@ -912,7 +918,6 @@ class VitastorDriver(driver.CloneableImageVD, |
|
|
|
|
|
|
|
|
|
def manage_existing_snapshot_get_size(self, snapshot, existing_ref): |
|
|
|
|
"""Return size of an existing image for manage_existing. |
|
|
|
|
|
|
|
|
|
:param snapshot: snapshot ref info to be set |
|
|
|
|
:param existing_ref: {'source-name': <name of snapshot>} |
|
|
|
|
""" |
|
|
|
@ -927,10 +932,8 @@ class VitastorDriver(driver.CloneableImageVD, |
|
|
|
|
|
|
|
|
|
def manage_existing_snapshot(self, snapshot, existing_ref): |
|
|
|
|
"""Manages an existing snapshot. |
|
|
|
|
|
|
|
|
|
Renames the snapshot name to match the expected name for the snapshot. |
|
|
|
|
Error checking done by manage_existing_get_size is not repeated. |
|
|
|
|
|
|
|
|
|
:param snapshot: snapshot ref info to be set |
|
|
|
|
:param existing_ref: {'source-name': <name of snapshot>} |
|
|
|
|
""" |
|
|
|
|