'Attach iscsi volume storage to VM instance.'

def _attach_volume_iscsi(self, connection_info, instance, adapter_type=None):

    vm_ref = vm_util.get_vm_ref(self._session, instance)
    LOG.debug('_attach_volume_iscsi:    %s', connection_info, instance=instance)
    data = connection_info['data']
    device_name = self._iscsi_discover_target(data)[0]
    if (device_name is None):
        raise exception.StorageError(reason=_('Unable    to    find    iSCSI    Target'))
    if (adapter_type is None):
        hardware_devices = self._session._call_method(vutil, 'get_object_property', vm_ref, 'config.hardware.device')
        adapter_type = vm_util.get_scsi_adapter_type(hardware_devices)
    self.attach_disk_to_vm(vm_ref, instance, adapter_type, 'rdmp', device_name=device_name)
    LOG.debug('Attached    ISCSI:    %s', connection_info, instance=instance)
