Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-25 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


Patch Set 4:

* Update Tracker::IGNORE, no bug url/s found
* Check Bug-Url::IGNORE, not relevant for branch: master
* Check Public Bug::WARN, no public bug url found
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-13 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/65308/3/tests/storagetestlib_test.py
File tests/storagetestlib_test.py:

Line 91: self.assertEquals(3, env.sd_manifest.getVersion())
Line 92: 
Line 93: def test_block_domain_version_4(self):
Line 94: with fake_env('block', sd_version=4) as env:
Line 95: self.assertEquals(4, env.sd_manifest.getVersion())
Nice!

But wouldn't it be even better if we merge to one test with permutations?

@permutations([
# env_type, sd_version
("file", 3),
("file", 4),
("block", 3),
("block", 4),
])
def test_domain_version(self, env_type, sd_version):
with fake_env(env_type, sd_version=sd_version) as env:
self.assertEquals(sd_version, env.sd_manifest.getVersion())

And we can have another test for the default.
Line 96: 
Line 97: def test_volume_structure(self):
Line 98: with fake_file_env() as env:
Line 99: img_id = make_uuid()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-13 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


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.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-13 Thread mlipchuk
Maor Lipchuk has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


Patch Set 3: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-10 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


Patch Set 2:

Looks good, now we need to add a test to make sure our testing infrastructure 
works.

I think there are existing tests for fake_env, you can enhance them with 
permutations for the sd version.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-10 Thread mlipchuk
Maor Lipchuk has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-10 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


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.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-10 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
..


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.6', 
'ovirt-4.0'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: storagetestlib: Add sdVersion param to the test API.

2016-10-10 Thread mlipchuk
Maor Lipchuk has uploaded a new change for review.

Change subject: storagetestlib: Add sdVersion param to the test API.
..

storagetestlib: Add sdVersion param to the test API.

Add a storage domain version when creating a mock for
the storage domain, so we can determine if the sd is
of version 4 or version 3.

Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Signed-off-by: Maor Lipchuk 
---
M tests/storagetestlib.py
1 file changed, 11 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/65308/1

diff --git a/tests/storagetestlib.py b/tests/storagetestlib.py
index 959a5fa..d93bb49 100644
--- a/tests/storagetestlib.py
+++ b/tests/storagetestlib.py
@@ -72,9 +72,9 @@
 
 
 @contextmanager
-def fake_file_env(obj=None):
+def fake_file_env(obj=None, sd_version=3):
 with namedTemporaryDir() as tmpdir:
-sd_manifest = make_filesd_manifest(tmpdir)
+sd_manifest = make_filesd_manifest(tmpdir, sd_version)
 fake_sdc = FakeStorageDomainCache()
 with MonkeyPatchScope([
 [sd, 'storage_repository', tmpdir],
@@ -89,7 +89,7 @@
 
 
 @contextmanager
-def fake_block_env(obj=None):
+def fake_block_env(obj=None, sd_version=3):
 with namedTemporaryDir() as tmpdir:
 lvm = FakeLVM(tmpdir)
 fake_sdc = FakeStorageDomainCache()
@@ -101,7 +101,7 @@
 (volume, 'sdCache', fake_sdc),
 (hsm, 'sdCache', fake_sdc),
 ]):
-sd_manifest = make_blocksd_manifest(tmpdir, lvm)
+sd_manifest = make_blocksd_manifest(tmpdir, lvm, sd_version)
 fake_sdc.domains[sd_manifest.sdUUID] = FakeSD(sd_manifest)
 try:
 yield FakeBlockEnv(tmpdir, sd_manifest, fake_sdc, lvm)
@@ -142,7 +142,8 @@
 return md
 
 
-def make_blocksd_manifest(tmpdir, fake_lvm, sduuid=None, devices=None):
+def make_blocksd_manifest(tmpdir, fake_lvm, sduuid=None, devices=None,
+  sd_version=3):
 if sduuid is None:
 sduuid = make_uuid()
 if devices is None:
@@ -159,7 +160,8 @@
 fake_lvm.createLV(sduuid, blockSD.MASTERLV, blockSD.MASTERLV_SIZE)
 
 # We'll store the domain metadata in the VG's tags
-metadata = make_sd_metadata(sduuid, pools=[spuuid])
+metadata = make_sd_metadata(sduuid, version=sd_version,
+pools=[spuuid])
 assert(metadata[sd.DMDK_VERSION] >= 3)  # Tag based MD is V3 and above
 tag_md = blockSD.TagBasedSDMetadata(sduuid)
 tag_md.update(metadata)
@@ -186,7 +188,7 @@
 return os.path.join(domaindir, sd.DOMAIN_META_DATA, sd.METADATA)
 
 
-def make_filesd_manifest(tmpdir):
+def make_filesd_manifest(tmpdir, sd_version=3):
 spuuid = make_uuid()
 sduuid = make_uuid()
 
@@ -194,7 +196,8 @@
 metafile = get_metafile_path(domain_path)
 make_file(metafile)
 metadata = fileSD.FileSDMetadata(metafile)
-metadata.update(make_sd_metadata(sduuid, pools=[spuuid]))
+metadata.update(make_sd_metadata(sduuid, version=sd_version,
+ pools=[spuuid]))
 
 manifest = fileSD.FileStorageDomainManifest(domain_path, metadata)
 os.makedirs(os.path.join(manifest.domaindir, sd.DOMAIN_IMAGES))


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org