Adam Litke has posted comments on this change. Change subject: StorageDomainManifest: move BlockSD.getVSize ......................................................................
Patch Set 13: (4 comments) https://gerrit.ovirt.org/#/c/41994/13/tests/storagefakelib.py File tests/storagefakelib.py: Line 38: devices = [_fqpvname(dev) for dev in devices] Line 39: size = self._PV_SIZE * len(devices) Line 40: extent_count = size / extentsize Line 41: if metadataSize is None: Line 42: metadataSize = 0 > None is invalid value, why do you want to allow it? I don't need this code. Will remove. Line 43: Line 44: vg_attr = dict(permission='w', Line 45: resizeable='z', Line 46: exported='-', Line 88: active=True) Line 89: Line 90: if vgName not in self.lvmd: Line 91: self.lvmd[vgName] = dict() Line 92: self.lvmd[vgName][lvName] = lv_md > Use setdefault: Done Line 93: Line 94: def lvPath(self, vgName, lvName): Line 95: return os.path.join(self.root, "dev", vgName, lvName) Line 96: Line 105: lv_attr = real_lvm.LV_ATTR(**lv_md['attr']) Line 106: lv_md['attr'] = lv_attr Line 107: return real_lvm.LV(**lv_md) Line 108: Line 109: def test_create_fake_lv_symlink(self, vg_name, lv_name): > test_? I wanted to separate this from the interface bits. I'll try something different. Line 110: volpath = self.lvPath(vg_name, lv_name) Line 111: os.makedirs(os.path.dirname(volpath)) Line 112: with open(volpath, "w") as f: Line 113: f.truncate(int(self.lvmd[vg_name][lv_name]['size'])) Line 107: return real_lvm.LV(**lv_md) Line 108: Line 109: def test_create_fake_lv_symlink(self, vg_name, lv_name): Line 110: volpath = self.lvPath(vg_name, lv_name) Line 111: os.makedirs(os.path.dirname(volpath)) > Why was wrong in __init__? I'll keep 'dev' up there and keep this down here. Line 112: with open(volpath, "w") as f: Line 113: f.truncate(int(self.lvmd[vg_name][lv_name]['size'])) Line 114: Line 115: -- To view, visit https://gerrit.ovirt.org/41994 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib00eba218cfb4af201aebcdc5071f95164c31687 Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Ala Hino <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Freddy Rolland <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
