@classmethod
def get(cls, top, parent=None):
    """
        This will get all of the switch contexts on the
        specified node.  If no node is specified, then
        it will get all of the switch contexts on all
        of the switches.

        :param parent:
       :param top: the topSystem level json object
       :returns: list of Switch context
        """
    cls.check_parent(parent)
    result = []
    ctx_data = top.get_class('l3Ctx')[:]
    ctx_data.extend(top.get_class('l3Inst')[:])
    for ctx in ctx_data:
        context = cls()
        if 'l3Ctx' in ctx:
            context._populate_from_attributes(ctx['l3Ctx']['attributes'])
        else:
            context._populate_from_attributes(ctx['l3Inst']['attributes'])
        result.append(context)
        if parent:
            context._parent = parent
            context._parent.add_child(context)
    return result
