Add get_volume_stats for LoggingVolumeDriver
The LoggingVolumeDriver will be useful in functional tests where the backend volume being created is not important, for example the nested quota Tempest tests. To allow volume creation, this driver should report stats so that the scheduler will consider this backend during volume creation. Change-Id: I02fc02b7e4d9d6b7fec0a288fc34e2365ddcd9fd Closes-Bug: #1554209
This commit is contained in:
parent
bb75d7b07a
commit
d3b769f4a3
|
@ -196,6 +196,15 @@ class LoggingVolumeDriver(driver.VolumeDriver):
|
|||
matches.append(entry)
|
||||
return matches
|
||||
|
||||
def get_volume_stats(self, refresh=False):
|
||||
return {
|
||||
'volume_backend_name': self.configuration.safe_get(
|
||||
'volume_backend_name'),
|
||||
'vendor_name': 'LoggingVolumeDriver',
|
||||
'total_capacity_gb': 'infinite',
|
||||
'free_capacity_gb': 'infinite',
|
||||
}
|
||||
|
||||
|
||||
class FakeGateDriver(lvm.LVMVolumeDriver):
|
||||
"""Class designation for FakeGateDriver.
|
||||
|
|
Loading…
Reference in New Issue