Change in vdsm[master]: virt: add device setup and teardown

mpolednik at redhat.com mpolednik at redhat.com
Wed May 4 10:12:26 UTC 2016


Martin Polednik has posted comments on this change.

Change subject: virt: add device setup and teardown
......................................................................


Patch Set 14:

(1 comment)

https://gerrit.ovirt.org/#/c/55135/14/tests/vmTests.py
File tests/vmTests.py:

Line 1114: 
Line 1115:         with fake.VM(self.conf, create_device_objects=True) as testvm:
Line 1116:             testvm._devices[hwclass.GENERAL] = devices
Line 1117:             self.assertRaises(ExpectedError, testvm._setup_devices)
Line 1118:             self.assertEqual(devices[0].state, fake.SETUP)
> For storage we have prepareVolumePath and teardownVolumePath, but prepareVo
Console uses both setup and teardown (called prepare, cleanup) so I guess that is the deciding device for now. Glancing over the code, we don't very well handle tearing down the sockets when creation flow fails, may even improve the code slightly to call teardown after failed setup.

I'm fine with either, we just need to decide which is more future proof.
Line 1119:             self.assertEqual(devices[1].state, fake.CREATED)
Line 1120:             self.assertEqual(devices[2].state, fake.CREATED)
Line 1121: 
Line 1122:     def test_device_setup_fail_second(self):


-- 
To view, visit https://gerrit.ovirt.org/55135
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f99b855de43cff693b99b6873a835b7ad56db1b
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list