Change in vdsm[master]: StorageDomainManifest: move extend and extendVolume

nsoffer at redhat.com nsoffer at redhat.com
Thu Aug 13 23:09:34 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: StorageDomainManifest: move extend and extendVolume
......................................................................


Patch Set 18: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/42266/18/tests/sdm_indirection_tests.py
File tests/sdm_indirection_tests.py:

Line 29:         self.sdUUID = 'a6ecac0a-5c6b-46d7-9ba5-df8b34df2d01'
Line 30:         self.domaindir = '/a/b/c'
Line 31:         self.mountpoint = '/a/b'
Line 32:         self._metadata = {}
Line 33:         FakeDomainManifest._classmethod_calls = []
Do we want this always on FakeDomainManifest, or actually on self.__class__?

If you use self.__class__, then methods called on FakeBlockDomainManifest wil be recorded there, and those called on FakeBlockDomainManifest will be recorded on that class object.

This seems more robust in case you try to test two FakeDomainManifest objects in the same test.
Line 34: 
Line 35:     @classmethod
Line 36:     def record_classmethod_call(cls, fn, args):
Line 37:         FakeDomainManifest._classmethod_calls.append((fn, args))


Line 197:         ['getIsoDomainImagesDir'],
Line 198:         ['getMDPath'],
Line 199:         ['getMetaParam', 1],
Line 200:         ['getVersion', 0],
Line 201:         ['getMetadata', 0],
This form is nicer and more clear (always specifying the number of arguments).
Line 202:         ])
Line 203:     def test_common_functions(self, fn, nargs=0):
Line 204:         self.check_call(fn, nargs)
Line 205: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0ad1769d7e4db6fc0883b37a67d071c278b96c8b
Gerrit-PatchSet: 18
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list