- if ( not self.is_local(host_box)):
- dest_dir="%s/qemu-%s"%(self.buildname(),hostname)
- utils.header ("Transferring configuration files for node %s"%hostname)
- utils.header ("Using dir %s on %s"%(dest_dir,host_box))
- self.test_plc.run_in_host("ssh root@%s rm -rf %s"%(host_box, dest_dir))
- self.test_plc.run_in_host("ssh root@%s mkdir -p %s"%(host_box, dest_dir))
- self.test_plc.run_in_host("scp -r %s/qemu-%s/* root@%s:%s"%(path,hostname,host_box,dest_dir))
-
- def create_boot_cd(self,path):
- model=self.node_spec['node_fields']['model']
- node_spec=self.node_spec
- hostname=node_spec['node_fields']['hostname']
- utils.header("Calling GetBootMedium for %s"%hostname)
- encoded=self.test_plc.server.GetBootMedium(self.test_plc.auth_root(), hostname, 'node-iso', '', ['serial'])
- if (encoded == ''):
- raise Exception, 'boot.iso not found'
-
- if model.find("qemu") >= 0:
- nodepath="%s/qemu-%s"%(path,hostname)
- self.test_plc.run_in_host("rm -rf %s"%nodepath)
- self.test_plc.run_in_host("mkdir -p %s"%nodepath)
- template="%s/template-qemu"%path
- self.test_plc.run_in_host("cp -r %s/* %s"%(template,nodepath))
- self.qemu_config(hostname, path)
- else:
- nodepath="%s/real-%s"%(path,hostname)
- self.test_plc.run_in_host("rm -rf %s"%nodepath)
- self.test_plc.run_in_host("mkdir -p %s"%nodepath)