summaryrefslogtreecommitdiff
path: root/nova
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2017-12-17 02:35:09 +0000
committerMatthew Booth <mbooth@redhat.com>2017-12-17 04:24:01 +0000
commitcfa6d3ae30282991f66606af1e06613698b0efb3 (patch)
tree9fd7467ecea6a0e4dd4a397e1deea1a8cdacfe69 /nova
parent912c349a030defe7cffd4ad4f1304969c8f0d298 (diff)
downloadnova-cfa6d3ae30282991f66606af1e06613698b0efb3.tar.gz
Removed unused argument from LibvirtDriver._connect_volume
_connect_volume was being passed disk_info as an argument. However, the purpose of _connect_volume is to mount a volume on the compute host, and disk_info only contains metadata about how the disk will be presented to a guest. It's therefore not relevant, so it's not surprising that no drivers are using it. Change-Id: I843b5c46f9f93a30e7121259feff17a8170a2e48
Diffstat (limited to 'nova')
-rwxr-xr-xnova/tests/unit/virt/libvirt/test_driver.py32
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_disco.py2
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_drbd.py3
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_hgst.py2
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_nfs.py6
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_quobyte.py13
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_scaleio.py2
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_smbfs.py9
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_vrtshyperscale.py3
-rw-r--r--nova/tests/unit/virt/libvirt/volume/test_vzstorage.py4
-rw-r--r--nova/virt/libvirt/driver.py20
-rw-r--r--nova/virt/libvirt/volume/aoe.py2
-rw-r--r--nova/virt/libvirt/volume/disco.py2
-rw-r--r--nova/virt/libvirt/volume/drbd.py3
-rw-r--r--nova/virt/libvirt/volume/fibrechannel.py2
-rw-r--r--nova/virt/libvirt/volume/fs.py2
-rw-r--r--nova/virt/libvirt/volume/hgst.py2
-rw-r--r--nova/virt/libvirt/volume/iscsi.py2
-rw-r--r--nova/virt/libvirt/volume/quobyte.py2
-rw-r--r--nova/virt/libvirt/volume/scaleio.py2
-rw-r--r--nova/virt/libvirt/volume/smbfs.py2
-rw-r--r--nova/virt/libvirt/volume/volume.py2
-rw-r--r--nova/virt/libvirt/volume/vrtshyperscale.py2
-rw-r--r--nova/virt/libvirt/volume/vzstorage.py6
24 files changed, 45 insertions, 82 deletions
diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py
index 1197052869..1f9f08808a 100755
--- a/nova/tests/unit/virt/libvirt/test_driver.py
+++ b/nova/tests/unit/virt/libvirt/test_driver.py
@@ -6630,7 +6630,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
test.MatchType(objects.ImageMeta),
bdm)
mock_connect_volume.assert_called_with(
- connection_info, disk_info, instance)
+ connection_info, instance)
mock_get_volume_config.assert_called_with(
connection_info, disk_info)
mock_dom.attachDeviceFlags.assert_called_with(
@@ -10070,12 +10070,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
).AndReturn(vol['block_device_mapping'])
self.mox.StubOutWithMock(drvr, "_connect_volume")
for v in vol['block_device_mapping']:
- disk_info = {
- 'bus': "scsi",
- 'dev': v['mount_device'].rpartition("/")[2],
- 'type': "disk"
- }
- drvr._connect_volume(v['connection_info'], disk_info, instance)
+ drvr._connect_volume(v['connection_info'], instance)
self.mox.StubOutWithMock(drvr, 'plug_vifs')
drvr.plug_vifs(mox.IsA(instance), nw_info)
@@ -10207,13 +10202,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
# Creating mocks
self.mox.StubOutWithMock(drvr, "_connect_volume")
for v in vol['block_device_mapping']:
- disk_info = {
- 'bus': "scsi",
- 'dev': v['mount_device'].rpartition("/")[2],
- 'type': "disk"
- }
- drvr._connect_volume(v['connection_info'], disk_info,
- inst_ref)
+ drvr._connect_volume(v['connection_info'], inst_ref)
self.mox.StubOutWithMock(drvr, 'plug_vifs')
drvr.plug_vifs(mox.IsA(inst_ref), nw_info)
self.mox.ReplayAll()
@@ -10961,7 +10950,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'delete_on_termination': False
}
- def _connect_volume_side_effect(connection_info, disk_info, instance):
+ def _connect_volume_side_effect(connection_info, instance):
bdm['connection_info']['data']['device_path'] = '/dev/path/to/dev'
def _get(key, opt=None):
@@ -15040,8 +15029,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
self.assertEqual(3, len(devices))
self.assertEqual('/dev/vdb', instance.default_ephemeral_device)
self.assertIsNone(instance.default_swap_device)
- connect_volume.assert_called_with(bdm['connection_info'],
- {'bus': 'virtio', 'type': 'disk', 'dev': 'vdc'}, instance)
+ connect_volume.assert_called_with(bdm['connection_info'], instance)
get_volume_config.assert_called_with(bdm['connection_info'],
{'bus': 'virtio', 'type': 'disk', 'dev': 'vdc'})
volume_save.assert_called_once_with()
@@ -15248,7 +15236,6 @@ class LibvirtConnTestCase(test.NoDBTestCase,
mock_dom.name.return_value = 'inst'
mock_dom.UUIDString.return_value = 'uuid'
get_guest.return_value = guest
- disk_info = {'bus': 'virtio', 'type': 'disk', 'dev': 'vdb'}
conf = mock.MagicMock(source_path='/fake-new-volume')
get_volume_config.return_value = conf
@@ -15256,8 +15243,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
'/dev/vdb', 1)
get_guest.assert_called_once_with(instance)
- connect_volume.assert_called_once_with(new_connection_info, disk_info,
- instance)
+ connect_volume.assert_called_once_with(new_connection_info, instance)
swap_volume.assert_called_once_with(guest, 'vdb', conf, 1)
disconnect_volume.assert_called_once_with(old_connection_info, 'vdb',
@@ -15298,8 +15284,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
mock.sentinel.new_connection_info,
instance, '/dev/vdb', 0)
connect_volume.assert_called_once_with(
- mock.sentinel.new_connection_info,
- {'dev': 'vdb', 'type': 'disk', 'bus': 'virtio'}, instance)
+ mock.sentinel.new_connection_info, instance)
disconnect_volume.assert_called_once_with(
mock.sentinel.new_connection_info, 'vdb', instance)
@@ -15331,8 +15316,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
mock.sentinel.new_connection_info,
instance, '/dev/vdb', 0)
connect_volume.assert_called_once_with(
- mock.sentinel.new_connection_info,
- {'dev': 'vdb', 'type': 'disk', 'bus': 'virtio'}, instance)
+ mock.sentinel.new_connection_info, instance)
disconnect_volume.assert_called_once_with(
mock.sentinel.new_connection_info, 'vdb', instance)
diff --git a/nova/tests/unit/virt/libvirt/volume/test_disco.py b/nova/tests/unit/virt/libvirt/volume/test_disco.py
index e8c27bd712..a43522db2d 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_disco.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_disco.py
@@ -39,7 +39,7 @@ class LibvirtDISCOVolumeDriverTestCase(
with mock.patch.object(dcon.connector,
'connect_volume',
return_value={'path': '/dev/dms1234567'}):
- dcon.connect_volume(conn, None, mock.sentinel.instance)
+ dcon.connect_volume(conn, mock.sentinel.instance)
self.assertEqual('/dev/dms1234567',
conn['data']['device_path'])
diff --git a/nova/tests/unit/virt/libvirt/volume/test_drbd.py b/nova/tests/unit/virt/libvirt/volume/test_drbd.py
index 759e992442..1b2f031e58 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_drbd.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_drbd.py
@@ -44,8 +44,7 @@ class LibvirtDRBDVolumeDriverTestCase(
}
with mock.patch.object(connector.DRBDConnector, 'connect_volume',
return_value=device_info):
- drbd_driver.connect_volume(
- connection_info, self.disk_info, instance)
+ drbd_driver.connect_volume(connection_info, instance)
# assert that the device_path was set
self.assertIn('device_path', connection_info['data'])
self.assertEqual('/path/to/fake-device',
diff --git a/nova/tests/unit/virt/libvirt/volume/test_hgst.py b/nova/tests/unit/virt/libvirt/volume/test_hgst.py
index 2a0838fbed..e71679b690 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_hgst.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_hgst.py
@@ -38,7 +38,7 @@ class LibvirtHGSTVolumeDriverTestCase(test_volume.LibvirtVolumeBaseTestCase):
drvr.connector.connect_volume = brick_conn_vol
di = {'path': '/dev/space01', 'name': 'space01'}
ci = {'data': di}
- drvr.connect_volume(ci, None, mock.sentinel.instance)
+ drvr.connect_volume(ci, mock.sentinel.instance)
self.assertEqual('/dev/space01',
ci['data']['device_path'])
diff --git a/nova/tests/unit/virt/libvirt/volume/test_nfs.py b/nova/tests/unit/virt/libvirt/volume/test_nfs.py
index 26f6170726..516e665c4e 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_nfs.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_nfs.py
@@ -51,8 +51,7 @@ class LibvirtNFSVolumeDriverTestCase(test_volume.LibvirtVolumeBaseTestCase):
'name': self.name}}
instance = mock.sentinel.instance
instance.uuid = uuids.instance
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- instance)
+ libvirt_driver.connect_volume(connection_info, instance)
libvirt_driver.disconnect_volume(connection_info, "vde",
mock.sentinel.instance)
@@ -100,8 +99,7 @@ class LibvirtNFSVolumeDriverTestCase(test_volume.LibvirtVolumeBaseTestCase):
'options': options}}
instance = mock.sentinel.instance
instance.uuid = uuids.instance
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- instance)
+ libvirt_driver.connect_volume(connection_info, instance)
libvirt_driver.disconnect_volume(connection_info, "vde",
mock.sentinel.instance)
diff --git a/nova/tests/unit/virt/libvirt/volume/test_quobyte.py b/nova/tests/unit/virt/libvirt/volume/test_quobyte.py
index 73aa16d47e..998a024673 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_quobyte.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_quobyte.py
@@ -314,8 +314,7 @@ class LibvirtQuobyteVolumeDriverTestCase(
connection_info = {'data': {'export': export_string,
'name': self.name}}
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
conf = libvirt_driver.get_config(connection_info, self.disk_info)
tree = conf.format_dom()
@@ -345,8 +344,7 @@ class LibvirtQuobyteVolumeDriverTestCase(
connection_info = {'data': {'export': export_string,
'name': self.name}}
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
conf = libvirt_driver.get_config(connection_info, self.disk_info)
tree = conf.format_dom()
@@ -379,8 +377,7 @@ class LibvirtQuobyteVolumeDriverTestCase(
connection_info = {'data': {'export': export_string,
'name': self.name}}
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
conf = libvirt_driver.get_config(connection_info, self.disk_info)
tree = conf.format_dom()
@@ -413,8 +410,7 @@ class LibvirtQuobyteVolumeDriverTestCase(
export_mnt_base = os.path.join(mnt_base,
utils.get_hash_str(quobyte_volume))
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
conf = libvirt_driver.get_config(connection_info, self.disk_info)
tree = conf.format_dom()
self.assertEqual('file', tree.get('type'))
@@ -451,7 +447,6 @@ class LibvirtQuobyteVolumeDriverTestCase(
self.assertRaises(nova_exception.NovaException,
libvirt_driver.connect_volume,
connection_info,
- self.disk_info,
mock.sentinel.instance)
def test_libvirt_quobyte_driver_normalize_export_with_protocol(self):
diff --git a/nova/tests/unit/virt/libvirt/volume/test_scaleio.py b/nova/tests/unit/virt/libvirt/volume/test_scaleio.py
index 3c7dd62672..3f564658e7 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_scaleio.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_scaleio.py
@@ -38,7 +38,7 @@ class LibvirtScaleIOVolumeDriverTestCase(
sio.connector.connect_volume = brick_conn_vol
disk_info = {'path': '/dev/vol01', 'name': 'vol01'}
conn = {'data': disk_info}
- sio.connect_volume(conn, None, mock.sentinel.instance)
+ sio.connect_volume(conn, mock.sentinel.instance)
self.assertEqual('/dev/vol01',
conn['data']['device_path'])
diff --git a/nova/tests/unit/virt/libvirt/volume/test_smbfs.py b/nova/tests/unit/virt/libvirt/volume/test_smbfs.py
index aaad0b5da0..4d39db5c9b 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_smbfs.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_smbfs.py
@@ -43,8 +43,7 @@ class LibvirtSMBFSVolumeDriverTestCase(test_volume.LibvirtVolumeBaseTestCase):
connection_info = {'data': {'export': export_string,
'name': self.name,
'options': None}}
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
libvirt_driver.disconnect_volume(connection_info, "vde",
mock.sentinel.instance)
@@ -65,8 +64,7 @@ class LibvirtSMBFSVolumeDriverTestCase(test_volume.LibvirtVolumeBaseTestCase):
connection_info = {'data': {'export': export_string,
'name': self.name}}
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
libvirt_driver.disconnect_volume(connection_info, "vde",
mock.sentinel.instance)
@@ -103,8 +101,7 @@ class LibvirtSMBFSVolumeDriverTestCase(test_volume.LibvirtVolumeBaseTestCase):
'name': self.name,
'options': options}}
- libvirt_driver.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ libvirt_driver.connect_volume(connection_info, mock.sentinel.instance)
libvirt_driver.disconnect_volume(connection_info, "vde",
mock.sentinel.instance)
diff --git a/nova/tests/unit/virt/libvirt/volume/test_vrtshyperscale.py b/nova/tests/unit/virt/libvirt/volume/test_vrtshyperscale.py
index 4bd155b71d..9af3ea1e4b 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_vrtshyperscale.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_vrtshyperscale.py
@@ -59,8 +59,7 @@ class LibvirtHyperScaleVolumeDriverTestCase(
disk_info = {'name': DEVICE_NAME}
connection_info = {'data': disk_info}
- hs.connect_volume(
- connection_info, disk_info, mock.sentinel.instance)
+ hs.connect_volume(connection_info, mock.sentinel.instance)
# expect connect_volume to add device_path to connection_info:
self.assertEqual(connection_info['data']['device_path'], DEVICE_PATH)
diff --git a/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py b/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py
index 965d1c0252..9e458a84ce 100644
--- a/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py
+++ b/nova/tests/unit/virt/libvirt/volume/test_vzstorage.py
@@ -64,7 +64,6 @@ class LibvirtVZStorageTestCase(test_volume.LibvirtVolumeBaseTestCase):
err_pattern,
drv.connect_volume,
connection_info,
- self.disk_info,
mock.sentinel.instance)
@mock.patch.object(vzstorage.utils, 'synchronized',
@@ -80,8 +79,7 @@ class LibvirtVZStorageTestCase(test_volume.LibvirtVolumeBaseTestCase):
connection_info = {'data': {'export': export_string,
'name': self.name}}
- drv.connect_volume(connection_info, self.disk_info,
- mock.sentinel.instance)
+ drv.connect_volume(connection_info, mock.sentinel.instance)
self.assertEqual('vstorage://testcluster',
connection_info['data']['device_path'])
self.assertEqual('-u stack -g qemu -m 0770 '
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 7941df5cfb..1b897a4b4c 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -1175,9 +1175,9 @@ class LibvirtDriver(driver.ComputeDriver):
raise exception.VolumeDriverNotFound(driver_type=driver_type)
return self.volume_drivers[driver_type]
- def _connect_volume(self, connection_info, disk_info, instance):
+ def _connect_volume(self, connection_info, instance):
vol_driver = self._get_volume_driver(connection_info)
- vol_driver.connect_volume(connection_info, disk_info, instance)
+ vol_driver.connect_volume(connection_info, instance)
def _disconnect_volume(self, connection_info, disk_dev, instance):
vol_driver = self._get_volume_driver(connection_info)
@@ -1242,9 +1242,9 @@ class LibvirtDriver(driver.ComputeDriver):
"block size") % CONF.libvirt.virt_type
raise exception.InvalidHypervisorType(msg)
+ self._connect_volume(connection_info, instance)
disk_info = blockinfo.get_info_from_bdm(
instance, CONF.libvirt.virt_type, instance.image_meta, bdm)
- self._connect_volume(connection_info, disk_info, instance)
if disk_info['bus'] == 'scsi':
disk_info['unit'] = self._get_scsi_controller_max_unit(guest) + 1
@@ -1356,7 +1356,7 @@ class LibvirtDriver(driver.ComputeDriver):
# LibvirtConfigGuestDisk object it returns. We do not explicitly save
# this to the BDM here as the upper compute swap_volume method will
# eventually do this for us.
- self._connect_volume(new_connection_info, disk_info, instance)
+ self._connect_volume(new_connection_info, instance)
conf = self._get_volume_config(new_connection_info, disk_info)
if not conf.source_path:
self._disconnect_volume(new_connection_info, disk_dev, instance)
@@ -3746,7 +3746,7 @@ class LibvirtDriver(driver.ComputeDriver):
connection_info = vol['connection_info']
vol_dev = block_device.prepend_dev(vol['mount_device'])
info = disk_mapping[vol_dev]
- self._connect_volume(connection_info, info, instance)
+ self._connect_volume(connection_info, instance)
if scsi_controller and scsi_controller.model == 'virtio-scsi':
info['unit'] = disk_mapping['unit']
disk_mapping['unit'] += 1
@@ -5054,10 +5054,7 @@ class LibvirtDriver(driver.ComputeDriver):
block_device_info)
root_disk = block_device.get_root_bdm(block_device_mapping)
if root_disk:
- disk_info = blockinfo.get_info_from_bdm(
- instance, CONF.libvirt.virt_type, image_meta, root_disk)
- self._connect_volume(root_disk['connection_info'], disk_info,
- instance)
+ self._connect_volume(root_disk['connection_info'], instance)
disk_path = root_disk['connection_info']['data']['device_path']
# NOTE(apmelton) - Even though the instance is being booted from a
@@ -6886,10 +6883,7 @@ class LibvirtDriver(driver.ComputeDriver):
for bdm in block_device_mapping:
connection_info = bdm['connection_info']
- disk_info = blockinfo.get_info_from_bdm(
- instance, CONF.libvirt.virt_type,
- instance.image_meta, bdm)
- self._connect_volume(connection_info, disk_info, instance)
+ self._connect_volume(connection_info, instance)
# We call plug_vifs before the compute manager calls
# ensure_filtering_rules_for_instance, to ensure bridge is set up
diff --git a/nova/virt/libvirt/volume/aoe.py b/nova/virt/libvirt/volume/aoe.py
index 7f8a63e9f5..36aa55bb1e 100644
--- a/nova/virt/libvirt/volume/aoe.py
+++ b/nova/virt/libvirt/volume/aoe.py
@@ -44,7 +44,7 @@ class LibvirtAOEVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
conf.source_path = connection_info['data']['device_path']
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
LOG.debug("Calling os-brick to attach AoE Volume")
device_info = self.connector.connect_volume(connection_info['data'])
LOG.debug("Attached AoE volume %s", device_info)
diff --git a/nova/virt/libvirt/volume/disco.py b/nova/virt/libvirt/volume/disco.py
index d627ec50b9..4e027da587 100644
--- a/nova/virt/libvirt/volume/disco.py
+++ b/nova/virt/libvirt/volume/disco.py
@@ -50,7 +50,7 @@ class LibvirtDISCOVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
conf.source_type = 'file'
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Connect a DISCO volume to a compute node."""
device_info = self.connector.connect_volume(connection_info['data'])
connection_info['data']['device_path'] = device_info['path']
diff --git a/nova/virt/libvirt/volume/drbd.py b/nova/virt/libvirt/volume/drbd.py
index edce396c36..30b805d618 100644
--- a/nova/virt/libvirt/volume/drbd.py
+++ b/nova/virt/libvirt/volume/drbd.py
@@ -29,7 +29,7 @@ class LibvirtDRBDVolumeDriver(libvirt_volume.LibvirtVolumeDriver):
self.connector = connector.InitiatorConnector.factory(
initiator.DRBD, utils.get_root_helper())
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Connect the volume.
Sets the connection_info['data']['device_path'] value upon successful
@@ -38,7 +38,6 @@ class LibvirtDRBDVolumeDriver(libvirt_volume.LibvirtVolumeDriver):
:param connection_info: dict of connection information for the backend
storage when a connection was initiated with Cinder. Expects
connection_info['data']['device'] to be set.
- :param disk_info: dict of block device information (not used).
:param instance: The nova.objects.Instance that is having a volume
connected to it.
"""
diff --git a/nova/virt/libvirt/volume/fibrechannel.py b/nova/virt/libvirt/volume/fibrechannel.py
index c3c0fb40b6..0aa622c69f 100644
--- a/nova/virt/libvirt/volume/fibrechannel.py
+++ b/nova/virt/libvirt/volume/fibrechannel.py
@@ -47,7 +47,7 @@ class LibvirtFibreChannelVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
conf.driver_io = "native"
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Attach the volume to instance_name."""
LOG.debug("Calling os-brick to attach FC Volume")
diff --git a/nova/virt/libvirt/volume/fs.py b/nova/virt/libvirt/volume/fs.py
index b14f2942ae..0a931bc355 100644
--- a/nova/virt/libvirt/volume/fs.py
+++ b/nova/virt/libvirt/volume/fs.py
@@ -107,7 +107,7 @@ class LibvirtMountedFileSystemVolumeDriver(LibvirtBaseFileSystemVolumeDriver):
self.fstype = fstype
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Connect the volume."""
export = connection_info['data']['export']
vol_name = connection_info['data']['name']
diff --git a/nova/virt/libvirt/volume/hgst.py b/nova/virt/libvirt/volume/hgst.py
index 32b2cb4781..6bc28d500f 100644
--- a/nova/virt/libvirt/volume/hgst.py
+++ b/nova/virt/libvirt/volume/hgst.py
@@ -42,7 +42,7 @@ class LibvirtHGSTVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
conf.source_path = connection_info['data']['device_path']
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
device_info = self.connector.connect_volume(connection_info['data'])
connection_info['data']['device_path'] = device_info['path']
diff --git a/nova/virt/libvirt/volume/iscsi.py b/nova/virt/libvirt/volume/iscsi.py
index 7644ffbd91..06d0debc31 100644
--- a/nova/virt/libvirt/volume/iscsi.py
+++ b/nova/virt/libvirt/volume/iscsi.py
@@ -57,7 +57,7 @@ class LibvirtISCSIVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
conf.driver_io = "native"
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Attach the volume to instance_name."""
LOG.debug("Calling os-brick to attach iSCSI Volume")
diff --git a/nova/virt/libvirt/volume/quobyte.py b/nova/virt/libvirt/volume/quobyte.py
index 462beab3e5..e98decb692 100644
--- a/nova/virt/libvirt/volume/quobyte.py
+++ b/nova/virt/libvirt/volume/quobyte.py
@@ -123,7 +123,7 @@ class LibvirtQuobyteVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
return conf
@utils.synchronized('connect_qb_volume')
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Connect the volume."""
data = connection_info['data']
quobyte_volume = self._normalize_export(data['export'])
diff --git a/nova/virt/libvirt/volume/scaleio.py b/nova/virt/libvirt/volume/scaleio.py
index 387f87cde5..b561dcb435 100644
--- a/nova/virt/libvirt/volume/scaleio.py
+++ b/nova/virt/libvirt/volume/scaleio.py
@@ -49,7 +49,7 @@ class LibvirtScaleIOVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver):
conf.source_path = connection_info['data']['device_path']
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
device_info = self.connector.connect_volume(connection_info['data'])
LOG.debug("Attached ScaleIO volume %s.", device_info)
connection_info['data']['device_path'] = device_info['path']
diff --git a/nova/virt/libvirt/volume/smbfs.py b/nova/virt/libvirt/volume/smbfs.py
index 8841bcb86e..eece7c1050 100644
--- a/nova/virt/libvirt/volume/smbfs.py
+++ b/nova/virt/libvirt/volume/smbfs.py
@@ -39,7 +39,7 @@ class LibvirtSMBFSVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
conf.driver_format = connection_info['data'].get('format', 'raw')
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Connect the volume."""
smbfs_share = connection_info['data']['export']
mount_path = self._get_mount_path(connection_info)
diff --git a/nova/virt/libvirt/volume/volume.py b/nova/virt/libvirt/volume/volume.py
index 327aeca050..279bd9585e 100644
--- a/nova/virt/libvirt/volume/volume.py
+++ b/nova/virt/libvirt/volume/volume.py
@@ -106,7 +106,7 @@ class LibvirtBaseVolumeDriver(object):
return conf
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Connect the volume."""
pass
diff --git a/nova/virt/libvirt/volume/vrtshyperscale.py b/nova/virt/libvirt/volume/vrtshyperscale.py
index c5c9a510c4..1db1bcb29c 100644
--- a/nova/virt/libvirt/volume/vrtshyperscale.py
+++ b/nova/virt/libvirt/volume/vrtshyperscale.py
@@ -39,7 +39,7 @@ class LibvirtHyperScaleVolumeDriver(libvirt_volume.LibvirtVolumeDriver):
self.connector = connector.InitiatorConnector.factory(
initiator.VERITAS_HYPERSCALE, utils.get_root_helper())
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
# The os-brick connector may raise BrickException.
# The convention in nova is to just propagate it up.
# Note that the device path is returned from the os-brick connector
diff --git a/nova/virt/libvirt/volume/vzstorage.py b/nova/virt/libvirt/volume/vzstorage.py
index e366fe56fc..455c5fa32c 100644
--- a/nova/virt/libvirt/volume/vzstorage.py
+++ b/nova/virt/libvirt/volume/vzstorage.py
@@ -110,13 +110,13 @@ class LibvirtVZStorageVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
return ' '.join(mount_opts)
- def connect_volume(self, connection_info, disk_info, instance):
+ def connect_volume(self, connection_info, instance):
"""Attach the volume to instance_name."""
vz_share = connection_info['data']['export']
share_lock = self.SHARE_LOCK_NAME % vz_share
@utils.synchronized(share_lock)
- def _connect_volume(connection_info, disk_info, instance):
+ def _connect_volume(connection_info, instance):
LOG.debug("Calling os-brick to mount vzstorage")
connection_info['data']['options'] = self._get_mount_opts(vz_share)
device_info = self.connector.connect_volume(
@@ -124,7 +124,7 @@ class LibvirtVZStorageVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
LOG.debug("Attached vzstorage volume %s", device_info)
connection_info['data']['device_path'] = device_info['path']
- return _connect_volume(connection_info, disk_info, instance)
+ return _connect_volume(connection_info, instance)
def disconnect_volume(self, connection_info, disk_dev, instance):
"""Detach the volume from instance_name."""