Change in vdsm[master]: add simple VM creation functional test

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Thu Aug 23 01:29:01 UTC 2012


Zhou Zheng Sheng has posted comments on this change.

Change subject: add simple VM creation functional test
......................................................................


Patch Set 1: (4 inline comments)

....................................................
File tests/functional/vmTests.py
Line 40:         kernelPath = "/boot/vmlinuz-" + kernelVer
Line 41:         initramfsPath = "/boot/initramfs-%s.img" % kernelVer
Line 42:         vmid = str(uuid.uuid4())
Line 43:         conf = {'acpiEnable': 'True',
Line 44:                 'display': 'vnc',
Thanks Deepak and Michal. I usually use VNC to connect to guest to see if it runs OK. Since there is no network defined for the default initramfs in Fedora, I am not able to operate on the guest without VNC. In functional test, it is useless, so I can remove the VNC parameter.
Line 45:                 'initrd': initramfsPath,
Line 46:                 'kernel': kernelPath,
Line 47:                 # Fedora uses dracut to create initramfs. The following
Line 48:                 # arguments will be interpreted by init scripts created by


Line 52:                 'memSize': '256',
Line 53:                 'vmId': vmid,
Line 54:                 'vmName': 'vdsm_testVM',
Line 55:                 'vmType': 'kvm'}
Line 56: 
Well, this is the first step I'm trying to write a VM creation test. The main point here is using host kernel and initramfs, so we will not need to install guest OS. If the community thinks using host kernel and initramfs is OK, next I will write VM tests with storages. Thanks for the advice.
Line 57:         self.s = vdscli.connect()
Line 58: 
Line 59:         try:
Line 60:             assertVdsOK(self.s.create(conf))


Line 83:         else:
Line 84:             return False
Line 85:         statsList = assertVdsOK(self.s.getVmStats(vmid))['statsList']
Line 86:         vm = statsList[0]
Line 87:         if vm['status'] == 'Up':
Done
Line 88:             return True


Line 85:         statsList = assertVdsOK(self.s.getVmStats(vmid))['statsList']
Line 86:         vm = statsList[0]
Line 87:         if vm['status'] == 'Up':
Line 88:             return True
Line 89:         return False
It should be

return vm['status'] == 'Up'


--
To view, visit http://gerrit.ovirt.org/7396
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb0d86ce20a547ef809d5407fe12d6ade474c4d2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list