From: Thierry Parmentelat Date: Tue, 1 Apr 2008 15:28:28 +0000 (+0000) Subject: pass the MAC address and the HOSTNAME to the qemu conf file X-Git-Tag: tests-4.2-4~114 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=18a30b0492e6f5caa11e6552f78405482354f030;p=tests.git pass the MAC address and the HOSTNAME to the qemu conf file rename the qemu conf file to qemu.conf --- diff --git a/system/TestNode.py b/system/TestNode.py index f8545e9..d44a159 100644 --- a/system/TestNode.py +++ b/system/TestNode.py @@ -126,10 +126,14 @@ class TestNode: def configure_qemu(self): if not self.is_qemu(): return - conf_filename="%s/start-qemu.conf"%(self.areaname()) + mac=self.node_spec['network_fields']['mac'] + hostname=self.node_spec['node_fields']['hostname'] + conf_filename="%s/qemu.conf"%(self.areaname()) utils.header('Storing qemu config for %s in %s'%(self.name(),conf_filename)) file=open(conf_filename,'w') + file.write('MACADDR=%s\n'%mac) file.write('NODE_ISO=%s.iso\n'%self.name()) + file.write('HOSTNAME=%s\n'%hostname) file.close() # if relevant, push the qemu area onto the host box