code: def _linux_iqn():
      '''
      Return iSCSI IQN from a Linux host.
      '''
      ret = []
  
      initiator = '/etc/iscsi/initiatorname.iscsi'
      try:
          with salt.utils.files.fopen(initiator, 'r') as _iscsi:
              for line in _iscsi:
                  line = line.strip()
                  if line.startswith('InitiatorName='):
                      ret.append(line.split('=', 1)[1])
      except IOError as ex:
          if ex.errno != errno.ENOENT:
              log.debug("Error while accessing '%s': %s", initiator, ex)
  
      return ref _linux_iqn():
      '''
      Return iSCSI IQN from a Linux host.
      '''
      ret = []
  
      initiator = '/etc/iscsi/initiatorname.iscsi'
      try:
          with salt.utils.files.fopen(initiator, 'r') as _iscsi:
              for line in _iscsi:
                  line = line.strip()
                  if line.startswith('InitiatorName='):
                      ret.append(line.split('=', 1)[1])
      except IOError as ex:
          if ex.errno != errno.ENOENT:
              log.debug("Error while accessing '%s': %s", initiator, ex)
  
      return ret
docs: Return iSCSI IQN from a Linux host.