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 <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Milan Zamazal <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to