Change in vdsm[master]: storage: introducing vdsm-dump-chains script (part of vdsm-t...
nsoffer at redhat.com
nsoffer at redhat.com
Thu Apr 2 17:18:21 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: storage: introducing vdsm-dump-chains script (part of vdsm-tool)
......................................................................
Patch Set 13:
(2 comments)
https://gerrit.ovirt.org/#/c/38281/13/lib/vdsm/tool/dump_volume_chains.py
File lib/vdsm/tool/dump_volume_chains.py:
Line 207: "legality: {legality}, type: {type}"
Line 208: try:
Line 209: formatted_info = info_fmt.format(**volumes_info[child])
Line 210: except KeyError:
Line 211: formatted_info = 'no volume data found'
> well, I meant to handle KeyError assuming that all volume properties are th
Right, I did not expect missing volume info. In that case, showing "no volume data found" or "no volume info" is better.
Line 212: print(_LINE_FORMAT.format('', ' ' + formatted_info))
Line 213:
Line 214:
Line 215: def _print_volume_chains(volume_chains, volumes_info):
Line 222: if isinstance(vol_chain, ChainError):
Line 223: chain_err = vol_chain
Line 224: print(_LINE_FORMAT.format('', chain_err.desc))
Line 225: print(_LINE_FORMAT.format('', 'Volumes and children:'))
Line 226: print
> yea, that was because, stupidly enough, print() prints '()'. IMO it is bett
This is because you did not import print_function from __future__
Line 227: for parent, child in chain_err.volumes_children:
Line 228: print(_LINE_FORMAT.format('', '- %s <- %s' % (parent, child)))
Line 229: _print_vol_info(child, volumes_info)
Line 230: print
--
To view, visit https://gerrit.ovirt.org/38281
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I428c443bb7d6b2a504a6f77efcd4838f7ae6c404
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vladik Romanovsky <vladik.romanovsky at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yaniv Dary <ydary at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list