From: Thierry Parmentelat Date: Wed, 19 Mar 2008 12:34:17 +0000 (+0000) Subject: mac addresses allocated to the pool of vnodes X-Git-Tag: tests-4.2-4~186 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4bcf3f402405626a19a85584ff5834f2f7278350;p=tests.git mac addresses allocated to the pool of vnodes --- diff --git a/system/config_onelab_vserver.py b/system/config_onelab_vserver.py index c1cef44..bc9fc1a 100644 --- a/system/config_onelab_vserver.py +++ b/system/config_onelab_vserver.py @@ -3,12 +3,12 @@ import os.path # the pool of IP addresses available # from 01 to 09 -available = [ ( 'vnode%02d.inria.fr'%i, '138.96.250.13%d'%i) for i in range(1,10) ] +available = [ ( 'vplc%02d.inria.fr'%i, '138.96.250.13%d'%i, 'ab:cd:ef:00:00:%02d'%i) for i in range(1,10) ] # let's be flexible def locate (user_provided): global available - for (hostname,ip) in available: + for (hostname,ip,mac) in available: if hostname.find(user_provided) >=0 or ip.find(user_provided) >=0: return (hostname,ip) @@ -28,7 +28,7 @@ def config (plcs,options): ### locating the next available hostname (using ping) while True: try: - (hostname,ip)=available.pop() + (hostname,ip,mac)=available.pop() utils.header('vserver IP assignment : scanning IP %s'%ip) if not utils.check_ping(hostname): utils.header('IP %s is OK'%ip)