Nir Soffer has uploaded a new change for review.
Change subject: hsm: Reformat device info dict ......................................................................
hsm: Reformat device info dict
Reformat device info dict in getDeviceList using one item per line and sorted. This make it easier to search and modify the code and creates nicer diffs.
Change-Id: Ic285575545ccdbe449d1c6b95f5874f8e15711ce Signed-off-by: Nir Soffer nsoffer@redhat.com --- M vdsm/storage/hsm.py 1 file changed, 16 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/45845/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py index 1b8c064..d3405aa 100644 --- a/vdsm/storage/hsm.py +++ b/vdsm/storage/hsm.py @@ -2024,18 +2024,22 @@ pvsize = "" vguuid = ""
- devInfo = {'GUID': dev.get("guid", ""), 'pvUUID': pvuuid, - 'pvsize': str(pvsize), - 'vgUUID': vguuid, 'vendorID': dev.get("vendor", ""), - 'productID': dev.get("product", ""), - 'fwrev': dev.get("fwrev", ""), - "serial": dev.get("serial", ""), - 'capacity': dev.get("capacity", "0"), - 'devtype': dev.get("devtype", ""), - 'pathstatus': dev.get("paths", []), - 'pathlist': dev.get("connections", []), - 'logicalblocksize': dev.get("logicalblocksize", ""), - 'physicalblocksize': dev.get("physicalblocksize", "")} + devInfo = { + "serial": dev.get("serial", ""), + 'GUID': dev.get("guid", ""), + 'capacity': dev.get("capacity", "0"), + 'devtype': dev.get("devtype", ""), + 'fwrev': dev.get("fwrev", ""), + 'logicalblocksize': dev.get("logicalblocksize", ""), + 'pathlist': dev.get("connections", []), + 'pathstatus': dev.get("paths", []), + 'physicalblocksize': dev.get("physicalblocksize", ""), + 'productID': dev.get("product", ""), + 'pvUUID': pvuuid, + 'pvsize': str(pvsize), + 'vendorID': dev.get("vendor", ""), + 'vgUUID': vguuid, + } if not checkStatus: devInfo["status"] = "unknown" devices.append(devInfo)
automation@ovirt.org has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
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'])
Freddy Rolland has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/45845/1/vdsm/storage/hsm.py File vdsm/storage/hsm.py:
Line 2028: "serial": dev.get("serial", "") If it is sorted, "serial" should not be first.
Nir Soffer has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/45845/1/vdsm/storage/hsm.py File vdsm/storage/hsm.py:
Line 2024: pvsize = "" Line 2025: vguuid = "" Line 2026: Line 2027: devInfo = { Line 2028: "serial": dev.get("serial", ""),
If it is sorted, "serial" should not be first.
Thanks, will fix ( " < ' ) Line 2029: 'GUID': dev.get("guid", ""), Line 2030: 'capacity': dev.get("capacity", "0"), Line 2031: 'devtype': dev.get("devtype", ""), Line 2032: 'fwrev': dev.get("fwrev", ""),
automation@ovirt.org has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
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'])
Nir Soffer has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
Patch Set 2:
This version fixes the sorting by normalizing quoting.
Freddy Rolland has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
Patch Set 2: Code-Review+1
Adam Litke has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
Patch Set 2: Code-Review+2
gerrit-hooks has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
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-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Nir Soffer has posted comments on this change.
Change subject: hsm: Reformat device info dict ......................................................................
Patch Set 3: Verified+1
vdsm-patches@lists.fedorahosted.org