From 998c3e94bd862f7392e2757b52b31c66ead52c8c Mon Sep 17 00:00:00 2001 From: John Griffith Date: Wed, 7 May 2014 14:34:52 -0600 Subject: [PATCH] Add missing methods to FakeISCSIDriver Just a quick/simple add of missing methods to make the FakeISCSI driver usable. Change-Id: I7e822dd094d925d13e7e5b2f6605d11fd138dbd1 --- cinder/volume/driver.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 526a32c88..437228af9 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -883,6 +883,43 @@ class FakeISCSIDriver(ISCSIDriver): LOG.debug(_("FAKE ISCSI: %s"), cmd) return (None, None) + def create_volume_from_snapshot(self, volume, snapshot): + """Creates a volume from a snapshot.""" + pass + + def create_cloned_volume(self, volume, src_vref): + """Creates a clone of the specified volume.""" + pass + + def delete_volume(self, volume): + """Deletes a volume.""" + pass + + def create_snapshot(self, snapshot): + """Creates a snapshot.""" + pass + + def delete_snapshot(self, snapshot): + """Deletes a snapshot.""" + pass + + def local_path(self, volume): + return '/tmp/volume-%s' % volume.id + + def ensure_export(self, context, volume): + """Synchronously recreates an export for a volume.""" + pass + + def create_export(self, context, volume): + """Exports the volume. Can optionally return a Dictionary of changes + to the volume object to be persisted. + """ + pass + + def remove_export(self, context, volume): + """Removes an export for a volume.""" + pass + class ISERDriver(ISCSIDriver): """Executes commands relating to ISER volumes. -- 2.45.2