storage: add volume.is_outdated() function
This is to match core-admin API. Logically it could be a property not a method (as other things like usage or size), but it is already defined (and used in various places) as a method in core-admin, so lets don't change the API right now.
This commit is contained in:
parent
3fcae995df
commit
5b0e7123b8
@ -171,6 +171,13 @@ class Volume(object):
|
||||
self._fetch_info()
|
||||
return int(self._info['revisions_to_keep'])
|
||||
|
||||
def is_outdated(self):
|
||||
''' Returns `True` if this snapshot of a source volume (for
|
||||
`snap_on_start`=True) is outdated.
|
||||
'''
|
||||
self._fetch_info(True)
|
||||
return self._info.get('is_outdated', False) == 'True'
|
||||
|
||||
def resize(self, size):
|
||||
'''Resize volume.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user