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 <nsof...@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) -- To view, visit https://gerrit.ovirt.org/45845 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic285575545ccdbe449d1c6b95f5874f8e15711ce Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches