Change in vdsm[master]: Introduce VolumeArtifacts

nsoffer at redhat.com nsoffer at redhat.com
Tue Feb 23 20:19:50 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: Introduce VolumeArtifacts
......................................................................


Patch Set 23:

(3 comments)

I have to invest more time in this, some comments for now.

https://gerrit.ovirt.org/#/c/48097/23/tests/volume_artifacts_test.py
File tests/volume_artifacts_test.py:

Line 68:     def test_state_missing(self):
Line 69:         with self.fake_env() as env:
Line 70:             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
Line 71:             self.assertFalse(artifacts.is_garbage())
Line 72:             self.assertFalse(artifacts.image_exists)
is_image()?

Same for rest of the file.
Line 73:             self.assertRaises(ValidationError,
Line 74:                               self.validate_artifacts, artifacts)
Line 75: 
Line 76:     def test_state_garbage_volatile_image_dir(self):


https://gerrit.ovirt.org/#/c/48097/23/vdsm/storage/sdm/volume_artifacts.py
File vdsm/storage/sdm/volume_artifacts.py:

Line 114:     - States:
Line 115:     - no image or volatile directories
Line 116:     - Operations:
Line 117:     - is_garbage -> false
Line 118:     - is_missing -> true
is_image (same for rest of the file)
Line 119:     - create artifacts -> change state GARBAGE
Line 120: 
Line 121:     GARBAGE
Line 122: 


Line 171:         else:
Line 172:             return self.sd_manifest.getDeletedImagePath(self.img_id)
Line 173: 
Line 174:     @property
Line 175:     def image_exists(self):
I think we wanted to replace this with is_image().

Also should move near is_garbage() - it is nice when methods are ordered by types (e.g. testing methods).
Line 176:         if self._image_exists is None:
Line 177:             self._image_exists = os.path.exists(self._image_dir)
Line 178:         return self._image_exists
Line 179: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I352423e39a899b9b83ccf3b8f6c17ec433e9c353
Gerrit-PatchSet: 23
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list