fix mapper logic
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 31 Mar 2008 19:49:25 +0000 (19:49 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 31 Mar 2008 19:49:25 +0000 (19:49 +0000)
system/TestNode.py
system/TestSite.py
system/config_1vnodes.py

index a893619..f8545e9 100644 (file)
@@ -13,7 +13,7 @@ class TestNode:
        self.node_spec=node_spec
         
     def name(self):
-        return self.node_spec['name']
+        return self.node_spec['node_fields']['hostname']
     
     @staticmethod
     def is_qemu_model (model):
index a167ebf..9a9aa3b 100644 (file)
@@ -50,7 +50,7 @@ class TestSite:
         
     def locate_node (self,nodename):
         for node in self.site_spec['nodes']:
-            if node['node_fields']['hostname'] == nodename:
+            if node['name'] == nodename:
                 return node
         raise Exception,"Cannot locate node %s"%nodename
         
index a9efc1a..08c8b50 100644 (file)
@@ -24,8 +24,11 @@ def config (plcs, options):
     for nodename in all_nodenames:
         (hostname,ip,mac) = test_pool.next_free()
         node_dict= {'node_fields:hostname':hostname,
-                    'network_fields:ip':ip,
-                    'network_fields:mac':mac}        
+                    'network_fields:ip':ip, 
+                    # xxx do not et mac as for some reason the qeu nodes don't know about their mac any more
+                    #'network_fields:mac':mac,
+                    }
+    
         node_dict.update(site_dict)
         maps.append ( ( nodename, node_dict) )