'Constructs the docutils content for the summary of
the support matrix.
The summary consists of a giant table, with one row
for each feature, and a column for each hypervisor
driver. It provides an \'at a glance\' summary of the
status of each driver'

def _build_summary(self, matrix, content):

    summarytitle = nodes.subtitle(text='Summary')
    summary = nodes.table()
    cols = len(matrix.targets.keys())
    cols += 2
    summarygroup = nodes.tgroup(cols=cols)
    summarybody = nodes.tbody()
    summaryhead = nodes.thead()
    for i in range(cols):
        summarygroup.append(nodes.colspec(colwidth=1))
    summarygroup.append(summaryhead)
    summarygroup.append(summarybody)
    summary.append(summarygroup)
    content.append(summarytitle)
    content.append(summary)
    header = nodes.row()
    blank = nodes.entry()
    blank.append(nodes.emphasis(text='Feature'))
    header.append(blank)
    blank = nodes.entry()
    blank.append(nodes.emphasis(text='Status'))
    header.append(blank)
    summaryhead.append(header)
    impls = list(matrix.targets.keys())
    impls.sort()
    for key in impls:
        target = matrix.targets[key]
        implcol = nodes.entry()
        header.append(implcol)
        implcol.append(nodes.strong(text=target.title))
    for feature in matrix.features:
        item = nodes.row()
        id = re.sub('[^a-zA-Z0-9_]', '_', feature.key)
        keycol = nodes.entry()
        item.append(keycol)
        keyref = nodes.reference(refid=id)
        keytxt = nodes.inline()
        keycol.append(keytxt)
        keytxt.append(keyref)
        keyref.append(nodes.strong(text=feature.title))
        statuscol = nodes.entry()
        item.append(statuscol)
        statuscol.append(nodes.inline(text=feature.status, classes=[('sp_feature_' + feature.status)]))
        impls = list(matrix.targets.keys())
        impls.sort()
        for key in impls:
            target = matrix.targets[key]
            impl = feature.implementations[key]
            implcol = nodes.entry()
            item.append(implcol)
            id = re.sub('[^a-zA-Z0-9_]', '_', ((feature.key + '_') + key))
            implref = nodes.reference(refid=id)
            impltxt = nodes.inline()
            implcol.append(impltxt)
            impltxt.append(implref)
            status = ''
            if (impl.status == SupportMatrixImplementation.STATUS_COMPLETE):
                status = u'\u2714'
            elif (impl.status == SupportMatrixImplementation.STATUS_MISSING):
                status = u'\u2716'
            elif (impl.status == SupportMatrixImplementation.STATUS_PARTIAL):
                status = u'\u2714'
            elif (impl.status == SupportMatrixImplementation.STATUS_UKNOWN):
                status = u'?'
            implref.append(nodes.literal(text=status, classes=['sp_impl_summary', ('sp_impl_' + impl.status)]))
        summarybody.append(item)
