def parse_interface_data(data):
    interface_table = []

    if "data" in data:
        raw_data = data["data"]

        for line in raw_data.split("\n"):
            if line.startswith("Interface") and "IP Address" in line:
                continue 

            if line.startswith("Codes:"):
                continue 

            if line.strip().startswith('-'): 
                continue

            if line.strip(): 
                interface_info = line.split()
                if len(interface_info) >= 6:
                    interface_table.append({
                        "interface": interface_info[0],
                        "ip_address": interface_info[1] if interface_info[1] != '-' else 'N/A',
                        "mac_address": interface_info[2],
                        "vrf": interface_info[3],
                        "mtu": interface_info[4],
                        "status": interface_info[5],
                        "description": " ".join(interface_info[6:]) 
                    })

    return interface_table