Adam Litke has uploaded a new change for review.
Change subject: FileVolumeMetadata: split getMetadata ......................................................................
FileVolumeMetadata: split getMetadata
Change-Id: I1d3fb61831de5b50a3e562b80bf38ef15ede254f Signed-off-by: Adam Litke alitke@redhat.com --- M vdsm/storage/fileVolume.py 1 file changed, 16 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/44569/1
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py index 08e3f50..74aa911 100644 --- a/vdsm/storage/fileVolume.py +++ b/vdsm/storage/fileVolume.py @@ -123,18 +123,10 @@ """ return (self.getVolumePath(),)
- def getMetadata(self, metaId=None): - """ - Get Meta data array of key,values lines - """ - if not metaId: - metaId = self.getMetadataId() - - volPath, = metaId - metaPath = self._getMetaVolumePath(volPath) - + @classmethod + def read_metadata(cls, oop, meta_path): try: - f = self.oop.directReadLines(metaPath) + f = oop.directReadLines(meta_path) out = {} for l in f: if l.startswith("EOF"): @@ -145,11 +137,22 @@ out[key.strip()] = value.strip()
except Exception as e: - self.log.error(e, exc_info=True) - raise se.VolumeMetadataReadError("%s: %s" % (metaId, e)) + cls.log.error(e, exc_info=True) + raise se.VolumeMetadataReadError("%s: %s" % (meta_path, e))
return out
+ def getMetadata(self, metaId=None): + """ + Get Meta data array of key,values lines + """ + if not metaId: + metaId = self.getMetadataId() + + volPath, = metaId + metaPath = self._getMetaVolumePath(volPath) + return self.read_metadata(self.oop, metaPath) + def getParentId(self): """ Return parent volume UUID
automation@ovirt.org has posted comments on this change.
Change subject: FileVolumeMetadata: split getMetadata ......................................................................
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: FileVolumeMetadata: split getMetadata ......................................................................
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: FileVolumeMetadata: split getMetadata ......................................................................
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: FileVolumeMetadata: split getMetadata ......................................................................
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'])
Adam Litke has abandoned this change.
Change subject: FileVolumeMetadata: split getMetadata ......................................................................
Abandoned
better version already merged.
gerrit-hooks has posted comments on this change.
Change subject: FileVolumeMetadata: split getMetadata ......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org