diff options
author | Matthew Booth <mbooth@redhat.com> | 2016-11-01 16:25:01 +0000 |
---|---|---|
committer | Matthew Booth <mbooth@redhat.com> | 2016-11-01 16:41:08 +0000 |
commit | 36322fdf48dc50a4518c0c9fd6aa787d3aa01fed (patch) | |
tree | b05d379bf9003719692d88f0c7c115108585671c /nova/virt/libvirt/volume/iscsi.py | |
parent | 26dcc8e45bb64e01325e738e4c18caef9163d9b5 (diff) | |
download | nova-36322fdf48dc50a4518c0c9fd6aa787d3aa01fed.tar.gz |
libvirt: Pass Host instead of Driver to volume drivers
We were initialising libvirt volume drivers by passing the
LibvirtDriver object. However, this is only ever used to fetch the
Host. We update the interface to pass the Host instead. This is
cleaner, but also better represents the intent of the interface. They
should not be able to access arbitrary attributes of the LibvirtDriver
object.
Change-Id: I87ceeee1ec46dc22754321574b16e6c47b27a848
Diffstat (limited to 'nova/virt/libvirt/volume/iscsi.py')
-rw-r--r-- | nova/virt/libvirt/volume/iscsi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/libvirt/volume/iscsi.py b/nova/virt/libvirt/volume/iscsi.py index 18d66ee394..1bd9a3c825 100644 --- a/nova/virt/libvirt/volume/iscsi.py +++ b/nova/virt/libvirt/volume/iscsi.py @@ -28,8 +28,8 @@ CONF = nova.conf.CONF class LibvirtISCSIVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver): """Driver to attach Network volumes to libvirt.""" - def __init__(self, connection): - super(LibvirtISCSIVolumeDriver, self).__init__(connection, + def __init__(self, host): + super(LibvirtISCSIVolumeDriver, self).__init__(host, is_block_dev=True) # Call the factory here so we can support |