| print "# For %d nodes cluster, %d flows per network pair, total %d flows" % (n, nflow, (n-1)*(n-2)/2 * nflow * 2) |
| for i in itertools.combinations(a,2): |
| for f in range(2, nflow+2): |
| print "%d ps_%d_1 00:00:00:00:00:00:%02x:%02x %d 00:00:00:00:00:00:%02x:%02x %d matchSrcMac 00:00:c0:a8:%02x:%02x matchDstMac 00:00:c0:a8:%02x:%02x" % (flow_id,pair_id,snet_id,term_id,src_port,dnet_id,term_id,dst_port,snet_id,term_id,dnet_id,term_id) |
| print "%d ps_%d_2 00:00:00:00:00:00:%02x:%02x %d 00:00:00:00:00:00:%02x:%02x %d matchSrcMac 00:00:c0:a8:%02x:%02x matchDstMac 00:00:c0:a8:%02x:%02x" % (flow_id,pair_id,dnet_id,term_id,dst_port,snet_id,term_id,src_port,dnet_id,term_id,snet_id,term_id) |