Example #1
0
def disconnect_cmd(link):
    # see also disconnect in real-net and global command below
    rns = [x for x in SIM_all_objects() if instance_of(x, "real_network")
           and x.link == link]
    for rn in rns:
        del_rn_default_route(rn)
        print "Disconnecting link %s from the real network." % rn.link.name
        SIM_delete_object(rn)
Example #2
0
def disconnect_rn_cmd(rn):
    # see also disconnect in ethernet-link (namespace and global)
    del_rn_default_route(rn)
    print "Disconnecting link %s from the real network." % rn.link.name
    SIM_delete_object(rn)