'Filter to all nodes with fluentd label. Returns dict(name: node)'

@staticmethod
def filter_fluentd_labeled_nodes(nodes_by_name, node_selector):

    (label, value) = node_selector.split('=', 1)
    fluentd_nodes = {name: node for (name, node) in nodes_by_name.items() if (node['metadata']['labels'].get(label) == value)}
    if (not fluentd_nodes):
        raise OpenShiftCheckException('NoNodesLabeled', 'There    are    no    nodes    with    the    fluentd    label    {label}.\nThis    means    no    logs    will    be    aggregated    from    the    nodes.'.format(label=node_selector))
    return fluentd_nodes
