def METHOD_NAME(tgen):
    r1 = tgen.add_router("r1")
    peer1 = tgen.add_exabgp_peer("peer1", ip="10.0.0.2", defaultRoute="via 10.0.0.1")
    switch = tgen.add_switch("s1")
    switch.add_link(r1)
    switch.add_link(peer1)