Adam Litke has uploaded a new change for review. Change subject: tests: Add sduuid to fake domain metadata ......................................................................
tests: Add sduuid to fake domain metadata When initializing fake storage domains we create the domain metadata. The domain ID should always be added to this metadata. Change-Id: Ife83a691e1a1ff9c657ae0fd4561a6dfa77ee787 Signed-off-by: Adam Litke <[email protected]> --- M tests/storagetestlib.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/54733/1 diff --git a/tests/storagetestlib.py b/tests/storagetestlib.py index a3568b5..8a75cca 100644 --- a/tests/storagetestlib.py +++ b/tests/storagetestlib.py @@ -35,8 +35,9 @@ yield -def make_sd_metadata(version=3, dom_class=sd.DATA_DOMAIN, pools=None): +def make_sd_metadata(sduuid, version=3, dom_class=sd.DATA_DOMAIN, pools=None): md = FakeMetadata() + md[sd.DMDK_SDUUID] = sduuid md[sd.DMDK_VERSION] = version md[sd.DMDK_CLASS] = dom_class md[sd.DMDK_POOLS] = pools if pools is not None else [str(uuid.uuid4())] @@ -49,7 +50,7 @@ if devices is None: devices = get_random_devices() if metadata is None: - metadata = make_sd_metadata() + metadata = make_sd_metadata(sduuid) fake_lvm.createVG(sduuid, devices, blockSD.STORAGE_DOMAIN_TAG, blockSD.VG_METADATASIZE) @@ -82,7 +83,7 @@ make_file(metafile) if metadata is None: metadata = fileSD.FileSDMetadata(metafile) - metadata.update(make_sd_metadata()) + metadata.update(make_sd_metadata(sduuid)) manifest = fileSD.FileStorageDomainManifest(domain_path, metadata) os.makedirs(os.path.join(manifest.domaindir, sd.DOMAIN_IMAGES)) return manifest -- To view, visit https://gerrit.ovirt.org/54733 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife83a691e1a1ff9c657ae0fd4561a6dfa77ee787 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
