Adam Litke has uploaded a new change for review.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
tests: FakeLVM support initialTag when creating LV
Change-Id: I4da4bf5e36a9476ecf34b588a494f1839857291d Signed-off-by: Adam Litke alitke@redhat.com --- M tests/storagefakelib.py M tests/storagefakelibTests.py 2 files changed, 29 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/47861/1
diff --git a/tests/storagefakelib.py b/tests/storagefakelib.py index 3c20a7c..3755ec3 100644 --- a/tests/storagefakelib.py +++ b/tests/storagefakelib.py @@ -84,6 +84,7 @@ devices = None
state = 'a' if activate else '-' + tags = (initialTag,) if initialTag is not None else () lv_attr = dict(voltype='-', permission='w', allocations='i', @@ -99,7 +100,7 @@ size=str(size), seg_start_pe='0', devices=None, - tags=(), + tags=tags, writeable=True, opened=False, active=bool(activate)) diff --git a/tests/storagefakelibTests.py b/tests/storagefakelibTests.py index 7be6c10..6da7190 100644 --- a/tests/storagefakelibTests.py +++ b/tests/storagefakelibTests.py @@ -23,7 +23,7 @@ from testlib import permutations, expandPermutations from storagefakelib import FakeLVM
-from storage import blockSD +from storage import blockSD, blockVolume
@expandPermutations @@ -222,3 +222,29 @@ lv = lvm.getLV(self.VG_NAME, self.LV_NAME) self.assertFalse(lv.active) self.assertEqual('-', lv.attr.state) + + def test_lv_initialtag(self): + """ + Create a logical volume with an initial tag. + + lvm.createLV('1ffead52-7363-4968-a8c7-3bc34504d452', + '54e3378a-b2f6-46ff-b2da-a9c82522a55e', + '1024', initialTag=blockVolume.TAG_VOL_UNINIT) + + print lvm.getLV('1ffead52-7363-4968-a8c7-3bc34504d452', + '54e3378a-b2f6-46ff-b2da-a9c82522a55e') + LV(uuid='yJngqd-2kRy-9ogk-D7Gk-v3b1-RDQm-cb1bJv', + name='54e3378a-b2f6-46ff-b2da-a9c82522a55e', + vg_name='1ffead52-7363-4968-a8c7-3bc34504d452', + attr=LV_ATTR(voltype='-', permission='w', allocations='i', + fixedminor='-', state='a', devopen='-', target='-', + zero='-'), size='1073741824', seg_start_pe='0', + devices='/dev/mapper/360014054d75cb132d474c0eae9825766(0)', + tags=('OVIRT_VOL_INITIALIZING',), writeable=True, opened=False, + active=True) + """ + with self.base_config() as lvm: + lvm.createLV(self.VG_NAME, self.LV_NAME, str(self.LV_SIZE_MB), + initialTag=blockVolume.TAG_VOL_UNINIT) + lv = lvm.getLV(self.VG_NAME, self.LV_NAME) + self.assertEqual((blockVolume.TAG_VOL_UNINIT,), lv.tags)
automation@ovirt.org has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Nir Soffer has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 4: Code-Review+2
automation@ovirt.org has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 5:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Adam Litke has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 5: Verified+1
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
tests: FakeLVM support initialTag when creating LV
Change-Id: I4da4bf5e36a9476ecf34b588a494f1839857291d Signed-off-by: Adam Litke alitke@redhat.com Reviewed-on: https://gerrit.ovirt.org/47861 Reviewed-by: Nir Soffer nsoffer@redhat.com Continuous-Integration: Jenkins CI --- M tests/storagefakelib.py M tests/storagefakelibTests.py 2 files changed, 29 insertions(+), 2 deletions(-)
Approvals: Adam Litke: Verified Nir Soffer: Looks good to me, approved Jenkins CI: Passed CI tests
automation@ovirt.org has posted comments on this change.
Change subject: tests: FakeLVM support initialTag when creating LV ......................................................................
Patch Set 6:
* Update tracker: IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
vdsm-patches@lists.fedorahosted.org