self.mox.ReplayAll()
self.driver.delete_snapshot(snapshot)
+ def test_extend_volume(self):
+ new_size = '200'
+ self.driver._eql_execute = self.mox.\
+ CreateMock(self.driver._eql_execute)
+ volume = {'name': self.volume_name, 'size': 100}
+ self.driver._eql_execute('volume', 'select', volume['name'],
+ 'size', "%sG" % new_size)
+ self.mox.ReplayAll()
+ self.driver.extend_volume(volume, new_size)
+
def test_initialize_connection(self):
self.driver._eql_execute = self.mox.\
CreateMock(self.driver._eql_execute)
"""
pass
+ def extend_volume(self, volume, new_size):
+ """Extend the size of the volume"""
+ try:
+ self._eql_execute('volume', 'select', volume['name'],
+ 'size', "%sG" % new_size)
+ except Exception:
+ with excutils.save_and_reraise_exception():
+ LOG.error(_('Failed to extend_volume %(name)s from '
+ '%(current_size)sGB to %(new_size)sGB'),
+ {'name': volume['name'],
+ 'current_size': volume['size'],
+ 'new_size': new_size})
+
def local_path(self, volume):
raise NotImplementedError()