コード例 #1
0
ファイル: manage.py プロジェクト: splaice/Virtbox
 def setup(self):
     self.vm = generate_vm()
     self.hdd = generate_hd()
     self.memory = "256"
     self.rtcuseutc = "on"
     modifyvm(vm_uuid=self.vm['uuid'], memory=self.memory,
             rtcuseutc=self.rtcuseutc)
コード例 #2
0
ファイル: manage.py プロジェクト: splaice/Virtbox
    def test_modifyvm_new_name_by_uuid(self):
        testify.assert_equal(self.vm_name, self.vm['name'])

        modifyvm(vm_uuid=self.vm['uuid'], name=self.new_name)
        vm_info = showvminfo(uuid=self.vm['uuid'])

        testify.assert_equal(self.new_name, vm_info['name'])
コード例 #3
0
ファイル: manage.py プロジェクト: splaice/Virtbox
    def test_modifyvm_adjust_memory_by_uuid(self):
        memory = "128"
        testify.assert_equal(self.vm_name, self.vm['name'])

        modifyvm(vm_uuid=self.vm['uuid'], memory=memory)
        vm_info = showvminfo(uuid=self.vm['uuid'])

        testify.assert_equal(memory, vm_info['memory'])
コード例 #4
0
ファイル: manage.py プロジェクト: splaice/Virtbox
    def test_modifyvm_basic_configuration(self):
        memory = "256"
        rtcuseutc = "on"
        nic1 = "hostonly"
        nictype1 = "Am79C973"
        hostonlyadapter1 = "vboxnet0"

        testify.assert_equal(self.vm_name, self.vm['name'])
        modifyvm(vm_uuid=self.vm['uuid'], memory=memory,
                rtcuseutc=rtcuseutc, nic1=nic1, nictype1=nictype1,
                hostonlyadapter1=hostonlyadapter1)
        vm_info = showvminfo(uuid=self.vm['uuid'])

        testify.assert_equal(memory, vm_info['memory'])
        testify.assert_equal(rtcuseutc, vm_info['rtcuseutc'])
        testify.assert_equal(nic1, vm_info['nic1'])
        testify.assert_equal(hostonlyadapter1, vm_info['hostonlyadapter1'])