def METHOD_NAME(ifnames, team_if):
    """Team0 add ports and return the ip link result for debuging"""
    for port in ifnames:
        session_serial.cmd_output_safe(params["clearip_cmd"] % port)
        session_serial.cmd_output_safe(params["setdown_cmd"] % port)
        session_serial.cmd_output_safe(params["addport_cmd"] % port)
    output_teamnl = session_serial.cmd_output_safe(params["portchk_cmd"])
    ports = re.findall(r"%s" % params["ptn_teamnl"], output_teamnl)
    for port in ifnames:
        if port not in ports:
            test.fail("Add %s to %s failed." % (port, team_if))
    session_serial.cmd_output_safe(params["killdhclient_cmd"])
    output = session_serial.cmd_output_safe(params["getip_cmd"],
                                            timeout=300)
    team_ip = re.search(r"%s" % params["ptn_ipv4"], output).group()
    if not team_ip:
        test.fail("Failed to get ip address of %s" % team_if)
    return ports, team_ip