Merge "cinder: Specify mountpoint host param to attach API"

This commit is contained in:
Zuul 2018-07-15 18:16:49 +00:00 committed by Gerrit Code Review
commit 0c3a15618b
2 changed files with 3 additions and 2 deletions

View File

@ -493,7 +493,7 @@ class Store(glance_store.driver.Store):
connection_info['driver_volume_type'], root_helper,
conn=connection_info)
device = conn.connect_volume(connection_info['data'])
volume.attach(None, None, attach_mode, host_name=host)
volume.attach(None, 'glance_store', attach_mode, host_name=host)
volume = self._wait_volume_status(volume, 'attaching', 'in-use')
if (connection_info['driver_volume_type'] == 'rbd' and
not conn.do_local_attach):

View File

@ -191,7 +191,8 @@ class TestCinderStore(base.StoreBaseTest,
fake_connector.disconnect_volume.assert_called_once_with(
mock.ANY, fake_devinfo)
fake_volume.attach.assert_called_once_with(
None, None, attach_mode, host_name=socket.gethostname())
None, 'glance_store', attach_mode,
host_name=socket.gethostname())
fake_volumes.detach.assert_called_once_with(fake_volume)
def test_open_cinder_volume_rw(self):