def monitor(): schemas = SchemaStore(getFiles()) schemas.printSchemas() recentMatches = [] #openflow = Openflow(schemas) sflow = Sflow(schemas, recentMatches) sflow.start() while True: if sflow.recentMatches: print sflow.recentMatches
allFiles = os.listdir(os.getcwd()) print "current working directory is "+os.getcwd() xmlFiles = [] xmlPattern= re.compile('^.*\.(xml)$') for fileName in allFiles: m = re.match(xmlPattern,fileName) if m and fileName != "FlowSchema.xml": xmlFiles += [m.group(0)] print xmlFiles return xmlFiles <<<<<<< HEAD schemas = SchemaStore(getFiles()) schemas.printSchemas() """fix parsing, get flows to work. work on architecture. make canonical topology, with ip addresses. switch to layer 3 routing. check latency properly, testing different maounts and cleearing the ARP cache. then combine flows with latency """ openflow = Openflow(schemas) openflow.start() sflow = Sflow(schemas) sflow.start() monitor = Monitor(sflow,openflow) monitor.start() """another infinite loop means it needs its own thread so it doesn't stop routing""" #sflow = Sflow(schemas)