+"""
+Find the IP address assigned to a virtual interface in the topology
+(for creating /etc/hosts)
+"""
+def get_virt_ip(myid, nodeid):
+ if myid < nodeid:
+ virtip = "10.%d.%d.2" % (myid, nodeid)
+ else:
+ virtip = "10.%d.%d.3" % (nodeid, myid)
+ return virtip
+
+