~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to AutoUpgradeTester/UpgradeTestBackendQemu.py

  • Committer: Michael Vogt
  • Date: 2009-01-20 11:01:45 UTC
  • Revision ID: michael.vogt@ubuntu.com-20090120110145-wxawnyuvw3i91d0f
AutoUpgradeTester/UpgradeTestBackendQemu.py: move VncNum, SshPort, BaseImage, SwapImage, CacheBaseImage options from the NonInteraction section to the new KVM section

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        self.qemu_pid = None
72
72
        self.profiledir = os.path.dirname(profile)
73
73
        # setup mount dir/imagefile location
74
 
        self.baseimage = self.config.get("NonInteractive","BaseImage")
 
74
        self.baseimage = self.config.get("KVM","BaseImage")
75
75
        if not os.path.exists(self.baseimage):
76
76
            raise NoImageFoundException
77
77
        # check if we want virtio here and default to yes
83
83
            self.qemu_options.extend(["-net","nic,model=virtio"])
84
84
            self.qemu_options.extend(["-net","user"])
85
85
        # swapimage
86
 
        if self.config.getWithDefault("NonInteractive","SwapImage",""):
 
86
        if self.config.getWithDefault("KVM","SwapImage",""):
87
87
            self.qemu_options.append("-hdb")
88
88
            self.qemu_options.append(self.config.get("NonInteractive","SwapImage"))
89
89
        # regular image
90
90
        self.image = os.path.join(self.profiledir, "test-image")
91
91
        # make ssh login possible (localhost 54321) available
92
92
        self.ssh_key = os.path.join(self.profiledir,self.config.getWithDefault("NonInteractive","SSHKey","ssh-key"))
93
 
        self.ssh_port = self.config.getWithDefault("NonInteractive","SshPort","54321")
 
93
        self.ssh_port = self.config.getWithDefault("KVM","SshPort","54321")
94
94
        self.qemu_options.append("-redir")
95
95
        self.qemu_options.append("tcp:%s::22" % self.ssh_port)
96
96
        # vnc port/display
97
 
        vncport = self.config.getWithDefault("NonInteractive","VncNum","0")
 
97
        vncport = self.config.getWithDefault("KVM","VncNum","0")
98
98
        self.qemu_options.append("-vnc")
99
99
        self.qemu_options.append("localhost:%s" % vncport)
100
100
 
192
192
        #        way to do this currently without running as root
193
193
        # as a workaround we regenerate manually every now and then
194
194
        # and use UpgradeFromDistOnBootstrap=true here
195
 
        self.config.set("NonInteractive","CacheBaseImage", "false")
 
195
        self.config.set("KVM","CacheBaseImage", "false")
196
196
        self.config.set("NonInteractive","UpgradeFromDistOnBootstrap","true")
197
197
        self.baseimage = "jeos/%s-i386.qcow2" % self.config.get("Sources","To")
198
198
        self.image = diff_image