Convert node data from nested-list to sorted dict.

def make_node_dict(outer_list, sort="zone"):
    """Convert node data from nested-list to sorted dict."""
    raw_dict = {}
    x = 1
    for inner_list in outer_list:
        for node in inner_list:
            raw_dict[x] = node
            x += 1
    if sort == "name":  # sort by provider - name
        srt_dict = OrderedDict(sorted(raw_dict.items(), key=lambda k:
                               (k[1].cloud, k[1].name.lower())))
    else:  # sort by provider - zone - name
        srt_dict = OrderedDict(sorted(raw_dict.items(), key=lambda k:
                               (k[1].cloud, k[1].zone, k[1].name.lower())))
    x = 1
    node_dict = {}
    for i, v in srt_dict.items():
        node_dict[x] = v
        x += 1
    return node_dict