def logical_switch_list(client_session):
    """
    This function returns all logical switches found in NSX
    :param client_session: An instance of an NsxClient Session
    :return: returns a tuple, the first item is a list of tuples with item 0 containing the LS Name as string
             and item 1 containing the LS id as string. The second item contains a list of dictionaries containing
             all logical switch details
    """
    all_logical_switches = client_session.read_all_pages('logicalSwitchesGlobal', 'read')
    switch_list = []
    for ls in all_logical_switches:
        try:
            lsname = ls['name']
        except KeyError:
            lsname = '<empty name>'
        switch_list.append((lsname, ls['objectId']))
    return switch_list, all_logical_switches