diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-24 03:26:32 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-24 03:26:32 -0700 |
| commit | 230d07e9002371bdb0030c9199df35fc6360a0a2 (patch) | |
| tree | 336138b643d45fa322a037ccc09348232d27b082 /nova/volume | |
| parent | 699adb4311fdd86525fae022f4119401fd1c0168 (diff) | |
| download | nova-230d07e9002371bdb0030c9199df35fc6360a0a2.tar.gz nova-230d07e9002371bdb0030c9199df35fc6360a0a2.tar.xz nova-230d07e9002371bdb0030c9199df35fc6360a0a2.zip | |
Test for attach / detach (and associated fixes)
Diffstat (limited to 'nova/volume')
| -rw-r--r-- | nova/volume/driver.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nova/volume/driver.py b/nova/volume/driver.py index 148e5facd..045974fa3 100644 --- a/nova/volume/driver.py +++ b/nova/volume/driver.py @@ -135,7 +135,7 @@ class VolumeDriver(object): """Removes an export for a logical volume.""" raise NotImplementedError() - def discover_volume(self, volume): + def discover_volume(self, context, volume): """Discover volume on a remote host.""" raise NotImplementedError() @@ -574,6 +574,8 @@ class RBDDriver(VolumeDriver): def discover_volume(self, volume): """Discover volume on a remote host""" + #NOTE(justinsb): This is messed up... discover_volume takes 3 args + # but then that would break local_path return "rbd:%s/%s" % (FLAGS.rbd_pool, volume['name']) def undiscover_volume(self, volume): @@ -622,7 +624,7 @@ class SheepdogDriver(VolumeDriver): """Removes an export for a logical volume""" pass - def discover_volume(self, volume): + def discover_volume(self, context, volume): """Discover volume on a remote host""" return "sheepdog:%s" % volume['name'] @@ -656,7 +658,7 @@ class LoggingVolumeDriver(VolumeDriver): def remove_export(self, context, volume): self.log_action('remove_export', volume) - def discover_volume(self, volume): + def discover_volume(self, context, volume): self.log_action('discover_volume', volume) def undiscover_volume(self, volume): @@ -668,6 +670,10 @@ class LoggingVolumeDriver(VolumeDriver): _LOGS = [] @staticmethod + def clear_logs(): + LoggingVolumeDriver._LOGS = [] + + @staticmethod def log_action(action, parameters): """Logs the command.""" LOG.debug(_("LoggingVolumeDriver: %s") % (action)) |
