Merge "Add logging to FakeLoggingVolumeDriver"
This commit is contained in:
commit
c633a5bfd2
@ -18,12 +18,12 @@ from cinder import exception
|
|||||||
from cinder import objects
|
from cinder import objects
|
||||||
from cinder.objects import fields
|
from cinder.objects import fields
|
||||||
from cinder.tests.unit.brick import fake_lvm
|
from cinder.tests.unit.brick import fake_lvm
|
||||||
|
from cinder import utils
|
||||||
from cinder.volume import driver
|
from cinder.volume import driver
|
||||||
from cinder.volume.drivers import lvm
|
from cinder.volume.drivers import lvm
|
||||||
from cinder.zonemanager import utils as fczm_utils
|
from cinder.zonemanager import utils as fczm_utils
|
||||||
|
|
||||||
|
|
||||||
# TODO(e0ne): add logging to FakeLoggingVolumeDriver and remove this one.
|
|
||||||
# TODO(e0ne): inherit from driver.VolumeDriver and fix unit-tests
|
# TODO(e0ne): inherit from driver.VolumeDriver and fix unit-tests
|
||||||
class FakeLoggingVolumeDriver(lvm.LVMVolumeDriver):
|
class FakeLoggingVolumeDriver(lvm.LVMVolumeDriver):
|
||||||
"""Logs calls instead of executing."""
|
"""Logs calls instead of executing."""
|
||||||
@ -37,46 +37,60 @@ class FakeLoggingVolumeDriver(lvm.LVMVolumeDriver):
|
|||||||
None, 'default',
|
None, 'default',
|
||||||
self.fake_execute)
|
self.fake_execute)
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def check_for_setup_error(self):
|
def check_for_setup_error(self):
|
||||||
"""No setup necessary in fake mode."""
|
"""No setup necessary in fake mode."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def create_volume(self, volume):
|
def create_volume(self, volume):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def delete_volume(self, volume):
|
def delete_volume(self, volume):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def create_snapshot(self, snapshot):
|
def create_snapshot(self, snapshot):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def delete_snapshot(self, snapshot):
|
def delete_snapshot(self, snapshot):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def ensure_export(self, context, volume):
|
def ensure_export(self, context, volume):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def create_export(self, context, volume, connector):
|
def create_export(self, context, volume, connector):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def remove_export(self, context, volume):
|
def remove_export(self, context, volume):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def create_export_snapshot(self, context, snapshot):
|
def create_export_snapshot(self, context, snapshot):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def remove_export_snapshot(self, context, snapshot):
|
def remove_export_snapshot(self, context, snapshot):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def terminate_connection_snapshot(self, snapshot, connector):
|
def terminate_connection_snapshot(self, snapshot, connector):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def create_cloned_volume(self, volume, src_vol):
|
def create_cloned_volume(self, volume, src_vol):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def create_volume_from_snapshot(self, volume, snapshot):
|
def create_volume_from_snapshot(self, volume, snapshot):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
# NOTE(thangp): There are several places in the core cinder code where
|
# NOTE(thangp): There are several places in the core cinder code where
|
||||||
# the volume passed through is a dict and not an oslo_versionedobject.
|
# the volume passed through is a dict and not an oslo_versionedobject.
|
||||||
@ -98,11 +112,13 @@ class FakeLoggingVolumeDriver(lvm.LVMVolumeDriver):
|
|||||||
return {'driver_volume_type': 'iscsi',
|
return {'driver_volume_type': 'iscsi',
|
||||||
'data': {'access_mode': access_mode}}
|
'data': {'access_mode': access_mode}}
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def initialize_connection_snapshot(self, snapshot, connector):
|
def initialize_connection_snapshot(self, snapshot, connector):
|
||||||
return {
|
return {
|
||||||
'driver_volume_type': 'iscsi',
|
'driver_volume_type': 'iscsi',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@utils.trace_method
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user