コード例 #1
0
ファイル: manage.py プロジェクト: splaice/Virtbox
 def setup(self):
     self.vm0 = generate_vm()
     self.running_uuid0 = startvm(vm_uuid=self.vm0['uuid'],
             start_type='headless')
     self.vm1 = generate_vm()
     self.running_uuid1 = startvm(vm_uuid=self.vm1['uuid'],
             start_type='headless')
     self.vm2 = generate_vm()
     self.running_uuid2 = startvm(vm_uuid=self.vm2['uuid'],
             start_type='headless')
     time.sleep(5)
コード例 #2
0
ファイル: manage.py プロジェクト: splaice/Virtbox
 def test_start_and_stop_vm(self):
     result = startvm(vm_name=self.vm['uuid'], start_type='headless')
     testify.assert_equal(self.vm['uuid'], result['uuid'])
     # this looks hacky but waiting on these operations finishing will
     # be handled in the biz logic at a higher level
     time.sleep(5)
     controlvm(vm_uuid=self.vm['uuid'], action='poweroff')
     time.sleep(5)