File add-necessary-code-for-unattended_inst.patch of Package virt-test

--- virttest/tests/unattended_install.py	2014-03-18 16:12:28.384314077 +0100
+++ virttest/tests/unattended_install.py.patched	2014-03-18 16:33:02.435870145 +0100
@@ -706,6 +706,23 @@
                                                       self.qemu_img_binary,
                                                       self.tmpdir,
                                                       self.vfd_size)
+                elif self.params.get('unattended_delivery_method') == 'url':
+                    http_ks_dir = self.params.get('http_ks_dir')
+                    self.unattended_server_port = 80 
+                    path = os.path.join(os.path.dirname(self.cdrom_unattended),
+                                        'autoyast')
+                    boot_disk = RemoteInstall(path, self.url_auto_content_ip,
+                                              self.unattended_server_port,
+                                              http_ks_dir + dest_fname)
+                    autoyast_param = 'autoyast=%s' % boot_disk.get_url()
+                    kernel_params = self.kernel_params
+                    if 'autoyast=' in kernel_params:
+                        kernel_params = re.sub('autoyast\=[\w\d\:\.\/]+',
+                                               autoyast_param,
+                                               kernel_params)
+                    else:
+                        kernel_params = '%s %s' % (kernel_params, autoyast_param)
+                    self.kernel_params = kernel_params
                 else:
                     raise ValueError("Neither cdrom_unattended nor floppy set "
                                      "on the config file, please verify")
openSUSE Build Service is sponsored by