#!/usr/bin/python # destroy_nodes.py import verse as v import sys if len(sys.argv) < 2: print "usage: destroy_nodes.py node_id node_id ..." print "example: destroy_nodes.py 1 2 3 4 5" sys.exit(0) ids = [] for i in range(1, len(sys.argv)): ids.append(int(sys.argv[i])) session = v.send_connect("a", "b", "localhost", 0) v.session_set(session) for i in range(0, 10): v.callback_update(10000) for id in ids: v.send_node_destroy(id) for i in range(0, 10): v.callback_update(10000) v.send_connect_terminate("", "") for i in range(0, 10): v.callback_update(10000) v.session_destroy(session)