Example #1
0
    def generateIsoAnswerfile(self):
        kickstartfile = "kickstart-%s.cfg" % (self.parent._osParent_name)
        filename = "%s/%s" % (xenrt.TEC().getLogdir(), kickstartfile)

        self.nfsdir = xenrt.NFSDirectory()
        ksf = RHELKickStartFile(self.distro,
                                self._maindisk,
                                self.nfsdir.getMountURL(""),
                                repository=self.installURL,
                                installOn=self.parent._osParent_hypervisorType,
                                pxe=False,
                                arch=self.arch)

        ks = ksf.generate()
        f = file(filename, "w")
        f.write(ks)
        f.close()

        installIP = self.getIP(trafficType="OUTBOUND", timeout=600)
        path = "%s/%s" % (xenrt.TEC().lookup("GUESTFILE_BASE_PATH"), installIP)

        self.cleanupdir = path
        try:
            os.makedirs(path)
        except:
            pass
        xenrt.rootops.sudo("chmod -R a+w %s" % path)
        xenrt.command("rm -f %s/kickstart.stamp" % path)
        shutil.copyfile(filename, "%s/kickstart" % (path))
Example #2
0
    def generateIsoAnswerfile(self):
        kickstartfile = "kickstart-%s.cfg" % (self.parent._osParent_name)
        filename = "%s/%s" % (xenrt.TEC().getLogdir(), kickstartfile)

        self.nfsdir = xenrt.NFSDirectory()
        ksf = RHELKickStartFile(self.distro,
                             self._maindisk,
                             self.nfsdir.getMountURL(""),
                             repository=self.installURL,
                             installOn=self.parent._osParent_hypervisorType,
                             pxe=False,
                             arch=self.arch)

        ks = ksf.generate()
        f = file(filename, "w")
        f.write(ks)
        f.close()

        installIP = self.getIP(trafficType="OUTBOUND", timeout=600)
        path = "%s/%s" % (xenrt.TEC().lookup("GUESTFILE_BASE_PATH"), installIP)

        self.cleanupdir = path
        try:
            os.makedirs(path)
        except:
            pass
        xenrt.rootops.sudo("chmod -R a+w %s" % path)
        xenrt.command("rm -f %s/kickstart.stamp" % path)
        shutil.copyfile(filename, "%s/kickstart" % (path))
Example #3
0
    def generateAnswerfile(self, webdir):
        """Generate an answerfile and put it in the provided webdir,
        returning any command line arguments needed to boot the OS"""

        kickstartfile = "kickstart-%s.cfg" % (self.parent._osParent_name)
        filename = "%s/%s" % (xenrt.TEC().getLogdir(), kickstartfile)

        self.nfsdir = xenrt.NFSDirectory()
        ksf = RHELKickStartFile(self.distro,
                                self._maindisk,
                                self.nfsdir.getMountURL(""),
                                repository=self.installURL,
                                installOn=self.parent._osParent_hypervisorType,
                                pxe=False,
                                arch=self.arch)

        ks = ksf.generate()
        f = file(filename, "w")
        f.write(ks)
        f.close()

        webdir.copyIn(filename)
        url = webdir.getURL(os.path.basename(filename))

        # TODO: handle native where console is different,
        # and handle other interfaces
        return ["graphical", "utf8", "ks=%s" % url]
Example #4
0
    def generateAnswerfile(self, webdir):
        """Generate an answerfile and put it in the provided webdir,
        returning any command line arguments needed to boot the OS"""

        kickstartfile = "kickstart-%s.cfg" % (self.parent._osParent_name)
        filename = "%s/%s" % (xenrt.TEC().getLogdir(), kickstartfile)

        self.nfsdir = xenrt.NFSDirectory()
        ksf = RHELKickStartFile(self.distro,
                             self._maindisk,
                             self.nfsdir.getMountURL(""),
                             repository=self.installURL,
                             installOn=self.parent._osParent_hypervisorType,
                             pxe=False,
                             arch=self.arch)

        ks = ksf.generate()
        f = file(filename, "w")
        f.write(ks)
        f.close()

        webdir.copyIn(filename)
        url = webdir.getURL(os.path.basename(filename))

        # TODO: handle native where console is different,
        # and handle other interfaces
        return ["graphical", "utf8", "ks=%s" % url]