+ # painfully enough, we need to allow for some time as netflow might show up last
+ def check_netflow (self):
+ "all nodes: check that the netflow slice is alive"
+ return self.check_systemslice ('netflow')
+
+ # we have the slices up already here, so it should not take too long
+ def check_systemslice (self, slicename, timeout_minutes=5, period=15):
+ timeout = datetime.datetime.now()+datetime.timedelta(minutes=timeout_minutes)
+ test_nodes=self.all_nodes()
+ while test_nodes:
+ for test_node in test_nodes:
+ if test_node.check_systemslice (slicename):
+ utils.header ("ok")
+ test_nodes.remove(test_node)
+ else:
+ print '.',
+ if not test_nodes:
+ return True
+ if datetime.datetime.now () > timeout:
+ for test_node in test_nodes:
+ utils.header ("can't find system slice %s in %s"%(slicename,test_node.name()))
+ return False
+ time.sleep(period)
+ return True
+