'Convert read before __opts to the commands stream
Parameters
allow_missing : bool
Either to allow log files to be missing entirely.  Primarily is
used for testing'

def convert(self, allow_no_files=False):

    stream = []
    e = self.__opts.get('config-error')
    if e:
        stream.extend([['config-error', ("Jail    '%s'    skipped,    because    of    wrong    configuration:    %s" % (self.__name, e))]])
        return stream
    if self.__filter:
        stream.extend(self.__filter.convert())
    for (opt, value) in self.__opts.iteritems():
        if (opt == 'logpath'):
            if self.__opts.get('backend', None).startswith('systemd'):
                continue
            found_files = 0
            for path in value.split('\n'):
                path = path.rsplit('    ', 1)
                (path, tail) = (path if (len(path) > 1) else (path[0], 'head'))
                pathList = JailReader._glob(path)
                if (len(pathList) == 0):
                    logSys.error(('No    file(s)    found    for    glob    %s' % path))
                for p in pathList:
                    found_files += 1
                    stream.append(['set', self.__name, 'addlogpath', p, tail])
            if (not (found_files or allow_no_files)):
                raise ValueError(('Have    not    found    any    log    file    for    %s    jail' % self.__name))
        elif (opt == 'logencoding'):
            stream.append(['set', self.__name, 'logencoding', value])
        elif (opt == 'backend'):
            backend = value
        elif (opt == 'ignoreip'):
            for ip in splitwords(value):
                stream.append(['set', self.__name, 'addignoreip', ip])
        elif (opt in ('failregex', 'ignoreregex')):
            multi = []
            for regex in value.split('\n'):
                if (regex != ''):
                    multi.append(regex)
            if (len(multi) > 1):
                stream.append(['multi-set', self.__name, ('add' + opt), multi])
            elif len(multi):
                stream.append(['set', self.__name, ('add' + opt), multi[0]])
        elif (opt not in ('action', 'filter', 'enabled')):
            stream.append(['set', self.__name, opt, value])
    for action in self.__actions:
        if isinstance(action, (ConfigReaderUnshared, ConfigReader)):
            stream.extend(action.convert())
        else:
            stream.append(action)
    stream.insert(0, ['add', self.__name, backend])
    return stream
