예제 #1
0
파일: debian.py 프로젝트: johnmdilley/xenrt
    def generateAnswerfile(self, webdir):
        """Generate an answerfile and put it in the provided webdir, returning any command line arguments needed to boot the OS"""
        preseedfile = "preseed-%s.cfg" % (self.parent._osParent_name)
        filename = "%s/%s" % (xenrt.TEC().getLogdir(), preseedfile)

        # TODO: Use new signalling method so this works for hosts as well
        ps=DebianPreseedFile(self.distro,
                             self.installURL,
                             filename,
                             arch=self.arch)
        ps.generate()
        webdir.copyIn(filename)
        url = webdir.getURL(os.path.basename(filename))

        # TODO: handle native where console is different, and handle other interfaces
        return ["vga=normal", "auto=true priority=critical", "console=hvc0", "interface=eth0", "url=%s" % url]
예제 #2
0
파일: debian.py 프로젝트: johnmdilley/xenrt
 def generateIsoAnswerfile(self):
     preseedfile = "preseed-%s.cfg" % (self.parent._osParent_name)
     filename = "%s/%s" % (xenrt.TEC().getLogdir(), preseedfile)
     ps = DebianPreseedFile(self.distro,
                            xenrt.getLinuxRepo(self.distro, self.arch, "HTTP"),
                            filename,
                            arch=self.arch)
     ps.generate()
     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/preseed.stamp" % path)
     shutil.copyfile(filename, "%s/preseed" % (path))
예제 #3
0
파일: debian.py 프로젝트: thomassa/xenrt
 def generateIsoAnswerfile(self):
     preseedfile = "preseed-%s.cfg" % (self.parent._osParent_name)
     filename = "%s/%s" % (xenrt.TEC().getLogdir(), preseedfile)
     ps = DebianPreseedFile(self.distro,
                            xenrt.getLinuxRepo(self.distro, self.arch,
                                               "HTTP"),
                            filename,
                            arch=self.arch)
     ps.generate()
     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/preseed.stamp" % path)
     shutil.copyfile(filename, "%s/preseed" % (path))
예제 #4
0
파일: debian.py 프로젝트: thomassa/xenrt
    def generateAnswerfile(self, webdir):
        """Generate an answerfile and put it in the provided webdir, returning any command line arguments needed to boot the OS"""
        preseedfile = "preseed-%s.cfg" % (self.parent._osParent_name)
        filename = "%s/%s" % (xenrt.TEC().getLogdir(), preseedfile)

        # TODO: Use new signalling method so this works for hosts as well
        ps = DebianPreseedFile(self.distro,
                               self.installURL,
                               filename,
                               arch=self.arch)
        ps.generate()
        webdir.copyIn(filename)
        url = webdir.getURL(os.path.basename(filename))

        # TODO: handle native where console is different, and handle other interfaces
        return [
            "vga=normal", "auto=true priority=critical", "console=hvc0",
            "interface=eth0",
            "url=%s" % url
        ]