def doctor(args): ver = dckr.version()['Version'] if ver.endswith('-ce'): curr_version = version.parse(ver.replace('-ce', '')) else: curr_version = version.parse(ver) min_version = version.parse('1.9.0') ok = curr_version >= min_version print 'docker version ... {1} ({0})'.format( ver, 'ok' if ok else 'update to {} at least'.format(min_version)) print 'bgperf image', if img_exists('bgperf/exabgp'): print '... ok' else: print '... not found. run `bgperf prepare`' for name in ['gobgp', 'bird', 'quagga']: print '{0} image'.format(name), if img_exists('bgperf/{0}'.format(name)): print '... ok' else: print '... not found. if you want to bench {0}, run `bgperf prepare`'.format( name) print '/proc/sys/net/ipv4/neigh/default/gc_thresh3 ... {0}'.format( gc_thresh3())
def doctor(args): ver = dckr.version()['Version'] ok = int(''.join(ver.split('.'))) >= 190 print 'docker version ... {1} ({0})'.format(ver, 'ok' if ok else 'update to 1.9.0 at least') print 'bgperf image', if img_exists('bgperf/exabgp'): print '... ok' else: print '... not found. run `bgperf prepare`' for name in ['gobgp', 'bird', 'quagga']: print '{0} image'.format(name), if img_exists('bgperf/{0}'.format(name)): print '... ok' else: print '... not found. if you want to bench {0}, run `bgperf prepare`'.format(name) print '/proc/sys/net/ipv4/neigh/default/gc_thresh3 ... {0}'.format(gc_thresh3())