import re


def parse_line(line):
    """
    This function is needed to parse one-liner from the controller and extract the information we need

    :param line: a one line of output from "show ap database long" command
    :return: object, representing AP and it's key values, like MAC-address or given name
    """
    name, group, apType, ipAddr, status, flags, switchAddr, \
    standbyAddr, mac, serNum, *other = re.split(r' {2,}', line)
    ap = {
        "invNum": "",
        "serNum": serNum,
        "mac": mac,
        "name": name
    }
    return ap