<s> """<STR_LIT>""" <EOL> from os_brick . initiator import connector <EOL> from oslo_config import cfg <EOL> from oslo_log import log as logging <EOL> from nova import utils <EOL> from nova . virt . libvirt . volume import volume as libvirt_volume <EOL> LOG = logging . getLogger ( __name__ ) <EOL> CONF = cfg . CONF <EOL> CONF . import_opt ( '<STR_LIT>' , '<STR_LIT>' , <EOL> group = '<STR_LIT>' ) <EOL> class LibvirtScaleIOVolumeDriver ( libvirt_volume . LibvirtBaseVolumeDriver ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , connection ) : <EOL> super ( LibvirtScaleIOVolumeDriver , self ) . __init__ ( connection , <EOL> is_block_dev = False ) <EOL> self . connector = connector . InitiatorConnector . factory ( <EOL> '<STR_LIT>' , utils . get_root_helper ( ) , <EOL> device_scan_attempts = CONF . libvirt . num_iscsi_scan_tries ) <EOL> def get_config ( self , connection_info , disk_info ) : <EOL> conf = super ( LibvirtScaleIOVolumeDriver , self ) . get_config ( <EOL> connection_info , disk_info ) <EOL> conf . source_type = '<STR_LIT>' <EOL> conf . source_path = connection_info [ '<STR_LIT:data>' ] [ '<STR_LIT>' ] <EOL> return conf <EOL> def connect_volume ( self , connection_info , disk_info ) : <EOL> device_info = self . connector . connect_volume ( connection_info [ '<STR_LIT:data>' ] ) <EOL> LOG . debug ( "<STR_LIT>" , device_info ) <EOL> connection_info [ '<STR_LIT:data>' ] [ '<STR_LIT>' ] = device_info [ '<STR_LIT:path>' ] <EOL> def disconnect_volume ( self , connection_info , disk_dev ) : <EOL> self . connector . disconnect_volume ( connection_info [ '<STR_LIT:data>' ] , None ) <EOL> LOG . debug ( "<STR_LIT>" , disk_dev ) <EOL> super ( LibvirtScaleIOVolumeDriver , self ) . disconnect_volume ( <EOL> connection_info , disk_dev ) </s>
